Skip to content

Commit e165d9f

Browse files
taraszkamavimo
andauthored
Add loadBalancer.labels support (#276)
* Add loadBalancer.labels support For example, cilium LB IPAM uses labels to match pool with a service (https://docs.cilium.io/en/latest/network/lb-ipam/) * bump version of the chart * make it minor release * fix trailing slash that break validation * fix empty annotation object --------- Co-authored-by: Marco Vito Moscaritolo <[email protected]>
1 parent b97d6c9 commit e165d9f

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

charts/caddy-ingress-controller/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ home: https://github.com/caddyserver/ingress
44
description: A helm chart for the Caddy Kubernetes ingress controller
55
icon: https://caddyserver.com/resources/images/caddy-circle-lock.svg
66
type: application
7-
version: 1.2.0
7+
version: 1.3.0
88
appVersion: "v0.2.1"
99
keywords:
1010
- ingress-controller

charts/caddy-ingress-controller/templates/loadbalancer.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ metadata:
1010
{{- end }}
1111
labels:
1212
{{- include "caddy-ingress-controller.labels" . | nindent 4 }}
13+
{{- with .Values.loadBalancer.labels }}
14+
{{- toYaml . | nindent 4 }}
15+
{{- end }}
1316
spec:
1417
type: "LoadBalancer"
1518
{{- if (semverCompare "<= 1.24.0" .Capabilities.KubeVersion.Version) }}

charts/caddy-ingress-controller/values.schema.json

+27
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,33 @@
6868
"$id": "#/properties/fullnameOverride",
6969
"type": "string"
7070
},
71+
"loadBalancer": {
72+
"$id": "#/properties/loadBalancer",
73+
"type": "object",
74+
"required": [
75+
"enabled"
76+
],
77+
"properties": {
78+
"enabled": {
79+
"$id": "#/properties/loadBalancer/properties/enabled",
80+
"type": "boolean"
81+
},
82+
"annotations": {
83+
"$id": "#/properties/loadBalancer/properties/annotations",
84+
"type": "object",
85+
"additionalProperties": {
86+
"type": "string"
87+
}
88+
},
89+
"labels": {
90+
"$id": "#/properties/loadBalancer/properties/labels",
91+
"type": "object",
92+
"additionalProperties": {
93+
"type": "string"
94+
}
95+
}
96+
}
97+
},
7198
"ingressController": {
7299
"$id": "#/properties/ingressController",
73100
"type": "object",

charts/caddy-ingress-controller/values.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ loadBalancer:
4545
loadBalancerIP:
4646
# Set to 'Local' to maintain the client's IP on inbound connections
4747
externalTrafficPolicy:
48-
annotations:
48+
annotations: {}
4949
# service.beta.kubernetes.io/aws-load-balancer-type:
5050
# service.beta.kubernetes.io/aws-load-balancer-nlb-target-type:
5151
# service.beta.kubernetes.io/aws-load-balancer-scheme:
5252
# service.beta.kubernetes.io/aws-load-balancer-eip-allocations:
5353
# service.beta.kubernetes.io/aws-load-balancer-subnets:
54+
labels: {}
5455

5556
service:
5657
# Set to 'Local' to maintain the client's IP on inbound connections

0 commit comments

Comments
 (0)