diff --git a/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml b/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml index 4bed73b0..ec7d9533 100644 --- a/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml +++ b/etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml @@ -23,8 +23,8 @@ spec: env: {{ include "eshoponabp.global.env" . | indent 8 }} - name: "ConnectionStrings__IdentityService" - value: {{ .Values.global.identityServiceConnString }} + value: {{ .Values.global.identityService.connString }} - name: "ConnectionStrings__AdministrationService" - value: {{ .Values.global.administrationServiceConnString }} + value: {{ .Values.global.administrationService.connString }} - name: "ConnectionStrings__SaasService" - value: {{ .Values.global.saasServiceConnString }} + value: {{ .Values.global.saasService.connString }} diff --git a/etc/k8s/eshoponabp/charts/identity/Chart.yaml b/etc/k8s/eshoponabp/charts/identity/Chart.yaml new file mode 100644 index 00000000..0af4b111 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/identity/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: identity +appVersion: "1.0" +description: Identity Microservice +version: 1.0.0 +type: application \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/identity/templates/admin-api-service.yaml b/etc/k8s/eshoponabp/charts/identity/templates/admin-api-service.yaml new file mode 100644 index 00000000..ee157c01 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/identity/templates/admin-api-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 }} diff --git a/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml b/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml new file mode 100644 index 00000000..3e8002eb --- /dev/null +++ b/etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml @@ -0,0 +1,27 @@ +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 +spec: + tls: + - hosts: + - {{ .Values.global.identityService.domain }} + secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls + rules: + - host: "{{ .Values.global.identityService.domain }}" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }}-{{ .Chart.Name }} + port: + number: 80 \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/identity/templates/identity.yaml b/etc/k8s/eshoponabp/charts/identity/templates/identity.yaml new file mode 100644 index 00000000..ba929514 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/identity/templates/identity.yaml @@ -0,0 +1,31 @@ +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.identityService.containerImage }}:{{ .Values.global.eventHubImageVersion }} + 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.identityService.connString }} + - name: "ConnectionStrings__AdministrationService" + value: {{ .Values.global.administrationService.connString }} + - name: "ConnectionStrings__SaasService" + value: {{ .Values.global.saasService.connString }} + diff --git a/etc/k8s/eshoponabp/charts/identity/values.yaml b/etc/k8s/eshoponabp/charts/identity/values.yaml new file mode 100644 index 00000000..e69de29b diff --git a/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml b/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml index 3e9e2ac7..fed9b5cf 100644 --- a/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml +++ b/etc/k8s/eshoponabp/charts/sqlserver/templates/sqlserver.yaml @@ -24,7 +24,7 @@ spec: {{- end }} ports: - name: sqlserver - containerPort: 5432 + containerPort: 1434 env: - name: SA_PASSWORD value: "myPassw0rd" diff --git a/etc/k8s/eshoponabp/templates/_helpers.tpl b/etc/k8s/eshoponabp/templates/_helpers.tpl index ef7abc38..50d1115c 100644 --- a/etc/k8s/eshoponabp/templates/_helpers.tpl +++ b/etc/k8s/eshoponabp/templates/_helpers.tpl @@ -64,18 +64,8 @@ Create the name of the service account to use {{- 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" diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 29f585dd..fd40c5f1 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -83,6 +83,7 @@ affinity: {} global: dotnetEnvironment: "Staging" + imagePullPolicy: Never eshoponabpImageVersion: latest authServer: domain: eshoponabp-authserver @@ -91,18 +92,21 @@ global: identityService: domain: eshoponabp-identity url: https://eshoponabp-identity - containerImage: "eshoponabp.identity" + containerImage: "eshoponabp/service-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" + containerImage: "eshoponabp/service-administration" 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" + containerImage: "eshoponabp/service-saas" connString: "Server=eshoponabp-sqldb,1434;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true" redisConfiguration: "eshoponabp-redis" nginxProxyBufferSize: "32k" - nginxProxyBuffersNumber: "8" \ No newline at end of file + nginxProxyBuffersNumber: "8" + internalAuthServerAuthority: "http://eshoponabp-authserver" + internalAuthServerRequireHttpsMetadata: "false" + stringEncryptionDefaultPassPhrase: "TxVIZFPxK33czbbv" \ No newline at end of file