You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2022/01/19 15:44:08 UTC

[solr-operator] branch main updated: Move runAsNonRoot to container securityContext in Operator chart. (#395)

This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new a6a7fc9  Move runAsNonRoot to container securityContext in Operator chart. (#395)
a6a7fc9 is described below

commit a6a7fc9bb9699561fe916ee41df3e8073c76a372
Author: Houston Putman <ho...@apache.org>
AuthorDate: Wed Jan 19 10:43:13 2022 -0500

    Move runAsNonRoot to container securityContext in Operator chart. (#395)
---
 config/manager/manager.yaml                  | 3 +--
 helm/solr-operator/Chart.yaml                | 7 +++++++
 helm/solr-operator/templates/deployment.yaml | 3 +--
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml
index 5cfc3b9..3e85306 100644
--- a/config/manager/manager.yaml
+++ b/config/manager/manager.yaml
@@ -37,8 +37,6 @@ spec:
       labels:
         control-plane: solr-operator
     spec:
-      securityContext:
-        runAsNonRoot: true
       containers:
       - args:
         - --leader-elect
@@ -47,6 +45,7 @@ spec:
         name: solr-operator
         securityContext:
           allowPrivilegeEscalation: false
+          runAsNonRoot: true
         livenessProbe:
           httpGet:
             path: /healthz
diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index 4a96c67..8b87f31 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -61,6 +61,13 @@ annotations:
           url: https://github.com/apache/solr-operator/issues/387
         - name: Github PR
           url: https://github.com/apache/solr-operator/pull/388
+    - kind: fixed
+      description: Solr Operator helm chart now sets runAsNonRoot only on the solr operator container. Sidecars can run as root.
+      links:
+        - name: Github Issue
+          url: https://github.com/apache/solr-operator/issues/389
+        - name: Github PR
+          url: https://github.com/apache/solr-operator/pull/395
   artifacthub.io/images: |
     - name: solr-operator
       image: apache/solr-operator:v0.6.0-prerelease
diff --git a/helm/solr-operator/templates/deployment.yaml b/helm/solr-operator/templates/deployment.yaml
index 777d62b..5df86ee 100644
--- a/helm/solr-operator/templates/deployment.yaml
+++ b/helm/solr-operator/templates/deployment.yaml
@@ -37,8 +37,6 @@ spec:
         {{ toYaml .Values.labels | nindent 8 }}
         {{- end }}
     spec:
-      securityContext:
-        runAsNonRoot: true
       serviceAccountName: {{ include "solr-operator.serviceAccountName" . }}
       {{- if .Values.priorityClassName }}
       priorityClassName: {{ .Values.priorityClassName }}
@@ -92,6 +90,7 @@ spec:
 
         securityContext:
           allowPrivilegeEscalation: false
+          runAsNonRoot: true
         livenessProbe:
           httpGet:
             path: /healthz