Skip to content

Commit 3f0da1c

Browse files
committed
Added configmap
1 parent 23a947e commit 3f0da1c

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ ms:
44
APP_NAME: Template
55
APPLICATION_ROOT : /template
66
SQLALCHEMY_TRACK_MODIFICATIONS: true
7-
SECRET_KEY: "gjr39dkjn344_!67#"
7+
SECRET_KEY: "gjr39dkjn344_!67#"
8+
DATABASE: db.sqlite3
9+
SQLALCHEMY_DATABASE_URI: sqlite:///db.sqlite3

service.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# interno
21
kind: Service
32
apiVersion: v1
43
kind: Service
@@ -31,6 +30,33 @@ spec:
3130
ports:
3231
- name: http
3332
containerPort: 5000
33+
env:
34+
- name: CONFIGMAP_FILE
35+
value: "/usr/share/microservice/config.yaml"
36+
volumeMounts:
37+
- mountPath: /usr/share/microservice
38+
name: ms-config-volume
39+
volumes:
40+
- name: ms-config-volume
41+
configMap:
42+
name: template-configmap
43+
---
44+
apiVersion: v1
45+
kind: ConfigMap
46+
metadata:
47+
name: template-configmap
48+
data:
49+
# When the config map is mounted as a volume, these will be created as files.
50+
config.yaml: |-
51+
ms:
52+
DEBUG: false
53+
TESTING: false
54+
APP_NAME: Template
55+
APPLICATION_ROOT : /template
56+
SQLALCHEMY_TRACK_MODIFICATIONS: true
57+
SECRET_KEY: "gjr39dkjn344_!67#"
58+
DATABASE: db.sqlite3
59+
SQLALCHEMY_DATABASE_URI: sqlite:///db.sqlite3
3460
---
3561
apiVersion: extensions/v1beta1
3662
kind: Ingress

0 commit comments

Comments
 (0)