Browse Source

gateway-web chart updated

pull/22/head
Galip Tolga Erdem 5 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", "ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/identity/{everything}", "DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "eshop-st-identity", "Host": "{{ .Values.reRoutes.identityService.host }}",
"Port": 80 "Port": {{ .Values.reRoutes.identityService.port }}
} }
], ],
"UpstreamPathTemplate": "/api/identity/{everything}", "UpstreamPathTemplate": "/api/identity/{everything}",
@ -22,11 +22,11 @@ data:
{ {
"ServiceKey": "Identity Service", "ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/account/{everything}", "DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "eshop-st-identity", "Host": "{{ .Values.reRoutes.identityService.host }}",
"Port": 80 "Port": {{ .Values.reRoutes.identityService.port }}
} }
], ],
"UpstreamPathTemplate": "/api/account/{everything}", "UpstreamPathTemplate": "/api/account/{everything}",
@ -35,11 +35,11 @@ data:
{ {
"ServiceKey": "Saas Service", "ServiceKey": "Saas Service",
"DownstreamPathTemplate": "/api/saas/{everything}", "DownstreamPathTemplate": "/api/saas/{everything}",
"DownstreamScheme": "https", "DownstreamScheme": "{{ .Values.reRoutes.saasService.schema }}",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "eshop-st-saas", "Host": "{{ .Values.reRoutes.saasService.host }}",
"Port": 80 "Port": {{ .Values.reRoutes.saasService.port }}
} }
], ],
"UpstreamPathTemplate": "/api/saas/{everything}", "UpstreamPathTemplate": "/api/saas/{everything}",
@ -48,11 +48,11 @@ data:
{ {
"ServiceKey": "Administration Service", "ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}", "DownstreamPathTemplate": "/api/abp/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "eshop-st-administration", "Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": 80 "Port": "{{ .Values.reRoutes.administrationService.port }}",
} }
], ],
"UpstreamPathTemplate": "/api/abp/{everything}", "UpstreamPathTemplate": "/api/abp/{everything}",
@ -61,11 +61,11 @@ data:
{ {
"ServiceKey": "Administration Service", "ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/feature-management/{everything}", "DownstreamPathTemplate": "/api/feature-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "eshop-st-administration", "Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": 80 "Port": "{{ .Values.reRoutes.administrationService.port }}",
} }
], ],
"UpstreamPathTemplate": "/api/feature-management/{everything}", "UpstreamPathTemplate": "/api/feature-management/{everything}",
@ -74,11 +74,11 @@ data:
{ {
"ServiceKey": "Administration Service", "ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/permission-management/{everything}", "DownstreamPathTemplate": "/api/permission-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "eshop-st-administration", "Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": 80 "Port": "{{ .Values.reRoutes.administrationService.port }}",
} }
], ],
"UpstreamPathTemplate": "/api/permission-management/{everything}", "UpstreamPathTemplate": "/api/permission-management/{everything}",
@ -87,11 +87,11 @@ data:
{ {
"ServiceKey": "Administration Service", "ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/setting-management/{everything}", "DownstreamPathTemplate": "/api/setting-management/{everything}",
"DownstreamScheme": "http", "DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [ "DownstreamHostAndPorts": [
{ {
"Host": "eshop-st-administration", "Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": 80 "Port": "{{ .Values.reRoutes.administrationService.port }}",
} }
], ],
"UpstreamPathTemplate": "/api/setting-management/{everything}", "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: metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations: annotations:
kubernetes.io/ingress.class: nginx kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: / nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}" nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
{{- if eq .Release.Name "es-az" }} {{- if eq .Release.Name "es-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true" nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }} {{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec: spec:
tls: tls:
- hosts: - hosts:
- {{ .Values.global.gatewayWeb.domain }} - {{ .Values.ingress.host }}
{{- if eq .Release.Name "es-az" }} {{- if eq .Release.Name "es-az" }}
- {{ print "www." .Values.global.gatewayWeb.domain }} - {{ print "www." .Values.ingress.host }}
{{- end }} {{- end }}
secretName: {{ .Values.global.tlsSecret }} secretName: {{ .Values.ingress.tlsSecret }}
rules: rules:
{{- if eq .Release.Name "es-az" }} {{- if eq .Release.Name "es-az" }}
- host: "{{ print "www." .Values.global.gatewayWeb.domain }}" - host: "{{ print "www." .Values.ingress.host }}"
{{- else }} {{- else }}
- host: "{{ .Values.global.gatewayWeb.domain }}" - host: "{{ .Values.ingress.host }}"
{{- end }} {{- end }}
http: http:
paths: 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: config:
- name: "App__SelfUrl" selfUrl: # https://eshop-st-gateway-web
value: "https://eshop-st-gateway-web" globalConfigurationBaseUrl: # http://eshop-st-gateway-web
- name: "App__CorsOrigins" authServer:
value: "https://eshop-st-web" authority: http://eshop-st-authserver
- name: "GlobalConfiguration__BaseUrl" requireHttpsMetadata: "false"
value: "http://eshop-st-gateway-web" dotnetEnv: #
- name: "Routes__0__DownstreamScheme" redisHost: #
value: "http" rabbitmqHost: #
- name: "Routes__0__DownstreamHostAndPorts__0__Host" elasticsearchHost: #
value: "eshop-st-identity" stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
- name: "Routes__0__DownstreamHostAndPorts__0__Port" reRoutes:
value: "80" identityService:
- name: "Routes__1__DownstreamScheme" schema: http
value: "http" host: eshop-st-identity
- name: "Routes__1__DownstreamHostAndPorts__0__Host" port: 80
value: "eshop-st-identity" administrationService:
- name: "Routes__1__DownstreamHostAndPorts__0__Port" schema: http
value: "80" host: eshop-st-administration
- name: "Routes__2__DownstreamScheme" port: 80
value: "http" saasService:
- name: "Routes__2__DownstreamHostAndPorts__0__Host" schema: # http
value: "eshop-st-saas" host: # eshop-st-saas
- name: "Routes__2__DownstreamHostAndPorts__0__Port" port: # 80
value: "80" ingress:
- name: "Routes__3__DownstreamScheme" host: # eshop-st-gateway-web
value: "http" tlsSecret: eshop-demo-tls
- name: "Routes__3__DownstreamHostAndPorts__0__Host"
value: "eshop-st-administration" image:
- name: "Routes__3__DownstreamHostAndPorts__0__Port" repository: eshoponabp/gateway-web
value: "80" tag: latest
- name: "Routes__4__DownstreamScheme" pullPolicy: IfNotPresent
value: "http"
- name: "Routes__4__DownstreamHostAndPorts__0__Host" env: {}
value: "eshop-st-administration"
- name: "Routes__4__DownstreamHostAndPorts__0__Port"
value: "80"

33
etc/k8s/eshoponabp/values.yaml

@ -162,13 +162,44 @@ administration:
repository: "eshoponabp/service-administration" repository: "eshoponabp/service-administration"
tag: latest 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 sub-chart override
gateway-web-public: gateway-web-public:
config: config:
selfUrl: https://eshop-st-gateway-web-public selfUrl: https://eshop-st-gateway-web-public
globalConfigurationBaseUrl: http://eshop-st-gateway-public-web globalConfigurationBaseUrl: http://eshop-st-gateway-public-web
authServer: authServer:
authority: http://eshop-st-authserver authority: http://eshop-st-AUTHSERVER
requireHttpsMetadata: "false" requireHttpsMetadata: "false"
dotnetEnv: Staging dotnetEnv: Staging
redisHost: es-st-redis redisHost: es-st-redis

Loading…
Cancel
Save