Skip to content

Commit 01e4bf3

Browse files
authored
Add support for pod securityContext configuration to operator helm chart (#818)
1 parent 08e405a commit 01e4bf3

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

helm/solr-operator/Chart.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ annotations:
117117
url: https://github.com/apache/solr-operator/issues/797
118118
- name: Github PR
119119
url: https://github.com/apache/solr-operator/pull/796
120+
- kind: added
121+
description: Add option for Pod SecurityContext in the Solr-Operator Helm chart
122+
links:
123+
- name: Github Issue
124+
url: https://github.com/apache/solr-operator/issues/817
125+
- name: Github PR
126+
url: https://github.com/apache/solr-operator/pull/818
120127
artifacthub.io/images: |
121128
- name: solr-operator
122129
image: apache/solr-operator:v0.10.0-prerelease

helm/solr-operator/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ The command removes all the Kubernetes components associated with the chart and
183183
| 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. |
184184
| resources.limits | map[string]string | | Provide Resource limits for the Solr Operator container |
185185
| resources.requests | map[string]string | | Provide Resource requests for the Solr Operator container |
186-
| securityContext | object | `allowPrivilegeEscalation: false, runAsNonRoot: true` | Provide security context for the Solr Operator container |
186+
| securityContext | object | `allowPrivilegeEscalation: false, runAsNonRoot: true` | Provide a security context for the Solr Operator container |
187+
| podSecurityContext | object | | Provide a security context for the Solr Operator pod |
187188
| labels | map[string]string | | Custom labels to add to the Solr Operator pod |
188189
| annotations | map[string]string | | Custom annotations to add to the Solr Operator pod |
189190
| nodeSelector | map[string]string | | Add a node selector for the Solr Operator pod, to specify where it can be scheduled |

helm/solr-operator/templates/deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ spec:
134134
volumes:
135135
{{- include "solr-operator.mTLS.volumes" . | nindent 8 }}
136136
{{- end }}
137-
137+
{{- with .Values.podSecurityContext }}
138+
securityContext:
139+
{{- toYaml . | nindent 8 }}
140+
{{- end }}
138141
{{- if .Values.sidecarContainers }}
139142
{{ toYaml .Values.sidecarContainers | nindent 6 }}
140143
{{- end }}

helm/solr-operator/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ securityContext:
8484
envVars: []
8585
labels: {}
8686
annotations: {}
87+
podSecurityContext: {}
8788
nodeSelector: {}
8889
affinity: {}
8990
tolerations: []

0 commit comments

Comments
 (0)