diff --git a/k8s/demo/configmap-config.yaml b/k8s/demo/configmap-config.yaml new file mode 100644 index 0000000..1506616 --- /dev/null +++ b/k8s/demo/configmap-config.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: foxmq-demo-config +data: + "permissions.toml": | + [[permissions.'*'.topic]] + filter = "pixel_pump_request" + allowed = ["publish"] + + [[permissions.'*'.topic]] + filter = "pixel_pump" + allowed = ["subscribe"] + + [[permissions.pixel-admin.topic]] + filter = "pixel_pump" + allowed = ["subscribe", "publish"] + + [[permissions.pixel-admin.topic]] + filter = "pixel_pump_request" + allowed = ["subscribe", "publish"] diff --git a/k8s/demo/stateful-set.yaml b/k8s/demo/stateful-set.yaml index 0294782..ec243bd 100644 --- a/k8s/demo/stateful-set.yaml +++ b/k8s/demo/stateful-set.yaml @@ -47,6 +47,9 @@ spec: - name: public-keys configMap: name: foxmq-demo-public-keys + - name: config + configMap: + name: foxmq-demo-config initContainers: - name: create-foxmq-d @@ -77,6 +80,9 @@ spec: - name: public-keys mountPath: /etc/foxmq.d.in/public-keys/ + - name: config + mountPath: /etc/foxmq.d.in/config/ + - name: foxmq-d mountPath: /etc/foxmq.d/ @@ -90,6 +96,8 @@ spec: cp /etc/foxmq.d.in/users/demo-$POD_INDEX.toml /etc/foxmq.d/users.toml cp /etc/foxmq.d.in/secret-keys/key-$POD_INDEX.pem /etc/foxmq.d/secret-key.pem + cp /etc/foxmq.d.in/config/* /etc/foxmq.d/ + # Synthesize address book for (( i=0; i