-
Notifications
You must be signed in to change notification settings - Fork 10
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]: Not using Nginx class name #67
Comments
Hey @guy-frontegg, thanks! Per your nginx-different-class-name, can you send some another helm configuration which do it? I’ll try to implement it even today. If not - I’ll think on smth. Regarding web socket - it is for live updates without refreshing the page. Imagine new alert arrive and you want to see it on the frontend without refreshing the page. |
Thank you for your answer. We simply need to provide a different className since we have more than one. For example we will use alb. I suggest basing it on a property like useNginx and letting us set the class name. (I hope I understand you correctly) |
Hi @shahargl , Anything you need from me? |
@guy-frontegg somehow missed your response, sorry for that. you can use
So just deploy with My concern is that for every ingress (e.g. |
I've merged the renaming (#69) |
i tied to create a PR but it's not allowed the {{- if .Values.global.ingress.enabled }}
{{- $fullName := include "keep.fullname" . }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}-ingress
labels:
{{- include "keep.labels" . | nindent 4 }}
annotations:
{{- if eq .Values.global.ingress.type "nginx" }}
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/use-http2: "false"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($request_uri ~* ^({{ .Values.global.ingress.websocketPrefix }}|{{ .Values.global.ingress.backendPrefix }}|{{ .Values.global.ingress.frontendPrefix }})(/|$)(.*)) {
rewrite ^({{ .Values.global.ingress.websocketPrefix }}|{{ .Values.global.ingress.backendPrefix }}|{{ .Values.global.ingress.frontendPrefix }})(/|$)(.*) /$3 break;
}
nginx.ingress.kubernetes.io/server-snippet: |
{{- if $.Values.websocket.enabled }}
location ^~ {{ .Values.global.ingress.websocketPrefix }} {
rewrite ^{{ .Values.global.ingress.websocketPrefix }}(/|$)(.*) /$2 break;
proxy_pass http://{{ $fullName }}-websocket.{{ .Release.Namespace }}.svc.cluster.local:{{ $.Values.websocket.service.port }};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_cache_bypass $http_upgrade;
}
{{- end }}
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/use-regex: "true"
{{- end }}
{{- with .Values.global.ingress.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.global.ingress.className }}
{{- if .Values.global.ingress.tls }}
tls:
{{- range .Values.global.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- if .Values.global.ingress.hosts }}
{{- range .Values.global.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- if $.Values.websocket.enabled }}
- path: {{ $.Values.global.ingress.websocketPrefix }}(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}-websocket
port:
number: {{ $.Values.websocket.service.port }}
{{- end }}
{{- if $.Values.backend.enabled }}
- path: {{ $.Values.global.ingress.backendPrefix }}(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}-backend
port:
number: {{ $.Values.backend.service.port }}
{{- end }}
- path: {{ $.Values.global.ingress.frontendPrefix }}(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}-frontend
port:
number: {{ $.Values.frontend.service.port }}
{{- end }}
{{- else }}
- http:
paths:
{{- if $.Values.websocket.enabled }}
- path: {{ $.Values.global.ingress.websocketPrefix }}(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}-websocket
port:
number: {{ $.Values.websocket.service.port }}
{{- end }}
{{- if $.Values.backend.enabled }}
- path: {{ $.Values.global.ingress.backendPrefix }}(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}-backend
port:
number: {{ $.Values.backend.service.port }}
{{- end }}
- path: {{ $.Values.global.ingress.frontendPrefix }}(.*)
pathType: ImplementationSpecific
backend:
service:
name: {{ $fullName }}-frontend
port:
number: {{ $.Values.frontend.service.port }}
{{- end }}
{{- end }} |
Hey @shahargl , Did you delete the last comment? |
@guy-frontegg I'm still struggling to understand what's the problem. If you specify For example, by default it uses
But when I speficy another class name I get what you want:
|
@guy-frontegg yea because I thought I understand what's the problem but while debugging it I find out I didn't ^^ |
Oh, you DO want nginx configuration, but for other class name. |
Fixing. |
Yes, |
We are welcoming PR's! I'll check why you didn't manage to create one :( |
Description
Hey All,
Great work on Keep, and thank you for open-source it.
We are using Nginx as an ingress controller, yet it has a different name. In the helm chart, if the ClassName is not Nginx, you lose all the configuration that makes Keep work.
Before creating a whole new ingress just for that, do you maybe have another solution?
And what is the importance of a WebSocket for Keep? should we enable it?
Thank you
Additional Information
No response
The text was updated successfully, but these errors were encountered: