Skip to content

Commit f6e9c40

Browse files
committed
Add optional storageAnnotations support for PVC metadata across all Sourcegraph services
1 parent c842dc2 commit f6e9c40

13 files changed

Lines changed: 77 additions & 0 deletions

charts/sourcegraph/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ In addition to the documented values, all services also support the following va
4040
| blobstore.resources | object | `{"limits":{"cpu":"1","memory":"500M"},"requests":{"cpu":"1","memory":"500M"}}` | Resource requests & limits for the `blobstore` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
4141
| blobstore.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `blobstore` |
4242
| blobstore.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
43+
| blobstore.storageAnnotations | object | `{}` | Optional annotations to add to the `blobstore` PVC |
4344
| blobstore.storageSize | string | `"100Gi"` | PVC Storage Request for `blobstore` data volume |
4445
| blobstore.storageSubPath | string | `""` | Optional subPath for the `blobstore` primary data volume mount |
4546
| cadvisor.containerSecurityContext | object | `{"privileged":true}` | Security context for the `cadvisor` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
@@ -72,6 +73,7 @@ In addition to the documented values, all services also support the following va
7273
| codeInsightsDB.resources | object | `{"limits":{"cpu":"4","memory":"2Gi"},"requests":{"cpu":"4","memory":"2Gi"}}` | Resource requests & limits for the `codeinsights-db` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
7374
| codeInsightsDB.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `codeinsights-db` |
7475
| codeInsightsDB.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
76+
| codeInsightsDB.storageAnnotations | object | `{}` | Optional annotations to add to the `codeinsights-db` PVC |
7577
| codeInsightsDB.storageSize | string | `"200Gi"` | PVC Storage Request for `codeinsights-db` data volume |
7678
| codeInsightsDB.storageSubPath | string | `""` | Optional subPath for the `codeinsights-db` primary data volume mount |
7779
| codeIntelDB.additionalConfig | string | `""` | Additional PostgreSQL configuration. This will override or extend our default configuration. Notes: This is expecting a multiline string. Learn more from our [recommended PostgreSQL configuration](https://docs.sourcegraph.com/admin/config/postgres-conf) and [PostgreSQL documentation](https://www.postgresql.org/docs/12/config-setting.html) |
@@ -93,6 +95,7 @@ In addition to the documented values, all services also support the following va
9395
| codeIntelDB.resources | object | `{"limits":{"cpu":"4","memory":"4Gi"},"requests":{"cpu":"4","memory":"4Gi"}}` | Resource requests & limits for the `codeintel-db` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
9496
| codeIntelDB.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `codeintel-db` |
9597
| codeIntelDB.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
98+
| codeIntelDB.storageAnnotations | object | `{}` | Optional annotations to add to the `codeintel-db` PVC |
9699
| codeIntelDB.storageSize | string | `"200Gi"` | PVC Storage Request for `codeintel-db` data volume |
97100
| codeIntelDB.storageSubPath | string | `""` | Optional subPath for the `codeintel-db` primary data volume mount |
98101
| extraResources | list | `[]` | Additional resources to include in the rendered manifest. Templates are supported. |
@@ -126,6 +129,7 @@ In addition to the documented values, all services also support the following va
126129
| gitserver.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `gitserver` |
127130
| gitserver.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
128131
| gitserver.sshSecret | string | `""` | Name of existing Secret that contains SSH credentials to clone repositories. It usually contains keys, such as `id_rsa` (private key) and `known_hosts`. Learn more from [documentation](https://docs.sourcegraph.com/admin/install/kubernetes/helm#using-ssh-to-clone-repositories) |
132+
| gitserver.storageAnnotations | object | `{}` | Optional annotations to add to the `gitserver` PVC |
129133
| gitserver.storageSize | string | `"200Gi"` | PVC Storage Request for `gitserver` data volume |
130134
| gitserver.storageSubPath | string | `""` | Optional subPath for the `gitserver` primary data volume mount |
131135
| grafana.auth | object | `{"database":"","existingSecret":"","host":"","password":"","port":"","sslmode":"","user":""}` | NOTE: Create a separate user in the pgsql database with read-only perms on the minimum set of tables |
@@ -146,6 +150,7 @@ In addition to the documented values, all services also support the following va
146150
| grafana.resources | object | `{"limits":{"cpu":"1","memory":"512Mi"},"requests":{"cpu":"100m","memory":"512Mi"}}` | Resource requests & limits for the `grafana` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
147151
| grafana.serviceAccount.create | bool | `true` | Enable creation of ServiceAccount for `grafana` |
148152
| grafana.serviceAccount.name | string | `"grafana"` | Name of the ServiceAccount to be created or an existing ServiceAccount |
153+
| grafana.storageAnnotations | object | `{}` | Optional annotations to add to the `grafana` PVC |
149154
| grafana.storageSize | string | `"2Gi"` | PVC Storage Request for `grafana` data volume |
150155
| grafana.storageSubPath | string | `""` | Optional subPath for the `grafana` primary data volume mount |
151156
| indexedSearch.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `zoekt-webserver` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
@@ -157,6 +162,7 @@ In addition to the documented values, all services also support the following va
157162
| indexedSearch.resources | object | `{"limits":{"cpu":"2","memory":"4G"},"requests":{"cpu":"500m","memory":"2G"}}` | Resource requests & limits for the `zoekt-webserver` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
158163
| indexedSearch.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `indexed-search` |
159164
| indexedSearch.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
165+
| indexedSearch.storageAnnotations | object | `{}` | Optional annotations to add to the `indexed-search` PVC |
160166
| indexedSearch.storageSize | string | `"200Gi"` | PVC Storage Request for `indexed-search` data volume The size of disk to used for search indexes. This should typically be gitserver disk size multipled by the number of gitserver shards. |
161167
| indexedSearch.storageSubPath | string | `""` | Optional subPath for the `indexed-search` primary data volume mount |
162168
| indexedSearchIndexer.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `zoekt-indexserver` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
@@ -248,6 +254,7 @@ In addition to the documented values, all services also support the following va
248254
| pgsql.resources | object | `{"limits":{"cpu":"4","memory":"4Gi"},"requests":{"cpu":"4","memory":"4Gi"}}` | Resource requests & limits for the `pgsql` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
249255
| pgsql.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `pgsql` |
250256
| pgsql.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
257+
| pgsql.storageAnnotations | object | `{}` | Optional annotations to add to the `pgsql` PVC |
251258
| pgsql.storageSize | string | `"200Gi"` | PVC Storage Request for `pgsql` data volume |
252259
| pgsql.storageSubPath | string | `""` | Optional subPath for the `pgsql` primary data volume mount |
253260
| postgresExporter.image.defaultTag | string | `"6.0.0@sha256:685a18f482e4a71a54e15814ffd6b8cd62844f6af056a81f7ec0ba5cf23fce27"` | Docker image tag for the `pgsql-exporter` image |
@@ -276,6 +283,7 @@ In addition to the documented values, all services also support the following va
276283
| prometheus.resources | object | `{"limits":{"cpu":"2","memory":"6G"},"requests":{"cpu":"500m","memory":"6G"}}` | Resource requests & limits for the `prometheus` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) Prometheus is relied upon to monitor services for sending alerts to site admins when something is wrong with Sourcegraph, thus its memory requests and limits are the same to guarantee it has enough memory to perform its job reliably and prevent conflicts with other pods on the same host node. The limit chosen here is based on what works reliably on Sourcegraph.com with lots of traffic. |
277284
| prometheus.serviceAccount.create | bool | `true` | Enable creation of ServiceAccount |
278285
| prometheus.serviceAccount.name | string | `"prometheus"` | Name of the ServiceAccount to be created or an existing ServiceAccount |
286+
| prometheus.storageAnnotations | object | `{}` | Optional annotations to add to the `prometheus` PVC |
279287
| prometheus.storageSize | string | `"200Gi"` | PVC Storage Request for `prometheus` data volume |
280288
| prometheus.storageSubPath | string | `""` | Optional subPath for the `prometheus` primary data volume mount |
281289
| redisCache.connection.endpoint | string | `"redis-cache:6379"` | Endpoint to use for redis-cache. Supports either host:port or IANA specification |
@@ -289,6 +297,7 @@ In addition to the documented values, all services also support the following va
289297
| redisCache.resources | object | `{"limits":{"cpu":"1","memory":"7Gi"},"requests":{"cpu":"1","memory":"7Gi"}}` | Resource requests & limits for the `redis-cache` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
290298
| redisCache.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `redis-cache` |
291299
| redisCache.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
300+
| redisCache.storageAnnotations | object | `{}` | Optional annotations to add to the `redis-cache` PVC |
292301
| redisCache.storageSize | string | `"100Gi"` | PVC Storage Request for `redis-cache` data volume |
293302
| redisCache.storageSubPath | string | `""` | Optional subPath for the `redis-cache` primary data volume mount |
294303
| redisExporter.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsUser":999}` | Security context for the `redis-exporter` sidecar container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
@@ -306,6 +315,7 @@ In addition to the documented values, all services also support the following va
306315
| redisStore.resources | object | `{"limits":{"cpu":"1","memory":"7Gi"},"requests":{"cpu":"1","memory":"7Gi"}}` | Resource requests & limits for the `redis-store` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
307316
| redisStore.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `redis-store` |
308317
| redisStore.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
318+
| redisStore.storageAnnotations | object | `{}` | Optional annotations to add to the `redis-store` PVC |
309319
| redisStore.storageSize | string | `"100Gi"` | PVC Storage Request for `redis-store` data volume |
310320
| redisStore.storageSubPath | string | `""` | Optional subPath for the `redis-store` primary data volume mount |
311321
| searcher.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `searcher` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
@@ -317,6 +327,7 @@ In addition to the documented values, all services also support the following va
317327
| searcher.resources | object | `{"limits":{"cpu":"2","memory":"2G"},"requests":{"cpu":"500m","memory":"500M"}}` | Resource requests & limits for the `searcher` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
318328
| searcher.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `searcher` |
319329
| searcher.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
330+
| searcher.storageAnnotations | object | `{}` | Optional annotations to add to the `searcher` PVC |
320331
| searcher.storageSize | string | `"26Gi"` | Size of the PVC for searcher pods to store cache data |
321332
| searcher.storageSubPath | string | `""` | Optional subPath for the `searcher` primary data volume mount |
322333
| sgTestConnection | object | `{"enabled":true}` | Enable the busybox connection test after deployment |

charts/sourcegraph/templates/blobstore/blobstore.PersistentVolumeClaim.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
labels:
66
deploy: sourcegraph
77
app.kubernetes.io/component: blobstore
8+
{{- if .Values.blobstore.storageAnnotations }}
9+
annotations:
10+
{{- toYaml .Values.blobstore.storageAnnotations | nindent 4 }}
11+
{{- end }}
812
name: blobstore
913
spec:
1014
accessModes:

charts/sourcegraph/templates/codeinsights-db/codeinsights-db.PersistentVolumeClaim.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
labels:
66
app.kubernetes.io/component: codeinsights-db
77
deploy: sourcegraph
8+
{{- if .Values.codeInsightsDB.storageAnnotations }}
9+
annotations:
10+
{{- toYaml .Values.codeInsightsDB.storageAnnotations | nindent 4 }}
11+
{{- end }}
812
name: codeinsights-db
913
spec:
1014
accessModes:

charts/sourcegraph/templates/codeintel-db/codeintel-db.PersistentVolumeClaim.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
labels:
66
app.kubernetes.io/component: codeintel-db
77
deploy: sourcegraph
8+
{{- if .Values.codeIntelDB.storageAnnotations }}
9+
annotations:
10+
{{- toYaml .Values.codeIntelDB.storageAnnotations | nindent 4 }}
11+
{{- end }}
812
name: {{ default "codeintel-db" .Values.codeIntelDB.name }}
913
spec:
1014
accessModes:

charts/sourcegraph/templates/gitserver/gitserver.StatefulSet.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ spec:
127127
volumeClaimTemplates:
128128
- metadata:
129129
name: repos
130+
{{- if .Values.gitserver.storageAnnotations }}
131+
annotations:
132+
{{- toYaml .Values.gitserver.storageAnnotations | nindent 8 }}
133+
{{- end }}
130134
spec:
131135
accessModes:
132136
- ReadWriteOnce

charts/sourcegraph/templates/grafana/grafana.StatefulSet.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ spec:
108108
volumeClaimTemplates:
109109
- metadata:
110110
name: grafana-data
111+
{{- if .Values.grafana.storageAnnotations }}
112+
annotations:
113+
{{- toYaml .Values.grafana.storageAnnotations | nindent 8 }}
114+
{{- end }}
111115
spec:
112116
accessModes: [ "ReadWriteOnce"]
113117
resources:

charts/sourcegraph/templates/indexed-search/indexed-search.StatefulSet.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ spec:
153153
labels:
154154
deploy: sourcegraph
155155
name: data
156+
{{- if .Values.indexedSearch.storageAnnotations }}
157+
annotations:
158+
{{- toYaml .Values.indexedSearch.storageAnnotations | nindent 8 }}
159+
{{- end }}
156160
spec:
157161
accessModes:
158162
- ReadWriteOnce

charts/sourcegraph/templates/pgsql/pgsql.PersistentVolumeClaim.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
labels:
66
deploy: sourcegraph
77
app.kubernetes.io/component: pgsql
8+
{{- if .Values.pgsql.storageAnnotations }}
9+
annotations:
10+
{{- toYaml .Values.pgsql.storageAnnotations | nindent 4 }}
11+
{{- end }}
812
name: pgsql
913
spec:
1014
accessModes:

charts/sourcegraph/templates/prometheus/prometheus.PersistentVolumeClaim.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
labels:
66
deploy: sourcegraph
77
app.kubernetes.io/component: prometheus
8+
{{- if .Values.prometheus.storageAnnotations }}
9+
annotations:
10+
{{- toYaml .Values.prometheus.storageAnnotations | nindent 4 }}
11+
{{- end }}
812
name: prometheus
913
spec:
1014
accessModes:

charts/sourcegraph/templates/redis/redis-cache.PersistentVolumeClaim.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
labels:
66
deploy: sourcegraph
77
app.kubernetes.io/component: redis
8+
{{- if .Values.redisCache.storageAnnotations }}
9+
annotations:
10+
{{- toYaml .Values.redisCache.storageAnnotations | nindent 4 }}
11+
{{- end }}
812
name: redis-cache
913
spec:
1014
accessModes:

0 commit comments

Comments
 (0)