diff --git a/etc/k8s/deploy-staging.sh b/etc/k8s/deploy-staging.sh old mode 100644 new mode 100755 index 342aab96..07748627 --- a/etc/k8s/deploy-staging.sh +++ b/etc/k8s/deploy-staging.sh @@ -1 +1 @@ -helm upgrade --install eshop-st eshoponabp --namespace eshop --create-namespace \ No newline at end of file +helm upgrade --install eshop-st eshoponabp -f ./eshoponabp/values.yaml --namespace eshop --create-namespace \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml b/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/administration/templates/administration-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml b/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml index 03fcc9e8..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml @@ -8,19 +8,22 @@ metadata: nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" cert-manager.io/cluster-issuer: letsencrypt - nginx.ingress.kubernetes.io/configuration-snippet: | - more_set_input_headers "from-ingress: true"; spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml b/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/basket/templates/basket-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml b/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/catalog/templates/catalog-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml b/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml b/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/ordering/templates/ordering-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml b/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/payment/templates/payment-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml index ccba5219..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml @@ -7,9 +7,6 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" -{{- if eq .Release.Name "eshop-az" }} - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" -{{- end }} cert-manager.io/cluster-issuer: letsencrypt spec: ingressClassName: nginx @@ -17,18 +14,16 @@ spec: - hosts: - {{ .Values.ingress.host }} {{- if eq .Release.Name "eshop-az" }} - - {{ print "www." .Values.ingress.host }} -{{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls - rules: -{{- if eq .Release.Name "eshop-az" }} - - host: "{{ print "www." .Values.ingress.host }}" {{- else }} - - host: "{{ .Values.ingress.host }}" + secretName: {{ .Values.ingress.tlsSecret }} {{- end }} + rules: + - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml index 8482c393..ab2b6312 100644 --- a/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml @@ -13,12 +13,17 @@ spec: tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls +{{- else }} + secretName: {{ .Values.ingress.tlsSecret }} +{{- end }} rules: - host: "{{ .Values.ingress.host }}" http: paths: - path: / + pathType: Prefix backend: service: diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index e33b861d..d013446a 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -50,7 +50,7 @@ public-web: elasticsearchHost: eshop-az-elasticsearch ingress: - host: eshoponabp.com + host: www.eshoponabp.com image: repository: "volocr.azurecr.io/eshoponabp/app-publicweb" tag: latest diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index cf42b3e1..d017e45f 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -31,6 +31,7 @@ web: requireHttpsMetadata: "false" ingress: host: eshop-st-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-web" tag: latest @@ -49,6 +50,7 @@ public-web: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-public-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/app-publicweb" tag: latest @@ -84,6 +86,7 @@ identity: paymentServiceRootUrl: https://eshop-st-payment/ ingress: host: eshop-st-identity + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-identity" tag: latest @@ -111,6 +114,7 @@ administration: authority: https://eshop-st-authserver ingress: host: eshop-st-administration + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-administration" tag: latest @@ -132,6 +136,7 @@ gateway-web: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-gateway-web + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/gateway-web" tag: latest @@ -162,6 +167,7 @@ gateway-web-public: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-gateway-web-public + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/gateway-web-public" tag: latest @@ -202,6 +208,7 @@ basket: catalogGrpcUrl: http://eshop-st-catalog:81 ingress: host: eshop-st-basket + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-basket" tag: latest @@ -230,6 +237,7 @@ catalog: grpcProtocols: Http2 ingress: host: eshop-st-catalog + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-catalog" tag: latest @@ -253,6 +261,7 @@ ordering: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-ordering + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-ordering" tag: latest @@ -276,6 +285,7 @@ payment: elasticsearchHost: eshop-st-elasticsearch ingress: host: eshop-st-payment + tlsSecret: eshop-wildcard-tls image: repository: "eshoponabp/service-payment" tag: latest