diff options
| author | WillardHu <wei.hu@daocloud.io> | 2023-12-06 18:21:49 +0800 |
|---|---|---|
| committer | WillardHu <wei.hu@daocloud.io> | 2024-01-16 13:44:46 +0800 |
| commit | c63cd0b5bdb0b6c0aa159dde07c0dfc3b7b7b6db (patch) | |
| tree | eba88783ac9df3dec6e26cedb277678fd382db5e /manifests | |
| parent | Merge pull request #5290 from cl2017/device_admission (diff) | |
| download | kubeedge-c63cd0b5bdb0b6c0aa159dde07c0dfc3b7b7b6db.tar.gz | |
Use the DaemonSet to manage the mqtt broker
Signed-off-by: WillardHu <wei.hu@daocloud.io>
Diffstat (limited to 'manifests')
| -rw-r--r-- | manifests/charts/cloudcore/templates/daemonset_mosquitto.yaml | 46 | ||||
| -rw-r--r-- | manifests/charts/cloudcore/values.yaml | 27 | ||||
| -rw-r--r-- | manifests/profiles/version.yaml | 27 |
3 files changed, 100 insertions, 0 deletions
diff --git a/manifests/charts/cloudcore/templates/daemonset_mosquitto.yaml b/manifests/charts/cloudcore/templates/daemonset_mosquitto.yaml new file mode 100644 index 000000000..85561309b --- /dev/null +++ b/manifests/charts/cloudcore/templates/daemonset_mosquitto.yaml @@ -0,0 +1,46 @@ +{{- if .Values.mosquitto.enable }} +kind: DaemonSet +apiVersion: apps/v1 +metadata: + name: edge-eclipse-mosquitto + {{- with .Values.mosquitto.labels }} + labels: {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.mosquitto.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} +spec: + selector: + matchLabels: + {{- with .Values.mosquitto.labels }} + {{- toYaml . | nindent 6 }} + {{- end }} + template: + metadata: + {{- with .Values.mosquitto.labels }} + labels: {{- toYaml . | nindent 8 }} + {{- end }} + spec: + hostNetwork: true + restartPolicy: Always + volumes: + - name: mqtt-data-path + hostPath: + path: /var/lib/kubeedge/mqtt/data + containers: + - name: edge-eclipse-mosquitto + image: {{ .Values.mosquitto.image.repository }}:{{ .Values.mosquitto.image.tag }} + imagePullPolicy: {{ .Values.mosquitto.image.pullPolicy }} + {{- with .Values.mosquitto.resources }} + resources: {{ toYaml . | nindent 10 }} + {{- end }} + volumeMounts: + - name: mqtt-data-path + mountPath: /mosquitto/data + {{- with .Values.mosquitto.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.mosquitto.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/manifests/charts/cloudcore/values.yaml b/manifests/charts/cloudcore/values.yaml index d33dac1b6..a09482c03 100644 --- a/manifests/charts/cloudcore/values.yaml +++ b/manifests/charts/cloudcore/values.yaml @@ -139,3 +139,30 @@ controllerManager: requests: cpu: 100m memory: 25Mi + +mosquitto: + enable: true + image: + repository: eclipse-mosquitto + tag: "1.6.15" + pullPolicy: "IfNotPresent" + pullSecrets: [] + labels: + k8s-app: eclipse-mosquitto + kubeedge: eclipse-mosquitto + annotations: {} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io/edge + operator: Exists + tolerations: [] + resources: + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 100m + memory: 50Mi diff --git a/manifests/profiles/version.yaml b/manifests/profiles/version.yaml index a959dfb55..5b3deb7e1 100644 --- a/manifests/profiles/version.yaml +++ b/manifests/profiles/version.yaml @@ -132,3 +132,30 @@ controllerManager: requests: cpu: 100m memory: 25Mi + +mosquitto: + enable: true + image: + repository: eclipse-mosquitto + tag: "1.6.15" + pullPolicy: "IfNotPresent" + pullSecrets: [] + labels: + k8s-app: eclipse-mosquitto + kubeedge: eclipse-mosquitto + annotations: {} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io/edge + operator: Exists + tolerations: [] + resources: + limits: + cpu: 200m + memory: 100Mi + requests: + cpu: 100m + memory: 50Mi
\ No newline at end of file |
