Hi all,
We are using OpenShift together with our EAP operator installed by the Operator Lifecycle Manager. During our regular testing process where we install our operator on the OpenShift 4.14 we started to face an issue during the EAP operator installation related to the new pod security standards introduced in the OCP 4.14 version.
In the CatalogSource yaml there was an error:
couldn't ensure registry server - error ensuring pod: : error creating new
pod: eap-operator-: pods "eap-operator-hclxd" is forbidden: violates
PodSecurity "restricted:v1.24":
allowPrivilegeEscalation != false
(container "configmap-registry-server" must set
securityContext.allowPrivilegeEscalation=false),
unrestricted capabilities
(container "configmap-registry-server" must set
securityContext.capabilities.drop=["ALL"]),
runAsNonRoot != true
(pod or container "configmap-registry-server" must set
securityContext.runAsNonRoot=true),
seccompProfile
(pod or container "configmap-registry-server" must set
securityContext.seccompProfile.type to
"RuntimeDefault" or "Localhost")
Looking into the code of the Operator Lifecycle Manager I found a constructor for the Pod object with a
condition calling addSecurityContext method only in case grpcPoGrpcPodConfigdConfig and GrpcPodConfig.SecurityContextConfig is configured.
This implied modification of our CatalogSource configuration to include grpcPodConfig with a grpc sourceType and image:
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: eap-operator
spec:
configMap: eap-operator
displayName: EAP Operator (QE)
publisher: Red Hat
sourceType: grpc
image: registry.redhat.io/redhat/redhat-operator-index:v4.13
grpcPodConfig:
securityContextConfig: restricted
(sourceType Internal was replaced by grpc and other configuration was added)
We need to use the image attribute with the operator index which has only stable channel for the EAP package. This blocks us from testing the unreleased operator version currently.
My question is, is there a possibility for the new pod security standards and SecurityContext in particular to be available also for the Internal sourceType so that we could keep our configuraion as it is or is it technically impossible?
Thanks for any help.
Daniel