-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Is your feature request related to a problem? Please describe.
Currently, there's no way to add custom labels to all Kubernetes resources managed by the nginx-ingress Helm chart. Users who need to apply organization-wide labels (e.g., for cost tracking, compliance, or resource management) must manually patch each resource type individually, which is error-prone and difficult to maintain across chart upgrades.
Describe the solution you'd like
Add a commonLabels configuration option to the Helm chart that allows users to specify custom labels applied to all Kubernetes resource metadata. This follows the same pattern used by the ingress-nginx chart:
commonLabels:
team: platform
environment: production
cost-center: "12345"
These labels would be automatically applied to all resources (Deployments, Services, ConfigMaps, Roles, etc.) but excluded from pod template labels to avoid selector conflicts.
Describe alternatives you've considered
- Using Kustomize overlays to add labels post-rendering
- Manual patching of resources after deployment
- Creating a wrapper chart that adds labels to all resources
- Using kubectl label commands after installation
All alternatives require additional tooling and maintenance overhead compared to native Helm chart support.
Additional context
This is a common pattern in enterprise Kubernetes deployments where labels are required for cost allocation, compliance tracking, or automated resource management policies.