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

Update Ingress API Version (extensions/v1beta1 -> networking.k8s.io/v1) #154

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

{{- if .Values.extra.pulsarAdminConsole }}
{{- if .Values.pulsarAdminConsole.ingress.enabled }}
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
apiVersion: extensions/v1beta1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarAdminConsole.component }}"
Expand All @@ -37,13 +41,31 @@ spec:
http:
paths:
- path: /
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarAdminConsole.component }}"
servicePort: 8080
{{- else }}
pathType: ImplementationSpecific
backend:
service:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarAdminConsole.component }}"
port:
number: 8080
{{- end }}
- path: /ws/
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarAdminConsole.component }}"
servicePort: 8080
{{- else }}
pathType: ImplementationSpecific
backend:
service:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarAdminConsole.component }}"
port:
number: 8080
{{- end }}
{{- if and .Values.enableTls .Values.pulsarAdminConsole.ingress.enableTls}}
tls:
- hosts:
Expand Down
54 changes: 53 additions & 1 deletion helm-chart-sources/pulsar/templates/proxy/proxy-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
#

{{- if .Values.proxy.ingress.enabled }}
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
apiVersion: extensions/v1beta1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
Expand All @@ -42,37 +46,85 @@ spec:
http:
paths:
- path: /
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
{{- if .Values.enableTls }}
servicePort: 8443
{{- else }}
servicePort: 8080
{{- end }}
{{- else }}
pathType: ImplementationSpecific
backend:
service:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
port:
{{- if .Values.enableTls }}
number: 8443
{{- else }}
number: 8080
{{- end }}
{{- end }}
{{- if .Values.proxy.ingress.enableWebSocket }}
- path: /ws
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
{{- if .Values.enableTls }}
servicePort: {{ .Values.proxy.ingress.wssPortOnProxy }}
{{- else }}
servicePort: 8000
{{- end }}
{{- else }}
pathType: ImplementationSpecific
backend:
service:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
port:
{{- if .Values.enableTls }}
number: {{ .Values.proxy.ingress.wssPortOnProxy }}
{{- else }}
number: 8000
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.proxy.ingress.enableBurnell }}
- path: /br
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
servicePort: 8964
{{- else }}
pathType: ImplementationSpecific
backend:
service:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.proxy.component }}"
port:
number: 8964
{{- end }}
{{- end }}
{{- if .Values.broker.ingress.enabled }}
- path: /broker
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
{{- if .Values.enableTls }}
servicePort: 8443
{{- else }}
servicePort: 8080
{{- end }}
{{- else }}
pathType: ImplementationSpecific
backend:
service:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}"
port:
{{- if .Values.enableTls }}
number: 8443
{{- else }}
number: 8080
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
17 changes: 16 additions & 1 deletion helm-chart-sources/pulsar/templates/pulsarSql/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

{{- if .Values.extra.pulsarSQL }}
{{- if .Values.pulsarSQL.ingress.enabled }}
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
apiVersion: extensions/v1beta1
{{- else }}
apiVersion: networking.k8s.io/v1
{{- end }}
kind: Ingress
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarSQL.component }}"
Expand All @@ -37,8 +41,19 @@ spec:
http:
paths:
- path: /
{{- if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version }}
backend:
serviceName: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarSQL.component }}"
servicePort: 8080
servicePort: "http-coord"
{{- else }}
pathType: ImplementationSpecific
backend:
service:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsarSQL.component }}"
port:
number: 8080
name: "http-coord"
{{- end }}
{{- end }}
{{- end }}
{{- end }}