Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cbluth opened this issue Jan 9, 2025 · 3 comments
Open

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

cbluth opened this issue Jan 9, 2025 · 3 comments

Comments

@cbluth
Copy link

cbluth commented Jan 9, 2025

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.
@cbluth
Copy link
Author

cbluth commented Jan 9, 2025

@cbluth
Copy link
Author

cbluth commented Jan 9, 2025

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

@cbluth
Copy link
Author

cbluth commented Jan 13, 2025

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant