Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions kubernetes/cmsweb/scripts/deploy-srv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,12 @@ elif [ "$cmsweb_env" == "k8s-preprod" ] ; then
elif [ "$srv" == "crabserver" ]; then
cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e 's+crabserver/prod+crabserver/preprod+g' | sed -e "s,k8s #k8s#,$cmsweb_env,g" > $srv.yaml.new
cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e 's+crabserver/prod+crabserver/preprod+g' | sed -e "s,k8s #k8s#,$cmsweb_env,g" | kubectl apply -f -

elif [[ "$cmsweb_env" == "k8s-auth" ]] && [[ "$srv" == "dbs2go-global-r" || "$srv" == "dbs2go-global-w" || "$srv" == "dbs2go-phys03-r" || "$srv" == "dbs2go-phys03-w" || "$srv" == "dbs2go-global-m" || "$srv" == "dbs2go-phys03-m" || "$srv" == "dbs2go-global-migration" || "$srv" == "dbs2go-phys03-migration" ]] ; then
cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e 's+dbs/prod+dbs/int+g' | sed -e "s,k8s #k8s#,$cmsweb_env,g" > $srv.yaml.new
cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e 's+dbs/prod+dbs/int+g' | sed -e "s,k8s #k8s#,$cmsweb_env,g" | kubectl apply -f -
elif [[ "$srv" == "dbs-global-r" || "$srv" == "dbs-global-w" || "$srv" == "dbs-migrate" || "$srv" == "dbs-phys03-r" || "$srv" == "dbs-phys03-w" || "$srv" == "dbs2go-global-r" || "$srv" == "dbs2go-global-w" || "$srv" == "dbs2go-phys03-r" || "$srv" == "dbs2go-phys03-w" || "$srv" == "dbs2go-global-m" || "$srv" == "dbs2go-phys03-m" || "$srv" == "dbs2go-global-migration" || "$srv" == "dbs2go-phys03-migration" ]] ; then
cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e 's+dbs/prod+dbs/dev+g' | sed -e "s,k8s #k8s#,$cmsweb_env,g" > $srv.yaml.new
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todor, I second Aroosha, you should not break existing behavior. Please restore imagetag here and later add additional change for dbs instance change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I just overlooked the $cmseb_image_tag tuneup here. The removal of the above lines was simply because they relate to the old python based services, which we never plan to use any more.
I'll take care of the missing tag.

cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e 's+dbs/prod+dbs/dev+g' | sed -e "s,k8s #k8s#,$cmsweb_env,g" | kubectl apply -f -
elif [[ "$cmsweb_env" == "k8s-preprod" ]] && [[ "$srv" =~ dbs2go.* ]]; then
cat $srv.yaml | sed -e "s|/dbs/prod/|/dbs/int/|g" > $srv.yaml.new
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is a purpose of newly created $srv.yaml.new here if it is not used afterwards?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, this is a question I would also like to have an answer to. I just repeated the actions taken for all other custom cases addressed in the lines above, but never found where would that file be used in reality. I am in favor of completely dropping this line.

cat $srv.yaml | sed -e "s|/dbs/prod/|/dbs/int/|g" | kubectl apply -f -
else
cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e "s,k8s #k8s#,$cmsweb_env,g" > $srv.yaml.new
cat $srv.yaml | sed -e "s, #imagetag,$cmsweb_image_tag,g" | sed -e "s,k8s #k8s#,$cmsweb_env,g" | kubectl apply -f -
Expand Down