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

View File

@ -1,6 +1,6 @@
# 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
@ -18,7 +18,7 @@ Kubernetes: `>=1.16.0-0`
| 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
@ -75,25 +75,13 @@ N/A
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| auth.enabled | bool | `false` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"eclipse-mosquitto"` | |
| image.tag | string | `"2.0.7"` | |
| persistence.configinc.accessMode | string | `"ReadWriteOnce"` | |
| persistence.configinc.emptyDir.enabled | bool | `false` | |
| persistence.configinc.enabled | bool | `false` | |
| 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"` | |
| auth.enabled | bool | `false` | By enabling this, `allow_anonymous` gets set to `false` in the mosquitto config. |
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| image.repository | string | `"eclipse-mosquitto"` | image repository |
| image.tag | string | `"2.0.11"` | image tag |
| 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.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. |
| service | object | See values.yaml | Configures service settings for the chart. Normally this does not need to be modified. |
## 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).
### [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]
#### Added
@ -129,8 +125,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A
[2.3.2]: #2.3.2
[1.1.1]: #1.1.1
[3.0.0]: #300
[2.3.2]: #232
[1.1.1]: #111
## 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).
### [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]
#### Added
@ -37,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A
[2.3.2]: #2.3.2
[1.1.1]: #1.1.1
[3.0.0]: #300
[2.3.2]: #232
[1.1.1]: #111
{{- end -}}

View File

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

View File

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

View File

@ -6,57 +6,40 @@
#
image:
# -- image repository
repository: eclipse-mosquitto
# -- image tag
tag: 2.0.11
# -- image pull policy
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:
type: ClusterIP
# loadBalancerIP:
annotations: {}
port:
main:
ports:
http:
enabled: false
mqtt:
enabled: true
port: 1883
name: mqtt
auth:
# -- By enabling this, `allow_anonymous` gets set to `false` in the mosquitto config.
enabled: false
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:
enabled: false
emptyDir:
enabled: false
mountPath: /mosquitto/data
## 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
size: 100Mi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""
# -- Configure a persistent volume to place *.conf mosquitto-config-files in.
# When enabled, this gets set as `include_dir` in the mosquitto config.
# @default -- See values.yaml
configinc:
# a persistent volume to place *.conf mosquitto-config-files in
enabled: false
emptyDir:
enabled: false
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
size: 100Mi
## Do not delete the pvc upon helm uninstall
# skipuninstall: false
# existingClaim: ""