-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support custom service account name (#52)
This PR enables users to override service account for all deployed resources ## Test plan ### Initial deployment ```sh kind create cluster ``` `override.yaml` ```yml storageClass: create: false # Disable if you have your own existing storage class name: standard sourcegraph: localDevMode: true ``` ```sh helm upgrade --install -n sourcegraph -f charts/sourcegraph/override.yaml sourcegraph charts/sourcegraph/ ``` ### Enable SA Updated `override.yaml` ```yml storageClass: create: false # Disable if you have your own existing storage class name: standard sourcegraph: localDevMode: true codeInsightsDB: serviceAccount: create: true codeIntelDB: serviceAccount: create: true githubProxy: serviceAccount: create: true gitserver: serviceAccount: create: true indexedSearch: serviceAccount: create: true minio: serviceAccount: create: true pgsql: serviceAccount: create: true preciseCodeIntel: serviceAccount: create: true redisCache: serviceAccount: create: true redisStore: serviceAccount: create: true repoUpdater: serviceAccount: create: true searcher: serviceAccount: create: true symbols: serviceAccount: create: true syntectServer: serviceAccount: create: true tracing: serviceAccount: create: true worker: serviceAccount: create: true ``` ```sh helm diff -n sourcegraph -f charts/sourcegraph/override.yaml sourcegraph charts/sourcegraph/ ``` - Verify rendered manifest is expected - Verify sourcegraph server still works fix https://github.com/sourcegraph/sourcegraph/issues/31889
- Loading branch information
1 parent
8da42c5
commit fac583b
Showing
39 changed files
with
312 additions
and
9 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/codeinsights-db/codeinsights-db.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.codeInsightsDB.enabled .Values.codeInsightsDB.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: codeinsights-db | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "codeInsightsDB") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/codeintel-db/codeintel-db.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.codeIntelDB.enabled .Values.codeIntelDB.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: codeintel-db | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "codeIntelDB") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/github-proxy/github-proxy.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.githubProxy.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: github-proxy | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "githubProxy") }} | ||
{{- end }} |
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/gitserver/gitserver.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.gitserver.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: gitserver | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "gitserver") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/indexed-search/indexed-search.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.indexedSearch.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: indexed-search | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "indexedSearch") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/jaeger/jaeger.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.tracing.enabled .Values.tracing.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: tracing | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "tracing") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/minio/minio.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.minio.enabled .Values.minio.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: minio | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "minio") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/pgsql/pgsql.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.pgsql.enabled .Values.pgsql.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: pgsql | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "pgsql") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/precise-code-intel/worker.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.preciseCodeIntel.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: precise-code-intel | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "preciseCodeIntel") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/redis/redis-cache.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.redisCache.enabled .Values.redisCache.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: redis | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "redisCache") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/redis/redis-store.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if and .Values.redisStore.enabled .Values.redisStore.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: redis | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "redisStore") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/repo-updater/repo-updater.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.repoUpdater.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: repo-updater | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "repoUpdater") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/searcher/searcher.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.searcher.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: searcher | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "searcher") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/symbols/symbols.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.symbols.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: symbols | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "symbols") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/syntect-server/syntect-server.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.syntectServer.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: syntect-server | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "syntectServer") }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
charts/sourcegraph/templates/worker/worker.ServiceAccount.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{- if .Values.worker.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
category: rbac | ||
deploy: sourcegraph | ||
app.kubernetes.io/component: worker | ||
name: {{ include "sourcegraph.serviceAccountName" (list . "worker") }} | ||
{{- end }} |
Oops, something went wrong.