Description:
The commonLabels helm chart value is not propagated to all resources. As pointed out in #7913, the ability to add labels to k8s resources has many use cases. I'm guessing this was just looked over in the initial PR. I'm not an expert with helm charts, but it looks like we'd just need to use the helper function for the RBAC resources:
|
--- |
|
apiVersion: rbac.authorization.k8s.io/v1 |
|
kind: Role |
|
metadata: |
|
creationTimestamp: null |
|
name: {{ include "eg.fullname" $ }}-envoy-gateway-role |
|
namespace: {{ $ns | quote }} |
|
rules: |
|
{{ include "eg.rbac.namespaced" $ }} |
Repro steps:
This command shows the resources that are unlabelled using mostly default values:
helm template eg oci://docker.io/envoyproxy/gateway-helm:1.8.0-rc.0 --set commonLabels.custom-label=custom-value | yq "{\"kind\": .kind, \"name\": .metadata.name, \"custom-label\": .metadata.labels.custom-label}"
# ...
---
kind: ClusterRole
name: eg-gateway-helm-envoy-gateway-role
custom-label: null
---
kind: ClusterRoleBinding
name: eg-gateway-helm-envoy-gateway-rolebinding
custom-label: null
# ...
I'm happy to have a go at implementing myself if it's helpful
Description:
The
commonLabelshelm chart value is not propagated to all resources. As pointed out in #7913, the ability to add labels to k8s resources has many use cases. I'm guessing this was just looked over in the initial PR. I'm not an expert with helm charts, but it looks like we'd just need to use the helper function for the RBAC resources:gateway/charts/gateway-helm/templates/envoy-gateway-rbac.yaml
Lines 14 to 22 in 00d0895
Repro steps:
This command shows the resources that are unlabelled using mostly default values:
I'm happy to have a go at implementing myself if it's helpful