Skip to content

Commit efd6c25

Browse files
authored
draft: Refactor: use bjw-s instead of bitnami dependency (#3)
* feat: add .helmignore * refactor: use bjw-s instead of bitnami * refactor: use bjw-s common schemas * fix values * docs: adjust readme and changelog * clear up readme
1 parent 2769436 commit efd6c25

File tree

10 files changed

+128
-142
lines changed

10 files changed

+128
-142
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [0.8.0] Initial Release
99

1010
### Added
11-
CI: add workflows PR validation and release creation
12-
feat: basic scaffolding
11+
* Working helm chart which deploys Terralist v0.8.0
12+
* CI: add workflows PR validation and release creation
1313

1414
### Changed
1515

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Installs [Terralist](https://github.com/terralist/terralist), A truly private Te
66

77
This repo contains helm charts the Terralist community developed to help deploy Terralist on Kubernetes cluster.
88

9-
It leverages the bitnami [common-library chart](https://github.com/bitnami/charts/tree/da4aaf376e800760fd5ada2b07e3c85c7c8ddd95/bitnami/common) to make configuration as easy as possible.
9+
It leverages the bjw-s [common-library chart](https://github.com/bjw-s-labs/helm-charts/tree/923ef40a39520979c98f354ea23963ee54f54433/charts/library/common) to make configuration as easy as possible.
1010

1111
# Installation
1212

@@ -17,9 +17,10 @@ $ helm install --create-namespace --namespace terralist terralist oci://ghcr.io/
1717
You should not copy the full values.yaml from this repository. Only set the values that you want to override.
1818

1919
There are a few things that you are required to configure in your values.yaml before installing the chart:
20-
* ...
21-
* ...
22-
* ...
20+
* Required Terralist options (TERRALIST_OAUTH_PROVIDER, TERRALIST_TOKEN_SIGNING_SECRET, etc...)
21+
* Configure persistence for `/data`:
22+
* Either let the chart create a PVC (set `persistence.data.storageClass` and `size`), or
23+
* Point at an existing PVC with `persistence.data.existingClaim`, or
2324

2425
# Configuration
2526

@@ -28,7 +29,7 @@ of all possible changes within the `charts/terralist/values.yaml` file.
2829

2930
## Chart architecture
3031

31-
This chart uses the [common library](https://github.com/bitnami/charts/tree/da4aaf376e800760fd5ada2b07e3c85c7c8ddd95/bitnami/common) from [Bitnami](https://bitnami.com/). You can freely add more top level keys to be applied to all the components, please reference [the common library's values.yaml](https://github.com/bitnami/charts/blob/main/bitnami/common/values.yaml) to see what keys are available.
32+
This chart uses the [common library](https://github.com/bjw-s-labs/helm-charts/tree/e44d184a8e2037495c122d8056878b1ca2ea9a5b/charts/library/common). You can freely add more top level keys to be applied to all the components, please reference [the common library's values.yaml](https://github.com/bjw-s-labs/helm-charts/blob/e44d184a8e2037495c122d8056878b1ca2ea9a5b/charts/library/common/values.yaml) to see what keys are available.
3233

3334
## Uninstalling the Chart
3435

charts/terralist/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ apiVersion: v2
88
appVersion: "v0.8.0"
99
dependencies:
1010
- name: common
11-
repository: https://charts.bitnami.com/bitnami
12-
version: 2.31.3
11+
version: 4.2.0
12+
repository: https://bjw-s-labs.github.io/helm-charts/
1313
description: A chart to run Terralist (terralist.io) running on kubernetes
1414
home: https://terralist.io/
1515
icon: https://raw.githubusercontent.com/terralist/terralist/refs/heads/master/docs/assets/terralist.svg
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.git/
2+
.github/
3+
.gitignore
4+
.idea/
5+
.vscode/
6+
*.swp
7+
*.bak
8+
.DS_Store
9+
charts/
10+
tmp/
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
{{- if .Values.ingress.enabled }}
2-
1. Get the application URL by running:
3-
4-
echo "https://{{ .Values.ingress.hostname }}/"
5-
6-
{{- else }}
7-
1. Get the service URL by running:
8-
9-
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
10-
kubectl port-forward $POD_NAME 5758:{{ .Values.service.ports.http }} --namespace {{ .Release.Namespace }}
11-
12-
Then access the app at: http://localhost:5758
13-
{{- end }}
1+
Terralist has been deployed.
2+
3+
Service:
4+
{{- if and .Values.service.main.enabled (hasKey .Values.service.main.ports "http") }}
5+
Type: ClusterIP
6+
Port: {{ .Values.service.main.ports.http.port }}
7+
{{- end }}
8+
9+
Ingress:
10+
{{- if .Values.ingress.main.enabled }}
11+
Host: {{ (index .Values.ingress.main.hosts 0).host }}
12+
Path: {{ (index (index .Values.ingress.main.hosts 0).paths 0).path }}
13+
{{- else }}
14+
Ingress disabled. Enable via values.yml: ingress.main.enabled=true
15+
{{- end }}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
{{/* Required bjw-s/common includes to render all resources from values.yaml */}}
3+
{{- include "bjw-s.common.loader.init" . -}}
4+
{{- include "bjw-s.common.loader.generate" . -}}

charts/terralist/templates/deployment.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

charts/terralist/templates/ingress.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

charts/terralist/templates/service.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

charts/terralist/values.yaml

Lines changed: 88 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,92 @@
1-
image:
2-
registry: ghcr.io
3-
repository: terralist/terralist
4-
tag: v0.8.0
5-
pullPolicy: IfNotPresent
6-
7-
containerPorts:
8-
http: 5758
9-
10-
replicaCount: 1
11-
12-
resources:
13-
limits:
14-
cpu: 500m
15-
memory: 512Mi
16-
requests:
17-
cpu: 100m
18-
memory: 128Mi
19-
20-
# TODO: add probes when terralist supports health checks
21-
# livenessProbe:
22-
# enabled: true
23-
# path: /health
24-
# port: http
25-
# initialDelaySeconds: 10
26-
# periodSeconds: 10
27-
28-
# readinessProbe:
29-
# enabled: true
30-
# path: /health
31-
# port: http
32-
# initialDelaySeconds: 5
33-
# periodSeconds: 5
34-
35-
# startupProbe:
36-
# enabled: true
37-
# path: /health
38-
# port: http
39-
# initialDelaySeconds: 5
40-
# periodSeconds: 5
41-
42-
podLabels:
43-
app.kubernetes.io/component: terralist
1+
---
2+
controllers:
3+
main:
4+
replicas: 1
5+
strategy: RollingUpdate
6+
containers:
7+
app:
8+
image:
9+
repository: ghcr.io/terralist/terralist
10+
tag: v0.8.0
11+
pullPolicy: IfNotPresent
12+
13+
ports:
14+
- name: http
15+
containerPort: 5758
16+
17+
command: ["terralist"]
18+
args: ["server"]
19+
20+
resources:
21+
requests:
22+
cpu: 100m
23+
memory: 128Mi
24+
limits:
25+
cpu: 500m
26+
memory: 512Mi
27+
28+
# TODO: Enable the probes below once the application is supports these
29+
# probes:
30+
# liveness:
31+
# enabled: true
32+
# type: http
33+
# path: /liveness
34+
# port: http
35+
# initialDelaySeconds: 10
36+
# periodSeconds: 10
37+
# readiness:
38+
# enabled: true
39+
# type: http
40+
# path: /readyz
41+
# port: http
42+
# initialDelaySeconds: 5
43+
# periodSeconds: 5
44+
# startup:
45+
# enabled: true
46+
# type: http
47+
# path: /healthz
48+
# port: http
49+
# initialDelaySeconds: 5
50+
# periodSeconds: 5
51+
pod:
52+
securityContext:
53+
runAsNonRoot: false
54+
runAsUser: 0
55+
runAsGroup: 0
56+
57+
defaultPodOptions:
58+
labels:
59+
app.kubernetes.io/component: terralist
4460

4561
service:
46-
enabled: true
47-
type: ClusterIP
48-
ports:
49-
http: 5758
62+
main:
63+
enabled: true
64+
controller: main
65+
type: ClusterIP
66+
ports:
67+
http:
68+
port: 5758
69+
targetPort: http
5070

5171
ingress:
52-
enabled: false
53-
ingressClassName: nginx
54-
hostname: terralist.local
55-
annotations: {}
56-
tls: false
57-
tlsSecret: terralist-tls
72+
main:
73+
enabled: false
74+
className: nginx
75+
hosts:
76+
- host: terralist.local
77+
paths:
78+
- path: /
79+
pathType: Prefix
80+
service:
81+
identifier: main
82+
port: http
83+
tls: []
84+
85+
persistence:
86+
data:
87+
enabled: true
88+
accessMode: ReadWriteMany
89+
size: 10Gi
90+
retain: true
91+
globalMounts:
92+
- path: /data

0 commit comments

Comments
 (0)