-
Notifications
You must be signed in to change notification settings - Fork 222
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
v23.01.1: Error: container has runAsNonRoot and image will run as root #817
Comments
Hello, attached is a diff/compare between v22.10.0 and v23.01.1 helmcharts: v23.01.1 - roles/rolebindings added before clusteroles/clusterrolebindings. Regards, temir. |
Possibly very important info: all rke2 cluster with rke2 (k8s) <1.25.x have "cis-profile: 1.6" configured. In the future, when rke2 is updated to version 1.25.x and newer, "cis-profile: 1.23" will be used. Regards, temir. |
Hi @temirg, We haven't tested Trident against RKE 2 and it seems that you are the first customer reporting an issue while using RKE 2. Please open a NetApp Support case for this issue so that additional information can be collected. This will help us to address this issue faster than if we try to just collect the information via GitHub Issues. |
Hello @gnarl, Netapp Case with prio 2 is closed today, because the bugfix wills take a while. |
Hi @temirg, I found out about the NetApp support case a bit ago. We are working on reopening the support case. |
The case has now been re-opened |
Hi @gnarl Do you need any more information about this issue. Please let me know if you do. |
Hi, We have the same issue with the Trident Operator (on k8s version 1.24). The Operator creates the deployment for the trident-controller, but it does not specify the securityContext on pod level and container level in the deployment. If an another PSP is specified in the cluster |
@mdekoster pod-security.kubernetes.io/enforce=privileged {"Conditions":[{"Type":"ResourceQuotaInit","Status":"True","Message":"","LastUpdateTime":"2022-01-28T11:03:35Z"},{"Type":"InitialRol Resource Quotas No LimitRange resource. |
@antwynne that's for the Pod Security Admission (PSA) in k8s 1.25+. We are still on 1.24 and use the (deprecated) Pod Security Policy feature. But, you still have to specify the needed securityContext in the pod specs of the deployment, daemonset or statefulset. The triden-operator does not specify the securityContext in the trident-controller deployment. |
@antwynne / @gnarl Regards, temirg. |
I just attempted the same with 23.04 and still have the same issue. RKE2 1.24.12+rke2r1, cis 1.6 Error: container has runAsNonRoot and image will run as root |
It appears that the Trident-Controller does not have a securityContext set, and is not configurable via the helm chart. Updating the deployment for the trident-controller and adding follow got it running. But as the chart/operator has no way to configure this we should probably get this bug report submitted.
|
@zlmitchell There are two deployments in total: trident-csi and trident-operator. == As a sample == |
@zlmitchell The workaround works, but: is it safe for production? |
If you are running PSA in your RKE2 cluster you will also need to add the following to the trident-operator ClusterRole
|
Hello all, the workaround with deployment edit works fine. Many thanks to all involved! Best Regards, temirg. |
This issue is also addressed with commit 6d30a16 and will be included in the Trident 23.07 release. |
Describe the bug
Upgrade of trident in Rancher UI via helmchart from 22.10.0 to 23.01.1 failed
Environment
Rancher 2.7.1, RKE2 v1.24.9+rke2r2
** yaml **
affinity: {}
deploymentAnnotations: {}
imagePullPolicy: IfNotPresent
imagePullSecrets: null
imageRegistry: registry.k8s.io/sig-storage
kubeletDir: ''
nodeSelector: {}
operatorDebug: true
operatorImage: docker.io/netapp/trident-operator:23.01.1
operatorImageTag: ''
podAnnotations: {}
tolerations: null
tridentAutosupportImage: docker.io/netapp/trident-autosupport:23.01
tridentAutosupportImageTag: '23.01'
tridentAutosupportProxy: ''
tridentDebug: false
tridentEnableNodePrep: false
tridentHttpRequestTimeout: 90s
tridentIPv6: false
tridentImage: docker.io/netapp/trident:23.01.1
tridentImageTag: ''
tridentK8sTimeout: 0
tridentLogFormat: text
tridentProbePort: ''
tridentSilenceAutosupport: false
tridentSkipK8sVersionCheck: false
windows: false
** yaml end **
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All trident pods run without errors
Additional context => Error:
Events:
Type Reason Age From Message
" ---- ------ ---- ---- -------"
Normal Scheduled 37s default-scheduler Successfully assigned trident/trident-controller-89d5d9c5f-pn7tr to worker-xxx
Normal Pulling 37s kubelet Pulling image "docker.io/netapp/trident:23.01.1"
Normal Pulled 35s kubelet Successfully pulled image "docker.io/netapp/trident:23.01.1" in 1.634133777s
Normal Pulling 35s kubelet Pulling image "docker.io/netapp/trident-autosupport:23.01"
Normal Pulling 34s kubelet Pulling image "registry.k8s.io/sig-storage/csi-provisioner:v3.4.0"
Normal Pulled 34s kubelet Successfully pulled image "docker.io/netapp/trident-autosupport:23.01" in 1.048826948s
Normal Pulling 33s kubelet Pulling image "registry.k8s.io/sig-storage/csi-attacher:v4.1.0"
Normal Pulled 33s kubelet Successfully pulled image "registry.k8s.io/sig-storage/csi-provisioner:v3.4.0" in 759.625294ms
Normal Pulled 32s kubelet Successfully pulled image "registry.k8s.io/sig-storage/csi-attacher:v4.1.0" in 881.271892ms
Normal Pulling 32s kubelet Pulling image "registry.k8s.io/sig-storage/csi-resizer:v1.7.0"
Warning Failed 32s kubelet Error: container has runAsNonRoot and image will run as root (pod: "trident-controller-89d5d9c5f-pn7tr_trident(6e9ac407-9040-4af6-ae1e-eea99b92d08e)", container: csi-attacher)
Warning Failed 31s kubelet Error: container has runAsNonRoot and image will run as root (pod: "trident-controller-89d5d9c5f-pn7tr_trident(6e9ac407-9040-4af6-ae1e-eea99b92d08e)", container: csi-resizer)
Normal Pulled 31s kubelet Successfully pulled image "registry.k8s.io/sig-storage/csi-resizer:v1.7.0" in 819.988585ms
Normal Pulling 31s kubelet Pulling image "registry.k8s.io/sig-storage/csi-snapshotter:v6.2.1"
Normal Pulled 31s kubelet Successfully pulled image "registry.k8s.io/sig-storage/csi-snapshotter:v6.2.1" in 812.559916ms
Warning Failed 31s kubelet Error: container has runAsNonRoot and image will run as root (pod: "trident-controller-89d5d9c5f-pn7tr_trident(6e9ac407-9040-4af6-ae1e-eea99b92d08e)", container: csi-snapshotter)
Warning Failed 30s (x2 over 35s) kubelet Error: container has runAsNonRoot and image will run as root (pod: "trident-controller-89d5d9c5f-pn7tr_trident(6e9ac407-9040-4af6-ae1e-eea99b92d08e)", container: trident-main)
Warning Failed 30s (x2 over 33s) kubelet Error: container has runAsNonRoot and image will run as root (pod: "trident-controller-89d5d9c5f-pn7tr_trident(6e9ac407-9040-4af6-ae1e-eea99b92d08e)", container: csi-provisioner)
Warning Failed 30s (x2 over 34s) kubelet Error: container has runAsNonRoot and image will run as root (pod: "trident-controller-89d5d9c5f-pn7tr_trident(6e9ac407-9040-4af6-ae1e-eea99b92d08e)", container: trident-autosupport)
Normal Pulled 30s kubelet Container image "docker.io/netapp/trident:23.01.1" already present on machine
Normal Pulled 30s kubelet Container image "docker.io/netapp/trident-autosupport:23.01" already present on machine
Normal Pulled 30s kubelet Container image "registry.k8s.io/sig-storage/csi-provisioner:v3.4.0" already present on machine
Normal Pulled 30s kubelet (combined from similar events): Container image "registry.k8s.io/sig-storage/csi-attacher:v4.1.0" already present on machine
The text was updated successfully, but these errors were encountered: