This commit is contained in:
awscloude
2026-07-16 15:56:29 +06:00
parent 5e804df3aa
commit 87371c400f
4 changed files with 44 additions and 0 deletions
+16
View File
@@ -50,6 +50,22 @@ securityContext: {}
# runAsNonRoot: true # runAsNonRoot: true
# runAsUser: 1000 # runAsUser: 1000
#config map and secrest
config:
APP_NAME: "Gen-iTech CI/CD Test"
APP_ENV: "production"
APP_DEBUG: "false"
secret:
DB_HOST: mysql.default.svc.cluster.local
DB_NAME: applicationdb
DB_USER: appuser
DB_PASSWORD: MyStrongPassword123
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
service: service:
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
+10
View File
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "myapp.fullname" . }}-config
data:
{{- range $key, $value := .Values.config }}
{{ $key }}: "{{ $value }}"
{{- end }}
+5
View File
@@ -38,6 +38,11 @@ spec:
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }} {{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
envFrom:
- configMapRef:
name: {{ include "myapp.fullname" . }}-config
- secretRef:
name: {{ include "myapp.fullname" . }}-secret
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
ports: ports:
- name: http - name: http
+13
View File
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "myapp.fullname" . }}-secret
type: Opaque
stringData:
{{- range $key, $value := .Values.secret }}
{{ $key }}: "{{ $value }}"
{{- end }}