Skip to content

extract initContainers into kustomization #537

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

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

uwedeportivo
Copy link
Contributor

@uwedeportivo uwedeportivo commented Feb 28, 2020

This extracts the initContainers into a kustomization, so once the migration is done through

cd overlays/migrate-to-nonroot
kubectl apply -k .

the initContainers don't pollute the base anymore.

I prefer this over having the initContainers inside base always getting executed (with no clear timeline when to remove them). This way we document that once this is committed they have to migrate once and then they can run normal and ignore this overlay.

And new installations can ignore this altogether.

What do you guys think ?

I'm also thinking of removing the custom ClusterRoles and using built in ones.
Then the only remaining items are some configmap alterations.

Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

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

This is a very nice use of Kustomization! I wonder how many of our old instructions in docs/migrate.md could of benefitted from this.

@uwedeportivo uwedeportivo merged commit 0663bc5 into no_root_user Feb 28, 2020
@uwedeportivo uwedeportivo deleted the no_root_user_kustomize branch February 28, 2020 21:27
uwedeportivo added a commit that referenced this pull request Feb 29, 2020
)

* switch away from user 0 (root) and delete unnecessary cluster role binding

* pgsql data dir tweak

* avoid chown when already correct

* extract initContainers into kustomization (#537)

* migrate doc

* buildkite checks accommodate kustomize

* kubectl version is not working

* asas !!!!!

* migrate doc specifies kubectl version
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