ACL using environment variables
In the README.md is noted that new users can be created through environment variables in the form of DOCKER_VERNEMQ_USER_<USERNAME>='password'.
Is there a similar way to define the ACLs for the created users through environment variables?
I guess I can create a secret to mount the vmq.passwd and vmq.acl and change the path to these files with DOCKER_VERNEMQ_VMQ_PASSWD__PASSWORD_FILE and ´DOCKER_VERNEMQ_VMQ_ACL__.ACL_FILE´. But an easier way would be preferable over managing different files.
@dannyyy , did you manage to set ACL rules via environment variables or some other way?
I managed to do it by creating a configmap containing the vmq.acl file like
apiVersion: v1
kind: ConfigMap
metadata:
name: vernemq-acl
labels:
{{ include "labels" . | indent 4}}
data:
vernemq-acl: |-
{{ .Files.Get .Values.vernemq.acl | indent 4 }}
and, later, referencing it on values.yaml with the extra volume options:
extraVolumeMounts:
- name: vernemq-acl
mountPath: /vernemq/etc/vmq.acl
subPath: vernemq-acl
readOnly: true
extraVolumes:
- name: vernemq-acl
configMap:
name: vernemq-acl
@masantiago great, they should document it somewhere right?
I managed to do it by creating a configmap containing the vmq.acl file like
apiVersion: v1 kind: ConfigMap metadata: name: vernemq-acl labels: {{ include "labels" . | indent 4}} data: vernemq-acl: |- {{ .Files.Get .Values.vernemq.acl | indent 4 }}and, later, referencing it on values.yaml with the extra volume options:
extraVolumeMounts: - name: vernemq-acl mountPath: /vernemq/etc/vmq.acl subPath: vernemq-acl readOnly: true extraVolumes: - name: vernemq-acl configMap: name: vernemq-acl
@masantiago Did you made changes to the help project, to include that configmap or ?
@cedricve I compiled this configmap as part of my own deployment. BTW, I'm not up-to-date in the version of vernemq helm, so there might be anything that can help to do it easier. I assume you already checked it right?
correct they didnt integrate it in the helm repository, thats why i was asking myself how you did it.
they should document it somewhere right?
"they" should do a lot of things, shouldn't they :)
Open and hoping for PRs if you have clear improvements.
@ioolkos sorry wasnt meant like that. I actually meant "we" ;)