Skip to content

Commit 5d283a3

Browse files
authored
feat: Add ability to specify load balancer class (#67)
Adds the ability to specify a load balancer class: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-class Using the value `service.loadBalancerClass`, default is an empty string, if an empty string the value will not be set retaining compatibility with older but still tested kubernetes versions in the pipeline (1.23). This PR cherry picks the commit from #62 and updates the docs, etc to support the release to artifact hub on merge to main.
2 parents ba0344d + 84cc49f commit 5d283a3

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

.github/workflows/helm-qa.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
- name: default
1616
ct_extra_args: >-
1717
--upgrade
18-
--helm-extra-set-args='--set=service.type=ClusterIP'
1918
name: 'Helm (${{ matrix.suite.name }})'
2019
uses: curium-rocks/flows/.github/workflows/helm-qa.yml@main
2120
with:

helm/wireguard/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: wireguard
33
description: A Helm chart for managing a wireguard vpn in kubernetes
44
type: application
5-
version: 0.27.0
5+
version: 0.28.0
66
appVersion: "0.0.0"
77
maintainers:
88
- name: bryopsida

helm/wireguard/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# wireguard
22

3-
![Version: 0.27.0](https://img.shields.io/badge/Version-0.27.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
3+
![Version: 0.28.0](https://img.shields.io/badge/Version-0.28.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
44

55
A Helm chart for managing a wireguard vpn in kubernetes
66

@@ -122,6 +122,7 @@ A Helm chart for managing a wireguard vpn in kubernetes
122122
| service.enabled | bool | `true` | Whether the service will be created or not |
123123
| service.externalTrafficPolicy | string | `""` | External Traffic Policy for the service |
124124
| service.extraPorts | list | `[]` | Extra ports that can be attached to the service object, these are passed directly to the port array on the service and must be well formed to the specification |
125+
| service.loadBalancerClass | string | `""` | loadBalancerClass for Service Controllers that support it |
125126
| service.loadBalancerIP | string | `""` | IP to assign to the LoadBalancer service |
126127
| service.nodePort | int | `31820` | Node port, only valid with service type: NodePort |
127128
| service.port | int | `51820` | Service port, default is 51820 UDP |

helm/wireguard/templates/service-health-endpoint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ spec:
2525
{{- end }}
2626
selector:
2727
app: "{{ .Release.Name }}-wireguard"
28+
{{- if and .Values.healthSideCar.service.loadBalancerClass (semverCompare ">=1.24-0" .Capabilities.KubeVersion.Version) }}
29+
loadBalancerClass: {{ .Values.healthSideCar.service.loadBalancerClass }}
30+
{{- end }}
2831
{{- end }}

helm/wireguard/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@ spec:
3030
{{- if .Values.service.loadBalancerIP }}
3131
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
3232
{{- end }}
33+
{{- if and .Values.service.loadBalancerClass (semverCompare ">=1.24-0" .Capabilities.KubeVersion.Version) }}
34+
loadBalancerClass: {{ .Values.service.loadBalancerClass }}
35+
{{- end }}
3336
{{- end }}

helm/wireguard/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ service:
9292
annotations: {}
9393
# -- Extra ports that can be attached to the service object, these are passed directly to the port array on the service and must be well formed to the specification
9494
extraPorts: []
95+
# -- loadBalancerClass for Service Controllers that support it
96+
loadBalancerClass: ""
9597
# -- Name of a secret with a wireguard private key on key privatekey, if not provided on first install a hook generates one.
9698
secretName: ~
9799
replicaCount: 3

0 commit comments

Comments
 (0)