diff --git a/CHANGELOG.md b/CHANGELOG.md index a39174d..0e56dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Add CoAP-WebSockets proxy deployment and service in chart * Remove separate switch for deploying external WebSocket proxy. It is requred for Plugin management service and must be deployed if it is enabled. * Add top level Ingress in chart Notes +* Add Hazelcast config for enabling discovery in Kubernetes ### Docker Compose * Add compose file for CoAP-WebSockets proxy diff --git a/k8s/devicehive/templates/devicehive-role.yaml b/k8s/devicehive/templates/devicehive-role.yaml index 4587b51..f4de76b 100644 --- a/k8s/devicehive/templates/devicehive-role.yaml +++ b/k8s/devicehive/templates/devicehive-role.yaml @@ -11,6 +11,7 @@ rules: - apiGroups: - "" resources: + - endpoints - pods verbs: - get diff --git a/k8s/devicehive/templates/dh-hazelcast-conf.xml b/k8s/devicehive/templates/dh-hazelcast-conf.xml new file mode 100644 index 0000000..99458b8 --- /dev/null +++ b/k8s/devicehive/templates/dh-hazelcast-conf.xml @@ -0,0 +1,54 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-devicehive-hazelcast-conf +data: + hazelcast.xml: |- + + + + true + + + + 0 + + com.devicehive.model.DevicePortableFactory + + + + LRU + + + 120 + + + 120 + + + 0 + 1 + SET + + + http://127.0.0.1:8090/mancenter + + + + + + + + + + {{ .Release.Name }}-devicehive-hazelcast + {{ .Release.Namespace }} + + + + + + diff --git a/k8s/devicehive/templates/dh-hazelcast-deployment.yaml b/k8s/devicehive/templates/dh-hazelcast-deployment.yaml index 94644f1..d207c49 100644 --- a/k8s/devicehive/templates/dh-hazelcast-deployment.yaml +++ b/k8s/devicehive/templates/dh-hazelcast-deployment.yaml @@ -29,6 +29,14 @@ spec: containerPort: 5701 resources: {{ toYaml .Values.javaServer.hazelcast.resources | indent 10 }} + volumeMounts: + - name: hazelcast-xml + mountPath: /opt/hazelcast/hazelcast.xml + subPath: hazelcast.xml + volumes: + - name: hazelcast-xml + configMap: + name: {{ .Release.Name }}-devicehive-hazelcast-conf {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }}