feat: initial kuberzero-sql module incl. MariaDB-Galera

This commit is contained in:
Stefan Reimer 2021-05-12 18:11:40 +02:00
parent 9a0a2602c8
commit 2ad57adaa7
6 changed files with 154 additions and 0 deletions

View File

@ -0,0 +1,22 @@
apiVersion: v2
name: kubezero-sql
description: KubeZero umbrella chart for SQL databases like MariaDB, PostgreSQL
type: application
version: 0.1.0
home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
keywords:
- kubezero
- mariadb
- postgresql
maintainers:
- name: Quarky9
dependencies:
- name: kubezero-lib
version: ">= 0.1.3"
repository: https://zero-down-time.github.io/kubezero/
- name: mariadb-galera
version: 5.8.0
repository: https://charts.bitnami.com/bitnami
condition: mariadb.enabled
kubeVersion: ">= 1.18.0"

View File

@ -0,0 +1,58 @@
# kubezero-mq
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
KubeZero umbrella chart for MQ systems like NATS, RabbitMQ
**Homepage:** <https://kubezero.com>
## Maintainers
| Name | Email | Url |
| ---- | ------ | --- |
| Quarky9 | | |
## Requirements
Kubernetes: `>= 1.18.0`
| Repository | Name | Version |
|------------|------|---------|
| | nats | 0.8.3 |
| https://charts.bitnami.com/bitnami | rabbitmq | 8.13.1 |
| https://zero-down-time.github.io/kubezero/ | kubezero-lib | >= 0.1.3 |
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| nats.enabled | bool | `false` | |
| nats.exporter.serviceMonitor.enabled | bool | `false` | |
| nats.nats.advertise | bool | `false` | |
| nats.nats.image | string | `"nats:2.2.1-alpine3.13"` | |
| nats.nats.jetstream.enabled | bool | `true` | |
| nats.natsbox.enabled | bool | `false` | |
| rabbitmq.auth.erlangCookie | string | `"randomlongerlangcookie"` | |
| rabbitmq.auth.password | string | `"supersecret"` | |
| rabbitmq.auth.tls.enabled | bool | `false` | |
| rabbitmq.auth.tls.existingSecret | string | `"rabbitmq-server-certificate"` | |
| rabbitmq.auth.tls.existingSecretFullChain | bool | `true` | |
| rabbitmq.auth.tls.failIfNoPeerCert | bool | `false` | |
| rabbitmq.clustering.forceBoot | bool | `true` | |
| rabbitmq.enabled | bool | `false` | |
| rabbitmq.hosts | list | `[]` | hostnames of rabbitmq services, used for Istio and TLS |
| rabbitmq.istio.enabled | bool | `false` | |
| rabbitmq.istio.gateway | string | `"istio-ingress/private-ingressgateway"` | |
| rabbitmq.metrics.enabled | bool | `false` | |
| rabbitmq.metrics.serviceMonitor.enabled | bool | `false` | |
| rabbitmq.pdb.create | bool | `true` | |
| rabbitmq.podAntiAffinityPreset | string | `""` | |
| rabbitmq.replicaCount | int | `1` | |
| rabbitmq.resources.requests.cpu | string | `"100m"` | |
| rabbitmq.resources.requests.memory | string | `"256Mi"` | |
| rabbitmq.topologySpreadConstraints | string | `"- maxSkew: 1\n topologyKey: topology.kubernetes.io/zone\n whenUnsatisfiable: DoNotSchedule\n labelSelector:\n matchLabels: {{- include \"common.labels.matchLabels\" . | nindent 6 }}\n- maxSkew: 1\n topologyKey: kubernetes.io/hostname\n whenUnsatisfiable: DoNotSchedule\n labelSelector:\n matchLabels: {{- include \"common.labels.matchLabels\" . | nindent 6 }}"` | |
## Resources
### NATS
- https://grafana.com/grafana/dashboards/13707

View File

@ -0,0 +1,20 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
{{ template "chart.description" . }}
{{ template "chart.homepageLine" . }}
{{ template "chart.maintainersSection" . }}
{{ template "chart.sourcesSection" . }}
{{ template "chart.requirementsSection" . }}
{{ template "chart.valuesSection" . }}
## Resources
### MariaDB

View File

@ -0,0 +1,27 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: test-mariadb
namespace: argocd
spec:
project: default
source:
repoURL: 'https://github.com/zero-down-time/kubezero'
path: charts/kubezero-sql
targetRevision: master
helm:
values: |
mariadb-galera:
enabled: true
metrics:
serviceMonitor:
enabled: true
destination:
server: 'https://kubernetes.default.svc'
namespace: db-sandbox
syncPolicy:
automated:
prune: true
syncOptions:
- CreateNamespace=true

7
charts/kubezero-sql/update.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -ex
### MariaDB
# Fetch dashboards

View File

@ -0,0 +1,20 @@
mariadb-galera:
enabled: true
replicaCount: 2
# Passwords should be fixed otherwise helm will create random new ones each time we template|apply
rootUser:
password: 12345qwert
db:
password: 12345qwert
galera:
mariabackup:
password: 12345qwert
metrics:
serviceMonitor:
enabled: false
prometheusRules:
enabled: false