open-vsx.org icon indicating copy to clipboard operation
open-vsx.org copied to clipboard

Added component label to some resources to disambiguate selectors

Open mbarbero opened this issue 3 years ago • 4 comments

We are using the same labels set for both the server deployment and the elasticsearch statefulset. Kubectl CLI is confuses the matching pods when doing requests on deployments or statefulset as it probably uses the selector to find matching pods:

$ oc logs -n open-vsx-org deploy/open-vsx-org-production --tail=1
Found 7 pods, using pod/elasticsearch-production-es-default-2

This may also cause confuse the cluster, even though I have no proof of that.

This cannot be deployed as is as the labels of pod templates in deployments and statefulsets cannot be updated once created. I'll provide the steps shortly

mbarbero avatar Oct 13 '22 16:10 mbarbero

The only way to deploy this change is to delete the old previous resources. Below the instruction for staging, needs to be replicated for prod. Note that this will introduce downtime:

  1. delete the elasticsearch cluster and the open-vsx deployment
$ oc delete -n open-vsx elasticsearch/elasticsearch-staging deployment/open-vsx-org-staging
  1. run a deployment job from laptop
./gen-deployment.sh staging <image> | kubectl apply -f -
  1. verify and profit.

mbarbero avatar Oct 13 '22 17:10 mbarbero

@mbarbero What's next with this one?

kineticsquid avatar Jan 12 '23 19:01 kineticsquid

It's up to the ops team to decide when then want to to that.

mbarbero avatar Jan 16 '23 13:01 mbarbero

@amvanbaren Thoughts?

kineticsquid avatar Jan 16 '23 17:01 kineticsquid