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

ingress updates #753

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
35 changes: 35 additions & 0 deletions charts/nbs6/templates/ingress-cached.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}-ingress-cached
namespace: {{ .Release.Namespace }}
{{- with .Values.ingress.annotationsCached }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
tls:
{{- range .Values.ingress.tlsCached }}
- secretName: {{ .secretName }}
hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.rulesCached }}
- host: {{ .host }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ $.Release.Name }}-service
port:
number: {{ $.Values.service.ports.https }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/nbs6/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}-ingress
namespace: {{ .Release.Namespace }}
{{- with .Values.ingress.annotations }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: "{{ $value }}"
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
tls:
{{- range .Values.ingress.tls }}
Expand Down
20 changes: 19 additions & 1 deletion charts/nbs6/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,25 @@ ingress:
- host: app-classic.example.com
paths:
- path: /
pathType: Prefix
pathType: Prefix
annotationsCached:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/service-upstream: "true"
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "X-Frame-Options: Allow";
more_set_headers "Cross-Origin-Opener-Policy: same-origin";
more_set_headers "Cache-Content: max-age=1209600, immutable";
tlsCached:
- secretName: app-classic.example.com
hosts:
- app-classic.example.com
rulesCached:
- host: app-classic.example.com
paths:
- path: '/.+\.(jpg|svg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|ttf|woff|woff2)$'
pathType: ImplementationSpecific



resources:
requests:
Expand Down
Loading