Skip to content

Changing the name of codeintel-db causes PVC to misalign on name #612

Closed

Description

@cbluth

if i use these values:

codeIntelDB:
  name: my-release-codeintel-db
  enabled: true

then the PVC is created with the same name, eg; my-release-codeintel-db
then, the statefulset is created with the same name, but will reference the default PVC name, creating a deployment failure:

Events:
Type     Reason            Age   From               Message
----     ------            ----  ----               -------
Warning  FailedScheduling  6m6s  default-scheduler  0/751 nodes are available: 751 persistentvolumeclaim "codeintel-db" not found. preemption: not eligible due to preemptionPolicy=Never.
Warning  FailedScheduling  6m3s  default-scheduler  0/751 nodes are available: 751 persistentvolumeclaim "codeintel-db" not found. preemption: not eligible due to preemptionPolicy=Never.

Activity

  1. cbluth commented on Jan 9, 2025

    @cbluth
    Author
  2. cbluth commented on Jan 9, 2025

    @cbluth
    Author

    EDIT: looks like theres a few of these

    here is a patch that will work:

    $ git diff
    diff --git a/charts/sourcegraph/templates/codeintel-db/codeintel-db.StatefulSet.yaml b/charts/sourcegraph/templates/codeintel-db/codeintel-db.StatefulSet.yaml
    index 6ad34e7..84a6b43 100644
    --- a/charts/sourcegraph/templates/codeintel-db/codeintel-db.StatefulSet.yaml
    +++ b/charts/sourcegraph/templates/codeintel-db/codeintel-db.StatefulSet.yaml
    @@ -142,7 +142,7 @@ spec:
           volumes:
           - name: disk
             persistentVolumeClaim:
    -          claimName: codeintel-db
    +          claimName: {{ default "codeintel-db" .Values.codeIntelDB.name }}
           - name: pgsql-conf
             configMap:
               defaultMode: 0777
    
  3. cbluth commented on Jan 13, 2025

    @cbluth
    Author

    there are more issues/inconsistencies with renaming the components, if you use name: my-release on all components, only some take the setting:

    NAME                                STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
    blobstore                           Pending                                      nfs-retain     52s
    cache-my-release-searcher-0         Pending                                      nfs-retain     5m57s
    cache-my-release-symbols-0          Pending                                      nfs-retain     5m58s
    codeinsights-db                     Pending                                      nfs-retain     52s
    codeintel-db                        Pending                                      nfs-retain     52s
    data-my-release-indexed-search-0    Pending                                      nfs-retain     5m57s
    pgsql                               Pending                                      nfs-retain     52s
    redis-cache                         Pending                                      nfs-retain     52s
    redis-store                         Pending                                      nfs-retain     52s
    repos-my-release-gitserver-0        Pending                                      nfs-retain     5m58s
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions