Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default-container annotations #47

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

michaellzc
Copy link
Member

@michaellzc michaellzc commented Feb 24, 2022

quality of life improvement

kubectl.kubernetes.io/default-container annotation should be configured in the pod template .spec.template.metadata instead of at deploy/sts level .spec.metadata

Notes

index-search.Statefulset.yaml has two containers, zoekt-webserver and zoekit-indexserver. They both sound equally important to me, so it is excluded from this PR.

Test plan

kind create cluster
helm upgrade --install -n sourcegraph --set storageClass.create=false,storageClass.name=standard,sourcegraph.localDevMode=true sourcegraph charts/sourcegraph/.

tailing logs of frontend pod should no longer complain about specifying a container

kubectl logs -l app=sourcegraph-frontend -f 
error: a container name must be specified for pod sourcegraph-frontend-8587484865-q68z2, choose one of: [frontend jaeger-agent] or one of the init containers: [migratory]

@michaellzc
Copy link
Member Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@michaellzc michaellzc changed the title Fix annotations Fix default-container annotations Feb 24, 2022
@michaellzc michaellzc marked this pull request as ready for review February 24, 2022 22:50
@michaellzc michaellzc requested a review from a team February 24, 2022 22:51
Copy link
Contributor

@caugustus-sourcegraph caugustus-sourcegraph left a comment

Choose a reason for hiding this comment

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

Fantastic - thank you for making this change! There's an open PR to resolve it for kustomize deployments but Filip is out for a few weeks so we may just need to take it over.

@@ -21,6 +21,7 @@ spec:
serviceName: indexed-search
template:
metadata:
annotations:
Copy link
Contributor

Choose a reason for hiding this comment

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

🙇

@caugustus-sourcegraph
Copy link
Contributor

caugustus-sourcegraph commented Feb 25, 2022

Side note, this problem is less irritating with kubectl v1.24 - kubernetes/kubernetes#105964

@michaellzc michaellzc merged commit def9e15 into main Feb 25, 2022
@michaellzc michaellzc deleted the 02-24-Fix_default-container_annotations branch February 25, 2022 18:17
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.

None yet

2 participants