Skip to content

Commit 09fcee6

Browse files
authored
Add appName to all resources so they can be deployed with other resources in the same namespace (#114)
1 parent c65300a commit 09fcee6

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: mongodb
4+
name: mongodb-{{ .Values.trs_filer.appName }}
55
spec:
66
progressDeadlineSeconds: 600
77
replicas: 1
88
revisionHistoryLimit: 10
99
selector:
1010
matchLabels:
11-
app: mongodb
11+
app: mongodb-{{ .Values.trs_filer.appName }}
1212
strategy:
1313
rollingUpdate:
1414
maxSurge: 25%
@@ -18,12 +18,12 @@ spec:
1818
metadata:
1919
creationTimestamp: null
2020
labels:
21-
app: mongodb
21+
app: mongodb-{{ .Values.trs_filer.appName }}
2222
spec:
2323
containers:
2424
- image: {{ .Values.mongodb.image }}
2525
imagePullPolicy: Always
26-
name: mongodb
26+
name: mongodb-{{ .Values.trs_filer.appName }}
2727
ports:
2828
- containerPort: 27017
2929
protocol: TCP
@@ -32,14 +32,14 @@ spec:
3232
terminationMessagePolicy: File
3333
volumeMounts:
3434
- mountPath: /data/db/
35-
name: mongodb
35+
name: mongodb-{{ .Values.trs_filer.appName }}
3636
dnsPolicy: ClusterFirst
3737
restartPolicy: Always
3838
schedulerName: default-scheduler
3939
securityContext: {}
4040
terminationGracePeriodSeconds: 30
4141
volumes:
42-
- name: mongodb
42+
- name: mongodb-{{ .Values.trs_filer.appName }}
4343
persistentVolumeClaim:
44-
claimName: mongodb
44+
claimName: mongodb-{{ .Values.trs_filer.appName }}
4545
status:

deployment/templates/mongo-pvc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: PersistentVolumeClaim
33
metadata:
4-
name: mongodb
4+
name: mongodb-{{ .Values.trs_filer.appName }}
55
spec:
66
accessModes:
77
- ReadWriteOnce

deployment/templates/mongo-service.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
name: mongodb
4+
name: mongodb-{{ .Values.trs_filer.appName }}
55
labels:
6-
app: mongodb
6+
app: mongodb-{{ .Values.trs_filer.appName }}
77
spec:
88
ports:
9-
- name: mongodb
9+
- name: mongodb-{{ .Values.trs_filer.appName }}
1010
port: 27017
1111
protocol: TCP
1212
targetPort: 27017
1313
selector:
14-
app: mongodb
14+
app: mongodb-{{ .Values.trs_filer.appName }}
1515
sessionAffinity: None
1616
type: ClusterIP
1717
status:

deployment/templates/trs-filer-configmap-job.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ data:
33
config.yaml: '# Empty, this configMap will be filled by Job (configmap-job-{{ .Values.trs_filer.appName }})'
44
kind: ConfigMap
55
metadata:
6-
name: app-config
6+
name: app-config-{{ .Values.trs_filer.appName }}
77
---
88
apiVersion: batch/v1
99
kind: Job
@@ -21,7 +21,7 @@ spec:
2121
- name: APISERVER
2222
value: {{ .Values.apiServer }}
2323
- name: CONFIG_MAP_NAME
24-
value: app-config
24+
value: app-config-{{ .Values.trs_filer.appName }}
2525
- name: APP_CONFIG_PATH
2626
value: /app/trs_filer/config.yaml
2727
- name: APP_NAME

deployment/templates/trs-filer-deploy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ spec:
4545
items:
4646
- key: config.yaml
4747
path: config.yaml
48-
name: app-config
48+
name: app-config-{{ .Values.trs_filer.appName }}
49+
4950
name: config-yaml
5051
status:

deployment/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
host_name: trs-filer-test.2.rahtiapp.fi
66

77
trs_filer:
8-
image: elixircloud/trs-filer:0.1.0
8+
image: elixircloud/trs-filer:20211110
99
appName: trs-filer
1010

1111
apiServer: kubernetes.default.svc:443 # address of k8s API server

0 commit comments

Comments
 (0)