Untitled
Anonymous
Plain Text
10/06/2025 5:35 PM
3.6 KB
17
Indexable
Never
config map
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-env-configmap
namespace: {{ .Release.Namespace }}
labels:
{{- include "reolink-app-registry.labels" . | nindent 4 }}
data:
config.yml: |
application:
instanceId: 3a3d2e96-5138-4382-993b-6cefa3a9ca72
# DB section now references ENV vars instead of hardcoding credentials
db:
default:
type: typeorm
options:
type: postgres
host: {{ .Values.database.host }}
port: {{ .Values.database.port }}
username: {{ .Values.database.user }}
password: ${SVC_COMMON_PASSWORD}
database: {{ .Values.database.name }}
entityPrefix: app_registry_
logging: false
extra:
connectionLimit: 2
cache:
zones:
health_checks:
driver: redis
options:
keyNamespace: 'health_checks:'
ttl: 86400
connections:
distributed_mutex:
driver: redis
password: ""
database: 0
host: {{ .Values.redis.host }}
port: {{ .Values.redis.port }}
health_checks:
driver: redis
password: ""
database: 0
host: {{ .Values.redis.host }}
port: {{ .Values.redis.port }}
rpc:
client:
altConfigProvider: ''
---------------------------------------------
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
{{- include "reolink-app-registry.labels" . | nindent 4 }}
{{- range $key, $value := .Values.appLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "reolink-app-registry.selectorLabels" . | nindent 6 }}
{{- range $key, $value := .Values.appLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
template:
metadata:
labels:
{{- include "reolink-app-registry.selectorLabels" . | nindent 10 }}
{{- range $key, $value := .Values.appLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 80
name: http
command: {{ toJson .Values.command }}
env:
- name: REOLINK_DEPLOY_HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: REOLINK_DEPLOY_HOST_KEY
value: "My-Host"
- name: REOLINK_DEPLOY_DC_NAME
value: "aws_camovue"
volumeMounts:
- name: secrets-store
mountPath: "/var/secrets"
readOnly: true
- name: config-volume
mountPath: /data/config.yml
subPath: config.yml
- name: server-common-settings
mountPath: /opt/reolink/config/templates
envFrom:
- configMapRef:
name: {{ .Release.Name }}-env-configmap
volumes:
- name: secrets-store
csi:
driver: secrets-store-gke.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: reolink-app-registry-secret-provider
- name: config-volume
configMap:
name: {{ .Release.Name }}-env-configmap
- name: server-common-settings
configMap:
name: server-common-settings
Editor is loading...
Leave a Comment