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

feat: add webhook support for init containers #162

Merged
merged 1 commit into from
Aug 31, 2021
Merged

feat: add webhook support for init containers #162

merged 1 commit into from
Aug 31, 2021

Conversation

chewong
Copy link
Contributor

@chewong chewong commented Aug 27, 2021

Signed-off-by: Ernest Wong chuwon@microsoft.com

Reason for Change:

Add webhook support for init containers.

Requirements

  • squashed commits
  • included documentation
  • added unit tests and e2e tests (if applicable).

Issue Fixed:

Fixes #149.

Please answer the following questions with yes/no:

Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

  • yes
  • no

Notes for Reviewers:

@chewong chewong requested a review from aramase as a code owner August 27, 2021 20:37
Signed-off-by: Ernest Wong <chuwon@microsoft.com>
@chewong chewong enabled auto-merge (squash) August 30, 2021 16:33
// add the volume mount if not exists
pod.Spec.Containers[i] = addProjectedTokenVolumeMount(pod.Spec.Containers[i])
}
pod.Spec.InitContainers = m.mutateContainers(pod.Spec.InitContainers, clientID, tenantID, skipContainers)
Copy link
Member

Choose a reason for hiding this comment

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

I think an interesting corner case is if the init container has the same name as a non-init container (which we should check if possible). If it's allowed, then skipping just the init/non-init container isn't an option. I don't think we need to support it but we should document using different name for init containers if Kubernetes allows using the same name.

@chewong chewong merged commit cde4de7 into Azure:main Aug 31, 2021
@aramase aramase deleted the fix-149 branch August 31, 2021 17:33
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.

Add support for init containers
2 participants