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

Latest commit to helm template server-statefulsets.yaml breaks installation on docker for desktop installs #91

Closed
rodfrancisco opened this issue Oct 21, 2019 · 6 comments · Fixed by #93
Assignees
Labels
bug Something isn't working

Comments

@rodfrancisco
Copy link

We use the helm templates for vault to do local k8s testing of vault using docker-for-desktop. Commit change b41d36c introduced a change to server-statefulsets.yaml that causes it to fail installs on docker-for-desktop k8s cluster. Specifically we get the following error:

error: error validating “STDIN”: error validating data: ValidationError(StatefulSet.spec.template.spec.securityContext): unknown field “readOnlyRootFilesystem” in io.k8s.api.core.v1.PodSecurityContext

This is using Docker Desktop: v2.1.0.4 running kubernetes v1.14.7

Removing the line introduced here: b41d36c?diff=split#diff-60ca1594dfcfe4f0d22db67a9583d9feR44 fixes the issue.

To reproduce:

  1. Install docker for desktop + Kubernetes (plus kubectl tools)
  2. Install Helm
  3. Get latest vault-helm templates
  4. Run helm template vault-helm --name vault | kubectl apply -f - on the docker-desktop cluster
@rodfrancisco rodfrancisco changed the title Latest commit to helm template server-statefulsets.yaml breaks installation on docket for desktop Latest commit to helm template server-statefulsets.yaml breaks installation on docker for desktop installs Oct 21, 2019
@rodfrancisco
Copy link
Author

@jasonodonnell

@jasonodonnell
Copy link
Contributor

Hi @rodfrancisco, thanks for bringing this to my attention.

I can make this configurable to support your use case. Would this help?

@jasonodonnell jasonodonnell added the bug Something isn't working label Oct 21, 2019
@jasonodonnell jasonodonnell self-assigned this Oct 21, 2019
@rodfrancisco
Copy link
Author

@jasonodonnell That works. Thanks for the quick turnaround.

@jemc
Copy link

jemc commented Nov 12, 2019

Why was this made to be configurable instead of removed altogether?

This is flat-out invalid Kubernetes config, so even if you want to turn it on, it won't work. As indicated in the error message, PodSecurityContext does not have this readOnlyRootFilesystem field at all. You can confirm this by checking the Kubernetes API docs for it

@jasonodonnell - did you ever do a successful deployment with the field present?

@jasonodonnell
Copy link
Contributor

Hi @jemc ,

I've just deployed it successfully to multiple Kubernetes clusters without error. I'm wondering if Kube isn't validating the object and just disregarding it.

I'll look into removing this and trying to understand why it's not showing up on my end or in the test clusters. Thanks

@malnick
Copy link
Contributor

malnick commented Nov 13, 2019

@jemc @jasonodonnell Looking at the docs link it looks like this setting belongs in the container security context this line

, not the global line we already removed it from.

PodSecurityPolicySpec v1beta1 policy (so unfortunate that we can't link to settings on this docs page) defines it under the container spec. So if we add it there, it should be picked up. I do think we should make it configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants