Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nginx): add loadBalancerClass and externalIPs #1727

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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