Skip to content

fix: use fullname helper for resource-config ConfigMap name#182

Draft
camjay wants to merge 1 commit intoPortkey-AI:mainfrom
camjay:fix/resource-config-fullname
Draft

fix: use fullname helper for resource-config ConfigMap name#182
camjay wants to merge 1 commit intoPortkey-AI:mainfrom
camjay:fix/resource-config-fullname

Conversation

@camjay
Copy link
Copy Markdown
Contributor

@camjay camjay commented Apr 3, 2026

Summary

The resource-config ConfigMap in charts/portkey-gateway/templates/resources-config.yaml uses a hardcoded name: resource-config instead of the portkeyenterprise.fullname template helper. This causes a name collision when deploying multiple instances of the chart in the same Kubernetes namespace — all instances attempt to own the same ConfigMap, resulting in sync conflicts (e.g., in ArgoCD or Flux).

Every other resource in the chart already uses the fullname helper for its metadata name. This ConfigMap is the only one that doesn't.

Changes

  • templates/resources-config.yaml: Prefix name with {{ include "portkeyenterprise.fullname" . }} and add standard portkeyenterprise.labels
  • values.yaml: Update commented volume example to reflect dynamic naming
  • README.md: Update PEM volume mounting example to reflect dynamic naming

Validation

Verified with helm template using multiple release names and fullnameOverride values:

# Two instances in the same namespace now get unique ConfigMap names:
helm template release-a charts/portkey-gateway --show-only templates/resources-config.yaml
# → name: release-a-gateway-resource-config

helm template release-b charts/portkey-gateway --show-only templates/resources-config.yaml
# → name: release-b-gateway-resource-config

# fullnameOverride also works correctly:
helm template x charts/portkey-gateway --set fullnameOverride=my-app --show-only templates/resources-config.yaml
# → name: my-app-resource-config

helm lint passes with no warnings.

Breaking Change

This renames an existing Kubernetes resource. On upgrade, the ConfigMap name changes from resource-config to <fullname>-resource-config. Two things to be aware of:

  1. Volume mounts: If the commented-out volume mount in values.yaml has been enabled, volumes[].configMap.name must be updated to match the new dynamic name. For most deployments this volume is commented out by default and no action is needed.

  2. Orphaned ConfigMap: After upgrading, the old resource-config ConfigMap will remain in the namespace. helm upgrade does not delete renamed resources. Users should clean it up manually:

    kubectl delete configmap resource-config -n <namespace>
    

    ArgoCD deployments with prune: true will handle this automatically.

  3. Version bump: This breaking change should be included in a minor or major version bump per semver conventions. Suggesting it be picked up in the next chart release.

@camjay camjay force-pushed the fix/resource-config-fullname branch from 27fb98c to 756a918 Compare April 3, 2026 19:03
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
@camjay camjay force-pushed the fix/resource-config-fullname branch from 756a918 to 8e416de Compare April 3, 2026 19:19
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

Successfully merging this pull request may close these issues.

1 participant