From 205e564d1dcc8ce8ed8b952f1b4ac18bffe3d038 Mon Sep 17 00:00:00 2001 From: Hyeonki Hong Date: Mon, 11 Mar 2024 21:55:56 +0900 Subject: [PATCH] feat(nginx): add loadBalancerClass and externalIPs --- templates/nginx/service.yaml | 7 +++++++ values.yaml | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/templates/nginx/service.yaml b/templates/nginx/service.yaml index 691584ce0..9bc059648 100644 --- a/templates/nginx/service.yaml +++ b/templates/nginx/service.yaml @@ -71,6 +71,9 @@ spec: {{- end }} spec: type: LoadBalancer + {{- with $loadBalancer.loadBalancerClass }} + loadBalancerClass: {{ . }} + {{- end }} {{- with $loadBalancer.sourceRanges }} loadBalancerSourceRanges: {{- toYaml . | nindent 4 }} @@ -78,6 +81,10 @@ spec: {{- if $loadBalancer.IP }} loadBalancerIP: {{ $loadBalancer.IP }} {{- end }} + {{- with $loadBalancer.externalIPs }} + externalIPs: + {{- toYaml . | nindent 4 }} + {{- end }} ports: - name: http port: {{ $loadBalancer.ports.httpPort }} diff --git a/values.yaml b/values.yaml index 7e7490650..2ccbae568 100644 --- a/values.yaml +++ b/values.yaml @@ -83,8 +83,13 @@ expose: loadBalancer: # The name of LoadBalancer service name: harbor + # Set the class of the loadBalancer implementation(Kubernetes >= 1.24) + loadBalancerClass: "" # Set the IP if the LoadBalancer supports assigning IP IP: "" + # Set a list of IP addresses for which nodes in the cluster will also accept + # traffic for this service. These IPs are not managed by Kubernetes + externalIPs: [] ports: # The service port Harbor listens on when serving HTTP httpPort: 80