diff --git a/.devcontainer.json b/.devcontainer.json index c200307..32135f8 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -3,7 +3,8 @@ "customizations": { "vscode": { "extensions": [ - "ms-dotnettools.csdevkit" + "ms-dotnettools.csdevkit", + "ms-kubernetes-tools.vscode-kubernetes-tools" ] } } diff --git a/Charts/ldtteam-authentication-server/templates/ingress.yaml b/Charts/ldtteam-authentication-server/templates/ingress.yaml index 6883a58..3694d4d 100644 --- a/Charts/ldtteam-authentication-server/templates/ingress.yaml +++ b/Charts/ldtteam-authentication-server/templates/ingress.yaml @@ -1,61 +1,34 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "ldtteam-authentication-server.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} kind: Ingress metadata: name: {{ $fullName }} labels: {{- include "ldtteam-authentication-server.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} annotations: - {{- toYaml . | nindent 4 }} - {{- end }} + cert-manager.io/cluster-issuer: letsencrypt-production + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/proxy-body-size: 30m + nginx.ingress.kubernetes.io/proxy-buffer-size: 256k + nginx.ingress.kubernetes.io/proxy-buffering: 'on' + nginx.ingress.kubernetes.io/proxy-buffers-number: '4' + nginx.ingress.kubernetes.io/proxy-max-temp-file-size: 1024m spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} + ingressClassName: "nginx" tls: - {{- range .Values.ingress.tls }} - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} + - {{ .Values.ingress.hostName }} + secretName: auth-minecolonies-tls rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} + - host: {{ .Values.ingress.hostName | quote }} http: paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} + - path: / + pathType: ImplementationSpecifics backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} + number: {{ .Values.service.port }} {{- end }} diff --git a/Charts/ldtteam-authentication-server/values.yaml b/Charts/ldtteam-authentication-server/values.yaml index d7ada16..7f0fc7a 100644 --- a/Charts/ldtteam-authentication-server/values.yaml +++ b/Charts/ldtteam-authentication-server/values.yaml @@ -40,24 +40,7 @@ service: ingress: enabled: true - className: "nginx" - annotations: - cert-manager.io/cluster-issuer: letsencrypt-production - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: 30m - nginx.ingress.kubernetes.io/proxy-buffer-size: 256k - nginx.ingress.kubernetes.io/proxy-buffering: 'on' - nginx.ingress.kubernetes.io/proxy-buffers-number: '4' - nginx.ingress.kubernetes.io/proxy-max-temp-file-size: 1024m - hosts: - - host: auth.minecolonies.com - paths: - - path: / - pathType: ImplementationSpecific - tls: - - secretName: auth-minecolonies-tls - hosts: - - auth.minecolonies.com + hostname: auth.minecolonies.com livenessProbe: httpGet: