Browse Source

gateway-web chart updated

pull/22/head
Galip Tolga Erdem 4 years ago
parent
commit
28cd6cbfc6
  1. 42
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml
  2. 51
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-deployment.yaml
  3. 18
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml
  4. 34
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml
  5. 71
      etc/k8s/eshoponabp/charts/gateway-web/values.yaml
  6. 33
      etc/k8s/eshoponabp/values.yaml

42
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml

@ -9,11 +9,11 @@ data:
{
"ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-identity",
"Port": 80
"Host": "{{ .Values.reRoutes.identityService.host }}",
"Port": {{ .Values.reRoutes.identityService.port }}
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
@ -22,11 +22,11 @@ data:
{
"ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-identity",
"Port": 80
"Host": "{{ .Values.reRoutes.identityService.host }}",
"Port": {{ .Values.reRoutes.identityService.port }}
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
@ -35,11 +35,11 @@ data:
{
"ServiceKey": "Saas Service",
"DownstreamPathTemplate": "/api/saas/{everything}",
"DownstreamScheme": "https",
"DownstreamScheme": "{{ .Values.reRoutes.saasService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-saas",
"Port": 80
"Host": "{{ .Values.reRoutes.saasService.host }}",
"Port": {{ .Values.reRoutes.saasService.port }}
}
],
"UpstreamPathTemplate": "/api/saas/{everything}",
@ -48,11 +48,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/abp/{everything}",
@ -61,11 +61,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/feature-management/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/feature-management/{everything}",
@ -74,11 +74,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/permission-management/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/permission-management/{everything}",
@ -87,11 +87,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/setting-management/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/setting-management/{everything}",

51
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-deployment.yaml

@ -0,0 +1,51 @@
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
volumeMounts:
- name: config-volume
mountPath: /app/appsettings.json
env:
- name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}"
- name: GlobalConfiguration__BaseUrl
value: "{{ .Values.config.globalConfigurationBaseUrl }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

18
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-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 }}"
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.gatewayWeb.domain }}
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "es-az" }}
- {{ print "www." .Values.global.gatewayWeb.domain }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Values.global.tlsSecret }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
{{- if eq .Release.Name "es-az" }}
- host: "{{ print "www." .Values.global.gatewayWeb.domain }}"
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.global.gatewayWeb.domain }}"
- host: "{{ .Values.ingress.host }}"
{{- end }}
http:
paths:

34
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml

@ -1,34 +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.gatewayWeb.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
volumeMounts:
- name: config-volume
mountPath: /app/config
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

71
etc/k8s/eshoponabp/charts/gateway-web/values.yaml

@ -1,37 +1,34 @@
env:
- name: "App__SelfUrl"
value: "https://eshop-st-gateway-web"
- name: "App__CorsOrigins"
value: "https://eshop-st-web"
- name: "GlobalConfiguration__BaseUrl"
value: "http://eshop-st-gateway-web"
- name: "Routes__0__DownstreamScheme"
value: "http"
- name: "Routes__0__DownstreamHostAndPorts__0__Host"
value: "eshop-st-identity"
- name: "Routes__0__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__1__DownstreamScheme"
value: "http"
- name: "Routes__1__DownstreamHostAndPorts__0__Host"
value: "eshop-st-identity"
- name: "Routes__1__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__2__DownstreamScheme"
value: "http"
- name: "Routes__2__DownstreamHostAndPorts__0__Host"
value: "eshop-st-saas"
- name: "Routes__2__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__3__DownstreamScheme"
value: "http"
- name: "Routes__3__DownstreamHostAndPorts__0__Host"
value: "eshop-st-administration"
- name: "Routes__3__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__4__DownstreamScheme"
value: "http"
- name: "Routes__4__DownstreamHostAndPorts__0__Host"
value: "eshop-st-administration"
- name: "Routes__4__DownstreamHostAndPorts__0__Port"
value: "80"
config:
selfUrl: # https://eshop-st-gateway-web
globalConfigurationBaseUrl: # http://eshop-st-gateway-web
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: #
redisHost: #
rabbitmqHost: #
elasticsearchHost: #
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
reRoutes:
identityService:
schema: http
host: eshop-st-identity
port: 80
administrationService:
schema: http
host: eshop-st-administration
port: 80
saasService:
schema: # http
host: # eshop-st-saas
port: # 80
ingress:
host: # eshop-st-gateway-web
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/gateway-web
tag: latest
pullPolicy: IfNotPresent
env: {}

33
etc/k8s/eshoponabp/values.yaml

@ -162,13 +162,44 @@ administration:
repository: "eshoponabp/service-administration"
tag: latest
# gateway-web sub-chart override
gateway-web:
config:
selfUrl: https://eshop-st-gateway-web
globalConfigurationBaseUrl: http://eshop-st-gateway-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-gateway-web
image:
repository: "eshoponabp/gateway-web"
tag: latest
reRoutes:
identityService:
schema: http
host: eshop-st-identity
port: 80
administrationService:
schema: http
host: eshop-st-administration
port: 80
saasService:
schema: http
host: eshop-st-saas
port: 80
# gateway-web-public sub-chart override
gateway-web-public:
config:
selfUrl: https://eshop-st-gateway-web-public
globalConfigurationBaseUrl: http://eshop-st-gateway-public-web
authServer:
authority: http://eshop-st-authserver
authority: http://eshop-st-AUTHSERVER
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis

Loading…
Cancel
Save