Browse Source

updated public-web application sub chart

pull/22/head
Galip Tolga Erdem 5 years ago
parent
commit
8d09213a78
  1. 44
      etc/k8s/eshoponabp/charts/public-web/templates/public-web-deployment.yaml
  2. 24
      etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml
  3. 31
      etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml
  4. 23
      etc/k8s/eshoponabp/charts/public-web/values.yaml
  5. 18
      etc/k8s/eshoponabp/values.yaml

44
etc/k8s/eshoponabp/charts/public-web/templates/public-web-deployment.yaml

@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
- name: App__SelfUrl
value: {{ .Values.config.selfUrl}}
- name: RemoteServices__Default__BaseUrl
value: {{ .Values.config.gatewayUrl}}
- name: "AuthServer__Authority"
value: {{ .Values.config.authServer.authority }}
- name: "AuthServer__RequireHttpsMetadata"
value: {{ .Values.config.authServer.requireHttpsMetadata }}
- name: "DOTNET_ENVIRONMENT"
value: {{ .Values.config.dotnetEnv }}
- name: "Redis__Configuration"
value: {{ .Values.config.redisHost }}
- name: "StringEncryption__DefaultPassPhrase"
value: {{ .Values.config.stringEncryptionDefaultPassPhrase }}
- name: "RabbitMQ__Connections__Default__HostName"
value: {{ .Values.config.rabbitmqHost }}
- name: "ElasticSearch__Url"
value: {{ .Values.config.elasticsearchHost }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

24
etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml

@ -3,28 +3,28 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
{{- if eq .Release.Name "eh-az" }}
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
{{- if eq .Release.Name "es-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.publicWeb.domain }}
{{- if eq .Release.Name "eh-az" }}
- {{ print "www." .Values.global.publicWeb.domain }}
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "es-az" }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Values.global.tlsSecret }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
{{- if eq .Release.Name "eh-az" }}
- host: "{{ print "www." .Values.global.publicWeb.domain }}"
{{- if eq .Release.Name "es-az" }}
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.global.publicWeb.domain }}"
- host: "{{ .Values.ingress.host }}"
{{- end }}
http:
paths:

31
etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml

@ -1,31 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.publicWeb.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
- name: App__SelfUrl
value: {{ .Values.config.selfUrl}}
- name: RemoteServices__Default__BaseUrl
value: {{ .Values.config.gatewayUrl}}
{{ include "eshoponabp.global.env" . | indent 8 }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

23
etc/k8s/eshoponabp/charts/public-web/values.yaml

@ -1,3 +1,22 @@
config:
selfUrl: "https://eshop-st-public-web"
gatewayUrl: "http://eshop-st-gateway-public-web/"
selfUrl: https://eshop-st-public-web
gatewayUrl: "http://eshop-st-gateway-web-public/"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: # eshop-st-public-web
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/app-publicweb
tag: latest
pullPolicy: IfNotPresent
env: {}

18
etc/k8s/eshoponabp/values.yaml

@ -108,6 +108,24 @@ authserver:
repository: "eshoponabp/app-authserver"
tag: latest
# public-web sub-chart override
public-web:
config:
selfUrl: https://eshop-st-public-web
gatewayUrl: "http://eshop-st-gateway-web-public/"
authServer:
authority: http://eshop-st-AUTHSERVER
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
ingress:
host: eshop-st-public-web
image:
repository: "eshoponabp/app-publicweb"
tag: latest
# identity-service sub-chart override
identity:
config:

Loading…
Cancel
Save