Skip to content

Commit ecf4161

Browse files
committed
fix(centurion_erp): Use projected/sources for mounting cm/secrets for configuration
ref: #22 #1
1 parent eda7ad0 commit ecf4161

4 files changed

Lines changed: 44 additions & 78 deletions

File tree

manifests/centurion_erp/base/Deployment-api.yaml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ spec:
2626

2727
- name: web
2828
image: nofusscomputing/centurion-erp:dev
29-
env:
30-
- name: PROMETHEUS_MULTIPROC_DIR
31-
value: '/tmp/prometheus'
3229
resources:
3330
limits:
3431
cpu: 1
@@ -43,11 +40,6 @@ spec:
4340

4441
volumeMounts:
4542

46-
- name: celery-broker
47-
mountPath: /etc/itsm/10.celery-broker.py
48-
subPath: 10.celery-broker.py
49-
readOnly: true
50-
5143
- name: configuration
5244
mountPath: /etc/itsm
5345
readOnly: true
@@ -56,11 +48,6 @@ spec:
5648
mountPath: /data
5749
subPath: data
5850

59-
- name: database
60-
mountPath: /etc/itsm/20.database.py
61-
subPath: 20.database.py
62-
readOnly: true
63-
6451
- mountPath: /var/log
6552
name: logs
6653

@@ -86,32 +73,36 @@ spec:
8673

8774
volumeMounts: []
8875

89-
priorityClassName: cluster-low
9076
tolerations: []
9177
volumes:
9278

93-
- name: celery-broker
94-
secret:
95-
secretName: celery-broker
96-
items:
97-
- key: 10.celery-broker.py
98-
path: 10.celery-broker.py
99-
10079
- name: configuration
101-
configMap:
102-
name: configuration
80+
projected:
81+
sources:
82+
- configMap:
83+
name: configuration
84+
items:
85+
- key: 00.settings.py
86+
path: 00.settings.py
87+
- key: 15.ui-redirect.py
88+
path: 15.ui-redirect.py
89+
- key: 80.csrf.py
90+
path: 80.csrf.py
91+
- secret:
92+
name: celery-broker
93+
items:
94+
- key: 10.celery-broker.py
95+
path: 10.celery-broker.py
96+
- secret:
97+
name: database
98+
items:
99+
- key: 20.database.py
100+
path: 20.database.py
103101

104102
- name: data
105103
persistentVolumeClaim:
106104
claimName: centurion
107105

108-
- name: database
109-
secret:
110-
secretName: database
111-
items:
112-
- key: 20.database.py
113-
path: 20.database.py
114-
115106
- name: logs
116107
hostPath:
117108
path: /opt/logs/centurion-api

manifests/centurion_erp/base/Deployment-worker.yaml

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,8 @@ spec:
4242

4343
volumeMounts:
4444

45-
- name: celery-broker
46-
mountPath: /etc/itsm/10.celery-broker.py
47-
subPath: 10.celery-broker.py
48-
readOnly: true
49-
5045
- name: configuration
51-
mountPath: /etc/itsm/00.settings.py
52-
subPath: 00.settings.py
53-
readOnly: true
54-
55-
- name: database
56-
mountPath: /etc/itsm/20.database.py
57-
subPath: 20.database.py
46+
mountPath: /etc/itsm
5847
readOnly: true
5948

6049
- mountPath: /var/log
@@ -67,26 +56,24 @@ spec:
6756
tolerations: []
6857
volumes:
6958

70-
- name: celery-broker
71-
secret:
72-
secretName: celery-broker
73-
items:
74-
- key: 10.celery-broker.py
75-
path: 10.celery-broker.py
76-
7759
- name: configuration
78-
configMap:
79-
name: configuration
80-
items:
81-
- key: 00.settings.py
82-
path: 00.settings.py
83-
84-
- name: database
85-
secret:
86-
secretName: database
87-
items:
88-
- key: 20.database.py
89-
path: 20.database.py
60+
projected:
61+
sources:
62+
- configMap:
63+
name: configuration
64+
items:
65+
- key: 00.settings.py
66+
path: 00.settings.py
67+
- secret:
68+
name: celery-broker
69+
items:
70+
- key: 10.celery-broker.py
71+
path: 10.celery-broker.py
72+
- secret:
73+
name: database
74+
items:
75+
- key: 20.database.py
76+
path: 20.database.py
9077

9178
- name: logs
9279
hostPath:

manifests/centurion_erp/base/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ kind: Kustomization
55
configMapGenerator:
66
- name: configuration
77
files:
8-
- 80.csrf.py
98
- 00.settings.py
109
- 15.ui-redirect.py
10+
- 80.csrf.py
1111

1212
generatorOptions:
1313
disableNameSuffixHash: true
@@ -39,7 +39,7 @@ resources:
3939
- Service-api.yaml
4040

4141
secretGenerator:
42-
- name: secret_key
42+
- name: secret-key
4343
files:
4444
- 90.secret_key.py
4545

manifests/centurion_erp/components/sso-keycloak/kustomization.yaml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,18 @@ generatorOptions:
99
namespace: centurion
1010

1111
secretGenerator:
12-
- name: social_auth_keycloak
12+
- name: social-auth-keycloak
1313
files:
1414
- 70.social_auth_keycloak.py
1515

1616
patches:
1717

1818
- patch: |-
1919
- op: add
20-
path: /spec/template/spec/containers/0/volumeMounts/-
20+
path: /spec/template/spec/volumes/0/projected/sources/-
2121
value:
22-
name: social-auth-keycloak
23-
mountPath: /etc/itsm/social_auth_keycloak.py
24-
subPath: social_auth_keycloak.py
25-
readOnly: true
26-
27-
- op: add
28-
path: /spec/template/spec/volumes/-
29-
value:
30-
name: social-auth-keycloak
31-
configMap:
22+
secret:
3223
name: social-auth-keycloak
33-
items:
34-
- key: social_auth_keycloak.py
35-
path: social_auth_keycloak.py
3624
3725
target:
3826
kind: Deployment

0 commit comments

Comments
 (0)