I am trying to deploy hono with enmasse. For this, I already installed enmasse and created address spaces and addresses following this repository.
As described in hono-doc on artifacthub. First I created a secret.
my_secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: mysecret
stringData:
amqp-credentials.properties: |
username: hono
password: HONO
and applied it into the hono-namespace:
kubectl apply -f ./hono/my_secret.yaml -n hono
After that, I created my own values.yaml file to overwrite the hono default values, as described in "Integrating with an existing AMQP Messaging Network".
my_values.yaml
amqpMessagingNetworkExample:
enabled: false
adapters:
extraSecretMounts:
- amqpNetwork:
secretName: "mysecret"
mountPath: "/etc/custom"
amqpMessagingNetworkSpec:
host: messaging-5355a0a.enmasse-infra
port: 5672
credentialsPath: /etc/custom/amqp-credentials.properties
commandAndControlSpec:
host: messaging-5355a0a.enmasse-infra
port: 5672
credentialsPath: /etc/custom/amqp-credentials.properties
amqp:
enabled: false
deviceRegistryExample:
enabled: true
type: mongodb
addExampleData: false
mongodb:
createInstance: true
grafana:
enabled: false
prometheus:
createInstance: false
At least I installed hono with:
helm install -n hono -f ./hono/my_values.yaml c2e eclipse-iot/hono
But unfortunately, I get errors and pods do not run well, In particular I get these errors from all pods, that try to connect to the enmasse-Amqp network:
10:47:45.645 [vert.x-eventloop-thread-0] WARN o.e.h.config.ClientConfigProperties - could not load client credentials for [messaging-5355a0a.enmasse-infra:5672, role: Command & Control] from file [/etc/custom/amqp-credentials.properties] java.io.FileNotFoundException: /etc/custom/amqp-credentials.properties (No such file or directory)
What am I doing wrong here?
Also, that would be great if someone could provide an exemplary "Hono+Enmasse" integration repository.
Thanks
You cannot specify extra secret mounts at the adapters
level. You need to specify the extraSecretMounts
property for each adapter individually, e.g. for the HTTP and MQTT adapter:
adapters:
http:
extraSecretMounts:
amqpNetwork:
secretName: "mysecret"
mountPath: "/etc/custom"
mqtt:
extraSecretMounts:
amqpNetwork:
secretName: "mysecret"
mountPath: "/etc/custom"
Also note that extraSecretMounts
value is not an array but an object, i.e. there must not be a -
character before the amqpNetwork
property.