Fix Context in Config
This commit is contained in:
parent
5a3f11af6e
commit
f741a0c71a
@ -22,7 +22,7 @@ jobs:
|
|||||||
docker_layer_caching: true
|
docker_layer_caching: true
|
||||||
- run: docker login rg.fr-par.scw.cloud/lecoffre -u nologin -p $SCW_SECRET_KEY
|
- run: docker login rg.fr-par.scw.cloud/lecoffre -u nologin -p $SCW_SECRET_KEY
|
||||||
- run: docker build --tag rg.fr-par.scw.cloud/lecoffre/api:$TAG -f devops/Dockerfile .
|
- run: docker build --tag rg.fr-par.scw.cloud/lecoffre/api:$TAG -f devops/Dockerfile .
|
||||||
- run: docker push rg.fr-par.scw.cloud/lecoffre/api:$TAG
|
- run: docker push rg.fr-par.scw.cloud/lecoffre/back:$TAG
|
||||||
|
|
||||||
|
|
||||||
deploy-docker-image:
|
deploy-docker-image:
|
||||||
@ -40,10 +40,10 @@ jobs:
|
|||||||
command: >
|
command: >
|
||||||
helm upgrade
|
helm upgrade
|
||||||
lecoffre-back devops/charts -i -f devops/charts/values.yaml
|
lecoffre-back devops/charts -i -f devops/charts/values.yaml
|
||||||
-n lecoffre-back
|
-n lecoffre
|
||||||
--create-namespace
|
--create-namespace
|
||||||
--set api.image.tag=$TAG
|
--set api.image.tag=$TAG
|
||||||
--set api.image.repository='rg.fr-par.scw.cloud/lecoffre/api'
|
--set api.image.repository='rg.fr-par.scw.cloud/lecoffre/back'
|
||||||
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Post Helm installation instruction
|
|
@ -1,119 +0,0 @@
|
|||||||
{{/*
|
|
||||||
Expand the name of the chart.
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.name" -}}
|
|
||||||
{{- default .Chart.Name .Values.global.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Create a default fully qualified app name.
|
|
||||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
||||||
If release name contains chart name it will be used as a full name.
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.fullname" -}}
|
|
||||||
{{- if .Values.global.fullnameOverride }}
|
|
||||||
{{- .Values.global.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- else }}
|
|
||||||
{{- .Release.Name | trunc 63 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Create chart name and version as used by the chart label.
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.chart" -}}
|
|
||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Common labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.labels.common" -}}
|
|
||||||
helm.sh/chart: {{ include "helpers.chart" . }}
|
|
||||||
{{ include "helpers.selectorLabels" . }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Proxy labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.labels.proxy" -}}
|
|
||||||
{{- include "helpers.labels.common" . }}
|
|
||||||
app.kubernetes.io/component : {{ printf "%s-%s" "proxy" (lower .Values.proxy.network) }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Proxy testnet abels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.labels.testnet.proxy" -}}
|
|
||||||
{{- include "helpers.labels.common" . }}
|
|
||||||
app.kubernetes.io/component : {{ printf "%s-%s" "proxy" (lower .Values.proxy.testnet.network) }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
front labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.labels.front" -}}
|
|
||||||
{{- include "helpers.labels.common" . }}
|
|
||||||
app.kubernetes.io/component : front
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
api labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.labels.api" -}}
|
|
||||||
{{- include "helpers.labels.common" . }}
|
|
||||||
app.kubernetes.io/component : api
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Selector labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.selectorLabels" -}}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Selector labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.proxy.selectorLabels" -}}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Selector labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.front.selectorLabels" -}}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/component : front
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Selector labels
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.api.selectorLabels" -}}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/component : api
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Create the name of the service account to use
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.serviceAccountName" -}}
|
|
||||||
{{- default (include "helpers.fullname" .) .serviceAccount.name }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Allow the release namespace to be overridden for multi-namespace deployments in combined charts.
|
|
||||||
*/}}
|
|
||||||
{{- define "helpers.namespace" -}}
|
|
||||||
{{- default .Release.Namespace .Values.global.namespaceOverride | trunc 63 | trimSuffix "-" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- define "common.tplvalues.render" -}}
|
|
||||||
{{- if typeIs "string" .value }}
|
|
||||||
{{- tpl .value .context }}
|
|
||||||
{{- else }}
|
|
||||||
{{- tpl (.value | toYaml) .context }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
19
devops/charts/templates/docker-pull-secret.yaml
Normal file
19
devops/charts/templates/docker-pull-secret.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: docker-pull-secret
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
secretStoreRef:
|
||||||
|
name: dockerpullsecret-vault-cluster-secret-store
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
template:
|
||||||
|
type: kubernetes.io/dockerconfigjson
|
||||||
|
name: docker-pull-secret
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: .dockerconfigjson
|
||||||
|
remoteRef:
|
||||||
|
key: {{ .Values.dockerPullSecret }}
|
||||||
|
property: .dockerconfigjson
|
73
devops/charts/templates/lecoffre-back.yaml
Normal file
73
devops/charts/templates/lecoffre-back.yaml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: lecoffre-back
|
||||||
|
namespace: {{ .Values.namespace }}
|
||||||
|
{{if .Values.lecoffreBack.ingress.annotations}}
|
||||||
|
annotations:
|
||||||
|
{{toYaml .Values.lecoffreBack.ingress.annotations | indent 4 }}
|
||||||
|
{{end}}
|
||||||
|
spec:
|
||||||
|
{{if .Values.lecoffreBack.ingress.tls.enabled }}
|
||||||
|
tls:
|
||||||
|
- hosts: {{ .Values.lecoffreBack.ingress.tls.hosts }}
|
||||||
|
secretName: {{ .Values.lecoffreBack.ingress.tls.secretName }}
|
||||||
|
{{end}}
|
||||||
|
rules:
|
||||||
|
- host: {{ .Values.lecoffreBack.ingress.host }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: lecoffre-back-svc
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: lecoffre-back-svc
|
||||||
|
namespace: {{ .Values.namespace }}
|
||||||
|
labels:
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
name: http
|
||||||
|
targetPort: 1337
|
||||||
|
selector:
|
||||||
|
app: lecoffre-back
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: lecoffre-back
|
||||||
|
namespace: {{ .Values.namespace }}
|
||||||
|
labels:
|
||||||
|
app: lecoffre-back
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: lecoffre-back
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
{{toYaml .Values.lecoffreBack.vault.annotations | indent 8 }}
|
||||||
|
labels:
|
||||||
|
app: lecoffre-back
|
||||||
|
spec:
|
||||||
|
serviceAccountName: {{ .Values.lecoffreBack.serviceAccountName }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: docker-pull-secret
|
||||||
|
containers:
|
||||||
|
- name: lecoffre-back
|
||||||
|
image: "{{ .Values.lecoffreBack.image.repository }}:{{ .Values.lecoffreBack.image.tag }}"
|
||||||
|
{{if .Values.lecoffreBack.resources}}
|
||||||
|
resources:
|
||||||
|
{{toYaml .Values.lecoffreBack.resources | indent 10}}
|
||||||
|
{{end}}
|
||||||
|
imagePullPolicy: {{ .Values.lecoffreBack.image.pullPolicy }}
|
||||||
|
command: [{{ .Values.lecoffreBack.command }}]
|
14
devops/charts/templates/service-account.yaml
Normal file
14
devops/charts/templates/service-account.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.minteedBack.serviceAccountName }}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.minteedBack.serviceAccountName }}-token
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/service-account.name: {{ .Values.minteedBack.serviceAccountName }}
|
||||||
|
type: kubernetes.io/service-account-token
|
@ -1,47 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-api
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
labels: {{ include "helpers.labels.api" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
replicas: {{ .Values.api.replicas }}
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "helpers.api.selectorLabels" . | nindent 6 }}
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "helpers.api.selectorLabels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: api-sa
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: docker-pull-secret
|
|
||||||
containers:
|
|
||||||
- name: {{ include "helpers.fullname" . }}-api
|
|
||||||
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
|
|
||||||
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag }}"
|
|
||||||
resources:
|
|
||||||
{{toYaml .Values.api.resources | indent 12}}
|
|
||||||
env:
|
|
||||||
- name: API_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: API_URL
|
|
||||||
- name: PROXY_TESTNET_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: PROXY_TESTNET_URL
|
|
||||||
- name: FRONT_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: FRONT_URL
|
|
||||||
{{- range $key, $val := .Values.api.env }}
|
|
||||||
- name: {{ $key }}
|
|
||||||
value: {{ $val | quote }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-api
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
annotations:
|
|
||||||
{{toYaml .Values.api.ingress.annotations | indent 4 }}
|
|
||||||
spec:
|
|
||||||
tls:
|
|
||||||
- hosts: {{ .Values.api.ingress.tls.hosts }}
|
|
||||||
secretName: {{ .Values.api.ingress.tls.secretName }}
|
|
||||||
rules:
|
|
||||||
- host: {{ .Values.api.ingress.host }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: {{ include "helpers.fullname" . }}-api
|
|
||||||
port:
|
|
||||||
number: {{ .Values.api.service.ports.http }}
|
|
@ -1,13 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-api
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
labels:
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: {{ .Values.api.service.ports.http }}
|
|
||||||
name: http
|
|
||||||
targetPort: {{ .Values.api.service.ports.http }}
|
|
||||||
selector:
|
|
||||||
{{- include "helpers.api.selectorLabels" . | nindent 8 }}
|
|
@ -1,5 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: api-sa
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
data:
|
|
||||||
API_URL: {{ .Values.api.ingress.host | quote}}
|
|
||||||
FRONT_URL: {{ .Values.front.ingress.host | quote }}
|
|
||||||
PROXY_TESTNET_URL: {{ .Values.proxy.testnet.ingress.host | quote }}
|
|
@ -1,45 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-front
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
labels: {{ include "helpers.labels.front" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
replicas: {{ .Values.front.replicas }}
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "helpers.front.selectorLabels" . | nindent 6 }}
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "helpers.front.selectorLabels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: front-sa
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: docker-pull-secret
|
|
||||||
containers:
|
|
||||||
- name: {{ include "helpers.fullname" . }}-front
|
|
||||||
imagePullPolicy: {{ .Values.front.image.pullPolicy }}
|
|
||||||
image: "{{ .Values.front.image.repository }}:{{ .Values.front.image.tag }}"
|
|
||||||
resources:
|
|
||||||
{{toYaml .Values.front.resources | indent 12}}
|
|
||||||
env:
|
|
||||||
- name: API_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: API_URL
|
|
||||||
- name: PROXY_TESTNET_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: PROXY_TESTNET_URL
|
|
||||||
- name: FRONT_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: FRONT_URL
|
|
||||||
{{- range $key, $val := .Values.front.env }}
|
|
||||||
- name: {{ $key }}
|
|
||||||
value: {{ $val | quote }}
|
|
||||||
{{- end }}
|
|
@ -1,22 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-front
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
annotations:
|
|
||||||
{{toYaml .Values.front.ingress.annotations | indent 4 }}
|
|
||||||
spec:
|
|
||||||
tls:
|
|
||||||
- hosts: {{ .Values.front.ingress.tls.hosts }}
|
|
||||||
secretName: {{ .Values.front.ingress.tls.secretName }}
|
|
||||||
rules:
|
|
||||||
- host: {{ .Values.front.ingress.host }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: {{ include "helpers.fullname" . }}-front
|
|
||||||
port:
|
|
||||||
number: {{ .Values.front.service.ports.http }}
|
|
@ -1,13 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-front
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
labels:
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: {{ .Values.front.service.ports.http }}
|
|
||||||
name: http
|
|
||||||
targetPort: {{ .Values.front.service.ports.http }}
|
|
||||||
selector:
|
|
||||||
{{- include "helpers.front.selectorLabels" . | nindent 8 }}
|
|
@ -1,4 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: front-sa
|
|
@ -1,79 +0,0 @@
|
|||||||
{{- if .Values.proxy.testnet.enabled}}
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-proxy
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
labels: {{ include "helpers.labels.testnet.proxy" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
replicas: {{ .Values.proxy.testnet.replicaCount }}
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "helpers.proxy.selectorLabels" . | nindent 6 }}
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "helpers.proxy.selectorLabels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: proxy-sa
|
|
||||||
containers:
|
|
||||||
- name: proxy-mainnet
|
|
||||||
image: "{{ .Values.proxy.testnet.image.repository }}:{{ .Values.proxy.testnet.image.tag }}"
|
|
||||||
imagePullPolicy: {{ .Values.proxy.testnet.image.pullPolicy }}
|
|
||||||
resources:
|
|
||||||
{{- toYaml .Values.proxy.testnet.resources | nindent 12 }}
|
|
||||||
env:
|
|
||||||
- name: API_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: API_URL
|
|
||||||
- name: PROXY_TESTNET_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: PROXY_TESTNET_URL
|
|
||||||
- name: FRONT_URL
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: {{ include "helpers.fullname" . }}-cm
|
|
||||||
key: FRONT_URL
|
|
||||||
{{- range $key, $val := .Values.proxy.testnet.env }}
|
|
||||||
- name: {{ $key }}
|
|
||||||
value: {{ $val | quote }}
|
|
||||||
{{- end }}
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8001
|
|
||||||
protocol: TCP
|
|
||||||
{{- if .Values.proxy.testnet.livenessProbe.enabled }}
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: {{ .Values.proxy.testnet.livenessProbe.path }}
|
|
||||||
port: {{ .Values.proxy.testnet.livenessProbe.port }}
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: {{ .Values.proxy.testnet.livenessProbe.initialDelaySeconds }}
|
|
||||||
periodSeconds: {{ .Values.proxy.testnet.livenessProbe.periodSeconds }}
|
|
||||||
timeoutSeconds: {{ .Values.proxy.testnet.livenessProbe.timeoutSeconds }}
|
|
||||||
failureThreshold: {{ .Values.proxy.testnet.livenessProbe.failureThreshold }}
|
|
||||||
successThreshold: {{ .Values.proxy.testnet.livenessProbe.successThreshold }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.proxy.testnet.readinessProbe.enabled }}
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: {{ .Values.proxy.testnet.readinessProbe.path }}
|
|
||||||
port: {{ .Values.proxy.testnet.readinessProbe.port }}
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: {{ .Values.proxy.testnet.readinessProbe.initialDelaySeconds }}
|
|
||||||
periodSeconds: {{ .Values.proxy.testnet.readinessProbe.periodSeconds }}
|
|
||||||
timeoutSeconds: {{ .Values.proxy.testnet.readinessProbe.timeoutSeconds }}
|
|
||||||
failureThreshold: {{ .Values.proxy.testnet.readinessProbe.failureThreshold }}
|
|
||||||
successThreshold: {{ .Values.proxy.testnet.readinessProbe.successThreshold }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.proxy.testnet.containerSecurityContext.enabled }}
|
|
||||||
securityContext: {{- omit .Values.proxy.testnet.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.proxy.testnet.podSecurityContext.enabled }}
|
|
||||||
securityContext: {{- omit .Values.proxy.testnet.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
@ -1,22 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-proxy
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
annotations:
|
|
||||||
{{toYaml .Values.proxy.testnet.ingress.annotations | indent 4 }}
|
|
||||||
spec:
|
|
||||||
tls:
|
|
||||||
- hosts: {{ .Values.proxy.testnet.ingress.tls.hosts }}
|
|
||||||
secretName: {{ .Values.proxy.testnet.ingress.tls.secretName }}
|
|
||||||
rules:
|
|
||||||
- host: {{ .Values.proxy.testnet.ingress.host }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: {{ include "helpers.fullname" . }}-proxy
|
|
||||||
port:
|
|
||||||
number: {{ .Values.proxy.testnet.service.ports.http }}
|
|
@ -1,13 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ include "helpers.fullname" . }}-proxy
|
|
||||||
namespace: {{ include "helpers.namespace" . | quote }}
|
|
||||||
labels:
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: {{ .Values.proxy.testnet.service.ports.http }}
|
|
||||||
name: http
|
|
||||||
targetPort: {{ .Values.proxy.testnet.service.ports.http }}
|
|
||||||
selector:
|
|
||||||
{{- include "helpers.proxy.selectorLabels" . | nindent 8 }}
|
|
@ -1,4 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: proxy-sa
|
|
@ -1,17 +1,37 @@
|
|||||||
global:
|
dockerPullSecret: secret/data/minteed-stg/config/dockerpullsecret
|
||||||
nameOverride: ""
|
|
||||||
fullnameOverride: ""
|
|
||||||
namespaceOverride: ""
|
|
||||||
|
|
||||||
api:
|
namespace: lecoffre
|
||||||
replicas: 1
|
|
||||||
|
|
||||||
|
lecoffreBack:
|
||||||
|
serviceAccountName: lecoffre-back-sa
|
||||||
|
command: "'sh', '-c', '. /vault/secrets/envs-api && npm start'"
|
||||||
|
vault:
|
||||||
|
role : custom_lecoffre-back_injector_rol
|
||||||
|
server: https://vault-stg.smart-chain.fr
|
||||||
|
annotations:
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-inject-secret-envs-api: secret/data/lecoffre-back-stg/config/envs-api
|
||||||
|
vault.hashicorp.com/role: custom_lecoffre-back_injector_rol
|
||||||
|
vault.hashicorp.com/agent-inject-template-envs-api: |
|
||||||
|
{{ with secret "secret/data/lecoffre-back-stg/config/envs-api" }}
|
||||||
|
{{ range $k, $v := .Data.data }}
|
||||||
|
export {{ $k }}="{{ $v }}"
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: docker-pull-secret
|
||||||
image:
|
image:
|
||||||
repository: rg.fr-par.scw.cloud/lecoffre/api
|
|
||||||
tag: 0.1.0
|
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
service:
|
repository: "rg.fr-par.scw.cloud/lecoffre/back"
|
||||||
ports:
|
tag: 0.1.0
|
||||||
http: 8000
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 1Gi
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
ingress:
|
ingress:
|
||||||
host: api.lecoffre.smart-chain.fr
|
host: api.lecoffre.smart-chain.fr
|
||||||
tls:
|
tls:
|
||||||
@ -33,11 +53,6 @@ api:
|
|||||||
APP_LABEL: "lecoffre"
|
APP_LABEL: "lecoffre"
|
||||||
APP_PORT: 3001
|
APP_PORT: 3001
|
||||||
API_ROOT_URL: /api
|
API_ROOT_URL: /api
|
||||||
resources:
|
|
||||||
limits: {}
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 256Mi
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
enabled: true
|
enabled: true
|
||||||
path: /health
|
path: /health
|
||||||
|
Loading…
x
Reference in New Issue
Block a user