Skip to content

Commit

Permalink
all: replace minio with sourcegraph/blobstore (#4206)
Browse files Browse the repository at this point in the history
* all: replace minio with sourcegraph/blobstore
* all: update image tags

Produced via:

```
sg ops update-images -t 187572_2022-12-06_cbecc5321c7d -kind k8s ./base
git checkout -- **/*.ConfigMap.yaml **/*.Role.yaml **/*.Ingress.yaml **/*.Service.yaml **/*.IndexerService.yaml
git add base/
```

See also #4207

Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Dec 7, 2022
1 parent cd3a00f commit bd961f0
Show file tree
Hide file tree
Showing 37 changed files with 133 additions and 132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,46 @@ apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: MinIO for storing LSIF uploads.
kubectl.kubernetes.io/default-container: minio
description: generic S3-like blobstore for storing LSIF uploads.
kubectl.kubernetes.io/default-container: blobstore
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: minio
name: minio
app.kubernetes.io/component: blobstore
name: blobstore
spec:
minReadySeconds: 10
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: minio
app: blobstore
strategy:
type: Recreate
template:
metadata:
labels:
deploy: sourcegraph
app: minio
app: blobstore
spec:
containers:
- name: minio
env:
- name: MINIO_ACCESS_KEY
value: AKIAIOSFODNN7EXAMPLE
- name: MINIO_SECRET_KEY
value: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
image: index.docker.io/sourcegraph/minio:4.2.0@sha256:a8cc7269c2ffecc7c03791d3999ccc30635e5af36cc73e412bec2ac944be7006
args: ['minio', 'server', '/data']
- name: blobstore
image: index.docker.io/sourcegraph/blobstore:187572_2022-12-06_cbecc5321c7d@sha256:8e57384c78a3b31cbe31d41656dbcbb8ee7279d96630a33936a2098afabb1317
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 9000
name: minio
name: blobstore
livenessProbe:
httpGet:
path: /minio/health/live
port: minio
path: /
port: blobstore
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /minio/health/live
port: minio
path: /
port: blobstore
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
Expand All @@ -60,10 +54,10 @@ spec:
memory: 500M
volumeMounts:
- mountPath: /data
name: minio-data
name: blobstore-data
securityContext:
runAsUser: 0
volumes:
- name: minio-data
- name: blobstore-data
persistentVolumeClaim:
claimName: minio
claimName: blobstore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ metadata:
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: minio
name: minio
app.kubernetes.io/component: blobstore
name: blobstore
spec:
accessModes:
- ReadWriteOnce
Expand Down
17 changes: 17 additions & 0 deletions base/blobstore/blobstore.Service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: blobstore
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: blobstore
name: blobstore
spec:
ports:
- name: blobstore
port: 9000
targetPort: blobstore
selector:
app: blobstore
type: ClusterIP
2 changes: 1 addition & 1 deletion base/cadvisor/cadvisor.DaemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
serviceAccountName: cadvisor
containers:
- name: cadvisor
image: index.docker.io/sourcegraph/cadvisor:4.2.0@sha256:ae984a4682f03d99a922d1c55af380641493b5c5cf3d4791a7c99920fdcf2c1a
image: index.docker.io/sourcegraph/cadvisor:187572_2022-12-06_cbecc5321c7d@sha256:755748f2f9b00d8f70bd65349e85235585bdf1a663e26198c8eaf91dfd5636e1
args:
# Kubernetes-specific flags below (other flags are baked into the Docker image)
#
Expand Down
6 changes: 3 additions & 3 deletions base/codeinsights-db/codeinsights-db.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
spec:
initContainers:
- name: correct-data-dir-permissions
image: index.docker.io/sourcegraph/alpine-3.14:4.2.0@sha256:3b195004ef9d37aaba08ab1eca931efc01d4bfb28668d8c5687c0794ea624465
image: index.docker.io/sourcegraph/alpine-3.14:187572_2022-12-06_cbecc5321c7d@sha256:4d8085acb2267d94c2099be8265352ceef7095b245482b603569ad8cd7563a90
command: ["sh", "-c", "if [ -d /var/lib/postgresql/data/pgdata ]; then chmod 750 /var/lib/postgresql/data/pgdata; fi"]
volumeMounts:
- mountPath: /var/lib/postgresql/data/
Expand All @@ -42,7 +42,7 @@ spec:
memory: "50Mi"
containers:
- name: codeinsights
image: index.docker.io/sourcegraph/codeinsights-db:4.2.0@sha256:ba704194bd4a03a261cb57378ea7a52c5729711ab3ec7620436f4afc12caf47a
image: index.docker.io/sourcegraph/codeinsights-db:187572_2022-12-06_cbecc5321c7d@sha256:4dd89a1279e7d55ddcb5b570d0bb544422dd1ecb0e3662f23d22f9643837c2b5
env:
- name: POSTGRES_DB
value: postgres
Expand Down Expand Up @@ -75,7 +75,7 @@ spec:
value: postgres://postgres:@localhost:5432/?sslmode=disable
- name: PG_EXPORTER_EXTEND_QUERY_PATH
value: /config/code_insights_queries.yaml
image: index.docker.io/sourcegraph/postgres_exporter:4.2.0@sha256:8590f7d59bad748812b4613ce14d0f870e1c390f6026175cd483cc013522945d
image: index.docker.io/sourcegraph/postgres_exporter:187572_2022-12-06_cbecc5321c7d@sha256:85d9ca134db535f0482e6e5cacf194ea118bf24d0fd52e36ba6714802d59c30a
terminationMessagePolicy: FallbackToLogsOnError
name: pgsql-exporter
resources:
Expand Down
12 changes: 6 additions & 6 deletions base/codeintel-db/codeintel-db.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
initContainers:
- name: correct-data-dir-permissions
image: index.docker.io/sourcegraph/alpine-3.14:4.2.0@sha256:3b195004ef9d37aaba08ab1eca931efc01d4bfb28668d8c5687c0794ea624465
image: index.docker.io/sourcegraph/alpine-3.14:187572_2022-12-06_cbecc5321c7d@sha256:4d8085acb2267d94c2099be8265352ceef7095b245482b603569ad8cd7563a90
command: ["sh", "-c", "if [ -d /data/pgdata-12 ]; then chmod 750 /data/pgdata-12; fi"]
volumeMounts:
- mountPath: /data
Expand All @@ -43,21 +43,21 @@ spec:
memory: "50Mi"
containers:
- name: pgsql
image: index.docker.io/sourcegraph/codeintel-db:4.2.0@sha256:13ad9576443b787f097dd58f2b9d890ae37cdbdcf43844d8930dfa013b1c181d
image: index.docker.io/sourcegraph/codeintel-db:187572_2022-12-06_cbecc5321c7d@sha256:7fb02a9392ce4dd3d4210dbd5792c09c4210a2dfc6dc389ed679137784359102
terminationMessagePolicy: FallbackToLogsOnError
readinessProbe:
exec:
command:
- /ready.sh
- /ready.sh
livenessProbe:
initialDelaySeconds: 15
exec:
command:
- /liveness.sh
- /liveness.sh
startupProbe:
exec:
command:
- /liveness.sh
- /liveness.sh
failureThreshold: 360
periodSeconds: 10
ports:
Expand All @@ -80,7 +80,7 @@ spec:
value: postgres://sg:@localhost:5432/?sslmode=disable
- name: PG_EXPORTER_EXTEND_QUERY_PATH
value: /config/code_intel_queries.yaml
image: index.docker.io/sourcegraph/postgres_exporter:4.2.0@sha256:8590f7d59bad748812b4613ce14d0f870e1c390f6026175cd483cc013522945d
image: index.docker.io/sourcegraph/postgres_exporter:187572_2022-12-06_cbecc5321c7d@sha256:85d9ca134db535f0482e6e5cacf194ea118bf24d0fd52e36ba6714802d59c30a
terminationMessagePolicy: FallbackToLogsOnError
name: pgsql-exporter
resources:
Expand Down
8 changes: 6 additions & 2 deletions base/frontend/sourcegraph-frontend.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
spec:
initContainers:
- name: migrator
image: index.docker.io/sourcegraph/migrator:4.2.0@sha256:d816e125395e99d8a25564f5a799f0e9bedf7c6230065619849e169d0865a35e
image: index.docker.io/sourcegraph/migrator:187572_2022-12-06_cbecc5321c7d@sha256:93fc175df594738a98a62f2057271824cdb674b0e63bedac9dc7cb0f04db76bb
args: ["up"]
resources:
limits:
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
value: sg
containers:
- name: frontend
image: index.docker.io/sourcegraph/frontend:4.2.0@sha256:7cfc4a4364947c43bac10cdc3e1165fabb12a6529b9614a5769a477f1943780d
image: index.docker.io/sourcegraph/frontend:187572_2022-12-06_cbecc5321c7d@sha256:73e64a8636e70ebbaf7f4a3300479529294f67e8cf644cdaea02435915aec869
args:
- serve
env:
Expand All @@ -89,6 +89,10 @@ spec:
value: disable
- name: CODEINTEL_PGUSER
value: sg
- name: PRECISE_CODE_INTEL_UPLOAD_BACKEND
value: blobstore
- name: PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT
value: http://blobstore:9000
- name: GRAFANA_SERVER_URL
value: http://grafana:30070
- name: PROMETHEUS_URL
Expand Down
2 changes: 1 addition & 1 deletion base/github-proxy/github-proxy.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
spec:
containers:
- name: github-proxy
image: index.docker.io/sourcegraph/github-proxy:4.2.0@sha256:1329c9681d9b221b87f60ee59ec43991f89dffb3e21149da1aa205b51efd98b0
image: index.docker.io/sourcegraph/github-proxy:187572_2022-12-06_cbecc5321c7d@sha256:b4739adfced18f2a8883da931da681f444b489f6606052246f7c8d536f22e425
env:
# OTEL_AGENT_HOST must be defined before OTEL_EXPORTER_OTLP_ENDPOINT to substitute the node IP on which the DaemonSet pod instance runs in the latter variable
- name: OTEL_AGENT_HOST
Expand Down
24 changes: 12 additions & 12 deletions base/gitserver/gitserver.StatefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
fieldPath: status.hostIP
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://$(OTEL_AGENT_HOST):4317
image: index.docker.io/sourcegraph/gitserver:4.2.0@sha256:f140a7849a7c3ef44c8cb3ea8bdaeef0363736f86db00118688e6cc4b5d5ec45
image: index.docker.io/sourcegraph/gitserver:187572_2022-12-06_cbecc5321c7d@sha256:87642b2f0cccbdcd661e470c8f7aa6c022ab03065a2c8ab565afc4b8829a4531
terminationMessagePolicy: FallbackToLogsOnError
livenessProbe:
initialDelaySeconds: 5
Expand All @@ -51,25 +51,25 @@ spec:
cpu: "4"
memory: 8G
requests:
cpu: "4"
cpu: "4"
memory: 8G
volumeMounts:
- mountPath: /data/repos
name: repos
# See the customization guide (../../../docs/configure.md) for information
# about configuring gitserver to use an SSH key
# - mountPath: /root/.ssh
# name: ssh
# See the customization guide (../../../docs/configure.md) for information
# about configuring gitserver to use an SSH key
# - mountPath: /root/.ssh
# name: ssh
securityContext:
runAsUser: 0
volumes:
- name: repos
# See the customization guide (../../../docs/configure.md) for information
# about configuring gitserver to use an SSH key
# - name: ssh
# secret:
# defaultMode: 384
# secretName: gitserver-ssh
# See the customization guide (../../../docs/configure.md) for information
# about configuring gitserver to use an SSH key
# - name: ssh
# secret:
# defaultMode: 384
# secretName: gitserver-ssh
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
Expand Down
6 changes: 3 additions & 3 deletions base/grafana/grafana.StatefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
app: grafana
serviceName: grafana
updateStrategy:
type: RollingUpdate
type: RollingUpdate
template:
metadata:
labels:
Expand All @@ -26,7 +26,7 @@ spec:
spec:
containers:
- name: grafana
image: index.docker.io/sourcegraph/grafana:4.2.0@sha256:f058db8ff6b151d3a46fb13a2246485f6bf3b825b936a7497da07b913d519157
image: index.docker.io/sourcegraph/grafana:187572_2022-12-06_cbecc5321c7d@sha256:cf295a1dada50607a364390a54744dbc9142aa99b42c07f1bb623ca251639d2c
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 3370
Expand Down Expand Up @@ -59,7 +59,7 @@ spec:
- metadata:
name: grafana-data
spec:
accessModes: [ "ReadWriteOnce"]
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 2Gi
Expand Down
4 changes: 2 additions & 2 deletions base/indexed-search/indexed-search.StatefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
value: http://$(OTEL_AGENT_HOST):4317
- name: OPENTELEMETRY_DISABLED
value: "false"
image: index.docker.io/sourcegraph/indexed-searcher:4.2.0@sha256:b2943dc9e0d02aa21206f22db903d0527dbc6192925c6ca5df0153607867fd68
image: index.docker.io/sourcegraph/indexed-searcher:187572_2022-12-06_cbecc5321c7d@sha256:79bec59c17482e4039931ed083113bd8723d74c42b96c3c489062f6b33b806f0
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 6070
Expand Down Expand Up @@ -67,7 +67,7 @@ spec:
value: http://$(OTEL_AGENT_HOST):4317
- name: OPENTELEMETRY_DISABLED
value: "false"
image: index.docker.io/sourcegraph/search-indexer:4.2.0@sha256:6f08a86860d30cbfd04c427afa2c24c8a9870c9d28d4bd24bf867abed8a2f9d8
image: index.docker.io/sourcegraph/search-indexer:187572_2022-12-06_cbecc5321c7d@sha256:a3ae20e4130b4846e2c3078b9ba942854890348da37c8fa7ee385c081b7d1666
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 6072
Expand Down
21 changes: 0 additions & 21 deletions base/minio/minio.Service.yaml

This file was deleted.

20 changes: 10 additions & 10 deletions base/node-exporter/node-exporter.DaemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
spec:
containers:
- name: node-exporter
image: index.docker.io/sourcegraph/node-exporter:179720_2022-10-25_4d925e87cfb8@sha256:2d9dcdf0b2226f0c3d550a64d2667710265462350a3ba9ebe37d0302bc64af0f
image: index.docker.io/sourcegraph/node-exporter:187572_2022-12-06_cbecc5321c7d@sha256:2d9dcdf0b2226f0c3d550a64d2667710265462350a3ba9ebe37d0302bc64af0f
imagePullPolicy: IfNotPresent
resources:
limits:
Expand All @@ -34,15 +34,15 @@ spec:
cpu: 200m
memory: 100Mi
args:
- --web.listen-address=:9100
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
- --path.procfs=/host/proc
- --no-collector.wifi
- --no-collector.hwmon
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.netclass.ignored-devices=^(veth.*)$
- --collector.netdev.device-exclude=^(veth.*)$
- --web.listen-address=:9100
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
- --path.procfs=/host/proc
- --no-collector.wifi
- --no-collector.hwmon
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.netclass.ignored-devices=^(veth.*)$
- --collector.netdev.device-exclude=^(veth.*)$
env:
securityContext:
allowPrivilegeEscalation: false
Expand Down
2 changes: 1 addition & 1 deletion base/otel-collector/otel-agent.DaemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
spec:
containers:
- name: otel-agent
image: index.docker.io/sourcegraph/opentelemetry-collector:4.2.0@sha256:4bc1df3d5bc681f2b16c39a66f3517b7493cf993046ac3036e781ad7c9c30a65
image: index.docker.io/sourcegraph/opentelemetry-collector:187572_2022-12-06_cbecc5321c7d@sha256:113a84fcef33f06f7e529961d5eb64400488953b23ac07ea8a3d628db6789ef0
command:
- "/bin/otelcol-sourcegraph"
- "--config=/etc/otel-agent/config.yaml"
Expand Down
2 changes: 1 addition & 1 deletion base/otel-collector/otel-collector.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
spec:
containers:
- name: otel-collector
image: index.docker.io/sourcegraph/opentelemetry-collector:4.2.0@sha256:4bc1df3d5bc681f2b16c39a66f3517b7493cf993046ac3036e781ad7c9c30a65
image: index.docker.io/sourcegraph/opentelemetry-collector:187572_2022-12-06_cbecc5321c7d@sha256:113a84fcef33f06f7e529961d5eb64400488953b23ac07ea8a3d628db6789ef0
command:
- "/bin/otelcol-sourcegraph"
# To use a custom configuration, edit otel-collector.ConfigMap.yaml
Expand Down
Loading

0 comments on commit bd961f0

Please sign in to comment.