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

Docs: Use docker.io/bash for sleep container of max-map-count-setter Daemonset #7332

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

florianmutter
Copy link
Contributor

On GKE Autopilot the Daemonset only works if a docker.io/bash image is used for the sleep container. For other images trying to apply this gives the follwing error message:

Error from server (GKE Warden constraints violations): error when creating "daemonset.yaml": admission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: {"[denied by autogke-disallow-privilege]":["container max-map-count-setter is privileged; not allowed in Autopilot"]}

I could not find official documentation from Google on this but I tested myself and it only works this way.

…onset

On GKE Autopilot the Daemonset only works if a `docker.io/bash` image is used for the sleep container. For other images trying to apply this gives the follwing error message:

```
Error from server (GKE Warden constraints violations): error when creating "daemonset.yaml": admission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: {"[denied by autogke-disallow-privilege]":["container max-map-count-setter is privileged; not allowed in Autopilot"]}
```
@botelastic botelastic bot added the triage label Nov 22, 2023
@florianmutter florianmutter changed the title Use docker.io/bash for sleep container of max-map-count-setter Daemonset Docs: Use docker.io/bash for sleep container of max-map-count-setter Daemonset Nov 22, 2023
@pebrc pebrc added the >docs Documentation label Nov 24, 2023
@botelastic botelastic bot removed the triage label Nov 24, 2023
@pebrc
Copy link
Collaborator

pebrc commented Nov 24, 2023

buildkite test this please

@florianmutter good catch it seems this was accidentally changed in the documentation in #6700

@pebrc
Copy link
Collaborator

pebrc commented Nov 24, 2023

@elasticmachine, run elasticsearch-ci/docs

pebrc
pebrc previously approved these changes Nov 24, 2023
@pebrc pebrc dismissed their stale review November 24, 2023 13:41

missed something

@@ -92,7 +92,8 @@ spec:
command: ['/usr/local/bin/bash', '-e', '-c', 'echo 262144 > /proc/sys/vm/max_map_count']
containers:
- name: sleep
image: gcr.io/google-containers/pause-amd64:3.2
image: docker.io/bash:5.2.21
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use the same version as in the init container?

Copy link
Contributor Author

@florianmutter florianmutter Nov 24, 2023

Choose a reason for hiding this comment

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

👍 fixed. updated the init container to the latest bash image version as well

@pebrc pebrc enabled auto-merge (squash) November 24, 2023 13:45
@pebrc
Copy link
Collaborator

pebrc commented Nov 24, 2023

Thank you @florianmutter for the contribution!

@thbkrkr
Copy link
Contributor

thbkrkr commented Nov 24, 2023

buildkite test this

@thbkrkr
Copy link
Contributor

thbkrkr commented Nov 24, 2023

@elasticmachine run elasticsearch-ci/docs

@pebrc pebrc merged commit e522406 into elastic:main Nov 24, 2023
5 checks passed
@florianmutter florianmutter deleted the patch-1 branch November 27, 2023 06:18
robbavey pushed a commit to robbavey/cloud-on-k8s that referenced this pull request Dec 20, 2023
…r Daemonset (elastic#7332)

* Use `docker.io/bash` for sleep container of max-map-count-setter Daemonset

On GKE Autopilot the Daemonset only works if a `docker.io/bash` image is used for the sleep container. For other images trying to apply this gives the follwing error message:

```
Error from server (GKE Warden constraints violations): error when creating "daemonset.yaml": admission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request: GKE Warden rejected the request because it violates one or more constraints.
Violations details: {"[denied by autogke-disallow-privilege]":["container max-map-count-setter is privileged; not allowed in Autopilot"]}
```

* Use latest docker.io/bash image for initContainer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs Documentation v2.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants