From 2403ba3aac90ce466c1c7dc423808afbfc7b4686 Mon Sep 17 00:00:00 2001 From: Yann Rosema Date: Wed, 11 Feb 2026 14:01:45 +0100 Subject: [PATCH 1/2] add support for pod security context configuration to operator helm chart --- helm/solr-operator/templates/deployment.yaml | 5 ++++- helm/solr-operator/values.yaml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/helm/solr-operator/templates/deployment.yaml b/helm/solr-operator/templates/deployment.yaml index 1c13fae4..98242913 100644 --- a/helm/solr-operator/templates/deployment.yaml +++ b/helm/solr-operator/templates/deployment.yaml @@ -133,7 +133,10 @@ spec: volumes: {{- include "solr-operator.mTLS.volumes" . | nindent 8 }} {{- end }} - + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end -}} {{- if .Values.sidecarContainers }} {{ toYaml .Values.sidecarContainers | nindent 6 }} {{- end }} diff --git a/helm/solr-operator/values.yaml b/helm/solr-operator/values.yaml index efdbe0a0..3a293e3f 100644 --- a/helm/solr-operator/values.yaml +++ b/helm/solr-operator/values.yaml @@ -84,6 +84,7 @@ securityContext: envVars: [] labels: {} annotations: {} +podSecurityContext: {} nodeSelector: {} affinity: {} tolerations: [] From 32e5dac544b63354413a4dc3daeb1bb61aa8ac80 Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Thu, 18 Jun 2026 10:52:33 -0700 Subject: [PATCH 2/2] Add changelog and docs. Fix whitespace in ending --- helm/solr-operator/Chart.yaml | 7 +++++++ helm/solr-operator/README.md | 3 ++- helm/solr-operator/templates/deployment.yaml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml index e445ad60..a95c838a 100644 --- a/helm/solr-operator/Chart.yaml +++ b/helm/solr-operator/Chart.yaml @@ -117,6 +117,13 @@ annotations: url: https://github.com/apache/solr-operator/issues/797 - name: Github PR url: https://github.com/apache/solr-operator/pull/796 + - kind: added + description: Add option for Pod SecurityContext in the Solr-Operator Helm chart + links: + - name: Github Issue + url: https://github.com/apache/solr-operator/issues/817 + - name: Github PR + url: https://github.com/apache/solr-operator/pull/818 artifacthub.io/images: | - name: solr-operator image: apache/solr-operator:v0.10.0-prerelease diff --git a/helm/solr-operator/README.md b/helm/solr-operator/README.md index 1a56ee97..50a34241 100644 --- a/helm/solr-operator/README.md +++ b/helm/solr-operator/README.md @@ -183,7 +183,8 @@ The command removes all the Kubernetes components associated with the chart and | serviceAccount.name | string | `""` | If `serviceAccount.create` is set to `false`, the name of an existing serviceAccount in the target namespace **must** be provided to run the Solr Operator with. This serviceAccount with be given the operator's RBAC rules. | | resources.limits | map[string]string | | Provide Resource limits for the Solr Operator container | | resources.requests | map[string]string | | Provide Resource requests for the Solr Operator container | -| securityContext | object | `allowPrivilegeEscalation: false, runAsNonRoot: true` | Provide security context for the Solr Operator container | +| securityContext | object | `allowPrivilegeEscalation: false, runAsNonRoot: true` | Provide a security context for the Solr Operator container | +| podSecurityContext | object | | Provide a security context for the Solr Operator pod | | labels | map[string]string | | Custom labels to add to the Solr Operator pod | | annotations | map[string]string | | Custom annotations to add to the Solr Operator pod | | nodeSelector | map[string]string | | Add a node selector for the Solr Operator pod, to specify where it can be scheduled | diff --git a/helm/solr-operator/templates/deployment.yaml b/helm/solr-operator/templates/deployment.yaml index a53ee30c..75413714 100644 --- a/helm/solr-operator/templates/deployment.yaml +++ b/helm/solr-operator/templates/deployment.yaml @@ -137,7 +137,7 @@ spec: {{- with .Values.podSecurityContext }} securityContext: {{- toYaml . | nindent 8 }} - {{- end -}} + {{- end }} {{- if .Values.sidecarContainers }} {{ toYaml .Values.sidecarContainers | nindent 6 }} {{- end }}