From 3f90510b5f4d19749babe14b35f60aac66b7832e Mon Sep 17 00:00:00 2001 From: Erik Seliger Date: Mon, 12 May 2025 14:27:51 +0200 Subject: [PATCH 1/2] Remove symbols statefulset Starting in Sourcegraph 6.4, the Symbols and Searcher services are now combined, for easier operation, simplified architecture, and better resource utilization. Customers can delete the service if not deleted automatically, and may want to consider reallocating resources previously given to symbols to searcher. Environment variables should be copied over from symbols to searcher. Test plan: This deployment ran for ~2 weeks on S2 and dotcom already and has signoff from team-product-platform. --- base/monitoring/prometheus/prometheus.yml | 3 - .../sourcegraph-frontend.ConfigMap.yaml | 1 - base/sourcegraph/kustomization.yaml | 1 - base/sourcegraph/symbols/kustomization.yaml | 5 - base/sourcegraph/symbols/symbols.Service.yaml | 24 ----- .../symbols/symbols.StatefulSet.yaml | 94 ------------------- .../clusters/old-base/kustomization.yaml | 9 +- .../symbols/symbols.patchesJson6902.yaml | 12 --- components/custom/replica/kustomization.yaml | 2 - .../custom/resources/kustomization.yaml | 40 -------- .../resources/patches/update-endpoints.yaml | 13 --- .../enable/otel-collector/kustomization.yaml | 2 +- .../sourcegraph-frontend.ConfigMap.yaml | 1 - .../sourcegraph-frontend.ConfigMap.yaml | 1 - components/patches/endpoints-update.yaml | 13 --- components/patches/resources.yaml | 20 ---- .../sourcegraph/symbols.StatefulSet.yaml | 16 ---- components/privileged/kustomization.yaml | 8 +- .../privileged/patches/symbols/symbols.yaml | 11 --- .../symbols-statefulset/kustomization.yaml | 9 -- components/services/redis/kustomization.yaml | 22 +---- .../patches/searcher.StatefulSet.yaml | 79 +++++++++------- components/services/symbols/README.md | 1 - .../services/symbols/deployment/README.md | 3 - .../symbols/deployment/kustomization.yaml | 15 --- .../patches/symbols.Deployment.yaml | 60 ------------ .../symbols/statefulset/kustomization.yaml | 9 -- .../patches/symbols.StatefulSet.yaml | 58 ------------ components/sizes/l/kustomization.yaml | 30 +----- components/sizes/l/patches/endpoints.yaml | 1 - components/sizes/l/patches/symbols.yaml | 19 ---- components/sizes/m/kustomization.yaml | 8 +- components/sizes/m/patches/endpoints.yaml | 1 - components/sizes/m/patches/symbols.yaml | 19 ---- components/sizes/s/kustomization.yaml | 8 +- components/sizes/s/patches/endpoints.yaml | 1 - components/sizes/s/patches/symbols.yaml | 19 ---- components/sizes/xl/kustomization.yaml | 8 +- components/sizes/xl/patches/endpoints.yaml | 1 - components/sizes/xl/patches/symbols.yaml | 19 ---- components/sizes/xs/kustomization.yaml | 8 +- components/sizes/xs/patches/endpoints.yaml | 1 - components/sizes/xs/patches/symbols.yaml | 19 ---- .../aws/aws-ebs/kustomization.yaml | 2 +- .../aws/ebs-csi/kustomization.yaml | 2 +- .../storage-class/azure/kustomization.yaml | 2 +- .../storage-class/gcp/kustomization.yaml | 2 +- .../storage-class/k3s/kustomization.yaml | 2 +- .../storage-class/minikube/kustomization.yaml | 2 +- .../name-update/kustomization.yaml | 2 +- .../sourcegraph/kustomization.yaml | 2 +- .../utils/endpoints/endpoints-update.yaml | 13 --- .../template/kustomization.template.yaml | 12 +-- 53 files changed, 62 insertions(+), 673 deletions(-) delete mode 100644 base/sourcegraph/symbols/kustomization.yaml delete mode 100644 base/sourcegraph/symbols/symbols.Service.yaml delete mode 100644 base/sourcegraph/symbols/symbols.StatefulSet.yaml delete mode 100644 components/clusters/old-base/patches/symbols/symbols.patchesJson6902.yaml delete mode 100644 components/patches/security-context/sourcegraph/symbols.StatefulSet.yaml delete mode 100644 components/privileged/patches/symbols/symbols.yaml delete mode 100644 components/remove/symbols-statefulset/kustomization.yaml delete mode 100644 components/services/symbols/README.md delete mode 100644 components/services/symbols/deployment/README.md delete mode 100644 components/services/symbols/deployment/kustomization.yaml delete mode 100644 components/services/symbols/deployment/patches/symbols.Deployment.yaml delete mode 100644 components/services/symbols/statefulset/kustomization.yaml delete mode 100644 components/services/symbols/statefulset/patches/symbols.StatefulSet.yaml delete mode 100644 components/sizes/l/patches/symbols.yaml delete mode 100644 components/sizes/m/patches/symbols.yaml delete mode 100644 components/sizes/s/patches/symbols.yaml delete mode 100644 components/sizes/xl/patches/symbols.yaml delete mode 100644 components/sizes/xs/patches/symbols.yaml diff --git a/base/monitoring/prometheus/prometheus.yml b/base/monitoring/prometheus/prometheus.yml index 7e413552..ebd12a9f 100644 --- a/base/monitoring/prometheus/prometheus.yml +++ b/base/monitoring/prometheus/prometheus.yml @@ -55,9 +55,6 @@ scrape_configs: # Configure targets to scrape - job_name: "sourcegraph-statefulsets" dns_sd_configs: - names: - - "symbols.default.svc.cluster.local" - - "symbols.ns-sourcegraph.svc.cluster.local" - - "symbols.$SG_NAMESPACE.svc.cluster.local" - "searcher.default.svc.cluster.local" - "searcher.ns-sourcegraph.svc.cluster.local" - "searcher.$SG_NAMESPACE.svc.cluster.local" diff --git a/base/sourcegraph/frontend/sourcegraph-frontend.ConfigMap.yaml b/base/sourcegraph/frontend/sourcegraph-frontend.ConfigMap.yaml index 5a280730..dd158259 100644 --- a/base/sourcegraph/frontend/sourcegraph-frontend.ConfigMap.yaml +++ b/base/sourcegraph/frontend/sourcegraph-frontend.ConfigMap.yaml @@ -24,5 +24,4 @@ data: PROMETHEUS_URL: http://prometheus:30090 SRC_GIT_SERVERS: gitserver-0.gitserver:3178 SEARCHER_URL: http://searcher-0.searcher:3181 - SYMBOLS_URL: http://symbols:3184 INDEXED_SEARCH_SERVERS: indexed-search-0.indexed-search:6070 diff --git a/base/sourcegraph/kustomization.yaml b/base/sourcegraph/kustomization.yaml index 5526df76..cef43ba8 100644 --- a/base/sourcegraph/kustomization.yaml +++ b/base/sourcegraph/kustomization.yaml @@ -11,7 +11,6 @@ resources: - precise-code-intel - redis - searcher - - symbols - syntactic-code-intel - syntect-server - worker diff --git a/base/sourcegraph/symbols/kustomization.yaml b/base/sourcegraph/symbols/kustomization.yaml deleted file mode 100644 index f5076b8d..00000000 --- a/base/sourcegraph/symbols/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - symbols.StatefulSet.yaml - - symbols.Service.yaml diff --git a/base/sourcegraph/symbols/symbols.Service.yaml b/base/sourcegraph/symbols/symbols.Service.yaml deleted file mode 100644 index 4bc3996a..00000000 --- a/base/sourcegraph/symbols/symbols.Service.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "6060" - sourcegraph.prometheus/scrape: "true" - labels: - app: symbols - app.kubernetes.io/component: symbols - deploy: sourcegraph - sourcegraph-resource-requires: no-cluster-admin - name: symbols -spec: - clusterIP: None - ports: - - name: http - port: 3184 - targetPort: http - - name: debug - port: 6060 - targetPort: debug - selector: - app: symbols - type: ClusterIP diff --git a/base/sourcegraph/symbols/symbols.StatefulSet.yaml b/base/sourcegraph/symbols/symbols.StatefulSet.yaml deleted file mode 100644 index e979abb3..00000000 --- a/base/sourcegraph/symbols/symbols.StatefulSet.yaml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - annotations: - description: Backend for symbols operations. - kubectl.kubernetes.io/default-container: symbols - labels: - app.kubernetes.io/component: symbols - deploy: sourcegraph - sourcegraph-resource-requires: no-cluster-admin - name: symbols -spec: - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app: symbols - serviceName: symbols - template: - metadata: - labels: - app: symbols - deploy: sourcegraph - spec: - securityContext: - runAsUser: 100 - fsGroup: 101 - fsGroupChangePolicy: OnRootMismatch - containers: - - name: symbols - env: - - name: SYMBOLS_CACHE_SIZE_MB - value: "12000" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - - name: OTEL_AGENT_HOST - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_AGENT_HOST):4317 - image: index.docker.io/sourcegraph/symbols:6.2.1106@sha256:3a2e282d27d0669323532b7515fc0b76016b4e15c8049540382312a5563a7f1c - livenessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - ports: - - containerPort: 3184 - name: http - - containerPort: 6060 - name: debug - readinessProbe: - httpGet: - path: /healthz - port: http - scheme: HTTP - periodSeconds: 5 - timeoutSeconds: 5 - resources: - limits: - cpu: "2" - memory: 2G - requests: - cpu: 500m - memory: 500M - securityContext: - allowPrivilegeEscalation: false - runAsGroup: 101 - runAsUser: 100 - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /mnt/cache - name: cache - volumes: - - name: cache - emptyDir: {} - updateStrategy: - type: RollingUpdate - volumeClaimTemplates: - - metadata: - name: cache - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 12G diff --git a/components/clusters/old-base/kustomization.yaml b/components/clusters/old-base/kustomization.yaml index 2df60393..959ac727 100644 --- a/components/clusters/old-base/kustomization.yaml +++ b/components/clusters/old-base/kustomization.yaml @@ -5,7 +5,6 @@ components: - ../../monitoring/cadvisor - ../../monitoring/rbacs - ../../services/searcher/deployment - - ../../services/symbols/deployment - ../../services/pgsql - ../../services/codeinsights-db - ../../services/codeintel-db @@ -13,19 +12,13 @@ components: - ../../storage-class/sourcegraph - ../../enable/service-discovery patches: - # To support searcher and symbols as both statefulset and deployment + # To support searcher as both statefulset and deployment - path: patches/searcher/searcher.patchesJson6902.yaml target: group: apps kind: StatefulSet|Deployment name: searcher version: v1 - - path: patches/symbols/symbols.patchesJson6902.yaml - target: - group: apps - kind: StatefulSet|Deployment - name: symbols - version: v1 - path: patches/remove/securityContext-container-0.yaml target: group: apps diff --git a/components/clusters/old-base/patches/symbols/symbols.patchesJson6902.yaml b/components/clusters/old-base/patches/symbols/symbols.patchesJson6902.yaml deleted file mode 100644 index 0773f186..00000000 --- a/components/clusters/old-base/patches/symbols/symbols.patchesJson6902.yaml +++ /dev/null @@ -1,12 +0,0 @@ -- op: replace - path: /spec/template/spec/containers/0/securityContext - value: - allowPrivilegeEscalation: true - runAsGroup: 0 - runAsUser: 0 -- op: replace - path: /spec/template/spec/securityContext - value: - runAsUser: 0 - fsGroup: 0 - fsGroupChangePolicy: OnRootMismatch \ No newline at end of file diff --git a/components/custom/replica/kustomization.yaml b/components/custom/replica/kustomization.yaml index 269147c6..674848ae 100644 --- a/components/custom/replica/kustomization.yaml +++ b/components/custom/replica/kustomization.yaml @@ -16,8 +16,6 @@ replicas: # count: 1 # - name: searcher # count: 1 - # - name: symbols - # count: 1 # - name: sourcegraph-frontend # count: 2 # - name: precise-code-intel-worker diff --git a/components/custom/resources/kustomization.yaml b/components/custom/resources/kustomization.yaml index 4471a93f..81e4eac6 100644 --- a/components/custom/resources/kustomization.yaml +++ b/components/custom/resources/kustomization.yaml @@ -348,26 +348,6 @@ patches: # memory: 500M # - patch: |- # apiVersion: apps/v1 -# kind: StatefulSet -# metadata: -# name: symbols -# spec: -# replicas: 1 -# template: -# spec: -# containers: -# - name: symbols -# resources: -# limits: -# cpu: "2" -# ephemeral-storage: "12G" -# memory: 2G -# requests: -# cpu: 500m -# ephemeral-storage: "10G" -# memory: 500M -# - patch: |- -# apiVersion: apps/v1 # kind: Deployment # metadata: # name: searcher @@ -390,26 +370,6 @@ patches: # apiVersion: apps/v1 # kind: Deployment # metadata: -# name: symbols -# spec: -# replicas: 1 -# template: -# spec: -# containers: -# - name: symbols -# resources: -# limits: -# cpu: "2" -# ephemeral-storage: "12G" -# memory: 2G -# requests: -# cpu: 500m -# ephemeral-storage: "10G" -# memory: 500M -# - patch: |- -# apiVersion: apps/v1 -# kind: Deployment -# metadata: # name: syntect-server # spec: # replicas: 1 diff --git a/components/custom/resources/patches/update-endpoints.yaml b/components/custom/resources/patches/update-endpoints.yaml index f131bd1b..3c8bf94a 100644 --- a/components/custom/resources/patches/update-endpoints.yaml +++ b/components/custom/resources/patches/update-endpoints.yaml @@ -21,19 +21,6 @@ name: sourcegraph-frontend-env fieldPaths: - data.SEARCHER_URL -- source: - group: apps - name: symbols - fieldPath: spec.replicas - reject: - - kind: Service - - kind: Deployment - targets: - - select: - kind: ConfigMap - name: sourcegraph-frontend-env - fieldPaths: - - data.SYMBOLS_URL - source: kind: StatefulSet name: indexed-search diff --git a/components/enable/otel-collector/kustomization.yaml b/components/enable/otel-collector/kustomization.yaml index be6f0a6b..9487b280 100644 --- a/components/enable/otel-collector/kustomization.yaml +++ b/components/enable/otel-collector/kustomization.yaml @@ -21,7 +21,7 @@ patches: target: group: apps kind: StatefulSet|Deployment - name: sourcegraph-frontend|gitserver|indexed-search|precise-code-intel-worker|searcher|symbols|worker + name: sourcegraph-frontend|gitserver|indexed-search|precise-code-intel-worker|searcher|worker version: v1 - patch: |- - op: add diff --git a/components/enable/service-discovery-default/patches/sourcegraph-frontend.ConfigMap.yaml b/components/enable/service-discovery-default/patches/sourcegraph-frontend.ConfigMap.yaml index 15a095ac..2a1bc6c6 100644 --- a/components/enable/service-discovery-default/patches/sourcegraph-frontend.ConfigMap.yaml +++ b/components/enable/service-discovery-default/patches/sourcegraph-frontend.ConfigMap.yaml @@ -5,5 +5,4 @@ metadata: data: SRC_GIT_SERVERS: k8s+rpc://gitserver:3178?kind=sts SEARCHER_URL: k8s+http://searcher:3181 - SYMBOLS_URL: http://symbols:3184 INDEXED_SEARCH_SERVERS: k8s+rpc://indexed-search:6070?kind=sts diff --git a/components/enable/service-discovery/patches/sourcegraph-frontend.ConfigMap.yaml b/components/enable/service-discovery/patches/sourcegraph-frontend.ConfigMap.yaml index c556bb99..ecd7494b 100644 --- a/components/enable/service-discovery/patches/sourcegraph-frontend.ConfigMap.yaml +++ b/components/enable/service-discovery/patches/sourcegraph-frontend.ConfigMap.yaml @@ -5,5 +5,4 @@ metadata: data: SRC_GIT_SERVERS: k8s+rpc://gitserver:3178?kind=sts SEARCHER_URL: k8s+http://searcher:3181?kind=sts - SYMBOLS_URL: k8s+http://symbols:3184?kind=sts INDEXED_SEARCH_SERVERS: k8s+rpc://indexed-search:6070?kind=sts diff --git a/components/patches/endpoints-update.yaml b/components/patches/endpoints-update.yaml index f131bd1b..3c8bf94a 100644 --- a/components/patches/endpoints-update.yaml +++ b/components/patches/endpoints-update.yaml @@ -21,19 +21,6 @@ name: sourcegraph-frontend-env fieldPaths: - data.SEARCHER_URL -- source: - group: apps - name: symbols - fieldPath: spec.replicas - reject: - - kind: Service - - kind: Deployment - targets: - - select: - kind: ConfigMap - name: sourcegraph-frontend-env - fieldPaths: - - data.SYMBOLS_URL - source: kind: StatefulSet name: indexed-search diff --git a/components/patches/resources.yaml b/components/patches/resources.yaml index 0c75e6e4..c3984923 100644 --- a/components/patches/resources.yaml +++ b/components/patches/resources.yaml @@ -357,26 +357,6 @@ # apiVersion: apps/v1 # kind: Deployment # metadata: -# name: symbols -# spec: -# replicas: 1 -# template: -# spec: -# containers: -# - name: symbols -# resources: -# limits: -# cpu: "2" -# ephemeral-storage: "12G" -# memory: 2G -# requests: -# cpu: 500m -# ephemeral-storage: "10G" -# memory: 500M ---- -# apiVersion: apps/v1 -# kind: Deployment -# metadata: # name: syntect-server # spec: # replicas: 1 diff --git a/components/patches/security-context/sourcegraph/symbols.StatefulSet.yaml b/components/patches/security-context/sourcegraph/symbols.StatefulSet.yaml deleted file mode 100644 index a48e4e0b..00000000 --- a/components/patches/security-context/sourcegraph/symbols.StatefulSet.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# apiVersion: apps/v1 -# kind: StatefulSet -# metadata: -# name: symbols -# spec: -# template: -# spec: -# securityContext: -# runAsUser: 100 -# fsGroup: 101 -# containers: -# - name: symbols -# securityContext: -# allowPrivilegeEscalation: false -# runAsGroup: 101 -# runAsUser: 100 diff --git a/components/privileged/kustomization.yaml b/components/privileged/kustomization.yaml index 3dcac220..c5f27383 100644 --- a/components/privileged/kustomization.yaml +++ b/components/privileged/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component -# To support searcher and symbols as both statefulset and deployment +# To support searcher as both statefulset and deployment patches: - path: patches/searcher/searcher.yaml target: @@ -8,12 +8,6 @@ patches: kind: StatefulSet|Deployment name: searcher version: v1 - - path: patches/symbols/symbols.yaml - target: - group: apps - kind: StatefulSet|Deployment - name: symbols - version: v1 - path: patches/databases/securityContext.yaml target: group: apps diff --git a/components/privileged/patches/symbols/symbols.yaml b/components/privileged/patches/symbols/symbols.yaml deleted file mode 100644 index b56d8243..00000000 --- a/components/privileged/patches/symbols/symbols.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- op: replace - path: /spec/template/spec/containers/0/securityContext - value: - allowPrivilegeEscalation: true - runAsGroup: 0 - runAsUser: 0 -- op: replace - path: /spec/template/spec/securityContext - value: - runAsUser: 0 - fsGroup: 0 \ No newline at end of file diff --git a/components/remove/symbols-statefulset/kustomization.yaml b/components/remove/symbols-statefulset/kustomization.yaml deleted file mode 100644 index 71571948..00000000 --- a/components/remove/symbols-statefulset/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1alpha1 -kind: Component -patches: - - patch: |- - $patch: delete - apiVersion: apps/v1 - kind: StatefulSet - metadata: - name: symbols diff --git a/components/services/redis/kustomization.yaml b/components/services/redis/kustomization.yaml index e48ec3b1..d92133ec 100644 --- a/components/services/redis/kustomization.yaml +++ b/components/services/redis/kustomization.yaml @@ -23,21 +23,11 @@ replacements: select: kind: StatefulSet name: searcher - - fieldPaths: - - spec.template.spec.containers.0.env.[name=REDIS_CACHE_ENDPOINT].value - select: - kind: StatefulSet - name: symbols - fieldPaths: - spec.template.spec.containers.0.env.[name=REDIS_CACHE_ENDPOINT].value select: kind: Deployment name: searcher - - fieldPaths: - - spec.template.spec.containers.0.env.[name=REDIS_CACHE_ENDPOINT].value - select: - kind: Deployment - name: symbols - fieldPaths: - spec.template.spec.containers.0.env.[name=REDIS_CACHE_ENDPOINT].value select: @@ -65,21 +55,11 @@ replacements: select: kind: StatefulSet name: searcher - - fieldPaths: - - spec.template.spec.containers.0.env.[name=REDIS_STORE_ENDPOINT].value - select: - kind: StatefulSet - name: symbols - fieldPaths: - spec.template.spec.containers.0.env.[name=REDIS_STORE_ENDPOINT].value select: kind: Deployment name: searcher - - fieldPaths: - - spec.template.spec.containers.0.env.[name=REDIS_STORE_ENDPOINT].value - select: - kind: Deployment - name: symbols - fieldPaths: - spec.template.spec.containers.0.env.[name=REDIS_STORE_ENDPOINT].value select: @@ -100,5 +80,5 @@ patches: target: group: apps kind: StatefulSet|Deployment - name: gitserver|searcher|symbols|worker + name: gitserver|searcher|worker version: v1 diff --git a/components/services/searcher/statefulset/patches/searcher.StatefulSet.yaml b/components/services/searcher/statefulset/patches/searcher.StatefulSet.yaml index 6a446803..7204dffb 100644 --- a/components/services/searcher/statefulset/patches/searcher.StatefulSet.yaml +++ b/components/services/searcher/statefulset/patches/searcher.StatefulSet.yaml @@ -1,36 +1,46 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: symbols + name: searcher spec: + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: searcher + serviceName: searcher template: + metadata: + labels: + app: searcher + deploy: sourcegraph spec: containers: - - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - - name: OTEL_AGENT_HOST - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_AGENT_HOST):4317 - name: symbols - resources: - limits: - cpu: "2" - memory: 2G - requests: - cpu: 500m - memory: 500M - securityContext: - allowPrivilegeEscalation: false - runAsGroup: 101 - runAsUser: 100 + - env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: CACHE_DIR + value: /mnt/cache/$(POD_NAME) + - name: OTEL_AGENT_HOST + valueFrom: + fieldRef: + fieldPath: status.hostIP + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://$(OTEL_AGENT_HOST):4317 + name: searcher + resources: + limits: + cpu: "2" + memory: 2G + requests: + cpu: 500m + memory: 500M + securityContext: + allowPrivilegeEscalation: false + runAsGroup: 101 + runAsUser: 100 securityContext: fsGroup: 101 fsGroupChangePolicy: OnRootMismatch @@ -38,12 +48,11 @@ spec: updateStrategy: type: RollingUpdate volumeClaimTemplates: - - metadata: - name: cache-ssd - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 50G - storageClassName: sourcegraph \ No newline at end of file + - metadata: + name: cache-ssd + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50G diff --git a/components/services/symbols/README.md b/components/services/symbols/README.md deleted file mode 100644 index b5d260ef..00000000 --- a/components/services/symbols/README.md +++ /dev/null @@ -1 +0,0 @@ -Component to deploy symbols as Deployment instead of Statefulset and vice versa diff --git a/components/services/symbols/deployment/README.md b/components/services/symbols/deployment/README.md deleted file mode 100644 index 774e6857..00000000 --- a/components/services/symbols/deployment/README.md +++ /dev/null @@ -1,3 +0,0 @@ -A component to deploy symbols as Deployment instead of Statefulset. - -It add the symbols Deployment resource and delete the symbols Statefulset. diff --git a/components/services/symbols/deployment/kustomization.yaml b/components/services/symbols/deployment/kustomization.yaml deleted file mode 100644 index d524c60d..00000000 --- a/components/services/symbols/deployment/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1alpha1 -kind: Component -patches: - - options: - allowKindChange: true - path: patches/symbols.Deployment.yaml - target: - kind: StatefulSet - name: symbols - - patch: |- - - op: remove - path: /spec/clusterIP - target: - kind: Service - name: symbols diff --git a/components/services/symbols/deployment/patches/symbols.Deployment.yaml b/components/services/symbols/deployment/patches/symbols.Deployment.yaml deleted file mode 100644 index fb146b19..00000000 --- a/components/services/symbols/deployment/patches/symbols.Deployment.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: symbols -spec: - strategy: - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 - type: RollingUpdate - template: - spec: - containers: - - name: symbols - env: - - name: SYMBOLS_CACHE_SIZE_MB - value: null - valueFrom: - resourceFieldRef: - containerName: symbols - resource: requests.ephemeral-storage - divisor: 1M - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - $patch: delete - value: "" - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - # 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 - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_AGENT_HOST):4317 - resources: - limits: - cpu: "2" - ephemeral-storage: "12G" - memory: 2G - requests: - cpu: 500m - ephemeral-storage: "10G" - memory: 500M - volumeMounts: - - mountPath: /mnt/cache - name: cache-ssd - securityContext: - runAsUser: 0 - fsGroup: 0 - fsGroupChangePolicy: OnRootMismatch - volumes: - - emptyDir: {} - name: cache-ssd - updateStrategy: - $patch: delete - volumeClaimTemplates: - serviceName: null diff --git a/components/services/symbols/statefulset/kustomization.yaml b/components/services/symbols/statefulset/kustomization.yaml deleted file mode 100644 index bdc464bd..00000000 --- a/components/services/symbols/statefulset/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1alpha1 -kind: Component -patches: - - options: - allowKindChange: true - path: patches/symbols.StatefulSet.yaml - target: - kind: Deployment - name: symbols diff --git a/components/services/symbols/statefulset/patches/symbols.StatefulSet.yaml b/components/services/symbols/statefulset/patches/symbols.StatefulSet.yaml deleted file mode 100644 index 7204dffb..00000000 --- a/components/services/symbols/statefulset/patches/symbols.StatefulSet.yaml +++ /dev/null @@ -1,58 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: searcher -spec: - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app: searcher - serviceName: searcher - template: - metadata: - labels: - app: searcher - deploy: sourcegraph - spec: - containers: - - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: CACHE_DIR - value: /mnt/cache/$(POD_NAME) - - name: OTEL_AGENT_HOST - valueFrom: - fieldRef: - fieldPath: status.hostIP - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://$(OTEL_AGENT_HOST):4317 - name: searcher - resources: - limits: - cpu: "2" - memory: 2G - requests: - cpu: 500m - memory: 500M - securityContext: - allowPrivilegeEscalation: false - runAsGroup: 101 - runAsUser: 100 - securityContext: - fsGroup: 101 - fsGroupChangePolicy: OnRootMismatch - runAsUser: 100 - updateStrategy: - type: RollingUpdate - volumeClaimTemplates: - - metadata: - name: cache-ssd - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 50G diff --git a/components/sizes/l/kustomization.yaml b/components/sizes/l/kustomization.yaml index f4808ae1..ed68df18 100644 --- a/components/sizes/l/kustomization.yaml +++ b/components/sizes/l/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component components: - ../../resources/lower-requests -# To support searcher and symbols as both statefulset and deployment +# To support searcher as both statefulset and deployment patches: - path: patches/searcher.yaml target: @@ -10,12 +10,6 @@ patches: kind: StatefulSet|Deployment name: searcher version: v1 - - path: patches/symbols.yaml - target: - group: apps - kind: StatefulSet|Deployment - name: symbols - version: v1 - path: patches/pgsql.yaml target: group: apps @@ -107,28 +101,6 @@ patches: cpu: "6" memory: 6G ephemeral-storage: 8Gi - - patch: |- - apiVersion: apps/v1 - kind: StatefulSet - metadata: - name: symbols - spec: - replicas: 1 - template: - spec: - containers: - - name: symbols - resources: - limits: - cpu: "4" - memory: 4G - env: - # Enables Rockskip - - name: USE_ROCKSKIP - value: "true" - # Uses Rockskip for all repositories over 1GB - - name: ROCKSKIP_MIN_REPO_SIZE_MB - value: "1000" - patch: |- apiVersion: apps/v1 kind: Deployment diff --git a/components/sizes/l/patches/endpoints.yaml b/components/sizes/l/patches/endpoints.yaml index e8786665..0a09d134 100644 --- a/components/sizes/l/patches/endpoints.yaml +++ b/components/sizes/l/patches/endpoints.yaml @@ -5,5 +5,4 @@ metadata: data: SRC_GIT_SERVERS: gitserver-0.gitserver:3178 SEARCHER_URL: http://searcher-0.searcher:3181 - SYMBOLS_URL: http://symbols:3184 INDEXED_SEARCH_SERVERS: indexed-search-0.indexed-search:6070 indexed-search-1.indexed-search:6070 diff --git a/components/sizes/l/patches/symbols.yaml b/components/sizes/l/patches/symbols.yaml deleted file mode 100644 index c5a14fcf..00000000 --- a/components/sizes/l/patches/symbols.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- op: replace - path: /spec/replicas - value: 1 -- op: replace - path: /spec/template/spec/containers/0/resources/limits/cpu - value: "4" -- op: replace - path: /spec/template/spec/containers/0/resources/limits/memory - value: 4G -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: USE_ROCKSKIP - value: "true" -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: ROCKSKIP_MIN_REPO_SIZE_MB - value: "1000" \ No newline at end of file diff --git a/components/sizes/m/kustomization.yaml b/components/sizes/m/kustomization.yaml index 204921cc..c2559877 100644 --- a/components/sizes/m/kustomization.yaml +++ b/components/sizes/m/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component components: - ../../resources/lower-requests -# To support searcher and symbols as both statefulset and deployment +# To support searcher as both statefulset and deployment patches: - path: patches/searcher.yaml target: @@ -10,12 +10,6 @@ patches: kind: StatefulSet|Deployment name: searcher version: v1 - - path: patches/symbols.yaml - target: - group: apps - kind: StatefulSet|Deployment - name: symbols - version: v1 - path: patches/pgsql.yaml target: group: apps diff --git a/components/sizes/m/patches/endpoints.yaml b/components/sizes/m/patches/endpoints.yaml index 4bea5107..69911677 100644 --- a/components/sizes/m/patches/endpoints.yaml +++ b/components/sizes/m/patches/endpoints.yaml @@ -5,5 +5,4 @@ metadata: data: SRC_GIT_SERVERS: gitserver-0.gitserver:3178 SEARCHER_URL: http://searcher-0.searcher:3181 - SYMBOLS_URL: http://symbols:3184 INDEXED_SEARCH_SERVERS: indexed-search-0.indexed-search:6070 diff --git a/components/sizes/m/patches/symbols.yaml b/components/sizes/m/patches/symbols.yaml deleted file mode 100644 index c5a14fcf..00000000 --- a/components/sizes/m/patches/symbols.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- op: replace - path: /spec/replicas - value: 1 -- op: replace - path: /spec/template/spec/containers/0/resources/limits/cpu - value: "4" -- op: replace - path: /spec/template/spec/containers/0/resources/limits/memory - value: 4G -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: USE_ROCKSKIP - value: "true" -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: ROCKSKIP_MIN_REPO_SIZE_MB - value: "1000" \ No newline at end of file diff --git a/components/sizes/s/kustomization.yaml b/components/sizes/s/kustomization.yaml index 658f8e7a..41569515 100644 --- a/components/sizes/s/kustomization.yaml +++ b/components/sizes/s/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component components: - ../../resources/lower-requests -# To support searcher and symbols as both statefulset and deployment +# To support searcher as both statefulset and deployment patches: - path: patches/searcher.yaml target: @@ -10,12 +10,6 @@ patches: kind: StatefulSet|Deployment name: searcher version: v1 - - path: patches/symbols.yaml - target: - group: apps - kind: StatefulSet|Deployment - name: symbols - version: v1 - path: patches/pgsql.yaml target: group: apps diff --git a/components/sizes/s/patches/endpoints.yaml b/components/sizes/s/patches/endpoints.yaml index 4bea5107..69911677 100644 --- a/components/sizes/s/patches/endpoints.yaml +++ b/components/sizes/s/patches/endpoints.yaml @@ -5,5 +5,4 @@ metadata: data: SRC_GIT_SERVERS: gitserver-0.gitserver:3178 SEARCHER_URL: http://searcher-0.searcher:3181 - SYMBOLS_URL: http://symbols:3184 INDEXED_SEARCH_SERVERS: indexed-search-0.indexed-search:6070 diff --git a/components/sizes/s/patches/symbols.yaml b/components/sizes/s/patches/symbols.yaml deleted file mode 100644 index c5a14fcf..00000000 --- a/components/sizes/s/patches/symbols.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- op: replace - path: /spec/replicas - value: 1 -- op: replace - path: /spec/template/spec/containers/0/resources/limits/cpu - value: "4" -- op: replace - path: /spec/template/spec/containers/0/resources/limits/memory - value: 4G -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: USE_ROCKSKIP - value: "true" -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: ROCKSKIP_MIN_REPO_SIZE_MB - value: "1000" \ No newline at end of file diff --git a/components/sizes/xl/kustomization.yaml b/components/sizes/xl/kustomization.yaml index 2f45f853..985f55ed 100644 --- a/components/sizes/xl/kustomization.yaml +++ b/components/sizes/xl/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component components: - ../../resources/lower-requests -# To support searcher and symbols as both statefulset and deployment +# To support searcher as both statefulset and deployment patches: - path: patches/searcher.yaml target: @@ -10,12 +10,6 @@ patches: kind: StatefulSet|Deployment name: searcher version: v1 - - path: patches/symbols.yaml - target: - group: apps - kind: StatefulSet|Deployment - name: symbols - version: v1 - path: patches/pgsql.yaml target: group: apps diff --git a/components/sizes/xl/patches/endpoints.yaml b/components/sizes/xl/patches/endpoints.yaml index 8ffd9b17..2f3ff26e 100644 --- a/components/sizes/xl/patches/endpoints.yaml +++ b/components/sizes/xl/patches/endpoints.yaml @@ -5,5 +5,4 @@ metadata: data: SRC_GIT_SERVERS: gitserver-0.gitserver:3178 gitserver-1.gitserver:3178 SEARCHER_URL: http://searcher-0.searcher:3181 http://searcher-1.searcher:3181 - SYMBOLS_URL: http://symbols:3184 INDEXED_SEARCH_SERVERS: indexed-search-0.indexed-search:6070 indexed-search-1.indexed-search:6070 indexed-search-2.indexed-search:6070 diff --git a/components/sizes/xl/patches/symbols.yaml b/components/sizes/xl/patches/symbols.yaml deleted file mode 100644 index b169d394..00000000 --- a/components/sizes/xl/patches/symbols.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- op: replace - path: /spec/replicas - value: 1 -- op: replace - path: /spec/template/spec/containers/0/resources/limits/cpu - value: "6" -- op: replace - path: /spec/template/spec/containers/0/resources/limits/memory - value: 12G -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: USE_ROCKSKIP - value: "true" -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: ROCKSKIP_MIN_REPO_SIZE_MB - value: "1000" \ No newline at end of file diff --git a/components/sizes/xs/kustomization.yaml b/components/sizes/xs/kustomization.yaml index 2288b698..29343a6e 100644 --- a/components/sizes/xs/kustomization.yaml +++ b/components/sizes/xs/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component components: - ../../resources/lower-requests -# To support searcher and symbols as both statefulset and deployment +# To support searcher as both statefulset and deployment patches: - path: patches/searcher.yaml target: @@ -10,12 +10,6 @@ patches: kind: StatefulSet|Deployment name: searcher version: v1 - - path: patches/symbols.yaml - target: - group: apps - kind: StatefulSet|Deployment - name: symbols - version: v1 - path: patches/databases.yaml target: group: apps diff --git a/components/sizes/xs/patches/endpoints.yaml b/components/sizes/xs/patches/endpoints.yaml index e7b27601..69911677 100644 --- a/components/sizes/xs/patches/endpoints.yaml +++ b/components/sizes/xs/patches/endpoints.yaml @@ -6,4 +6,3 @@ data: SRC_GIT_SERVERS: gitserver-0.gitserver:3178 SEARCHER_URL: http://searcher-0.searcher:3181 INDEXED_SEARCH_SERVERS: indexed-search-0.indexed-search:6070 - SYMBOLS_URL: http://symbols:3184 diff --git a/components/sizes/xs/patches/symbols.yaml b/components/sizes/xs/patches/symbols.yaml deleted file mode 100644 index c5a14fcf..00000000 --- a/components/sizes/xs/patches/symbols.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- op: replace - path: /spec/replicas - value: 1 -- op: replace - path: /spec/template/spec/containers/0/resources/limits/cpu - value: "4" -- op: replace - path: /spec/template/spec/containers/0/resources/limits/memory - value: 4G -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: USE_ROCKSKIP - value: "true" -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: ROCKSKIP_MIN_REPO_SIZE_MB - value: "1000" \ No newline at end of file diff --git a/components/storage-class/aws/aws-ebs/kustomization.yaml b/components/storage-class/aws/aws-ebs/kustomization.yaml index b52821f7..5ea459b7 100644 --- a/components/storage-class/aws/aws-ebs/kustomization.yaml +++ b/components/storage-class/aws/aws-ebs/kustomization.yaml @@ -10,7 +10,7 @@ patches: target: group: apps kind: StatefulSet - name: searcher|symbols|indexed-search|grafana|gitserver + name: searcher|indexed-search|grafana|gitserver version: v1 - patch: |- - op: replace diff --git a/components/storage-class/aws/ebs-csi/kustomization.yaml b/components/storage-class/aws/ebs-csi/kustomization.yaml index b52821f7..5ea459b7 100644 --- a/components/storage-class/aws/ebs-csi/kustomization.yaml +++ b/components/storage-class/aws/ebs-csi/kustomization.yaml @@ -10,7 +10,7 @@ patches: target: group: apps kind: StatefulSet - name: searcher|symbols|indexed-search|grafana|gitserver + name: searcher|indexed-search|grafana|gitserver version: v1 - patch: |- - op: replace diff --git a/components/storage-class/azure/kustomization.yaml b/components/storage-class/azure/kustomization.yaml index b52821f7..5ea459b7 100644 --- a/components/storage-class/azure/kustomization.yaml +++ b/components/storage-class/azure/kustomization.yaml @@ -10,7 +10,7 @@ patches: target: group: apps kind: StatefulSet - name: searcher|symbols|indexed-search|grafana|gitserver + name: searcher|indexed-search|grafana|gitserver version: v1 - patch: |- - op: replace diff --git a/components/storage-class/gcp/kustomization.yaml b/components/storage-class/gcp/kustomization.yaml index b52821f7..5ea459b7 100644 --- a/components/storage-class/gcp/kustomization.yaml +++ b/components/storage-class/gcp/kustomization.yaml @@ -10,7 +10,7 @@ patches: target: group: apps kind: StatefulSet - name: searcher|symbols|indexed-search|grafana|gitserver + name: searcher|indexed-search|grafana|gitserver version: v1 - patch: |- - op: replace diff --git a/components/storage-class/k3s/kustomization.yaml b/components/storage-class/k3s/kustomization.yaml index 02f83e7f..9364619a 100644 --- a/components/storage-class/k3s/kustomization.yaml +++ b/components/storage-class/k3s/kustomization.yaml @@ -5,7 +5,7 @@ patches: target: group: apps kind: StatefulSet - name: searcher|symbols|indexed-search|grafana|gitserver + name: searcher|indexed-search|grafana|gitserver version: v1 - path: patches/replace-storageclass-name-pvc.yaml target: diff --git a/components/storage-class/minikube/kustomization.yaml b/components/storage-class/minikube/kustomization.yaml index 479a8f9f..c2de1e8e 100644 --- a/components/storage-class/minikube/kustomization.yaml +++ b/components/storage-class/minikube/kustomization.yaml @@ -9,7 +9,7 @@ patches: target: group: apps kind: StatefulSet - name: searcher|symbols|indexed-search|grafana|gitserver + name: searcher|indexed-search|grafana|gitserver version: v1 - patch: |- - op: replace diff --git a/components/storage-class/name-update/kustomization.yaml b/components/storage-class/name-update/kustomization.yaml index 449546b2..e3898183 100644 --- a/components/storage-class/name-update/kustomization.yaml +++ b/components/storage-class/name-update/kustomization.yaml @@ -5,7 +5,7 @@ patches: target: group: apps kind: StatefulSet - name: indexed-search|grafana|gitserver|searcher|symbols + name: indexed-search|grafana|gitserver|searcher version: v1 - path: patches/replace-storageclass-name-pvc.yaml target: diff --git a/components/storage-class/sourcegraph/kustomization.yaml b/components/storage-class/sourcegraph/kustomization.yaml index 911ab7e5..5ca28199 100644 --- a/components/storage-class/sourcegraph/kustomization.yaml +++ b/components/storage-class/sourcegraph/kustomization.yaml @@ -8,7 +8,7 @@ patches: target: group: apps kind: StatefulSet - name: searcher|symbols|indexed-search|grafana|gitserver + name: searcher|indexed-search|grafana|gitserver version: v1 - patch: |- - op: replace diff --git a/components/utils/endpoints/endpoints-update.yaml b/components/utils/endpoints/endpoints-update.yaml index f131bd1b..3c8bf94a 100644 --- a/components/utils/endpoints/endpoints-update.yaml +++ b/components/utils/endpoints/endpoints-update.yaml @@ -21,19 +21,6 @@ name: sourcegraph-frontend-env fieldPaths: - data.SEARCHER_URL -- source: - group: apps - name: symbols - fieldPath: spec.replicas - reject: - - kind: Service - - kind: Deployment - targets: - - select: - kind: ConfigMap - name: sourcegraph-frontend-env - fieldPaths: - - data.SYMBOLS_URL - source: kind: StatefulSet name: indexed-search diff --git a/instances/template/kustomization.template.yaml b/instances/template/kustomization.template.yaml index 0c70879d..51d92b90 100644 --- a/instances/template/kustomization.template.yaml +++ b/instances/template/kustomization.template.yaml @@ -260,16 +260,6 @@ components: # name: searcher # kind: StatefulSet|Deployment # -# - patch: |- -# - op: replace -# path: /spec/template/spec/containers/0/env/0 -# value: -# name: SYMBOLS_CACHE_SIZE_MB -# value: "50000" -# target: -# name: symbols -# kind: StatefulSet|Deployment -# # #--------------------------------------------------------------------------------------- # # Adjust Storage Sizes # #--------------------------------------------------------------------------------------- @@ -287,7 +277,7 @@ components: # value: 200Gi # target: # kind: StatefulSet -# name: gitserver|indexed-search|searcher|symbols +# name: gitserver|indexed-search|searcher # # ########################################################################################## From 84e710d5978e4dde66fd165812830074e01abbd4 Mon Sep 17 00:00:00 2001 From: Erik Seliger Date: Mon, 12 May 2025 14:55:59 +0200 Subject: [PATCH 2/2] Fixups --- components/sizes/l/kustomization.yaml | 22 ++++++++++++++++++++++ components/sizes/l/patches/searcher.yaml | 12 +++++++++++- components/sizes/m/patches/searcher.yaml | 12 +++++++++++- components/sizes/s/patches/searcher.yaml | 12 +++++++++++- components/sizes/xl/patches/searcher.yaml | 12 +++++++++++- components/sizes/xs/patches/searcher.yaml | 12 +++++++++++- 6 files changed, 77 insertions(+), 5 deletions(-) diff --git a/components/sizes/l/kustomization.yaml b/components/sizes/l/kustomization.yaml index ed68df18..4dd9bd73 100644 --- a/components/sizes/l/kustomization.yaml +++ b/components/sizes/l/kustomization.yaml @@ -101,6 +101,28 @@ patches: cpu: "6" memory: 6G ephemeral-storage: 8Gi + - patch: |- + apiVersion: apps/v1 + kind: StatefulSet + metadata: + name: searcher + spec: + replicas: 1 + template: + spec: + containers: + - name: searcher + resources: + limits: + cpu: "4" + memory: 4G + env: + # Enables Rockskip + - name: USE_ROCKSKIP + value: "true" + # Uses Rockskip for all repositories over 1GB + - name: ROCKSKIP_MIN_REPO_SIZE_MB + value: "1000" - patch: |- apiVersion: apps/v1 kind: Deployment diff --git a/components/sizes/l/patches/searcher.yaml b/components/sizes/l/patches/searcher.yaml index 73533397..c68dbcd5 100644 --- a/components/sizes/l/patches/searcher.yaml +++ b/components/sizes/l/patches/searcher.yaml @@ -6,4 +6,14 @@ value: "6" - op: replace path: /spec/template/spec/containers/0/resources/limits/memory - value: 12G \ No newline at end of file + value: 12G +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: USE_ROCKSKIP + value: "true" +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: ROCKSKIP_MIN_REPO_SIZE_MB + value: "1000" diff --git a/components/sizes/m/patches/searcher.yaml b/components/sizes/m/patches/searcher.yaml index 4c53609b..21ff7e7d 100644 --- a/components/sizes/m/patches/searcher.yaml +++ b/components/sizes/m/patches/searcher.yaml @@ -6,4 +6,14 @@ value: "5" - op: replace path: /spec/template/spec/containers/0/resources/limits/memory - value: 12G \ No newline at end of file + value: 12G +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: USE_ROCKSKIP + value: "true" +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: ROCKSKIP_MIN_REPO_SIZE_MB + value: "1000" diff --git a/components/sizes/s/patches/searcher.yaml b/components/sizes/s/patches/searcher.yaml index 73533397..b169d394 100644 --- a/components/sizes/s/patches/searcher.yaml +++ b/components/sizes/s/patches/searcher.yaml @@ -6,4 +6,14 @@ value: "6" - op: replace path: /spec/template/spec/containers/0/resources/limits/memory - value: 12G \ No newline at end of file + value: 12G +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: USE_ROCKSKIP + value: "true" +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: ROCKSKIP_MIN_REPO_SIZE_MB + value: "1000" \ No newline at end of file diff --git a/components/sizes/xl/patches/searcher.yaml b/components/sizes/xl/patches/searcher.yaml index 4655c26e..923a1a49 100644 --- a/components/sizes/xl/patches/searcher.yaml +++ b/components/sizes/xl/patches/searcher.yaml @@ -6,4 +6,14 @@ value: "10" - op: replace path: /spec/template/spec/containers/0/resources/limits/memory - value: 16G \ No newline at end of file + value: 16G +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: USE_ROCKSKIP + value: "true" +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: ROCKSKIP_MIN_REPO_SIZE_MB + value: "1000" diff --git a/components/sizes/xs/patches/searcher.yaml b/components/sizes/xs/patches/searcher.yaml index 73973e79..3b4df728 100644 --- a/components/sizes/xs/patches/searcher.yaml +++ b/components/sizes/xs/patches/searcher.yaml @@ -6,4 +6,14 @@ value: "2" - op: replace path: /spec/template/spec/containers/0/resources/limits/memory - value: 2G \ No newline at end of file + value: 2G +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: USE_ROCKSKIP + value: "true" +- op: add + path: /spec/template/spec/containers/0/env/- + value: + name: ROCKSKIP_MIN_REPO_SIZE_MB + value: "1000"