diff --git a/README.md b/README.md index 378c850..3d10862 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get * [WordPress](charts/wordpress/README.md) 🗸 * Authentication / Identity * [Keycloak](charts/keycloak/README.md) 🗸 + * [Kratos](charts/kratos/README.md) 🗸 * Cloud providers * [Azure Storage](charts/azure-storage/README.md) 🗸 * [Outscale](charts/outscale/README.md) @@ -27,9 +28,9 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get * [MariaDB](charts/mariadb/README.md) 🗸 * [memcached](charts/memcached/README.md) * [MongoDB](charts/mongodb/README.md) - * [PostgreSQL](charts/postgresql/README.md) + * [PostgreSQL](charts/postgresql/README.md) 🗸 * [RabbitMQ](charts/rabbitmq/README.md) 🗸 - * [Redis](charts/redis/README.md) + * [Redis](charts/redis/README.md) 🗸 * Learning Platforms * [HobbyFarm](charts/hobbyfarm/README.md) 🗸 * Networking / Messaging @@ -51,7 +52,7 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get * Observability * [Elastic Stack](charts/elastic-stack/README.md) * [OpenTelemetry Collector](charts/opentelemetry-collector/README.md) 🗸 - * [Prometheus](charts/prometheus/README.md) + * [Prometheus](charts/prometheus/README.md) 🗸 * [Grafana](charts/grafana/README.md) * Secrets * [Sealed Secrets](charts/sealed-secrets/README.md) 🗸 @@ -62,7 +63,7 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get * Storage * [Kasten K10](charts/kasten-k10/README.md) 🗸 * [Longhorn](charts/longhorn/README.md) 🗸 - * [MinIO](charts/minio/README.md) + * [MinIO](charts/minio/README.md) 🗸 * [s3gw](charts/s3gw/README.md) 🗸 * Supply Chain (Software Factory) * [ArgoCD](charts/argo-cd/README.md) 🗸 diff --git a/charts/drupal/README.md b/charts/drupal/README.md index e69de29..312796c 100644 --- a/charts/drupal/README.md +++ b/charts/drupal/README.md @@ -0,0 +1,17 @@ +## Drupal + +### Stable repository for Drupal + +[stable/drupal](https://github.com/helm/charts/tree/master/stable/drupal) refers to [bitnami chart](https://bitnami.com/stack/drupal/helm). + +Install with the default values (+ mandatory fields that are required): `helm install d8cluster stable/drupal --set mariadb.rootUser.password=password,mariadb.db.password=secretpassword`. + +Wait for the pods to be created: `kubectl get pods`. + +You should be able to access your new Drupal installation through [drupal.local](http://drupal.local/) and log with username = "user" and password = `kubectl get secret --namespace default d8cluster-drupal -o jsonpath="{.data.drupal-password}" | base64 --decode`. + +If [drupal.local](http://drupal.local/) doesn't work, look at the services state and see if the public ip of the LoadBalancer is defined. If you're on MiniKube it may be undefined, in this case look at minikube services `minikube service d8cluster-drupal --url` and open the link in the URL. + +### Additional reading on Drupal + +- Article from Jeff Geerling on [Running Drupal in Kubernetes with Docker in production](https://www.jeffgeerling.com/blog/2019/running-drupal-kubernetes-docker-production) _April 12, 2019_ diff --git a/charts/kratos/CONTRIBUTING.md b/charts/kratos/CONTRIBUTING.md new file mode 100644 index 0000000..982af24 --- /dev/null +++ b/charts/kratos/CONTRIBUTING.md @@ -0,0 +1,64 @@ +# Contribute + +## How to update the dependencies + +```bash +# makes sure the repository has been added and refreshed +helm repo add bitnami https://charts.bitnami.com/bitnami +helm repo add ory https://k8s.ory.sh/helm/charts +helm repo update + +# searches for the latest version +helm search repo -l kratos --versions +helm search repo -l postgresql --versions + +# manual: update version number in Chart.yaml + +# updates Chart.lock +helm dependency update +``` + +## How to check the manifest code quality + +```bash +# checks code style +helm lint + +# checks the Kubernetes objects generated from the chart +helm template kratos . -f values.yaml --namespace kratos \ + --set kratos.kratos.config.dsn=postgres://foo:bar@pg-sqlproxy-gcloud-sqlproxy:5432/db \ + > temp.yaml +``` + +## How to deploy the chart from the sources + +### Example with NGINX Ingress Controller + +```bash +# gets Ingress Controller external IP +NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` + +# installs on a cluster +helm upgrade --install kratos . -f values.yaml --create-namespace \ + --set kratos.kratos.config.dsn=postgres://postgres:secretpassword@kratos-postgresql:5432/kratos \ + --set-file kratos.kratos.identitySchemas.'identity\.default\.schema\.json'=examples/kratos/email-password/identity.schema.json \ + --set kratos.kratos.automigration.enabled=true \ + --set kratos.ingress.admin.enabled=true \ + --set kratos.ingress.admin.className=nginx \ + --set kratos.ingress.admin.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ + --set kratos.ingress.admin.hosts[0].host=kratos-admin.${NGINX_PUBLIC_IP}.sslip.io \ + --set kratos.ingress.admin.tls[0].secretName=kratos-admin-tls \ + --set kratos.ingress.admin.tls[0].hosts[0]=kratos-admin.${NGINX_PUBLIC_IP}.sslip.io \ + --set kratos.ingress.public.enabled=true \ + --set kratos.ingress.public.className=nginx \ + --set kratos.ingress.public.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ + --set kratos.ingress.public.hosts[0].host=kratos.${NGINX_PUBLIC_IP}.sslip.io \ + --set kratos.ingress.public.tls[0].secretName=kratos-tls \ + --set kratos.ingress.public.tls[0].hosts[0]=kratos.${NGINX_PUBLIC_IP}.sslip.io \ + --set postgresql.dependency.enabled=true \ + --set postgresql.global.postgresql.auth.postgresPassword=secretpassword \ + --namespace kratos \ + --debug + +# manual: open http://kratos.${NGINX_PUBLIC_IP}.sslip.io/ (log in with admin/pasWd8char) +``` diff --git a/charts/kratos/Chart.lock b/charts/kratos/Chart.lock new file mode 100644 index 0000000..5e653af --- /dev/null +++ b/charts/kratos/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: kratos + repository: https://k8s.ory.sh/helm/charts + version: 0.33.4 +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.6.0 +digest: sha256:cf4c7369ecaf6bfb8c2d35ae11f60c7b9b3cb692f4b357b19b4beb66f8edb00d +generated: "2023-07-03T11:39:45.082206693+02:00" diff --git a/charts/kratos/Chart.yaml b/charts/kratos/Chart.yaml new file mode 100644 index 0000000..bb259f8 --- /dev/null +++ b/charts/kratos/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: kratos +description: Helm chart for managing Kratos +type: application +version: "0.1.0" +appVersion: "v0.13.0" +dependencies: + # ref. https://k8s.ory.sh/helm/kratos.html + - name: kratos + version: 0.33.4 # appVersion: v0.13.0 + repository: https://k8s.ory.sh/helm/charts + condition: kratos.dependency.enabled + # ref. https://github.com/bitnami/charts/blob/main/bitnami/postgresql + - name: postgresql + version: 12.6.0 # appVersion: 15.3.0 + repository: https://charts.bitnami.com/bitnami + condition: postgresql.dependency.enabled +maintainers: + - name: devpro + email: bertrand@devpro.fr +home: https://github.com/devpro/helm-charts/tree/main/charts/kratos diff --git a/charts/kratos/README.md b/charts/kratos/README.md new file mode 100644 index 0000000..de16c69 --- /dev/null +++ b/charts/kratos/README.md @@ -0,0 +1,30 @@ +# Helm chart for Kratos + +This Helm chart will install [Kratos](https://www.ory.sh/kratos/) ([code](https://github.com/ory/kratos), [docs](https://www.ory.sh/docs/kratos/ory-kratos-intro)) on a Kubernetes cluster. +It is based on [the official Helm chart](https://k8s.ory.sh/helm/kratos.html) ([code](https://github.com/ory/k8s/tree/master/helm/charts/kratos)). + +## Usage + +```bash +# if not already done, adds devpro repository in helm +helm repo add devpro https://devpro.github.io/helm-charts +helm repo update + +# installs the chart with default parameters +helm upgrade --install kratos devpro/kratos --create-namespace --namespace kratos + +# cleans up +helm uninstall kratos -n kratos +kubectl delete ns kratos +``` + +## Configuration + +Setting up the authentication flow can be tricky. Here are some links with information that could help you. + +* [Quickstart](https://www.ory.sh/docs/kratos/quickstart) +* [Kratos Helm chart hack values](https://github.com/ory/k8s/blob/master/hacks/values/kratos.yaml) + +## Going further + +Look at [Contibuting](CONTRIBUTING.md) page. diff --git a/charts/kratos/examples/kratos/email-password/identity.schema.json b/charts/kratos/examples/kratos/email-password/identity.schema.json new file mode 100644 index 0000000..1a13787 --- /dev/null +++ b/charts/kratos/examples/kratos/email-password/identity.schema.json @@ -0,0 +1,49 @@ +{ + "$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Person", + "type": "object", + "properties": { + "traits": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "title": "E-Mail", + "minLength": 3, + "ory.sh/kratos": { + "credentials": { + "password": { + "identifier": true + } + }, + "verification": { + "via": "email" + }, + "recovery": { + "via": "email" + } + } + }, + "name": { + "type": "object", + "properties": { + "first": { + "title": "First Name", + "type": "string" + }, + "last": { + "title": "Last Name", + "type": "string" + } + } + } + }, + "required": [ + "email" + ], + "additionalProperties": false + } + } +} diff --git a/charts/kratos/values.yaml b/charts/kratos/values.yaml new file mode 100644 index 0000000..9523f8e --- /dev/null +++ b/charts/kratos/values.yaml @@ -0,0 +1,20 @@ +# https://github.com/ory/k8s/blob/master/helm/charts/kratos/values.yaml +kratos: + kratos: + config: + identity: + default_schema_id: default + schemas: + - id: default + url: file:///etc/config/identity.default.schema.json + +# https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml +postgresql: + dependency: + enabled: false + primary: + initdb: + scripts: + # creates the database (ref. https://artifacthub.io/packages/helm/bitnami/postgresql#initialize-a-fresh-instance) + init.sql: | + CREATE DATABASE kratos; diff --git a/charts/minio/CONTRIBUTING.md b/charts/minio/CONTRIBUTING.md new file mode 100644 index 0000000..ab9cf97 --- /dev/null +++ b/charts/minio/CONTRIBUTING.md @@ -0,0 +1,71 @@ +# Contribute + +## How to update the dependencies + +```bash +# makes sure the repository has been added and refreshed +helm repo add minio https://charts.min.io/ +helm repo update + +# searches for the latest version +helm search repo -l minio --versions + +# manual: update version number in Chart.yaml + +# updates Chart.lock +helm dependency update +``` + +## How to check the manifest before deployment + +```bash +# checks code style +helm lint + +# checks the Kubernetes objects generated from the chart +helm template minio . -f values.yaml \ + --namespace minio > temp.yaml +``` + +## How to deploy the chart from the sources + +```bash +# installs on a cluster +helm upgrade --install minio . -f values.yaml --create-namespace \ + --set minio.resources.requests.memory=512Mi \ + --set minio.replicas=1 --set minio.mode=standalone \ + --set minio.persistence.enabled=false \ + --set minio.rootUser=admin,minio.rootPassword=pasWd8char \ + --namespace minio \ + # --debug +``` + +## How to access the console + +### Example with NGINX Ingress Controller and a default storage class defined + +ℹ MinIO Server comes with an embedded web based object browser + +```bash +# gets Ingress Controller external IP +NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'` + +# installs on a cluster +helm upgrade --install minio . -f values.yaml --create-namespace \ + --set minio.resources.requests.memory=512Mi \ + --set minio.replicas=1 \ + --set minio.mode=standalone \ + --set minio.persistence.enabled=true,minio.persistence.size=10Gi \ + --set minio.rootUser=admin,minio.rootPassword=pasWd8char \ + --set minio.ingress.enabled=true,minio.ingress.ingressClassName=nginx,minio.ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ + --set minio.ingress.hosts[0]=minio.${NGINX_PUBLIC_IP}.sslip.io \ + --set minio.ingress.tls[0].secretName=minio-tls \ + --set minio.ingress.tls[0].hosts[0]=minio.${NGINX_PUBLIC_IP}.sslip.io \ + --set minio.consoleIngress.enabled=true,minio.consoleIngress.ingressClassName=nginx,minio.consoleIngress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \ + --set minio.consoleIngress.hosts[0]=minio-console.${NGINX_PUBLIC_IP}.sslip.io \ + --set minio.consoleIngress.tls[0].secretName=minio-console-tls \ + --set minio.consoleIngress.tls[0].hosts[0]=minio-console.${NGINX_PUBLIC_IP}.sslip.io \ + --namespace minio + +# manual: open http://minio-console.${NGINX_PUBLIC_IP}.sslip.io/ (log in with admin/pasWd8char) +``` diff --git a/charts/minio/Chart.lock b/charts/minio/Chart.lock new file mode 100644 index 0000000..7ef9ddf --- /dev/null +++ b/charts/minio/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: minio + repository: https://charts.min.io + version: 5.0.9 +digest: sha256:f93e3182ead43eb99cfb2e9caabfd9af08a106c8d4276feaae91ade0149b0ed4 +generated: "2023-07-03T08:56:29.967777315+02:00" diff --git a/charts/minio/Chart.yaml b/charts/minio/Chart.yaml new file mode 100644 index 0000000..b84cdf4 --- /dev/null +++ b/charts/minio/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: minio +description: Helm chart for managing MinIO +type: application +version: "0.1.0" +appVersion: "RELEASE.2023-04-28T18-11-17Z" +dependencies: + - name: minio + version: 5.0.9 # appVersion: RELEASE.2023-04-28T18-11-17Z + repository: https://charts.min.io +maintainers: + - name: devpro + email: bertrand@devpro.fr +home: https://github.com/devpro/helm-charts/tree/main/charts/minio diff --git a/charts/minio/README.md b/charts/minio/README.md index e94ad2d..8ef6be3 100644 --- a/charts/minio/README.md +++ b/charts/minio/README.md @@ -1,3 +1,23 @@ -# MinIO +# Helm chart for MinIO -[min.io](https://min.io/) +This Helm chart will install [min.io](https://min.io/) ([code](https://github.com/minio/minio)) on a Kubernetes cluster. +It is based on [the official Helm chart](https://github.com/minio/minio/tree/master/helm/minio). + +## Quick start + +```bash +# if not already done, adds devpro repository in helm +helm repo add devpro https://devpro.github.io/helm-charts +helm repo update + +# installs the chart with default parameters +helm upgrade --install minio devpro/minio --create-namespace --namespace minio + +# cleans up +helm uninstall minio -n minio +kubectl delete ns minio +``` + +## Going further + +Look at [Contibuting](CONTRIBUTING.md) page. diff --git a/charts/minio/values.yaml b/charts/minio/values.yaml new file mode 100644 index 0000000..cc943a1 --- /dev/null +++ b/charts/minio/values.yaml @@ -0,0 +1,13 @@ +# https://github.com/minio/minio/blob/master/helm/minio/values.yaml +minio: {} + # resources: + # requests: + # memory: + # replicas: + # mode: + # persistence: + # enabled: + # # access key length should be at least 3 character long + # rootUser: + # # secret key length should be at least 8 character long + # rootPassword: diff --git a/charts/outscale/Chart.lock b/charts/outscale/Chart.lock new file mode 100644 index 0000000..922b59f --- /dev/null +++ b/charts/outscale/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: osc-cloud-controller-manager + repository: oci://registry-1.docker.io/outscalehelm + version: 0.2.0 +- name: osc-bsu-csi-driver + repository: oci://registry-1.docker.io/outscalehelm + version: 1.2.1 +digest: sha256:8cba9c83f5b8dd659c59f05a6354a98c46d5db48a7bb59148a0b557acfbe139c +generated: "2023-06-26T17:15:01.698505202+02:00" diff --git a/charts/outscale/Chart.yaml b/charts/outscale/Chart.yaml new file mode 100644 index 0000000..f7423a1 --- /dev/null +++ b/charts/outscale/Chart.yaml @@ -0,0 +1,19 @@ +apiVersion: v2 +name: outscale +description: Helm chart for managing Outscale Cloud +type: application +version: "0.1.0" +appVersion: "0.1.0" +dependencies: + # https://github.com/outscale/cloud-provider-osc/ + - name: osc-cloud-controller-manager + version: 0.2.0 + repository: oci://registry-1.docker.io/outscalehelm + # https://github.com/outscale/osc-bsu-csi-driver + - name: osc-bsu-csi-driver + version: 1.2.1 + repository: oci://registry-1.docker.io/outscalehelm +maintainers: + - name: devpro + email: bertrand@devpro.fr +home: https://github.com/devpro/helm-charts/tree/main/charts/outscale diff --git a/charts/outscale/README.md b/charts/outscale/README.md index 269e54b..f74ee1c 100644 --- a/charts/outscale/README.md +++ b/charts/outscale/README.md @@ -1 +1,49 @@ -# Outscale Cloud Helm chart +# Helm chart for Outscale Cloud + +This Helm chart will install Outscale Cloud CCM and CSI on a Kubernetes cluster. +It is based on Outscale Helm charts ([CCM](https://github.com/outscale/cloud-provider-osc/blob/OSC-MIGRATION/docs/helm.md), [CSI](https://github.com/outscale/osc-bsu-csi-driver/tree/master/osc-bsu-csi-driver)). + +💡 Kubernetes objects will be installed in `kube-system` namespace + +## How to use + +- Create a Kubernetes secret called `osc-secret` + +- With Helm CLI (see [README](../../README.md#from-helm-cli) for requirements) + +```bash +# install with default parameters +helm upgrade --install outscale devpro/outscale --create-namespace \ + --namespace kube-system + +# watches the installation and checks all pods are running after some time +# TODO +``` + +## How to create or update the chart + +```bash +# searches for the latest version +helm show all oci://registry-1.docker.io/outscalehelm/osc-cloud-controller-manager +helm show all oci://registry-1.docker.io/outscalehelm/osc-bsu-csi-driver + +# (optional) checks the template +helm template outscale oci://registry-1.docker.io/outscalehelm/osc-cloud-controller-manager > temp.yaml +helm template outscale oci://registry-1.docker.io/outscalehelm/osc-bsu-csi-driver > temp.yaml + +# manual: get latest version and update it in Chart.yaml + +# updates Chart.lock +helm dependency update +``` + +## How to deploy manually from the sources + +```bash +# creates the release from the local files +helm upgrade --install outscale . -f values.yaml --create-namespace \ + --namespace kube-system + +# if needed, deletes the release +helm uninstall outscale -n kube-system +``` diff --git a/charts/outscale/values.yaml b/charts/outscale/values.yaml new file mode 100644 index 0000000..7a6db18 --- /dev/null +++ b/charts/outscale/values.yaml @@ -0,0 +1,4 @@ +# https://github.com/outscale/cloud-provider-osc/blob/OSC-MIGRATION/deploy/k8s-osc-ccm/values.yaml +osc-cloud-controller-manager: {} +# https://github.com/outscale/osc-bsu-csi-driver/blob/master/osc-bsu-csi-driver/values.yaml +osc-bsu-csi-driver: {} diff --git a/charts/postgresql/CONTRIBUTING.md b/charts/postgresql/CONTRIBUTING.md new file mode 100644 index 0000000..f852f9a --- /dev/null +++ b/charts/postgresql/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contribute + +## How to update the dependencies + +```bash +# makes sure the repository has been added and refreshed +helm repo add bitnami https://charts.bitnami.com/bitnami +helm repo update + +# searches for the latest version +helm search repo postgresql + +# manual: update version number in Chart.yaml + +# updates Chart.lock +helm dependency update +``` + +## How to check the manifest before deployment + +```bash +# checks the Kubernetes objects generated from the chart +helm template postgresql . -f values.yaml \ + --namespace postgresql > temp.yaml +``` + +## How to check the chart + +```bash +# applies the manifest on a cluster +helm upgrade --install postgresql . -f values.yaml --create-namespace \ + --set postgresql.auth.postgresPassword=secretpassword \ + --namespace postgresql + # --debug > output.yaml +``` diff --git a/charts/postgresql/Chart.lock b/charts/postgresql/Chart.lock new file mode 100644 index 0000000..e20b230 --- /dev/null +++ b/charts/postgresql/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.5.5 +digest: sha256:0c9124a7c9cd445ef1cef8e90810921a94069bfa420024150c1e571935fa16e3 +generated: "2023-05-24T10:45:31.737710399+02:00" diff --git a/charts/postgresql/Chart.yaml b/charts/postgresql/Chart.yaml new file mode 100644 index 0000000..23abb5c --- /dev/null +++ b/charts/postgresql/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: postgresql +description: Helm chart for managing PostgreSQL +type: application +version: "0.1.0" +appVersion: "15.3.0" +dependencies: + - name: postgresql + version: 12.5.5 + repository: https://charts.bitnami.com/bitnami +maintainers: + - name: devpro + email: bertrand@devpro.fr +home: https://github.com/devpro/helm-charts/tree/main/charts/postgresql diff --git a/charts/postgresql/README.md b/charts/postgresql/README.md index e69de29..dae74f0 100644 --- a/charts/postgresql/README.md +++ b/charts/postgresql/README.md @@ -0,0 +1,31 @@ +# Helm chart for PostgreSQL + +This Helm chart will install [PostgreSQL](https://www.postgresql.org/) ([code](https://github.com/postgres/postgres)) on a Kubernetes cluster. +It is based on [Bitnami's Helm chart](https://bitnami.com/stack/postgresql/helm) ([code](https://github.com/bitnami/charts/blob/main/bitnami/postgresql)). + +## Installation + +```bash +# installs the chart with default parameters +helm upgrade --install postgresql devpro/postgresql --create-namespace --namespace postgresql +``` + +## Getting started + +### Minimal installation + +```bash +# installs with a fixed password +helm upgrade --install postgresql devpro/postgresql --create-namespace \ + --set postgresql.auth.postgresPassword=secretpassword \ + --namespace postgresql + +# forwards service port for local access +kubectl port-forward service/postgresql 5432:5432 -n postgresql + +# manual: use pgAdmin (https://www.pgadmin.org/) to access the service on http://localhost:5432/ (log in with postgres/secretpassword) + +# cleans up +helm uninstall postgresql -n postgresql +kubectl delete ns postgresql +``` diff --git a/charts/postgresql/values.yaml b/charts/postgresql/values.yaml new file mode 100644 index 0000000..9430757 --- /dev/null +++ b/charts/postgresql/values.yaml @@ -0,0 +1,2 @@ +# ref. https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml +postgresql: {} diff --git a/charts/prometheus/Chart.lock b/charts/prometheus/Chart.lock new file mode 100644 index 0000000..ab0ad1f --- /dev/null +++ b/charts/prometheus/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: prometheus + repository: https://prometheus-community.github.io/helm-charts + version: 21.0.0 +digest: sha256:5dbae68ca9560b3f3233874866449aad456a23d03b11fa0419717ddedf8e9b08 +generated: "2023-05-22T18:04:09.766855582+02:00" diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml new file mode 100644 index 0000000..4afe3a8 --- /dev/null +++ b/charts/prometheus/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +name: prometheus +description: Helm chart for managing Prometheus +type: application +version: "0.1.0" +appVersion: "2.43.0" +dependencies: + - name: prometheus + version: 21.0.0 + repository: https://prometheus-community.github.io/helm-charts +maintainers: + - name: devpro + email: bertrand@devpro.fr diff --git a/charts/prometheus/README.md b/charts/prometheus/README.md index e69de29..63c319f 100644 --- a/charts/prometheus/README.md +++ b/charts/prometheus/README.md @@ -0,0 +1,53 @@ +# Helm chart for Prometheus + +This Helm chart will install [Prometheus](https://prometheus.io/) ([code](https://github.com/prometheus/prometheus)) on a Kubernetes cluster. +It is based on the [community Helm chart](https://prometheus-community.github.io/helm-charts/) ([code](https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus/README.md)). + +See [README](../../README.md#from-helm-cli) for requirements. + +## How to use + +```bash +# install with default parameters +helm upgrade --install prometheus devpro/prometheus --create-namespace \ + --namespace prometheus + +# checks all pods are running after some time +kubectl get pod -n prometheus +``` + +## How to create or update the chart + +```bash +# searches for the latest version +helm search repo prometheus-community + +# manual: update version number in Chart.yaml + +# updates Chart.lock +helm dependency update + +# checks the Kubernetes objects generated from the chart +helm template prometheus . -f values.yaml \ + --namespace prometheus > temp.yaml +``` + +## How to deploy manually from the sources + +### Sample with a given password + +```bash +# applies the manifest (add "--debug > output.yaml" in case of issue) +helm upgrade --install prometheus . -f values.yaml --create-namespace \ + --namespace prometheus + +# forwards service port for local access +kubectl port-forward service/prometheus-server 9090:80 -n prometheus + +# accesses prometheus server UI with http://localhost:9090/ +curl http://localhost:9090/ + +# cleans up +helm uninstall prometheus -n prometheus +kubectl delete ns prometheus +``` diff --git a/charts/prometheus/values.yaml b/charts/prometheus/values.yaml new file mode 100644 index 0000000..37bec0e --- /dev/null +++ b/charts/prometheus/values.yaml @@ -0,0 +1,2 @@ +# https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus/values.yaml +prometheus: {} diff --git a/charts/redis/Chart.lock b/charts/redis/Chart.lock new file mode 100644 index 0000000..f032577 --- /dev/null +++ b/charts/redis/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 17.11.3 +digest: sha256:5d9e82dff628bd8441854eec087cdbec8a6a2a5a4d2a2eb9ae4af60d84b201fb +generated: "2023-05-22T14:47:37.5098716+02:00" diff --git a/charts/redis/Chart.yaml b/charts/redis/Chart.yaml new file mode 100644 index 0000000..0c633ca --- /dev/null +++ b/charts/redis/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v2 +name: redis +description: Helm chart for managing Redis +type: application +version: "0.1.0" +appVersion: "7.0.11" +dependencies: + - name: redis + version: 17.11.3 + repository: https://charts.bitnami.com/bitnami +maintainers: + - name: devpro + email: bertrand@devpro.fr diff --git a/charts/redis/README.md b/charts/redis/README.md index e69de29..0af75ef 100644 --- a/charts/redis/README.md +++ b/charts/redis/README.md @@ -0,0 +1,62 @@ +# Helm chart for Redis + +This Helm chart will install [Redis](https://redis.io/) ([code](https://github.com/redis/redis)) on a Kubernetes cluster. +It is based on [Bitnami's Helm chart](https://bitnami.com/stack/redis/helm) ([code](https://github.com/bitnami/charts/blob/main/bitnami/redis/README.md)). + +## How to use + +- With Helm (see [README](../../README.md#from-helm-cli) for requirements) + +```bash +# install with default parameters +helm upgrade --install redis devpro/redis --create-namespace \ + --namespace redis + +# checks all pods are running after some time +kubectl get pod -n redis +``` + +## How to create or update the chart + +```bash +# adds helm chart repository +helm repo add bitnami https://charts.bitnami.com/bitnami + +# searches for the latest version +helm search repo -l redis --versions + +# manual: update version number in Chart.yaml + +# updates Chart.lock +helm dependency update + +# checks code style +helm lint + +# checks the Kubernetes objects generated from the chart +helm template redis . -f values.yaml \ + --namespace redis > temp.yaml +``` + +## How to deploy manually from the sources + +### Sample with a given password + +```bash +# applies the manifest (add "--debug > output.yaml" in case of issue) +helm upgrade --install redis . -f values.yaml --create-namespace \ + --set redis.auth.password=secretpassword \ + --set redis.replica.replicaCount=1 \ + --namespace redis + +# forwards service port for local access +kubectl port-forward service/redis-master 6379:6379 -n redis + +# checks the service is up and running with redis-cli +sudo apt install redis-tools +redis-cli -a secretpassword + +# cleans up +helm uninstall redis -n redis +kubectl delete ns redis +``` diff --git a/charts/redis/values.yaml b/charts/redis/values.yaml new file mode 100644 index 0000000..6fb191d --- /dev/null +++ b/charts/redis/values.yaml @@ -0,0 +1,2 @@ +# https://github.com/bitnami/charts/blob/main/bitnami/redis/values.yaml +redis: {} diff --git a/scripts/add_helm_repo.sh b/scripts/add_helm_repo.sh index 1539b8a..e0e73a3 100755 --- a/scripts/add_helm_repo.sh +++ b/scripts/add_helm_repo.sh @@ -14,9 +14,12 @@ helm repo add jenkinsci https://charts.jenkins.io helm repo add jetstack https://charts.jetstack.io helm repo add kasten https://charts.kasten.io/ helm repo add longhorn https://charts.longhorn.io +helm repo add minio https://charts.min.io/ helm repo add mongodb https://mongodb.github.io/helm-charts helm repo add neuvector https://neuvector.github.io/neuvector-helm helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts +helm repo add ory https://k8s.ory.sh/helm/charts +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo add rancher-latest https://releases.rancher.com/server-charts/latest helm repo add reportportal https://reportportal.github.io/kubernetes helm repo add s3gw https://aquarist-labs.github.io/s3gw-charts