Skip to content

Commit

Permalink
Sourcegraph 4.2.x minio removal patches (#4208)
Browse files Browse the repository at this point in the history
* all: replace minio with sourcegraph/blobstore (#4206)

* 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]>

* all: update image tags to :4.2_187939_2022-12-07_5d744edd0103

Produced via:

```
sg ops update-images -t 4.2_187939_2022-12-07_5d744edd0103 -kind k8s ./base
git checkout -- **/*.ConfigMap.yaml **/*.Role.yaml **/*.Ingress.yaml **/*.Service.yaml **/*.IndexerService.yaml
git add base/
```

Signed-off-by: Stephen Gutekanst <[email protected]>

Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots authored Dec 7, 2022
1 parent cd3a00f commit 6393e5f
Show file tree
Hide file tree
Showing 38 changed files with 135 additions and 134 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:4.2_187939_2022-12-07_5d744edd0103@sha256:ce977909ba8cda68339221fb85fa6c96b731e2a86c348605a7acad2ef2b2febe
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
4 changes: 2 additions & 2 deletions base/cadvisor/cadvisor.ClusterRole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ metadata:
rules:
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
verbs: ['use']
resourceNames:
- cadvisor
- cadvisor
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:4.2_187939_2022-12-07_5d744edd0103@sha256:5c4fa3c7749d07a75d80bd34db24fa986791d00ecb256cad04713feb82ee86c9
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:4.2_187939_2022-12-07_5d744edd0103@sha256:dc5c10df081e7a1769d52fec6dca1803c5b09f0ff146b81f85edbbd113a74dfc
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:4.2_187939_2022-12-07_5d744edd0103@sha256:265f21359dace894477960d5f7ff93d928cb1fc0f758c006b9dc98a1bfc85ec8
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:4.2_187939_2022-12-07_5d744edd0103@sha256:3cb006891f115446d6af1fab875ad763e3c6364fe20b73eb37b07e989a678a54
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:4.2_187939_2022-12-07_5d744edd0103@sha256:dc5c10df081e7a1769d52fec6dca1803c5b09f0ff146b81f85edbbd113a74dfc
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:4.2_187939_2022-12-07_5d744edd0103@sha256:708740c0969abe2563c32dfdfe8ae7c0ae847dd65a93e440f4215fa6d0459ec2
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:4.2_187939_2022-12-07_5d744edd0103@sha256:3cb006891f115446d6af1fab875ad763e3c6364fe20b73eb37b07e989a678a54
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:4.2_187939_2022-12-07_5d744edd0103@sha256:afcc200a6717692642d8066fd47c6ee0b1f4abbd73ca4170cb21a348e2a1e491
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:4.2_187939_2022-12-07_5d744edd0103@sha256:1f3f9365b74a80ca8a77b3f17822410952d5b349fdac4f25ec2af11095b45cdd
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:4.2_187939_2022-12-07_5d744edd0103@sha256:60aa2b3c0bf8ec6e7498e9510b953c72744550cb22c596b838d535f2884cf3fc
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:4.2_187939_2022-12-07_5d744edd0103@sha256:1cd91b677dee14b7ca18b2be7dee6e1f678c385f520e7a92b78484b23edf447f
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:4.2_187939_2022-12-07_5d744edd0103@sha256:34e044023b1078f19bb45eea0b6297b19654602fbd05449faea2d047106c39fe
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:4.2_187939_2022-12-07_5d744edd0103@sha256:b2943dc9e0d02aa21206f22db903d0527dbc6192925c6ca5df0153607867fd68
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:4.2_187939_2022-12-07_5d744edd0103@sha256:6f08a86860d30cbfd04c427afa2c24c8a9870c9d28d4bd24bf867abed8a2f9d8
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:4.2_187939_2022-12-07_5d744edd0103@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:4.2_187939_2022-12-07_5d744edd0103@sha256:64595ac0178439cf845904878250625c8ece9d5913cfa5d66848fb14ac3b4816
command:
- "/bin/otelcol-sourcegraph"
- "--config=/etc/otel-agent/config.yaml"
Expand Down
Loading

0 comments on commit 6393e5f

Please sign in to comment.