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