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

feat(openshift): add projected volumes to SecurityContextConstraints #2443

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

kkujawa-sumo
Copy link
Contributor

without this change Prometheus Pod was not created on OpenShift 4.10
in side by side deployment of k8s collection

I observed following error:

  Warning  FailedCreate  5m44s (x6 over 5m44s)       statefulset-controller  create Pod prometheus-collection-kube-prometheus-prometheus-0 in StatefulSet prometheus-collection-kube-prometheus-prometheus failed error: pods "prometheus-collection-kube-prometheus-prometheus-0" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, provider restricted: .spec.securityContext.fsGroup: Invalid value: []int64{2000}: 2000 is not an allowed group, spec.initContainers[0].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1000429999], spec.containers[0].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1000429999], spec.containers[1].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1000429999], spec.containers[2].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1000429999], provider "nonroot": Forbidden: not usable by user or serviceaccount, 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]  Warning  FailedCreate  <invalid> (x14 over 5m44s)  statefulset-controller  create Pod prometheus-collection-kube-prometheus-prometheus-0 in StatefulSet prometheus-collection-kube-prometheus-prometheus failed error: pods "prometheus-collection-kube-prometheus-prometheus-0" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, provider restricted: .spec.securityContext.fsGroup: Invalid value: []int64{2000}: 2000 is not an allowed group, spec.initContainers[0].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1000429999], spec.containers[0].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1000429999], spec.containers[1].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1000429999], spec.containers[2].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000420000, 1/Users/kkujawa/git/sumologic-kubernetes-collection-helm-operator/openshift4_10/statefulset.yaml000429999], provider "nonroot": Forbidden: not usable by user or serviceaccount, 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, spec.volumes[1]: Invalid value: "projected": projected volumes are not allowed to be used, provider "node-exporter": Forbidden: not usable by user or serviceaccount, provider "privileged": Forbidden: not usable by user or serviceaccount]

@kkujawa-sumo kkujawa-sumo requested a review from a team as a code owner July 21, 2022 14:14
@github-actions github-actions bot added the documentation documentation label Jul 21, 2022
without this change Prometheus Pod was not created on OpenShift 4.10
in side by side deployment of k8s collection
@kkujawa-sumo kkujawa-sumo force-pushed the kk-add-projected-volume-to-scc branch from 1a8b215 to 3e8a28d Compare July 21, 2022 14:16
@kkujawa-sumo kkujawa-sumo merged commit 0f10872 into main Jul 22, 2022
@kkujawa-sumo kkujawa-sumo deleted the kk-add-projected-volume-to-scc branch July 22, 2022 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants