feat: Add oc-catalog component with Helm chart

This commit is contained in:
na
2024-09-12 14:34:43 +02:00
parent 17aeef4ad0
commit 9d7f473982
7 changed files with 190 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: oc-catalog-configmap
data:
MONGO_DATABASE: "{{ .Values.env.mongoDatabase }}"
OCCATALOG_MONGOURL: "{{ .Values.env.mongoUrl }}"

View File

@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: oc-catalog
labels:
app: oc-catalog
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: oc-catalog
release: {{ .Release.Name }}
template:
metadata:
labels:
app: oc-catalog
release: {{ .Release.Name }}
spec:
containers:
- name: oc-catalog
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.targetPort }}
envFrom:
- configMapRef:
name: oc-catalog-configmap
imagePullSecrets:
{{- if .Values.imagePullSecrets }}
{{- range .Values.imagePullSecrets }}
- name: {{ .name }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: oc-catalog
labels:
app: oc-catalog
release: {{ .Release.Name }}
spec:
type: {{ .Values.service.type }}
selector:
app: oc-catalog
release: {{ .Release.Name }}
ports:
- protocol: TCP
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}