Browse Source

added web app template

pull/20/head
Galip Tolga Erdem 5 years ago
parent
commit
60846bf188
  1. 6
      etc/k8s/eshoponabp/charts/web/Chart.yaml
  2. 37
      etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml
  3. 14
      etc/k8s/eshoponabp/charts/web/templates/web-service.yaml
  4. 27
      etc/k8s/eshoponabp/charts/web/templates/web.yaml
  5. 2
      etc/k8s/eshoponabp/charts/web/values.yaml
  6. 4
      etc/k8s/eshoponabp/values.yaml

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

@ -0,0 +1,6 @@
apiVersion: v2
name: web
appVersion: "1.0"
description: eShopOnAbp BackOffice Web Application
version: 1.0.0
type: application

37
etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml

@ -0,0 +1,37 @@
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 }}"
{{- if eq .Release.Name "eh-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.web.domain }}
{{- if eq .Release.Name "eh-az" }}
- {{ print "www." .Values.global.web.domain }}
{{- end }}
secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls
rules:
{{- if eq .Release.Name "eh-az" }}
- host: "{{ print "www." .Values.global.web.domain }}"
{{- else }}
- host: "{{ .Values.global.web.domain }}"
{{- end }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-{{ .Chart.Name }}
port:
number: 80

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

27
etc/k8s/eshoponabp/charts/web/templates/web.yaml

@ -0,0 +1,27 @@
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.web.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 }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

2
etc/k8s/eshoponabp/charts/web/values.yaml

@ -0,0 +1,2 @@

4
etc/k8s/eshoponabp/values.yaml

@ -90,6 +90,10 @@ global:
dotnetEnvironment: "Staging"
imagePullPolicy: Never
eshoponabpImageVersion: latest
web:
domain: eshop-st-web
url: https://eshop-st-web
containerImage: "eshoponabp/app-web"
publicWeb:
domain: eshop-st-public-web
url: https://eshop-st-public-web

Loading…
Cancel
Save