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

use init container for CNI setup #727

Closed
wants to merge 1 commit into from

Conversation

jaypipes
Copy link
Contributor

@jaypipes jaypipes commented Nov 17, 2019

Instead of using a shell script as the entrypoint for the CNI image and
relying on that shell script to copy the CNI plugin binary to a host
volume, perform those steps using an initContainer and set the CNI
aws-k8s-agent binary to be the CNI image's CMD.

This has the benefit of not embedding setup steps in either a shell
script that needs to be copied into the target image /app directory nor
hard-coded into the aws-k8s-agent's main.go file (which was performing
the copy of the CNI plugin binary to a host volume).

See discussion in
#706 (comment)
for more details.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Instead of using a shell script as the entrypoint for the CNI image and
relying on that shell script to copy the CNI plugin binary to a host
volume, perform those steps using an initContainer and set the CNI
aws-k8s-agent binary to be the CNI image's CMD.

This has the benefit of not embedding setup steps in either a shell
script that needs to be copied into the target image /app directory nor
hard-coded into the aws-k8s-agent's main.go file (which was performing
the copy of the CNI plugin binary to a host volume).

See discussion in
aws#706 (comment)
for more details.
@mogren
Copy link
Contributor

mogren commented Nov 22, 2019

I like the idea of having an init container, but I would also like to have the config file copied only once ipamd is up and running, so that we know there are at least a few IPs available in the subnet where the node is launched.

@jaypipes
Copy link
Contributor Author

Will need to reevaluate this one. Closing and going with a different approach.

@jaypipes jaypipes closed this Nov 26, 2019
@jaypipes
Copy link
Contributor Author

#735 contains my new approach...

@jaypipes jaypipes deleted the rework-build-and-init branch January 29, 2020 15:58
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.

2 participants