Skip to content

Commit 8e416de

Browse files
author
Campbell Pool
committed
fix: use fullname helper for resource-config ConfigMap name
The resource-config ConfigMap uses a hardcoded name instead of the portkeyenterprise.fullname helper. This causes a name collision when deploying multiple chart instances in the same namespace — all instances try to own the same ConfigMap, causing ArgoCD sync conflicts. - Prefix name with portkeyenterprise.fullname (consistent with all other resources in the chart) - Add standard chart labels via portkeyenterprise.labels - Update values.yaml comment and README to reflect dynamic naming
1 parent 0722e35 commit 8e416de

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

charts/portkey-gateway/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ MONGO_GENERATION_HOOKS_COLLECTION_NAME: "<Mongo Collection for Hooks>"
330330
volumes:
331331
- name: shared-folder
332332
configMap:
333-
name: resource-config
333+
name: <release-fullname>-resource-config # e.g. my-release-gateway-resource-config
334334
volumeMounts:
335335
- name: shared-folder
336336
mountPath: /etc/shared/document_db.pem

charts/portkey-gateway/templates/resources-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: resource-config
4+
name: {{ include "portkeyenterprise.fullname" . }}-resource-config
5+
labels:
6+
{{- include "portkeyenterprise.labels" . | nindent 4 }}
57
data:
68
document_db.pem: |
79
-----BEGIN CERTIFICATE-----

charts/portkey-gateway/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ autoscaling:
264264
volumes: []
265265
# - name: shared-folder
266266
# configMap:
267-
# name: resource-config
267+
# # Use your release's fullname: kubectl get configmap -l app.kubernetes.io/managed-by=Helm
268+
# name: my-release-gateway-resource-config
268269

269270
# Additional volumeMounts on the output Deployment definition.
270271
volumeMounts: []

0 commit comments

Comments
 (0)