Browse Source

added authserver and globals

pull/12/head
Galip Tolga Erdem 5 years ago
parent
commit
7b2b8699c6
  1. 6
      etc/k8s/eshoponabp/charts/authserver/Chart.yaml
  2. 29
      etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml
  3. 14
      etc/k8s/eshoponabp/charts/authserver/templates/authserver-service.yaml
  4. 30
      etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml
  5. 0
      etc/k8s/eshoponabp/charts/authserver/values.yaml
  6. 2
      etc/k8s/eshoponabp/charts/sqlserver/Chart.yaml
  7. 25
      etc/k8s/eshoponabp/templates/_helpers.tpl
  8. 26
      etc/k8s/eshoponabp/values.yaml

6
etc/k8s/eshoponabp/charts/authserver/Chart.yaml

@ -0,0 +1,6 @@
apiVersion: v2
name: authserver
appVersion: "1.0"
description: eShop AuthServer Application
version: 1.0.0
type: application

29
etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml

@ -0,0 +1,29 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
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 }}"
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_input_headers "from-ingress: true";
spec:
tls:
- hosts:
- {{ .Values.global.authServerDomain }}
secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls
rules:
- host: "{{ .Values.global.authServerDomain }}"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-{{ .Chart.Name }}
port:
number: 80

14
etc/k8s/eshoponabp/charts/authserver/templates/authserver-service.yaml

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
labels:
name: {{ .Release.Name }}-{{ .Chart.Name }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
ports:
- name: "80"
port: 80
- name: "443"
port: 443
selector:
app: {{ .Release.Name }}-{{ .Chart.Name }}

30
etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml

@ -0,0 +1,30 @@
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.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
- name: "ConnectionStrings__IdentityService"
value: {{ .Values.global.identityServiceConnString }}
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.global.administrationServiceConnString }}
- name: "ConnectionStrings__SaasService"
value: {{ .Values.global.saasServiceConnString }}

0
etc/k8s/eshoponabp/charts/authserver/values.yaml

2
etc/k8s/eshoponabp/charts/sqlserver/Chart.yaml

@ -1,5 +1,5 @@
apiVersion: v2
name: sqlserver
name: sqldb
appVersion: "1.0"
description: Runs SQL Server Instance
version: 1.0.0

25
etc/k8s/eshoponabp/templates/_helpers.tpl

@ -60,3 +60,28 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{- define "eshoponabp.global.env" -}}
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.global.dotnetEnvironment }}"
- name: "AppUrls__Account"
value: "{{ .Values.global.authServerUrl }}"
- name: "AppUrls__Web"
value: "{{ .Values.global.webUrl }}"
- name: "AppUrls__Api"
value: "{{ .Values.global.apiUrl }}"
- name: "AppUrls__ApiInternal"
value: "{{ .Values.global.apiUrlInternal }}"
- name: "AppUrls__Admin"
value: "{{ .Values.global.adminUrl }}"
- name: "AppUrls__AdminApi"
value: "{{ .Values.global.adminApiUrl }}"
- name: "Redis__Configuration"
value: "{{ .Values.global.redisConfiguration }}"
- name: "AuthServer__Authority"
value: "{{ .Values.global.internalAuthServerAuthority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.global.internalAuthServerRequireHttpsMetadata }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.global.stringEncryptionDefaultPassPhrase }}"
{{- end }}

26
etc/k8s/eshoponabp/values.yaml

@ -80,3 +80,29 @@ nodeSelector: {}
tolerations: []
affinity: {}
global:
dotnetEnvironment: "Staging"
authServer:
domain: eshoponabp-authserver
url: https://eshoponabp-authserver
containerImage: "eshoponabp.authserver"
identityService:
domain: eshoponabp-identity
url: https://eshoponabp-identity
containerImage: "eshoponabp.identity"
connString: "Server=eshoponabp-sqldb,1434;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService:
domain: eshoponabp-administration
url: https://eshoponabp-administration
containerImage: "eshoponabp.authserver"
connString: "Server=eshoponabp-sqldb,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService:
domain: eshoponabp-saas
url: https://eshoponabp-saas
containerImage: "eshoponabp.saas"
connString: "Server=eshoponabp-sqldb,1434;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
redisConfiguration: "eshoponabp-redis"
nginxProxyBufferSize: "32k"
nginxProxyBuffersNumber: "8"
eshoponabpImageVersion: latest
Loading…
Cancel
Save