deploy-sourcegraph icon indicating copy to clipboard operation
deploy-sourcegraph copied to clipboard

Update storage spec for statefulset in minikube overlay

Open abeatrix opened this issue 2 years ago • 0 comments

In our minikube overlays, the current patch to update the storage spec to 10Gi in the kustomization.yaml file only targets PersistentVolumeClaim (pgsql, minios etc), while gitserver and indexed-search are still requesting 200Gi of storage, which might be a lot for a minikube instance considering most of the resources are removed:

  volumeClaimTemplates:
  - metadata:
      labels:
        deploy: sourcegraph
      name: data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 200Gi
      storageClassName: standard

This PR adds an extra patch in the kustomization.yaml file for adjusting the storage spec for both gitserver and indexed-search, which is currently set to 200Gi respectively by default.

Also added instructions in README on how to adjust the values when needed.

Checklist

Test plan

Manually run the generate cluster command to confirm the storage value are updated for apps_v1_statefulset_gitserver.yaml file:

...
  volumeClaimTemplates:
  - metadata:
      name: repos
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 50Gi
      storageClassName: standard

apps_v1_statefulset_indexed-search.yaml file:

...
  volumeClaimTemplates:
  - metadata:
      labels:
        deploy: sourcegraph
      name: data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 25Gi
      storageClassName: standard

abeatrix avatar Aug 31 '22 16:08 abeatrix