update deployment

This commit is contained in:
kandrusyak
2023-07-18 02:09:19 +03:00
parent e6918c6e51
commit f6f05c6764
4 changed files with 43 additions and 39 deletions

View File

@@ -1,2 +1,2 @@
SERVICE_REPLICAS=3
SERVICE_PORT=8080
SERVICE_PORT=8080

View File

@@ -1,5 +1,5 @@
apiVersion: v2
name: astra-api-gateway
name: astra-users
appVersion: latest
description: A Helm chart to deploy app - astra
@@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1
version: 0.1.0
engine: gotpl

View File

@@ -1,37 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.app.fullName }}
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 10
selector:
matchLabels:
app: {{ .Values.app.fullName }}
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: {{ .Values.app.fullName }}
spec:
imagePullSecrets:
- name: {{ .Values.images.pullSecret }}
containers:
- name: {{ .Values.app.fullName }}
env:
- name: TZ
value: Europe/Moscow
- name: PORT
value: {{ .Values.app.server.port | quote }}
{{- .Values.envs | toYaml | nindent 12 }}
image: {{ .Values.app.image }}:{{ .Chart.AppVersion }} #"docker-registry.dopcore.com/andrusyakka/urban-couscous:latest"
imagePullPolicy: Always
ports:
- name: http
containerPort: {{ .Values.app.server.port }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.app.fullName }}
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 10
selector:
matchLabels:
app: {{ .Values.app.fullName }}
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: {{ .Values.app.fullName }}
spec:
imagePullSecrets:
- name: {{ .Values.images.pullSecret }}
containers:
- name: {{ .Values.app.fullName }}
env:
- name: TZ
value: Europe/Moscow
- name: PORT
value: {{ .Values.app.server.port | quote }}
- name: CONNECTION_STRING
value: {{ .Values.app.db.connection_string }}
{{- .Values.envs | toYaml | nindent 12 }}
image: {{ .Values.app.image }}:{{ .Chart.AppVersion }}
imagePullPolicy: Always
ports:
- name: http
containerPort: {{ .Values.app.server.port }}
protocol: TCP

View File

@@ -1,6 +1,8 @@
app:
fullName: ${CI_PROJECT_TITLE}
image: docker-registry.dopcore.com/${CI_PROJECT_PATH}
db:
connection_string: ${CONNECTION_STRING}
server:
port: ${SERVICE_PORT}