From c64786e272371f0b7d4a22d623aa7eb912ff55ba Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 19 Oct 2021 13:33:27 +0300 Subject: [PATCH] added consul --- etc/k8s/eshoponabp/charts/consul/Chart.yaml | 6 +++++ .../consul/templates/consul-service.yaml | 17 +++++++++++++ .../charts/consul/templates/consul.yaml | 24 +++++++++++++++++++ etc/k8s/eshoponabp/charts/consul/values.yaml | 0 .../public-web/templates/public-web.yaml | 2 ++ etc/k8s/eshoponabp/values.yaml | 3 ++- 6 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 etc/k8s/eshoponabp/charts/consul/Chart.yaml create mode 100644 etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml create mode 100644 etc/k8s/eshoponabp/charts/consul/templates/consul.yaml create mode 100644 etc/k8s/eshoponabp/charts/consul/values.yaml diff --git a/etc/k8s/eshoponabp/charts/consul/Chart.yaml b/etc/k8s/eshoponabp/charts/consul/Chart.yaml new file mode 100644 index 00000000..ae174a63 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/consul/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: consul +appVersion: "1.0" +description: Runs Consul instance +version: 1.0.0 +type: application diff --git a/etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml b/etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml new file mode 100644 index 00000000..1af77696 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/consul/templates/consul-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + name: {{ .Release.Name }}-{{ .Chart.Name }} + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + type: ClusterIP + ports: + - name: consul-1 + protocol: TCP + port: 8500 + - name: consul-2 + protocol: TCP + port: 8600 + selector: + app: {{ .Release.Name }}-{{ .Chart.Name }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/consul/templates/consul.yaml b/etc/k8s/eshoponabp/charts/consul/templates/consul.yaml new file mode 100644 index 00000000..cb1cc9e1 --- /dev/null +++ b/etc/k8s/eshoponabp/charts/consul/templates/consul.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + template: + metadata: + labels: + app: {{ .Release.Name }}-{{ .Chart.Name }} + spec: + containers: + - image: consul + name: {{ .Release.Name }}-{{ .Chart.Name }} + ports: + - name: consul-1 + protocol: TCP + containerPort: 8500 + - name: consul-2 + protocol: TCP + containerPort: 8600 \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/consul/values.yaml b/etc/k8s/eshoponabp/charts/consul/values.yaml new file mode 100644 index 00000000..e69de29b diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml index 3766e986..8e688a21 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml @@ -22,3 +22,5 @@ spec: containerPort: 443 env: {{ include "eshoponabp.global.env" . | indent 8 }} + - name: "RemoteServices__Default__BaseUrl" + value: {{ .Values.global.publicWeb.remoteServiceUrl }} \ No newline at end of file diff --git a/etc/k8s/eshoponabp/values.yaml b/etc/k8s/eshoponabp/values.yaml index 72715015..e8ac782c 100644 --- a/etc/k8s/eshoponabp/values.yaml +++ b/etc/k8s/eshoponabp/values.yaml @@ -85,10 +85,11 @@ global: dotnetEnvironment: "Staging" imagePullPolicy: Never eshoponabpImageVersion: latest - publicWeb: + publicWeb: domain: eshoponabp-public-web url: https://eshoponabp-public-web containerImage: "eshoponabp/app-publicweb" + remoteServiceUrl: http://eshoponabp-public-webgateway authServer: domain: eshoponabp-authserver url: https://eshoponabp-authserver