forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/nginx-ingress] Add support for an internal load balancer alon…
…g with an external one (helm#22758) * [stable/nginx-ingress] Add support for an internal load balancer along with an external one Signed-off-by: Luis Garnica Guilarte <[email protected]> * [stable/nginx-ingress] Add support for an internal load balancer along with an external one Signed-off-by: Luis Garnica Guilarte <[email protected]> Signed-off-by: camelusluo <[email protected]>
- Loading branch information
Showing
6 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
controller: | ||
kind: DaemonSet | ||
service: | ||
internal: | ||
enabled: true | ||
annotations: | ||
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
controller: | ||
service: | ||
internal: | ||
enabled: true | ||
annotations: | ||
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 |
45 changes: 45 additions & 0 deletions
45
stable/nginx-ingress/templates/controller-service-internal.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{{- if and .Values.controller.service.enabled .Values.controller.service.internal.enabled .Values.controller.service.internal.annotations}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
{{- range $key, $value := .Values.controller.service.internal.annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
labels: | ||
{{- if .Values.controller.service.labels }} | ||
{{ toYaml .Values.controller.service.labels | indent 4 }} | ||
{{- end }} | ||
app: {{ template "nginx-ingress.name" . }} | ||
chart: {{ template "nginx-ingress.chart" . }} | ||
component: "{{ .Values.controller.name }}" | ||
heritage: {{ .Release.Service }} | ||
release: {{ template "nginx-ingress.releaseLabel" . }} | ||
name: {{ template "nginx-ingress.controller.fullname" . }}-internal | ||
spec: | ||
ports: | ||
{{- $setNodePorts := (or (eq .Values.controller.service.type "NodePort") (eq .Values.controller.service.type "LoadBalancer")) }} | ||
{{- if .Values.controller.service.enableHttp }} | ||
- name: http | ||
port: {{ .Values.controller.service.ports.http }} | ||
protocol: TCP | ||
targetPort: {{ .Values.controller.service.targetPorts.http }} | ||
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.http))) }} | ||
nodePort: {{ .Values.controller.service.nodePorts.http }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.controller.service.enableHttps }} | ||
- name: https | ||
port: {{ .Values.controller.service.ports.https }} | ||
protocol: TCP | ||
targetPort: {{ .Values.controller.service.targetPorts.https }} | ||
{{- if (and $setNodePorts (not (empty .Values.controller.service.nodePorts.https))) }} | ||
nodePort: {{ .Values.controller.service.nodePorts.https }} | ||
{{- end }} | ||
{{- end }} | ||
selector: | ||
app: {{ template "nginx-ingress.name" . }} | ||
release: {{ template "nginx-ingress.releaseLabel" . }} | ||
app.kubernetes.io/component: controller | ||
type: "{{ .Values.controller.service.type }}" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters