Skip to content

Quick and dirty fix for addressing DBS preprod endpoint discrepancy#1581

Open
todor-ivanov wants to merge 1 commit intodmwm:masterfrom
todor-ivanov:fixDBSPreprodDeployment
Open

Quick and dirty fix for addressing DBS preprod endpoint discrepancy#1581
todor-ivanov wants to merge 1 commit intodmwm:masterfrom
todor-ivanov:fixDBSPreprodDeployment

Conversation

@todor-ivanov
Copy link
Copy Markdown
Contributor

@todor-ivanov todor-ivanov commented Mar 13, 2025

With this PR we partially address one of the issues mentioned in this DBS related ticket: dmwm/dbs2go#119

which should avoid the need for creation of a preprod branch in the CMSKubernetes repository

FYI @arooshap

@todor-ivanov todor-ivanov requested a review from arooshap March 13, 2025 10:41
Copy link
Copy Markdown
Member

@arooshap arooshap left a comment

Choose a reason for hiding this comment

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

Hi @todor-ivanov, the usage of image tag is crucial to ensure the correct working of the script.

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" > $srv.yaml.new
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants