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

fix: ensure OLM bundle installs fine all supported OpenShift Versions #299

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

sthaha
Copy link
Collaborator

@sthaha sthaha commented Jun 2, 2023

NOTE: this HACK removes the RuntimeDefault seccomProfile from prometheus-operator deployments (opearator and webhook) so that the bundle installs fine on all OpenShift versions >= 4.9.

Without this HACK pods fail to be created with the following status error ...

status:
  conditions:
    message: '
      pods "obo-prometheus-operator-5864dd8b49-xjs55" is forbidden:
      unable to validate against any security context constraint: [pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod:
      Forbidden: seccomp may not be set pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/prometheus-operator:
      Forbidden: seccomp may not be set provider "anyuid":
      Forbidden: not usable by user or serviceaccount pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod:
      Forbidden: seccomp may not be set spec.containers[0].securityContext.runAsUser:
	Invalid value: 65534: must be in the ranges: [1000410000, 1000419999] pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/prometheus-operator:
      Forbidden: seccomp may not be set provider "hostmount-anyuid":
      Forbidden: not usable by user or serviceaccount provider "machine-api-termination-handler":
      Forbidden: not usable by user or serviceaccount provider "hostnetwork":
      Forbidden: not usable by user or serviceaccount provider "hostaccess":
      Forbidden: not usable by user or serviceaccount provider "node-exporter":
      Forbidden: not usable by user or serviceaccount provider "privileged":
      Forbidden: not usable by user or serviceaccount]'
    reason: FailedCreate
    status: "True"
    type: ReplicaFailure

Ref: https://issues.redhat.com/browse/MON-3225

@sthaha sthaha requested a review from a team as a code owner June 2, 2023 04:29
@sthaha sthaha requested review from jan--f and JoaoBraveCoding June 2, 2023 04:29
NOTE: this HACK removes the RuntimeDefault seccomProfile from
prometheus-operator deployments (opearator and webhook) so that the
bundle installs fine on all OpenShift versions >= 4.9.

Without this HACK pods fail to be created with the following status
error ...

---
status:
  conditions:
    message: '
      pods "obo-prometheus-operator-5864dd8b49-xjs55" is forbidden:
      unable to validate against any security context constraint:
      [pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod:
      Forbidden: seccomp may not be set
      pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/prometheus-operator:
      Forbidden: seccomp may not be set provider "anyuid":
      Forbidden: not usable by user or serviceaccount
      pod.metadata.annotations.seccomp.security.alpha.kubernetes.io/pod:
      Forbidden: seccomp may not be set
	spec.containers[0].securityContext.runAsUser: Invalid value: 65534:
	must be in the ranges: [1000410000, 1000419999]
	pod.metadata.annotations.container.seccomp.security.alpha.kubernetes.io/prometheus-operator:
      Forbidden: seccomp may not be set provider "hostmount-anyuid":
      Forbidden: not usable by user or serviceaccount provider
	"machine-api-termination-handler":
      Forbidden: not usable by user or serviceaccount provider "hostnetwork":
      Forbidden: not usable by user or serviceaccount provider "hostaccess":
      Forbidden: not usable by user or serviceaccount provider "node-exporter":
      Forbidden: not usable by user or serviceaccount provider "privileged":
      Forbidden: not usable by user or serviceaccount]'
    reason: FailedCreate
    status: "True"
    type: ReplicaFailure
---

Ref: https://issues.redhat.com/browse/MON-3225

Signed-off-by: Sunil Thaha <sthaha@redhat.com>
@sthaha sthaha force-pushed the fix-webhook-4.10 branch from 8763517 to 0023cdf Compare June 2, 2023 04:31
@sthaha sthaha changed the title fix: Ensure OLM bundle installs fine all supported OpenShift Versions fix: ensure OLM bundle installs fine all supported OpenShift Versions Jun 2, 2023
@sthaha sthaha merged commit e33f901 into rhobs:main Jun 4, 2023
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