[mosquitto] Migrate to common v3 (#957)

* [mosquitto] Upgrade to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* Update maintainers

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-06-10 01:08:40 +02:00 committed by GitHub
parent 6b9dbce1d1
commit ed7e0965d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 92 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v2 apiVersion: v2
appVersion: 2.0.7 appVersion: 2.0.11
description: Eclipse Mosquitto - An open source MQTT broker description: Eclipse Mosquitto - An open source MQTT broker
name: mosquitto name: mosquitto
version: 2.4.0 version: 3.0.0
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
keywords: keywords:
- mosquitto - mosquitto
@ -13,9 +13,9 @@ icon: https://raw.githubusercontent.com/eclipse/mosquitto/master/logo/mosquitto-
sources: sources:
- https://github.com/eclipse/mosquitto - https://github.com/eclipse/mosquitto
maintainers: maintainers:
- name: ishioni - name: bjw-s
email: helm@movishell.pl email: me@bjw-s.dev
dependencies: dependencies:
- name: common - name: common
repository: https://library-charts.k8s-at-home.com repository: https://library-charts.k8s-at-home.com
version: 2.5.0 version: 3.0.1

View File

@ -1,6 +1,6 @@
# mosquitto # mosquitto
![Version: 2.4.0](https://img.shields.io/badge/Version-2.4.0-informational?style=flat-square) ![AppVersion: 2.0.7](https://img.shields.io/badge/AppVersion-2.0.7-informational?style=flat-square) ![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=flat-square) ![AppVersion: 2.0.11](https://img.shields.io/badge/AppVersion-2.0.11-informational?style=flat-square)
Eclipse Mosquitto - An open source MQTT broker Eclipse Mosquitto - An open source MQTT broker
@ -18,7 +18,7 @@ Kubernetes: `>=1.16.0-0`
| Repository | Name | Version | | Repository | Name | Version |
|------------|------|---------| |------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.5.0 | | https://library-charts.k8s-at-home.com | common | 3.0.1 |
## TL;DR ## TL;DR
@ -75,25 +75,13 @@ N/A
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| auth.enabled | bool | `false` | | | auth.enabled | bool | `false` | By enabling this, `allow_anonymous` gets set to `false` in the mosquitto config. |
| image.pullPolicy | string | `"IfNotPresent"` | | | image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| image.repository | string | `"eclipse-mosquitto"` | | | image.repository | string | `"eclipse-mosquitto"` | image repository |
| image.tag | string | `"2.0.7"` | | | image.tag | string | `"2.0.11"` | image tag |
| persistence.configinc.accessMode | string | `"ReadWriteOnce"` | | | persistence.configinc | object | See values.yaml | Configure a persistent volume to place *.conf mosquitto-config-files in. When enabled, this gets set as `include_dir` in the mosquitto config. |
| persistence.configinc.emptyDir.enabled | bool | `false` | | | persistence.data | object | See values.yaml | Configure a persistent volume to place mosquitto data in. When enabled, this enables `persistence` and `persistence_location` in the mosquitto config. |
| persistence.configinc.enabled | bool | `false` | | | service | object | See values.yaml | Configures service settings for the chart. Normally this does not need to be modified. |
| persistence.configinc.mountPath | string | `"/mosquitto/configinc"` | |
| persistence.configinc.size | string | `"100Mi"` | |
| persistence.data.accessMode | string | `"ReadWriteOnce"` | |
| persistence.data.emptyDir.enabled | bool | `false` | |
| persistence.data.enabled | bool | `false` | |
| persistence.data.mountPath | string | `"/mosquitto/data"` | |
| persistence.data.size | string | `"100Mi"` | |
| service.annotations | object | `{}` | |
| service.port.name | string | `"mqtt"` | |
| service.port.port | int | `1883` | |
| service.type | string | `"ClusterIP"` | |
| strategy.type | string | `"Recreate"` | |
## Changelog ## Changelog
@ -101,6 +89,14 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.0.1. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.0.1/charts/stable/common/) for the up-to-date values.
- Changed image tag to `2.0.11`.
### [2.3.2] ### [2.3.2]
#### Added #### Added
@ -129,8 +125,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A - N/A
[2.3.2]: #2.3.2 [3.0.0]: #300
[1.1.1]: #1.1.1 [2.3.2]: #232
[1.1.1]: #111
## Support ## Support

View File

@ -9,6 +9,14 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [3.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.0.1. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.0.1/charts/stable/common/) for the up-to-date values.
- Changed image tag to `2.0.11`.
### [2.3.2] ### [2.3.2]
#### Added #### Added
@ -37,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A - N/A
[2.3.2]: #2.3.2 [3.0.0]: #300
[1.1.1]: #1.1.1 [2.3.2]: #232
[1.1.1]: #111
{{- end -}} {{- end -}}

View File

@ -1,31 +1,17 @@
{{/* Make sure all variables are set properly */}} {{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }} {{- include "common.values.setup" . }}
{{/* Append the configMap to the additionalVolumes */}} {{/* Append the configMap volume to the volumes */}}
{{- define "mosquitto.configmap.volume" -}} {{- define "mosquitto.configVolume" -}}
name: mosquitto-config enabled: "true"
configMap: mountPath: "/mosquitto/config/mosquitto.conf"
name: {{ template "common.names.fullname" . }}-config subPath: "mosquitto.conf"
{{- end -}} type: "custom"
volumeSpec:
{{- $volume := include "mosquitto.configmap.volume" . | fromYaml -}} configMap:
{{- if $volume -}} name: {{ template "common.names.fullname" . }}-config
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
{{- end -}}
{{/* Append the configMap volume to the additionalVolumeMounts */}}
{{- define "mosquitto.configmap.volumeMount" -}}
name: mosquitto-config
mountPath: /mosquitto/config/mosquitto.conf
subPath: mosquitto.conf
{{- end -}}
{{- $volumeMount := include "mosquitto.configmap.volumeMount" . | fromYaml -}}
{{- if $volumeMount -}}
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
{{- end -}} {{- end -}}
{{- $_ := set .Values.persistence "mosquitto-config" (include "mosquitto.configVolume" . | fromYaml) -}}
{{/* Render the templates */}} {{/* Render the templates */}}
{{ include "common.all" . }} {{ include "common.all" . }}

View File

@ -6,7 +6,7 @@ metadata:
{{- include "common.labels" . | nindent 4 }} {{- include "common.labels" . | nindent 4 }}
data: data:
mosquitto.conf: | mosquitto.conf: |
listener {{ .Values.service.port.port }} listener {{ .Values.service.main.ports.mqtt.port }}
{{- if .Values.auth.enabled }} {{- if .Values.auth.enabled }}
allow_anonymous false allow_anonymous false
{{- else }} {{- else }}

View File

@ -6,57 +6,40 @@
# #
image: image:
# -- image repository
repository: eclipse-mosquitto repository: eclipse-mosquitto
# -- image tag
tag: 2.0.11
# -- image pull policy
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: 2.0.7
strategy:
type: Recreate
# -- Configures service settings for the chart. Normally this does not need to be modified.
# @default -- See values.yaml
service: service:
type: ClusterIP main:
# loadBalancerIP: ports:
annotations: {} http:
port: enabled: false
port: 1883 mqtt:
name: mqtt enabled: true
port: 1883
auth: auth:
# -- By enabling this, `allow_anonymous` gets set to `false` in the mosquitto config.
enabled: false enabled: false
persistence: persistence:
# -- Configure a persistent volume to place mosquitto data in.
# When enabled, this enables `persistence` and `persistence_location` in the mosquitto config.
# @default -- See values.yaml
data: data:
enabled: false enabled: false
emptyDir:
enabled: false
mountPath: /mosquitto/data mountPath: /mosquitto/data
## Persistent Volume Storage Class # -- Configure a persistent volume to place *.conf mosquitto-config-files in.
## If defined, storageClassName: <storageClass> # When enabled, this gets set as `include_dir` in the mosquitto config.
## If set to "-", storageClassName: "", which disables dynamic provisioning # @default -- See values.yaml
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
# storageClass: "-"
accessMode: ReadWriteOnce
size: 100Mi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""
configinc: configinc:
# a persistent volume to place *.conf mosquitto-config-files in
enabled: false enabled: false
emptyDir:
enabled: false
mountPath: /mosquitto/configinc mountPath: /mosquitto/configinc
## Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
# storageClass: "-"
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
size: 100Mi size: 100Mi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""