From 44cc1c2d2fa13ed381fa63eed57c82613a4cd4e0 Mon Sep 17 00:00:00 2001 From: Erik Seliger Date: Thu, 24 Apr 2025 23:14:38 +0200 Subject: [PATCH] Remove repo-updater from helm chart We no longer need this service, starting in 6.4. It's fully incorporated into other services now and an empty service doing nothing. Test plan: TBD. --- charts/sourcegraph/CHANGELOG.md | 1 + charts/sourcegraph/README.md | 8 -- .../common-modifications/override.yaml | 9 -- charts/sourcegraph/examples/gcp/override.yaml | 5 - .../repo-updater/repo-updater.Deployment.yaml | 113 ------------------ .../repo-updater/repo-updater.Service.yaml | 26 ---- .../repo-updater.ServiceAccount.yaml | 11 -- charts/sourcegraph/values.yaml | 33 ----- 8 files changed, 1 insertion(+), 205 deletions(-) delete mode 100644 charts/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml delete mode 100644 charts/sourcegraph/templates/repo-updater/repo-updater.Service.yaml delete mode 100644 charts/sourcegraph/templates/repo-updater/repo-updater.ServiceAccount.yaml diff --git a/charts/sourcegraph/CHANGELOG.md b/charts/sourcegraph/CHANGELOG.md index 581aeb7f..696244ba 100644 --- a/charts/sourcegraph/CHANGELOG.md +++ b/charts/sourcegraph/CHANGELOG.md @@ -10,6 +10,7 @@ Use `**BREAKING**:` to denote a breaking change - Fix Pod Disruption Budget for sourcegraph-frontend - Added a startup probe to the gitserver statefulset to give it time to run the on-disk migration from repo names to repo IDs +- The repo-updater service is no longer needed and has been removed from the chart. ## 5.10.0 diff --git a/charts/sourcegraph/README.md b/charts/sourcegraph/README.md index ada2a76a..233c0bac 100644 --- a/charts/sourcegraph/README.md +++ b/charts/sourcegraph/README.md @@ -289,14 +289,6 @@ In addition to the documented values, all services also support the following va | redisStore.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `redis-store` | | redisStore.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount | | redisStore.storageSize | string | `"100Gi"` | PVC Storage Request for `redis-store` data volume | -| repoUpdater.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `repo-updater` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) | -| repoUpdater.image.defaultTag | string | `"6.0.0@sha256:238702dde17eaa41f9dc5b5f379c08a9e57940587128ceda6008d7f06e72cccc"` | Docker image tag for the `repo-updater` image | -| repoUpdater.image.name | string | `"repo-updater"` | Docker image name for the `repo-updater` image | -| repoUpdater.name | string | `"repo-updater"` | Name used by resources. Does not affect service names or PVCs. | -| repoUpdater.podSecurityContext | object | `{}` | Security context for the `repo-updater` pod, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) | -| repoUpdater.resources | object | `{"limits":{"cpu":"1","memory":"2Gi"},"requests":{"cpu":"1","memory":"500Mi"}}` | Resource requests & limits for the `repo-updater` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | -| repoUpdater.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `repo-updater` | -| repoUpdater.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount | | 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) | | searcher.image.defaultTag | string | `"6.0.0@sha256:c7508abda2202d4a33400ce23a95dd8d59fe6220d85d7fbee6fb186c55931336"` | Docker image tag for the `searcher` image | | searcher.image.name | string | `"searcher"` | Docker image name for the `searcher` image | diff --git a/charts/sourcegraph/examples/common-modifications/override.yaml b/charts/sourcegraph/examples/common-modifications/override.yaml index 8483abae..118f4fea 100644 --- a/charts/sourcegraph/examples/common-modifications/override.yaml +++ b/charts/sourcegraph/examples/common-modifications/override.yaml @@ -171,15 +171,6 @@ redisStore: memory: 7Gi storageSize: 100Gi -repoUpdater: - resources: - limits: - cpu: "1" - memory: 2Gi - requests: - cpu: "1" - memory: 500Mi - searcher: replicaCount: 2 resources: diff --git a/charts/sourcegraph/examples/gcp/override.yaml b/charts/sourcegraph/examples/gcp/override.yaml index 348487a6..6026346e 100644 --- a/charts/sourcegraph/examples/gcp/override.yaml +++ b/charts/sourcegraph/examples/gcp/override.yaml @@ -69,11 +69,6 @@ preciseCodeIntel: SRC_LOG_FORMAT: value: json_gcp -repoUpdater: - env: - SRC_LOG_FORMAT: - value: json_gcp - searcher: env: SRC_LOG_FORMAT: diff --git a/charts/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml b/charts/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml deleted file mode 100644 index b2d12e4b..00000000 --- a/charts/sourcegraph/templates/repo-updater/repo-updater.Deployment.yaml +++ /dev/null @@ -1,113 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - description: Handles repository metadata (not Git data) lookups and updates from - external code hosts and other similar services. - labels: - {{- include "sourcegraph.labels" . | nindent 4 }} - {{- if .Values.repoUpdater.labels }} - {{- toYaml .Values.repoUpdater.labels | nindent 4 }} - {{- end }} - deploy: sourcegraph - app.kubernetes.io/component: repo-updater - name: {{ .Values.repoUpdater.name }} -spec: - minReadySeconds: 10 - replicas: 1 - revisionHistoryLimit: {{ .Values.sourcegraph.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "sourcegraph.selectorLabels" . | nindent 6 }} - app: repo-updater - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - type: RollingUpdate - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: repo-updater - {{- include "sourcegraph.redisChecksum" . | nindent 8 }} - {{- if .Values.sourcegraph.podAnnotations }} - {{- toYaml .Values.sourcegraph.podAnnotations | nindent 8 }} - {{- end }} - {{- if .Values.repoUpdater.podAnnotations }} - {{- toYaml .Values.repoUpdater.podAnnotations | nindent 8 }} - {{- end }} - labels: - {{- include "sourcegraph.selectorLabels" . | nindent 8 }} - {{- if .Values.sourcegraph.podLabels }} - {{- toYaml .Values.sourcegraph.podLabels | nindent 8 }} - {{- end }} - {{- if .Values.repoUpdater.podLabels }} - {{- toYaml .Values.repoUpdater.podLabels | nindent 8 }} - {{- end }} - deploy: sourcegraph - app: repo-updater - spec: - containers: - - name: repo-updater - image: {{ include "sourcegraph.image" (list . "repoUpdater") }} - imagePullPolicy: {{ .Values.sourcegraph.image.pullPolicy }} - {{- with .Values.repoUpdater.args }} - args: - {{- toYaml . | nindent 8 }} - {{- end }} - env: - {{- include "sourcegraph.redisConnection" .| nindent 8 }} - {{- range $name, $item := .Values.repoUpdater.env}} - - name: {{ $name }} - {{- $item | toYaml | nindent 10 }} - {{- end }} - {{- include "sourcegraph.openTelemetryEnv" . | nindent 8 }} - terminationMessagePolicy: FallbackToLogsOnError - ports: - - containerPort: 3182 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - failureThreshold: 3 - httpGet: - path: /ready - port: debug - scheme: HTTP - periodSeconds: 1 - timeoutSeconds: 5 - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: debug - scheme: HTTP - periodSeconds: 1 - timeoutSeconds: 5 - {{- if not .Values.sourcegraph.localDevMode }} - resources: - {{- toYaml .Values.repoUpdater.resources | nindent 10 }} - {{- end }} - securityContext: - {{- toYaml .Values.repoUpdater.containerSecurityContext | nindent 10 }} - volumeMounts: - {{- if .Values.repoUpdater.extraVolumeMounts }} - {{- toYaml .Values.repoUpdater.extraVolumeMounts | nindent 8 }} - {{- end }} - {{- if .Values.repoUpdater.extraContainers }} - {{- toYaml .Values.repoUpdater.extraContainers | nindent 6 }} - {{- end }} - securityContext: - {{- toYaml .Values.repoUpdater.podSecurityContext | nindent 8 }} - {{- include "sourcegraph.nodeSelector" (list . "repoUpdater" ) | trim | nindent 6 }} - {{- include "sourcegraph.affinity" (list . "repoUpdater" ) | trim | nindent 6 }} - {{- include "sourcegraph.tolerations" (list . "repoUpdater" ) | trim | nindent 6 }} - {{- with .Values.sourcegraph.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- include "sourcegraph.renderServiceAccountName" (list . "repoUpdater") | trim | nindent 6 }} - volumes: - {{- if .Values.repoUpdater.extraVolumes }} - {{- toYaml .Values.repoUpdater.extraVolumes | nindent 6 }} - {{- end }} diff --git a/charts/sourcegraph/templates/repo-updater/repo-updater.Service.yaml b/charts/sourcegraph/templates/repo-updater/repo-updater.Service.yaml deleted file mode 100644 index e1414eb8..00000000 --- a/charts/sourcegraph/templates/repo-updater/repo-updater.Service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - sourcegraph.prometheus/scrape: "true" - {{- if .Values.repoUpdater.serviceAnnotations }} - {{- toYaml .Values.repoUpdater.serviceAnnotations | nindent 4 }} - {{- end }} - labels: - app: repo-updater - deploy: sourcegraph - app.kubernetes.io/component: repo-updater - {{- if .Values.repoUpdater.serviceLabels }} - {{- toYaml .Values.repoUpdater.serviceLabels | nindent 4 }} - {{- end }} - name: repo-updater -spec: - ports: - - name: http - port: 3182 - targetPort: http - selector: - {{- include "sourcegraph.selectorLabels" . | nindent 4 }} - app: repo-updater - type: {{ .Values.repoUpdater.serviceType | default "ClusterIP" }} diff --git a/charts/sourcegraph/templates/repo-updater/repo-updater.ServiceAccount.yaml b/charts/sourcegraph/templates/repo-updater/repo-updater.ServiceAccount.yaml deleted file mode 100644 index c3ea021e..00000000 --- a/charts/sourcegraph/templates/repo-updater/repo-updater.ServiceAccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if .Values.repoUpdater.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - category: rbac - deploy: sourcegraph - app.kubernetes.io/component: repo-updater - {{- include "sourcegraph.serviceAccountAnnotations" (list . "repoUpdater") | trim | nindent 2 }} - name: {{ include "sourcegraph.serviceAccountName" (list . "repoUpdater") }} -{{- end }} diff --git a/charts/sourcegraph/values.yaml b/charts/sourcegraph/values.yaml index b638002f..3de364ee 100644 --- a/charts/sourcegraph/values.yaml +++ b/charts/sourcegraph/values.yaml @@ -1035,39 +1035,6 @@ redisStore: # -- PVC Storage Request for `redis-store` data volume storageSize: 100Gi -repoUpdater: - image: - # -- Docker image tag for the `repo-updater` image - defaultTag: 6.0.0@sha256:238702dde17eaa41f9dc5b5f379c08a9e57940587128ceda6008d7f06e72cccc - # -- Docker image name for the `repo-updater` image - name: "repo-updater" - # -- Security context for the `repo-updater` container, - # learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) - containerSecurityContext: - allowPrivilegeEscalation: false - runAsUser: 100 - runAsGroup: 101 - readOnlyRootFilesystem: true - # -- Name used by resources. Does not affect service names or PVCs. - name: "repo-updater" - # -- Security context for the `repo-updater` pod, - # learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) - podSecurityContext: {} - # -- Resource requests & limits for the `repo-updater` container, - # learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - resources: - limits: - cpu: "1" - memory: 2Gi - requests: - cpu: "1" - memory: 500Mi - serviceAccount: - # -- Enable creation of ServiceAccount for `repo-updater` - create: false - # -- Name of the ServiceAccount to be created or an existing ServiceAccount - name: "" - searcher: image: # -- Docker image tag for the `searcher` image