Skip to content

Commit

Permalink
Add MongoDB charts (#36)
Browse files Browse the repository at this point in the history
* Add MongoDB Community chart

* Update typo in README

* Update README of grafana stack

Dump version 0.2.2

* Add empty linkerd chart folder

* Fix md issue

* Add NATS chart

* Add MongoDB Bitnami chart

* Small updates to cow demo and 2048 game

* Update container image repo of game 2048

* Remove s3gw repo

* Upgrade keycloak version to upstream chart version 18.7.0

* Update cow-demo to use BSI based image
  • Loading branch information
devpro committed Apr 25, 2024
1 parent c6dc916 commit e34450b
Show file tree
Hide file tree
Showing 40 changed files with 648 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
temp*.yaml
temp.sh
/charts/temp/
values_mine.yaml
values_*.y*ml
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get
* [Elasticsearch](charts/elasticsearch/README.md) 🗸
* [MariaDB](charts/mariadb/README.md) 🗸
* [memcached](charts/memcached/README.md)
* [MongoDB](charts/mongodb/README.md)
* [MongoDB (Bitnami)](charts/mongodb-bitnami/README.md) 🗸
* [MongoDB Community](charts/mongodb-community/README.md) 🗸
* [PostgreSQL](charts/postgresql/README.md) 🗸
* [RabbitMQ](charts/rabbitmq/README.md) 🗸
* [Redis](charts/redis/README.md) 🗸
Expand All @@ -43,9 +44,10 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get
* [Kafka](charts/kafka/README.md)
* [Kong](charts/kong/README.md)
* [Let's Encrypt](charts/letsencrypt/README.md) 🗸
* [Linkerd](charts/linkerd/README.md)
* [MetalLB](charts/metallb/README.md)
* [MQTT](charts/mqtt/README.md)
* [NATS](charts/nats/README.md)
* [NATS](charts/nats/README.md) 🗸
* [NGINX Ingress Controller](charts/ingress-nginx/README.md) 🗸
* [Traefik](charts/traefik/README.md) 🗸
* Management
Expand Down Expand Up @@ -164,7 +166,7 @@ helm:
### From Rancher

* In your cluster
* Go to "Apps" > "Repositories", click on "Create" and enter "https://devpro.github.io/helm-charts" as "Index URL", then click on "Create"
* Go to "Apps" > "Repositories", click on "Create" and enter `https://devpro.github.io/helm-charts` as "Index URL", then click on "Create"
* Go to "Apps" > "Charts", look at the available applications (charts) and install the one(s) you want

## Cluster setup logic
Expand Down
4 changes: 2 additions & 2 deletions charts/cow-demo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: cow-demo
description: Helm chart for Cow Demo Application
type: application
version: 0.1.2
appVersion: "1.0.0"
version: 0.2.0
appVersion: "2.0.0"
maintainers:
- name: devpro
email: bertrand@devpro.fr
25 changes: 10 additions & 15 deletions charts/cow-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Helm chart to deploy cow demonstration application.
```bash
# lints the chart
helm lint .

# creates Kubernetes template file from chart
helm template cow-demo . -f values.yaml --namespace demo > temp.yaml
```

## How to deploy manually
Expand All @@ -15,17 +18,13 @@ helm lint .
# gets ingress controller public IP
NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'`

# creates Kubernetes template file from chart
helm template cow-demo . -f values.yaml \
--namespace demo > temp.yaml

# applies the manifest (add "--debug > output.yaml" in case of issue)
helm upgrade --install cow-demo . -f values.yaml \
--set cow.color=green \
--set host=cow-demo.${NGINX_PUBLIC_IP}.sslip.io \
--set 'ingress.annotations.cert-manager\.io/cluster-issuer=selfsigned-cluster-issuer' \
--set 'ingress.enabled=true' \
--namespace demo --create-namespace
helm upgrade --install cow-demo . -f values.yaml --namespace demo \
--set pet.color=green \
--set host=cow-demo.${NGINX_PUBLIC_IP}.sslip.io \
--set ingress.annotations.'cert-manager\.io/cluster-issuer'=selfsigned-cluster-issuer \
--set ingress.enabled=true \
--create-namespace

# checks everythings is ok
kubectl get all -n demo
Expand All @@ -41,8 +40,4 @@ helm delete cow-demo -n demo

### AMD64

* [monachus/rancher-demo](https://hub.docker.com/r/monachus/rancher-demo) ([code](https://github.com/oskapt/rancher-demo))

### ARM64

* [bashofmann/rancher-demo](https://hub.docker.com/r/bashofmann/rancher-demo) ([code](https://github.com/bashofmann/rancher-demo))
* [devprofr/cow-demo](https://hub.docker.com/r/devprofr/cow-demo) ([code](https://github.com/devpro/container-images/tree/main/src/cow-demo))
11 changes: 7 additions & 4 deletions charts/cow-demo/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ spec:
app.kubernetes.io/name: {{ $name }}
spec:
containers:
- name: {{ $name }}
- name: webapp
image: "{{ $.Values.image }}:{{ $.Values.tag }}"
imagePullPolicy: Always
env:
- name: COW_COLOR
value: {{ $.Values.cow.color }}
- name: CONTAINER_COLOR
value: {{ $.Values.pet.color }}
- name: PETS
value: {{ $.Values.pet.type }}
ports:
- containerPort: 8080
- name: http
containerPort: 8080
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
12 changes: 7 additions & 5 deletions charts/cow-demo/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $.Values.name }}-ingress
name: {{ $.Values.name }}
{{- with $.Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -13,20 +13,22 @@ spec:
ingressClassName: {{ $.Values.ingress.className }}
{{- end }}
rules:
- host: {{ $.Values.host }}
- {{- if $.Values.ingress.host }}
host: {{ $.Values.ingress.host }}
{{- end }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $.Values.name }}-svc
name: {{ $.Values.name }}
port:
number: 80
number: {{ $.Values.port }}
{{- if $.Values.ingress.tls }}
tls:
- hosts:
- {{ $.Values.host | quote }}
- {{ $.Values.ingress.host | quote }}
secretName: {{ $.Values.ingress.tls.secretName }}
{{- end }}
{{- end }}
11 changes: 6 additions & 5 deletions charts/cow-demo/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
apiVersion: v1
kind: Service
metadata:
name: {{ $name }}
labels:
app: {{ $name }}
app.kubernetes.io/name: {{ $name }}
name: {{ $name }}-svc
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
targetPort: 8080
selector:
app: {{ $name }}
app.kubernetes.io/name: {{ $name }}
ports:
- name: http
port: {{ $.Values.port }}
protocol: TCP
targetPort: 8080
21 changes: 13 additions & 8 deletions charts/cow-demo/values.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: cow-demo
image: monachus/rancher-demo
tag: latest
image: devprofr/cow-demo
tag: 1.0.8830193847
replicaCount: 2
host: "cow-demo.example.com"
port: 80
ingress:
enabled: false
className: "nginx"
# annotations:
# nginx.ingress.kubernetes.io/ssl-redirect: "false"
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
host: ""
annotations: {}
# nginx.ingress.kubernetes.io/ssl-redirect: "false"
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
# cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
secretName: "cow-demo-tls"
cow:
color: red
pet:
# choice: cows, chameleons, cowmeleons
type: cows
# choice: red, orange, yellow, olive, green, teal, blue, violet, purple, pink, black
color: blue
resources: {}
# limits:
# cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion charts/game-2048/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: game-2048
description: Helm chart for Game 2048
type: application
version: 0.1.0
version: 0.1.1
appVersion: "1.0.0"
maintainers:
- name: devpro
Expand Down
2 changes: 1 addition & 1 deletion charts/game-2048/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ spec:
ports:
- name: http
containerPort: 80
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}

10 changes: 6 additions & 4 deletions charts/game-2048/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $.Values.name }}-ing
name: {{ $.Values.name }}
{{- with $.Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -13,16 +13,18 @@ spec:
ingressClassName: {{ $.Values.ingress.className }}
{{- end }}
rules:
- host: {{ $.Values.ingress.host }}
- {{- if $.Values.ingress.host }}
host: {{ $.Values.ingress.host }}
{{- end }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $.Values.name }}-svc
name: {{ $.Values.name }}
port:
number: 80
number: {{ $.Values.port }}
{{- if $.Values.ingress.tls }}
tls:
- hosts:
Expand Down
11 changes: 6 additions & 5 deletions charts/game-2048/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
apiVersion: v1
kind: Service
metadata:
name: {{ $name }}-svc
name: {{ $name }}
labels:
app: {{ $name }}
app.kubernetes.io/name: {{ $name }}
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 80
selector:
app: {{ $name }}
app.kubernetes.io/name: {{ $name }}
ports:
- name: http
port: {{ $.Values.port }}
protocol: TCP
targetPort: 80
7 changes: 4 additions & 3 deletions charts/game-2048/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: game-2048
image: alexwhen/docker-2048
tag: latest
image: devprofr/game-2048
tag: "1.0.8328752292"
replicaCount: 1
port: 80
ingress:
enabled: false
className: "nginx"
host: "game-2048.dummy"
host: ""
annotations: {}
# cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
Expand Down
2 changes: 1 addition & 1 deletion charts/grafana-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: grafana-stack
description: Helm chart for managing Grafana Stack
type: application
version: "0.2.1"
version: "0.2.2"
appVersion: "10.3.1"
dependencies:
- name: grafana
Expand Down
9 changes: 8 additions & 1 deletion charts/grafana-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
This Helm chart will install [Grafana stack](https://grafana.com/about/grafana-stack/) ([GitHub org](https://github.com/grafana)) on a Kubernetes cluster.
It is based on the [community Helm charts](https://github.com/grafana/helm-charts).

Stack components:

- [Grafana](https://grafana.com/oss/grafana/) ([Deploy Grafana on Kubernetes](https://grafana.com/docs/grafana/latest/setup-grafana/installation/kubernetes/))
- [Loki](https://grafana.com/oss/loki/) ([Install Grafana Loki with Helm](https://grafana.com/docs/loki/latest/setup/install/helm/))
- [Mimir](https://grafana.com/oss/mimir/) ([Get started with Grafana Mimir using the Helm chart](https://grafana.com/docs/helm-charts/mimir-distributed/latest/get-started-helm-charts/))
- [Tempo](https://grafana.com/oss/tempo/) ([Deploy Tempo with Helm](https://grafana.com/docs/tempo/latest/setup/helm-chart/))

See also:

- [CNCF Live Webinar: Intro to open source observability with Grafana, Prometheus, Loki, and Tempo](https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cncf-live-webinar-intro-to-open-source-observability-with-grafana-prometheus-loki-and-tempo/) - November 16, 2021
Expand All @@ -22,9 +29,9 @@ kubectl get pod -n grafana
```bash
# searches for the latest version
helm search repo grafana/grafana
helm search repo grafana/mimir-distributed
helm search repo grafana/loki
helm search repo grafana/tempo
helm search repo grafana/mimir-distributed

# manual: update version number in Chart.yaml

Expand Down
49 changes: 49 additions & 0 deletions charts/keycloak/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contribute to Keycloak Devpro Helm chart

## How to update the chart

```bash
# adds helm chart repository
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

# searches for the latest version
helm search repo -l keycloak

# manual: update version number in Chart.yaml

# updates Chart.lock
helm dependency update
```

## How to deploy from the sources

```bash
# gets ingress controller public IP
NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'`

# checks the Kubernetes objects generated from the chart
helm template keycloak . -f values.yaml \
--namespace keycloak > temp.yaml

# applies the manifest (add "--debug > output.yaml" in case of issue)
helm upgrade --install keycloak . -f values.yaml --create-namespace \
--set keycloak.auth.adminPassword=Admin1234 \
--set keycloak.ingress.hostname=keycloak.${NGINX_PUBLIC_IP}.sslip.io \
--set keycloak.ingress.annotations.'cert-manager\.io/cluster-issuer'=letsencrypt-prod \
--set keycloak.global.storageClass=default \
--set keycloak.extraStartupArgs="-Dkeycloak.frontendUrl=keycloak.${NGINX_PUBLIC_IP}.sslip.io --proxy edge"
--namespace keycloak

# waits for the application to be running
kubectl wait pods -n keycloak -l app.kubernetes.io/instance=keycloak --for condition=Ready

# checks everything is ok
kubectl get svc,deploy,pod,ingress,pv,certificate -n keycloak

# manual: open https://keycloak.${NGINX_PUBLIC_IP}.sslip.io/ (and login with user/Admin1234)

# if needed, deletes the chart
helm uninstall keycloak -n keycloak
kubectl delete ns keycloak
```
6 changes: 3 additions & 3 deletions charts/keycloak/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: keycloak
repository: https://charts.bitnami.com/bitnami
version: 9.2.10
digest: sha256:4fa06ef6bf8691a261fc85ad3175f06ce1c4620aad05a67ec15ae01cd7648636
generated: "2022-12-26T22:37:56.080641402+01:00"
version: 18.7.0
digest: sha256:5316590066b03500b1c7af114f631c56bcf27c8c44e39e6decf6812b28f4fa82
generated: "2024-04-23T18:04:09.32086579+02:00"
Loading

0 comments on commit e34450b

Please sign in to comment.