Skip to content

Commit

Permalink
feat(nginx): add loadBalancerClass and externalIPs
Browse files Browse the repository at this point in the history
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
  • Loading branch information
hhk7734 committed Mar 11, 2024
1 parent cc7016a commit 83672fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions templates/nginx/service.yaml
Expand Up @@ -71,13 +71,20 @@ spec:
{{- end }}
spec:
type: LoadBalancer
{{- with $loadBalancer.loadBalancerClass }}
loadBalancerClass: {{ . }}
{{- end }}
{{- with $loadBalancer.sourceRanges }}
loadBalancerSourceRanges:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if $loadBalancer.IP }}
loadBalancerIP: {{ $loadBalancer.IP }}
{{- end }}
{{- with $loadBalancer.externalIPs }}
externalIPs:
{{- toYaml . | nindent 4 }}
{{- end }}
ports:
- name: http
port: {{ $loadBalancer.ports.httpPort }}
Expand Down
5 changes: 5 additions & 0 deletions values.yaml
Expand Up @@ -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
Expand Down

0 comments on commit 83672fe

Please sign in to comment.