Skip to content

Commit

Permalink
feat: disable default helm labels (#3574)
Browse files Browse the repository at this point in the history
* feat: disable helm labels

* fix: doc
  • Loading branch information
darkweaver87 authored May 22, 2024
1 parent 9d2acb4 commit b389ac9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helm/aws-load-balancer-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,5 @@ The default values set by the application itself can be confirmed [here](https:/
| `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` |
| `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 |
| `loadBalancerClass` | Sets the AWS load balancer type to be used when the Kubernetes service requests an external load balancer | `service.k8s.aws/nlb` |

| `creator` | if set to a `value!=helm`, it will disable the addition of default helm labels | `helm` |
| `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. | "" |
4 changes: 3 additions & 1 deletion helm/aws-load-balancer-controller/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ This enables using a shorter name for the resources, for example aws-load-balanc
Common labels
*/}}
{{- define "aws-load-balancer-controller.labels" -}}
{{- if eq (default "helm" .Values.creator) "helm" -}}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "aws-load-balancer-controller.chart" . }}
{{- end }}
{{ include "aws-load-balancer-controller.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels }}
{{- end -}}
Expand Down
3 changes: 3 additions & 0 deletions helm/aws-load-balancer-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,6 @@ serviceTargetENISGTags:

# 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)
loadBalancerClass:

# creator will disable helm default labels, so you can only add yours
# creator: "me"

0 comments on commit b389ac9

Please sign in to comment.