diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 73fad2a67..cecfba698 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -11,15 +11,17 @@ spec: containers: - name: kube-rbac-proxy securityContext: + readOnlyRootFilesystem: true allowPrivilegeEscalation: false + runAsUser: 10999 + runAsGroup: 10999 capabilities: drop: - "ALL" - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.16.0 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" - - "--logtostderr=true" - "--v=0" ports: - containerPort: 8443 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index ab0520063..fe6014d3b 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -36,35 +36,11 @@ spec: labels: control-plane: controller-manager spec: - # TODO(user): Uncomment the following code to configure the nodeAffinity expression - # according to the platforms which are supported by your solution. - # It is considered best practice to support multiple architectures. You can - # build your manager image using the makefile target docker-buildx. - # affinity: - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchExpressions: - # - key: kubernetes.io/arch - # operator: In - # values: - # - amd64 - # - arm64 - # - ppc64le - # - s390x - # - key: kubernetes.io/os - # operator: In - # values: - # - linux securityContext: + fsGroup: 2000 runAsNonRoot: true - # TODO(user): For common cases that do not require escalating privileges - # it is recommended to ensure that all your Pods/Containers are restrictive. - # More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted - # Please uncomment the following code if your project does NOT have to work on old Kubernetes - # versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ). - # seccompProfile: - # type: RuntimeDefault + seccompProfile: + type: RuntimeDefault containers: - command: - /manager @@ -81,7 +57,10 @@ spec: value: v4beta name: manager securityContext: + readOnlyRootFilesystem: true allowPrivilegeEscalation: false + runAsUser: 10999 + runAsGroup: 10999 capabilities: drop: - "ALL"