Skip to content

Commit 813b254

Browse files
authored
Add keycloak chart (#10)
* Improve README with usage * Add empty charts * Use Let's Encrypt for certificats * Fix typo * cert-manager - Remove CRD file * gitlab - update URLs * Add keycloak chart * Add comment * Bump versions
1 parent ad729e1 commit 813b254

26 files changed

Lines changed: 219 additions & 4448 deletions

File tree

README.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
Helm charts to ease the deployment of containers on Kubernetes clusters and get information on widely used components.
77

8+
## Quickstart
9+
10+
* Visit [devpro.github.io/helm-charts](https://devpro.github.io/helm-charts/)
11+
812
## Catalog
913

1014
* Applications
@@ -13,10 +17,11 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get
1317
* [WordPress](charts/wordpress/README.md) 🗸
1418
* Backing services
1519
* [Kafka](charts/kafka/README.md)
16-
* [Keycloak](charts/Keycloak/README.md)
20+
* [Keycloak](charts/keycloak/README.md) 🗸
1721
* [MariaDB](charts/mariadb/README.md) 🗸
1822
* [memcached](charts/memcached/README.md)
1923
* [MongoDB](charts/mongodb/README.md)
24+
* [MQTT](charts/mqtt/README.md)
2025
* [PostgreSQL](charts/postgresql/README.md)
2126
* [RabbitMQ](charts/rabbitmq/README.md)
2227
* [Redis](charts/redis/README.md)
@@ -26,6 +31,7 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get
2631
* Kube add-ons
2732
* [ArgoCD](charts/argo-cd/README.md) 🗸
2833
* [cert-manager](charts/cert-manager/README.md) 🗸
34+
* [external-dns](charts/external-dns/README.md)
2935
* [HAProxy](charts/haproxy/README.md)
3036
* [Istio](charts/istio/README.md)
3137
* [Kong](charts/kong/README.md)
@@ -41,17 +47,71 @@ Helm charts to ease the deployment of containers on Kubernetes clusters and get
4147
* Security
4248
* [NeuVector](charts/neuvector/README.md) 🗸
4349
* Software Factory (supply chain)
50+
* [Artifactory](charts/artifactory/README.md)
4451
* [Azure DevOps Agent](charts/azure-devops-agent/README.md)
4552
* [Concourse](charts/concourse/README.md)
4653
* [Drone](charts/drone/README.md)
4754
* [GitLab](charts/gitlab/README.md) 🗸
4855
* [GitLab Runner](charts/gitlab-runner/README.md)
4956
* [Harbor](charts/harbor/README.md) 🗸
57+
* [Jira](charts/jira/README.md)
58+
* [Nexus](charts/nexus/README.md)
5059
* [SonarQube](charts/sonarqube/README.md) 🗸
5160
* [Tekton](charts/tekton/README.md)
5261

5362
Limitation: [Helm Chart Releaser](https://github.com/helm/chart-releaser) doesn't support multiple chart directories ou multiple levels so all charts must be in `charts` repository
5463

64+
## Usage
65+
66+
### From Helm CLI
67+
68+
```bash
69+
# adds the Helm repository
70+
helm repo add devpro https://devpro.github.io/helm-charts
71+
72+
# searches for a specific package from the command line
73+
helm repo search <package_name>
74+
75+
# installs a package
76+
helm install <package_name>
77+
```
78+
79+
### From ArgoCD
80+
81+
* Create a git repository to store Kubernetes definition files (GitOps approach)
82+
83+
```yaml
84+
# wordpress/Chart.yaml
85+
apiVersion: v2
86+
name: wordpress
87+
description: Helm chart for installing WordPress
88+
type: application
89+
version: 0.1.0
90+
appVersion: 1.0.0
91+
dependencies:
92+
- name: wordpress
93+
version: 0.1.1
94+
repository: https://devpro.github.io/helm-charts
95+
```
96+
97+
* Create a new application in ArgoCD to reference the git repository with the path to the folder
98+
99+
### From Fleet
100+
101+
* Create a git repository to store Kubernetes definition files (GitOps approach)
102+
103+
```yaml
104+
# wordpress/fleet.yaml
105+
defaultNamespace: sample-apps
106+
helm:
107+
repo: https://devpro.github.io/helm-charts
108+
chart: wordpress
109+
version: 0.1.1
110+
releaseName: wordpress
111+
```
112+
113+
* Create a GitRepo to reference the git repository with the path to the folder
114+
55115
## Cluster setup logic
56116
57117
* Create a Kubernetes Cluster and get CLI access (download `kubectl` configuration)

charts/Keycloak/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: keycloak
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 12.1.3
5+
digest: sha256:3f010ce6f75ce94c67301c19c0fe2551b82ba287ffef63c6db24f9a42bc97f1d
6+
generated: "2022-11-24T20:55:19.448675175+01:00"

charts/Keycloak/Chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
name: keycloak
3+
description: Helm chart for managing Keycloak
4+
type: application
5+
version: "0.1.0"
6+
appVersion: "19.0.3"
7+
dependencies:
8+
- name: keycloak
9+
version: 12.1.3
10+
repository: https://charts.bitnami.com/bitnami
11+
maintainers:
12+
- name: devpro
13+
email: bertrand@devpro.fr

charts/Keycloak/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Keycloack
2+
3+
This Helm chart will install [Keycloack](https://www.keycloak.org/) ([docs](https://www.keycloak.org/documentation), [code](https://github.com/keycloak/keycloak))
4+
and is based from the [Bitnami Helm chart](https://bitnami.com/stack/keycloak/helm) ([docs]((https://github.com/bitnami/charts/tree/main/bitnami/keycloak))).
5+
6+
## How to update the chart
7+
8+
```bash
9+
# adds helm chart repository
10+
helm repo add bitnami https://charts.bitnami.com/bitnami
11+
helm repo update
12+
13+
# searches for the latest version
14+
helm search repo -l keycloak
15+
16+
# manual: update version number in Chart.yaml
17+
18+
# updates Chart.lock
19+
helm dependency update
20+
```
21+
22+
## How to deploy manually
23+
24+
```bash
25+
# gets ingress controller public IP
26+
NGINX_PUBLIC_IP=`kubectl get service -n ingress-nginx ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}'`
27+
28+
# checks the Kubernetes objects generated from the chart
29+
helm template keycloak . -f values.yaml \
30+
--namespace supply-chain > temp.yaml
31+
32+
# applies the manifest (add "--debug > output.yaml" in case of issue)
33+
helm upgrade --install keycloak . -f values.yaml --create-namespace \
34+
--set keycloak.ingress.hostname=keycloak.${NGINX_PUBLIC_IP}.sslip.io \
35+
--namespace authentication
36+
37+
# checks everything is ok
38+
kubectl get svc,deploy,pod,ingress,pv,certificate -n authentication
39+
40+
# manual: open https://keycloak.${NGINX_PUBLIC_IP}.sslip.io/ (and login with user/Admin1234)
41+
42+
# if needed, deletes the chart
43+
helm uninstall keycloak -n authentication
44+
```
45+
46+
## How to start once the application is running
47+
48+
* [Get started with Keycloak on Kubernetes](https://www.keycloak.org/getting-started/getting-started-kube)
49+
50+
## How to investigate
51+
52+
### Known issue
53+
54+
* Creating the secret at the same time as the chart may cause issue, create the secret first

charts/Keycloak/values.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# https://github.com/bitnami/charts/blob/main/bitnami/keycloak/values.yaml
2+
keycloak:
3+
auth:
4+
adminUser: user
5+
adminPassword: Admin1234
6+
# existingSecret: keycloak-credentials
7+
# passwordSecretKey: admin-password
8+
# production: false
9+
ingress:
10+
enabled: true
11+
ingressClassName: nginx
12+
annotations:
13+
cert-manager.io/cluster-issuer: letsencrypt-prod
14+
tls: true
15+
# extraEnvVars:
16+
# - name: KEYCLOAK_LOG_LEVEL
17+
# value: DEBUG

charts/artifactory/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Artifactory
2+
3+
[docs](https://jfrog.com/knowledge-base/artifactory-installation-quick-start-guide-helm/)

charts/cert-manager/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: cert-manager
33
description: Helm chart for managing cert-manager
44
type: application
5-
version: "0.1.2"
5+
version: "0.1.3"
66
appVersion: "1.10.0"
77
dependencies:
88
- name: cert-manager

charts/cert-manager/README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ helm search repo cert-manager
2121

2222
# updates Chart.lock (and downloads locally the charts)
2323
helm dependency update
24-
25-
# refreshes CRD file
26-
wget -O crds/cert-manager.crds.yaml https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.crds.yaml
2724
```
2825

2926
## How to deploy manually
@@ -32,15 +29,15 @@ wget -O crds/cert-manager.crds.yaml https://github.com/cert-manager/cert-manager
3229
# checks the Kubernetes objects generated from the chart
3330
helm template cert-manager . -f values.yaml --namespace cert-manager > temp.yaml
3431

35-
# installs the chart with helm (with CRDs)
36-
helm install cert-manager . -f values.yaml --create-namespace --namespace cert-manager
32+
# applies CRD file (to be done once)
33+
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.crds.yaml
34+
35+
# installs the chart with helm
36+
helm upgrade --install cert-manager . -f values.yaml --namespace cert-manager
3737

3838
# checks deployments (the 3 of them should be READY 1/1)
3939
kubectl get deploy -n cert-manager
4040

41-
# updates an existing installation (CRDs won't be installed)
42-
helm upgrade --install cert-manager . -f values.yaml --namespace cert-manager
43-
4441
# if needed, deletes the chart
4542
helm delete cert-manager -n cert-manager
4643
kubectl delete ns cert-manager

0 commit comments

Comments
 (0)