refactor: standardize namespace and PVC names in Helm templates

This commit is contained in:
Elmar Kresse
2024-11-22 03:53:42 +01:00
parent 74dcdd16d4
commit a96bcea806
7 changed files with 51 additions and 302 deletions

View File

@@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-koha
namespace: koha-{{ .Values.instance }}
namespace: koha
labels:
run: {{ .Values.instance }}-koha
spec:
@@ -22,7 +22,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-plack
namespace: koha-{{ .Values.instance }}
namespace: koha
labels:
run: {{ .Values.instance }}-plack
spec:
@@ -33,67 +33,13 @@ spec:
selector:
app: koha
component: plack
{{ if .Values.sip.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-sip
namespace: koha-{{ .Values.instance }}
labels:
run: {{ .Values.instance }}-sip
spec:
type: ClusterIP
ports:
- port: 6001
protocol: TCP
selector:
app: koha
component: sip
{{ end }}
{{ if .Values.ncip.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-ncip
namespace: koha-{{ .Values.instance }}
labels:
run: {{ .Values.instance }}-ncip
spec:
type: ClusterIP
ports:
- port: 3000
protocol: TCP
selector:
app: koha
component: ncip
{{ end }}
{{ if .Values.z3950.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-z3950
namespace: koha-{{ .Values.instance }}
labels:
run: {{ .Values.instance }}-z3950
spec:
type: ClusterIP
ports:
- port: 2100
protocol: TCP
selector:
app: koha
component: z3950
{{ end }}
{{ if and .Values.elasticsearch.enabled (not .Values.elasticsearch.external) }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-es
namespace: koha-{{ .Values.instance }}
namespace: koha
labels:
run: {{ .Values.instance }}-es
spec:
@@ -111,7 +57,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-db
namespace: koha-{{ .Values.instance }}
namespace: koha
labels:
run: {{ .Values.instance }}-db
spec:
@@ -129,7 +75,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ .Values.instance }}-memcached
namespace: koha-{{ .Values.instance }}
namespace: koha
labels:
run: {{ .Values.instance }}-memcached
spec: