Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions charts/sourcegraph/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ spec:
volumeMounts:
- name: blobstore-data
mountPath: /data
{{- if .Values.blobstore.storageSubPath }}
subPath: {{ .Values.blobstore.storageSubPath }}
{{- end }}
- name: blobstore
mountPath: /blobstore
{{- if .Values.blobstore.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
deploy: sourcegraph
app.kubernetes.io/component: blobstore
{{- if .Values.blobstore.storageAnnotations }}
annotations:
{{- toYaml .Values.blobstore.storageAnnotations | nindent 4 }}
{{- end }}
name: blobstore
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
app.kubernetes.io/component: codeinsights-db
deploy: sourcegraph
{{- if .Values.codeInsightsDB.storageAnnotations }}
annotations:
{{- toYaml .Values.codeInsightsDB.storageAnnotations | nindent 4 }}
{{- end }}
name: codeinsights-db
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ spec:
volumeMounts:
- mountPath: /var/lib/postgresql/data/
name: disk
{{- if .Values.codeInsightsDB.storageSubPath }}
subPath: {{ .Values.codeInsightsDB.storageSubPath }}
{{- end }}
securityContext:
{{- toYaml .Values.codeInsightsDB.init.containerSecurityContext | nindent 10 }}
{{- if not .Values.sourcegraph.localDevMode }}
Expand Down Expand Up @@ -90,6 +93,9 @@ spec:
volumeMounts:
- mountPath: /var/lib/postgresql/data/
name: disk
{{- if .Values.codeInsightsDB.storageSubPath }}
subPath: {{ .Values.codeInsightsDB.storageSubPath }}
{{- end }}
- mountPath: /conf
name: codeinsights-conf
- mountPath: /var/run/postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
app.kubernetes.io/component: codeintel-db
deploy: sourcegraph
{{- if .Values.codeIntelDB.storageAnnotations }}
annotations:
{{- toYaml .Values.codeIntelDB.storageAnnotations | nindent 4 }}
{{- end }}
name: {{ default "codeintel-db" .Values.codeIntelDB.name }}
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ spec:
volumeMounts:
- mountPath: /data
name: disk
{{- if .Values.codeIntelDB.storageSubPath }}
subPath: {{ .Values.codeIntelDB.storageSubPath }}
{{- end }}
securityContext:
{{- toYaml .Values.alpine.containerSecurityContext | nindent 10 }}
{{- if not .Values.sourcegraph.localDevMode }}
Expand Down Expand Up @@ -101,6 +104,9 @@ spec:
volumeMounts:
- mountPath: /data
name: disk
{{- if .Values.codeIntelDB.storageSubPath }}
subPath: {{ .Values.codeIntelDB.storageSubPath }}
{{- end }}
- mountPath: /conf
name: pgsql-conf
- mountPath: /var/run/postgresql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ spec:
name: tmpdir
- mountPath: /data/repos
name: repos
{{- if .Values.gitserver.storageSubPath }}
subPath: {{ .Values.gitserver.storageSubPath }}
{{- end }}
{{- if .Values.gitserver.sshSecret }}
- mountPath: /home/sourcegraph/.ssh
name: ssh
Expand Down Expand Up @@ -124,6 +127,10 @@ spec:
volumeClaimTemplates:
- metadata:
name: repos
{{- if .Values.gitserver.storageAnnotations }}
annotations:
{{- toYaml .Values.gitserver.storageAnnotations | nindent 8 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
7 changes: 7 additions & 0 deletions charts/sourcegraph/templates/grafana/grafana.StatefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ spec:
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-data
{{- if .Values.grafana.storageSubPath }}
subPath: {{ .Values.grafana.storageSubPath }}
{{- end }}
- mountPath: /sg_config_grafana/provisioning/datasources
name: config
# Grafana is relied upon to send alerts to site admins when something is wrong with
Expand Down Expand Up @@ -105,6 +108,10 @@ spec:
volumeClaimTemplates:
- metadata:
name: grafana-data
{{- if .Values.grafana.storageAnnotations }}
annotations:
{{- toYaml .Values.grafana.storageAnnotations | nindent 8 }}
{{- end }}
spec:
accessModes: [ "ReadWriteOnce"]
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ spec:
volumeMounts:
- mountPath: /data
name: data
{{- if .Values.indexedSearch.storageSubPath }}
subPath: {{ .Values.indexedSearch.storageSubPath }}
{{- end }}
{{- if .Values.indexedSearch.extraVolumeMounts }}
{{- toYaml .Values.indexedSearch.extraVolumeMounts | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -118,6 +121,9 @@ spec:
volumeMounts:
- mountPath: /data
name: data
{{- if .Values.indexedSearch.storageSubPath }}
subPath: {{ .Values.indexedSearch.storageSubPath }}
{{- end }}
{{- if .Values.indexedSearchIndexer.extraVolumeMounts }}
{{- toYaml .Values.indexedSearchIndexer.extraVolumeMounts | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -147,6 +153,10 @@ spec:
labels:
deploy: sourcegraph
name: data
{{- if .Values.indexedSearch.storageAnnotations }}
annotations:
{{- toYaml .Values.indexedSearch.storageAnnotations | nindent 8 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
deploy: sourcegraph
app.kubernetes.io/component: pgsql
{{- if .Values.pgsql.storageAnnotations }}
annotations:
{{- toYaml .Values.pgsql.storageAnnotations | nindent 4 }}
{{- end }}
name: pgsql
spec:
accessModes:
Expand Down
6 changes: 6 additions & 0 deletions charts/sourcegraph/templates/pgsql/pgsql.StatefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ spec:
volumeMounts:
- mountPath: /data
name: disk
{{- if .Values.pgsql.storageSubPath }}
subPath: {{ .Values.pgsql.storageSubPath }}
{{- end }}
securityContext:
{{- toYaml .Values.alpine.containerSecurityContext | nindent 10 }}
{{- if not .Values.sourcegraph.localDevMode }}
Expand Down Expand Up @@ -101,6 +104,9 @@ spec:
volumeMounts:
- mountPath: /data
name: disk
{{- if .Values.pgsql.storageSubPath }}
subPath: {{ .Values.pgsql.storageSubPath }}
{{- end }}
- mountPath: /conf
name: pgsql-conf
- mountPath: /dev/shm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ spec:
volumeMounts:
- mountPath: /prometheus
name: data
{{- if .Values.prometheus.storageSubPath }}
subPath: {{ .Values.prometheus.storageSubPath }}
{{- end }}
- mountPath: /sg_prometheus_add_ons
name: config
{{- if .Values.prometheus.extraVolumeMounts }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
deploy: sourcegraph
app.kubernetes.io/component: prometheus
{{- if .Values.prometheus.storageAnnotations }}
annotations:
{{- toYaml .Values.prometheus.storageAnnotations | nindent 4 }}
{{- end }}
name: prometheus
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ spec:
volumeMounts:
- mountPath: /redis-data
name: redis-data
{{- if .Values.redisCache.storageSubPath }}
subPath: {{ .Values.redisCache.storageSubPath }}
{{- end }}
{{- if .Values.redisCache.extraVolumeMounts }}
{{- toYaml .Values.redisCache.extraVolumeMounts | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
deploy: sourcegraph
app.kubernetes.io/component: redis
{{- if .Values.redisCache.storageAnnotations }}
annotations:
{{- toYaml .Values.redisCache.storageAnnotations | nindent 4 }}
{{- end }}
name: redis-cache
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ spec:
volumeMounts:
- mountPath: /redis-data
name: redis-data
{{- if .Values.redisStore.storageSubPath }}
subPath: {{ .Values.redisStore.storageSubPath }}
{{- end }}
{{- if .Values.redisStore.extraVolumeMounts }}
{{- toYaml .Values.redisStore.extraVolumeMounts | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
labels:
deploy: sourcegraph
app.kubernetes.io/component: redis
{{- if .Values.redisStore.storageAnnotations }}
annotations:
{{- toYaml .Values.redisStore.storageAnnotations | nindent 4 }}
{{- end }}
name: redis-store
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ spec:
volumeMounts:
- mountPath: /mnt/cache
name: cache
{{- if .Values.searcher.storageSubPath }}
subPath: {{ .Values.searcher.storageSubPath }}
{{- end }}
- mountPath: /tmp
name: tmpdir
{{- if .Values.searcher.extraVolumeMounts }}
Expand Down Expand Up @@ -135,6 +138,10 @@ spec:
volumeClaimTemplates:
- metadata:
name: cache
{{- if .Values.searcher.storageAnnotations }}
annotations:
{{- toYaml .Values.searcher.storageAnnotations | nindent 8 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
44 changes: 44 additions & 0 deletions charts/sourcegraph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ codeInsightsDB:
name: ""
# -- PVC Storage Request for `codeinsights-db` data volume
storageSize: 200Gi
# -- Optional subPath for the `codeinsights-db` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `codeinsights-db` PVC
storageAnnotations: {}

codeIntelDB:
# -- Enable `codeintel-db` PostgreSQL server
Expand Down Expand Up @@ -290,6 +294,10 @@ codeIntelDB:
name: ""
# -- PVC Storage Request for `codeintel-db` data volume
storageSize: 200Gi
# -- Optional subPath for the `codeintel-db` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `codeintel-db` PVC
storageAnnotations: {}

frontend:
# -- Environment variables for the `frontend` container
Expand Down Expand Up @@ -446,6 +454,10 @@ gitserver:
name: ""
# -- PVC Storage Request for `gitserver` data volume
storageSize: 200Gi
# -- Optional subPath for the `gitserver` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `gitserver` PVC
storageAnnotations: {}

grafana:
# -- Enable `grafana` dashboard (recommended)
Expand Down Expand Up @@ -508,6 +520,10 @@ grafana:
name: grafana
# -- PVC Storage Request for `grafana` data volume
storageSize: 2Gi
# -- Optional subPath for the `grafana` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `grafana` PVC
storageAnnotations: {}

indexedSearch:
image:
Expand Down Expand Up @@ -549,6 +565,10 @@ indexedSearch:
# The size of disk to used for search indexes.
# This should typically be gitserver disk size multipled by the number of gitserver shards.
storageSize: 200Gi
# -- Optional subPath for the `indexed-search` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `indexed-search` PVC
storageAnnotations: {}

indexedSearchIndexer:
image:
Expand Down Expand Up @@ -614,6 +634,10 @@ blobstore:
name: ""
# -- PVC Storage Request for `blobstore` data volume
storageSize: 100Gi
# -- Optional subPath for the `blobstore` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `blobstore` PVC
storageAnnotations: {}

openTelemetry:
enabled: true
Expand Down Expand Up @@ -800,6 +824,10 @@ pgsql:
name: ""
# -- PVC Storage Request for `pgsql` data volume
storageSize: 200Gi
# -- Optional subPath for the `pgsql` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `pgsql` PVC
storageAnnotations: {}

postgresExporter:
image:
Expand Down Expand Up @@ -948,6 +976,10 @@ prometheus:
name: prometheus
# -- PVC Storage Request for `prometheus` data volume
storageSize: 200Gi
# -- Optional subPath for the `prometheus` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `prometheus` PVC
storageAnnotations: {}

redisCache:
# -- Enable `redis-cache` Redis server
Expand Down Expand Up @@ -994,6 +1026,10 @@ redisCache:
name: ""
# -- PVC Storage Request for `redis-cache` data volume
storageSize: 100Gi
# -- Optional subPath for the `redis-cache` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `redis-cache` PVC
storageAnnotations: {}

redisExporter:
image:
Expand Down Expand Up @@ -1063,6 +1099,10 @@ redisStore:
name: ""
# -- PVC Storage Request for `redis-store` data volume
storageSize: 100Gi
# -- Optional subPath for the `redis-store` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `redis-store` PVC
storageAnnotations: {}

searcher:
image:
Expand Down Expand Up @@ -1103,6 +1143,10 @@ searcher:
name: ""
# -- Size of the PVC for searcher pods to store cache data
storageSize: 26Gi
# -- Optional subPath for the `searcher` primary data volume mount
storageSubPath: ""
# -- Optional annotations to add to the `searcher` PVC
storageAnnotations: {}

storageClass:
# -- Enable creation of storageClass.
Expand Down
Loading