Skip to content

Commit 63e3d3f

Browse files
darkweaver87oliviassss
authored andcommitted
feat: disable default helm labels (kubernetes-sigs#3574)
* feat: disable helm labels * fix: doc
1 parent f261408 commit 63e3d3f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

helm/aws-load-balancer-controller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,5 +279,5 @@ The default values set by the application itself can be confirmed [here](https:/
279279
| `autoscaling` | If `autoscaling.enabled=true`, enable the HPA on the controller mainly to survive load induced failure by the calls to the `aws-load-balancer-webhook-service`. Please keep in mind that the controller pods have `priorityClassName: system-cluster-critical`, enabling HPA may lead to the eviction of other low-priority pods in the node | `false` |
280280
| `serviceTargetENISGTags` | set of `key=value` pairs of AWS tags in addition to cluster name for finding the target ENI security group to which to add inbound rules from NLBs | None |
281281
| `loadBalancerClass` | Sets the AWS load balancer type to be used when the Kubernetes service requests an external load balancer | `service.k8s.aws/nlb` |
282-
282+
| `creator` | if set to a `value!=helm`, it will disable the addition of default helm labels | `helm` |
283283
| `runtimeClassName` | Runtime class name for the controller pods , such as `gvisor` or `kata`. An unspecified `nil` or empty `""` RuntimeClassName is equivalent to the backwards-compatible default behavior as if the RuntimeClass feature is disabled. | "" |

helm/aws-load-balancer-controller/templates/_helpers.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ This enables using a shorter name for the resources, for example aws-load-balanc
4545
Common labels
4646
*/}}
4747
{{- define "aws-load-balancer-controller.labels" -}}
48+
{{- if eq (default "helm" .Values.creator) "helm" -}}
49+
app.kubernetes.io/managed-by: {{ .Release.Service }}
4850
helm.sh/chart: {{ include "aws-load-balancer-controller.chart" . }}
51+
{{- end }}
4952
{{ include "aws-load-balancer-controller.selectorLabels" . }}
5053
{{- if .Chart.AppVersion }}
5154
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
5255
{{- end }}
53-
app.kubernetes.io/managed-by: {{ .Release.Service }}
5456
{{- if .Values.additionalLabels }}
5557
{{ toYaml .Values.additionalLabels }}
5658
{{- end -}}

helm/aws-load-balancer-controller/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,3 +424,6 @@ serviceTargetENISGTags:
424424

425425
# Specifies the class of load balancer to use for services. This affects how services are provisioned if type LoadBalancer is used (default service.k8s.aws/nlb)
426426
loadBalancerClass:
427+
428+
# creator will disable helm default labels, so you can only add yours
429+
# creator: "me"

0 commit comments

Comments
 (0)