Skip to content

Commit b389ac9

Browse files
authored
feat: disable default helm labels (#3574)
* feat: disable helm labels * fix: doc
1 parent 9d2acb4 commit b389ac9

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
@@ -277,5 +277,5 @@ The default values set by the application itself can be confirmed [here](https:/
277277
| `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` |
278278
| `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 |
279279
| `loadBalancerClass` | Sets the AWS load balancer type to be used when the Kubernetes service requests an external load balancer | `service.k8s.aws/nlb` |
280-
280+
| `creator` | if set to a `value!=helm`, it will disable the addition of default helm labels | `helm` |
281281
| `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
@@ -419,3 +419,6 @@ serviceTargetENISGTags:
419419

420420
# 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)
421421
loadBalancerClass:
422+
423+
# creator will disable helm default labels, so you can only add yours
424+
# creator: "me"

0 commit comments

Comments
 (0)