Skip to content

Commit 2e145ab

Browse files
authored
Create Values.frontend.createRoleBinding to allow it to be disabled (#704)
### Checklist - [x] Follow the [manual testing process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md) - [ ] Update [changelog](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/CHANGELOG.md) - [ ] Update [Kubernetes update doc](https://docs.sourcegraph.com/admin/updates/kubernetes) ### Test plan Ran `helm template`, `helm lint`, and `helm unittest`, all passed <!-- As part of SOC2/GN-104 and SOC2/GN-105 requirements, all pull requests are REQUIRED to provide a "test plan". A test plan is a loose explanation of what you have done or implemented to test this, as outlined in our Testing principles and guidelines: https://docs.sourcegraph.com/dev/background-information/testing_principles Write your test plan here after the "Test plan" header. -->
1 parent 449e570 commit 2e145ab

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

charts/sourcegraph/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ In addition to the documented values, all services also support the following va
9494
| codeIntelDB.storageSize | string | `"200Gi"` | PVC Storage Request for `codeintel-db` data volume |
9595
| extraResources | list | `[]` | Additional resources to include in the rendered manifest. Templates are supported. |
9696
| frontend.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `frontend` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
97+
| frontend.createRoleBinding | bool | `true` | Disable the roleBinding resource for deployment environments blocking RBAC, ex. OpenShift's default "secure" SCC |
9798
| frontend.env | object | the chart will add some default environment values | Environment variables for the `frontend` container |
9899
| frontend.image.defaultTag | string | `"6.0.0@sha256:d4f21178096da5fdb3804099ae9de2e050b06e859a327aa79452b1ea2f3ede0a"` | Docker image tag for the `frontend` image |
99100
| frontend.image.name | string | `"frontend"` | Docker image name for the `frontend` image |

charts/sourcegraph/templates/frontend/sourcegraph-frontend.RoleBinding.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.frontend.createRoleBinding }}
12
apiVersion: rbac.authorization.k8s.io/v1
23
kind: RoleBinding
34
metadata:
@@ -21,3 +22,4 @@ subjects:
2122
- kind: ServiceAccount
2223
name: {{ include "sourcegraph.serviceAccountName" (list . "frontend") }}
2324
namespace: {{ .Release.Namespace }}
25+
{{- end }}

charts/sourcegraph/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ frontend:
326326
runAsUser: 100
327327
runAsGroup: 101
328328
readOnlyRootFilesystem: true
329+
# -- Disable the roleBinding resource for deployment environments blocking RBAC, ex. OpenShift's default "secure" SCC
330+
createRoleBinding: true
329331
# -- Security context for the `frontend` pod,
330332
# learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod)
331333
podSecurityContext: {}

0 commit comments

Comments
 (0)