Browse Source

cms k8s chart configuration

pull/131/head
malik masis 4 years ago
parent
commit
c933649d85
  1. 6
      etc/k8s/eshoponabp/charts/cmskit/Chart.yaml
  2. 53
      etc/k8s/eshoponabp/charts/cmskit/templates/cmskit-deployment.yaml
  3. 32
      etc/k8s/eshoponabp/charts/cmskit/templates/cmskit-ingress.yaml
  4. 14
      etc/k8s/eshoponabp/charts/cmskit/templates/cmskit-service.yaml
  5. 28
      etc/k8s/eshoponabp/charts/cmskit/values.yaml

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

@ -0,0 +1,6 @@
apiVersion: v2
name: cmskit
appVersion: "1.0"
description: eShopOnAbp Cmskit Microservice
version: 1.0.0
type: application

53
etc/k8s/eshoponabp/charts/cmskit/templates/cmskit-deployment.yaml

@ -0,0 +1,53 @@
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: App__CorsOrigins
value: "{{ .Values.config.corsOrigins }}"
- name: "ConnectionStrings__CmskitService"
value: {{ .Values.config.connectionStrings.cmskitService }}
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.config.connectionStrings.administrationService }}
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "AuthServer__SwaggerClientId"
value: "{{ .Values.config.authServer.swaggerClientId }}"
- name: "AuthServer__SwaggerClientSecret"
value: "{{ .Values.config.authServer.swaggerClientSecret }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

32
etc/k8s/eshoponabp/charts/cmskit/templates/cmskit-ingress.yaml

@ -0,0 +1,32 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
spec:
ingressClassName: nginx
tls:
- hosts:
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "eshop-az" }}
secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls
{{- else }}
secretName: {{ .Values.ingress.tlsSecret }}
{{- end }}
rules:
- host: "{{ .Values.ingress.host }}"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-{{ .Chart.Name }}
port:
number: 80

14
etc/k8s/eshoponabp/charts/cmskit/templates/cmskit-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 }}

28
etc/k8s/eshoponabp/charts/cmskit/values.yaml

@ -0,0 +1,28 @@
config:
selfUrl: # https://eshop-st-cmskit
corsOrigins: # https://eshop-st-gateway-web,https://eshop-st-gateway-public-web
connectionStrings:
cmskitService: #
administrationService: #
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
swaggerClientId: WebGateway_Swagger
swaggerClientSecret: "1q2w3e*"
dotnetEnv: Staging
redisHost: eshop-st-redis
rabbitmqHost: eshop-st-rabbitmq
elasticsearchHost: eshop-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: eshop-st-cmskit
tlsSecret: eshop-wildcard-tls
image:
repository: eshoponabp/service-cmskit
tag: latest
pullPolicy: IfNotPresent
env: {}
Loading…
Cancel
Save