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
slimsag authored Dec 6, 2022
1 parent 2e2d2d1 commit 5eeb447
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:insiders@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:insiders@sha256:48516577913be62d98a52d33f0490989c8a63ab285c25f79b9686abc372234f4
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:insiders@sha256:d2ab341c3b78a143d33831410f1bb572585d46d017ae0d81a7b73d9ef070fbad
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:insiders@sha256:99967b478190da99b8782184e9faba9879c959a719563c191a521906a7e75aaa
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:insiders@sha256:ab15b9a482a4f78720a5ba0f01c895175897e09671cfa225dd6ff7c03780851d
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:insiders@sha256:d2ab341c3b78a143d33831410f1bb572585d46d017ae0d81a7b73d9ef070fbad
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:insiders@sha256:d8a66d1b64656ae2ff3e0f82c16f2641d967dcaa7bf58c523c247cb4ab574ceb
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:insiders@sha256:ab15b9a482a4f78720a5ba0f01c895175897e09671cfa225dd6ff7c03780851d
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:insiders@sha256:b51b04d856359b708d453c81fbf105ec36801279eec96f51e8594619799ae20b
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:insiders@sha256:31ed4a503368a3d80e70118199196f8180f1470c47968a23e9a0a38ebc55470c
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:insiders@sha256:a3e4e5c880c395e4bb30a57a5a0754291461695584e4fdd0008f6cd4584ee2f7
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:insiders@sha256:314fd5270d42623ffa2d65cac5702332480b64886c66d58d456ff0fb167d5897
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:insiders@sha256:f44cd0f0aa339c0be3c680d27ffe1b231975211dc7d315656d80dfde8b633baf
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:insiders@sha256:adfecfa68702118dffd2259c5f7793fbbd06828ea1f43f5c38ea8b0fd3a9ee9a
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:insiders@sha256:3fd9e83dbd2b8d906957e66137907117ee3445ff3ce2524dec161198d51286e2
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:insiders@sha256:c7d3094b05e4d9149b986d094d632989f8b0bbdde806b22bcc877d07c982ca01
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:insiders@sha256:c7d3094b05e4d9149b986d094d632989f8b0bbdde806b22bcc877d07c982ca01
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 5eeb447

Please sign in to comment.