Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit bffee92

Browse files
committed
reworking of the tembo-operator helm chart
1 parent 4571097 commit bffee92

30 files changed

+1209
-186
lines changed

.github/workflows/helm-lint.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release Helm Chart
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- 'charts/**'
8+
9+
jobs:
10+
release-chart:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v3
15+
with:
16+
path: 'code'
17+
18+
- name: Checkout gh-pages branch
19+
uses: actions/checkout@v3
20+
with:
21+
ref: 'gh-pages'
22+
path: 'gh-pages'
23+
24+
- name: Set up Helm
25+
uses: azure/[email protected]
26+
with:
27+
version: 3.13.2
28+
29+
- name: Package Helm Chart
30+
run: |
31+
cd code/charts/tembo-operator
32+
helm package .
33+
34+
- name: Update Helm repo index
35+
run: |
36+
mv code/charts/tembo-operator/*.tgz gh-pages/
37+
cd gh-pages
38+
helm repo index . --url https://tembo-io.github.io/tembo-stacks
39+
40+
- name: Commit and Push
41+
run: |
42+
cd gh-pages
43+
git config user.name "tembo-service-user"
44+
git config user.email "[email protected]"
45+
git add .
46+
git commit -m "Update Helm chart"
47+
git push origin gh-pages
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.SERVICE_USER_GITHUB_SSH_KEY }}

.github/workflows/helm-test.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Lint/Test Helm charts
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
paths:
7+
- 'charts/**'
8+
9+
jobs:
10+
find_directories:
11+
name: Find changed helm charts
12+
runs-on: ubuntu-latest
13+
outputs:
14+
directories: ${{ steps.find_directories.outputs.build_matrix }}
15+
steps:
16+
- name: Check out the repo
17+
uses: actions/checkout@v3
18+
- name: Check out the coredb repo to reuse some actions
19+
uses: actions/checkout@v3
20+
with:
21+
repository: tembo-io/tembo
22+
path: ./.tembo
23+
ref: 84664df742ce9774a3029e08111940f9f1fb345e
24+
- name: Find directories with Chart.yaml that changed
25+
id: find_directories
26+
uses: ./.tembo/.github/actions/find-changed-directories
27+
with:
28+
contains_the_file: Chart.yaml
29+
changed_relative_to_branch: ${{ github.base_ref || 'not-a-branch' }}
30+
ignore_dirs: ".tembo"
31+
32+
lint:
33+
name: Lint charts
34+
runs-on: ubuntu-latest
35+
needs:
36+
- find_directories
37+
strategy:
38+
fail-fast: false
39+
matrix: ${{ fromJson(needs.find_directories.outputs.directories) }}
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
with:
44+
fetch-depth: 0
45+
46+
- name: Helm lint
47+
run: helm lint ${{ matrix.path }}
48+
49+
lint-ct:
50+
name: Lint using chart-testing
51+
runs-on: ubuntu-latest
52+
needs:
53+
- find_directories
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v3
57+
with:
58+
fetch-depth: 0
59+
60+
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
61+
# yamllint (https://github.com/adrienverge/yamllint) which require Python
62+
- name: Set up Python
63+
uses: actions/setup-python@v4 #
64+
with:
65+
python-version: 3.x
66+
67+
- name: Set up Helm
68+
uses: azure/[email protected]
69+
with:
70+
version: 3.13.2
71+
72+
- name: Set up chart-testing
73+
uses: helm/[email protected]
74+
75+
- name: Install just
76+
uses: extractions/setup-just@v1
77+
- run: just helm-repo
78+
79+
- name: Run chart-testing (list-changed)
80+
id: list-changed
81+
run: |
82+
changed=$(ct list-changed --target-branch main)
83+
if [[ -n "$changed" ]]; then
84+
echo "changed=true" >> $GITHUB_OUTPUT
85+
fi
86+
87+
- name: Run chart-testing linter
88+
if: steps.list-changed.outputs.changed == 'true'
89+
run: ct lint --config ct.yaml
90+
91+
test:
92+
name: Test using chart-testing
93+
runs-on: ubuntu-latest
94+
needs: lint-ct
95+
# if: needs.lint-ct.outputs.changed == 'true'
96+
steps:
97+
- name: Checkout
98+
uses: actions/checkout@v3
99+
with:
100+
fetch-depth: 0
101+
102+
- name: Set up Helm
103+
uses: azure/[email protected]
104+
with:
105+
version: 3.13.2
106+
107+
- name: Set up chart-testing
108+
uses: helm/[email protected]
109+
110+
- uses: extractions/setup-just@v1
111+
- run: just helm-repo
112+
- name: Install kind cluster
113+
uses: helm/[email protected]
114+
with:
115+
install_only: true
116+
- name: Start kind cluster
117+
run: just start-kind
118+
119+
- name: Run helm chart tests
120+
run: ct install --config ct.yaml

charts/tembo-operator/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: cloudnative-pg
3+
repository: https://cloudnative-pg.github.io/charts
4+
version: 0.18.2
5+
digest: sha256:a2958964e5a652da7ad60263bb0a68e01481da5d642c779462aeaf9450bc208a
6+
generated: "2023-11-10T15:17:24.580704853-06:00"

charts/tembo-operator/Chart.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
apiVersion: v2
2-
name: coredb-operator
3-
description: Helm chart to deploy coredb operator
2+
name: tembo-operator
3+
description: 'Helm chart to deploy the tembo-operator'
44
type: application
5-
version: 0.1.1
6-
appVersion: "0.1.0"
5+
icon: https://cloud.tembo.io/images/TemboElephant.png
6+
version: 0.2.0
7+
home: https://tembo.io
8+
sources:
9+
- https://github.com/tembo-io/tembo-stacks
10+
- https://github.com/cloudnative-pg/cloudnative-pg
11+
keywords:
12+
- postgresql
13+
- postgres
14+
- database
15+
maintainers:
16+
- name: Tembo
17+
url: https://tembocommunity.slack.com
18+
dependencies:
19+
- name: cloudnative-pg
20+
version: 0.18.2
21+
repository: https://cloudnative-pg.github.io/charts

charts/tembo-operator/README.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# tembo-operator
2+
3+
![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)
4+
5+
Helm chart to deploy the tembo-operator
6+
7+
**Homepage:** <https://tembo.io>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| Tembo | | <https://tembocommunity.slack.com> |
14+
15+
## Source Code
16+
17+
* <https://github.com/tembo-io/tembo-stacks>
18+
* <https://github.com/cloudnative-pg/cloudnative-pg>
19+
20+
## Requirements
21+
22+
| Repository | Name | Version |
23+
|------------|------|---------|
24+
| https://cloudnative-pg.github.io/charts | cloudnative-pg | 0.18.2 |
25+
26+
## Values
27+
28+
| Key | Type | Default | Description |
29+
|-----|------|---------|-------------|
30+
| cloudnative-pg.config.create | bool | `true` | |
31+
| cloudnative-pg.config.data.INHERITED_ANNOTATIONS | string | `"tembo-pod-init.tembo.io/*, tembo.io/*"` | |
32+
| cloudnative-pg.monitoring.podMonitorEnabled | bool | `false` | |
33+
| cloudnative-pg.service.type | string | `"ClusterIP"` | |
34+
| controller.affinity | object | `{}` | |
35+
| controller.annotations | object | `{}` | |
36+
| controller.extraEnv[0].name | string | `"SOME_ENV_VAR"` | |
37+
| controller.extraEnv[0].value | string | `"some value"` | |
38+
| controller.image.pullPolicy | string | `"Always"` | |
39+
| controller.image.repository | string | `"quay.io/tembo/tembo-operator"` | |
40+
| controller.image.tag | string | `"latest"` | |
41+
| controller.livenessProbe | object | `{}` | |
42+
| controller.logLevel | string | `"info"` | |
43+
| controller.monitoring.podMonitor.enabled | bool | `false` | |
44+
| controller.monitoring.podMonitor.path | string | `"/metrics"` | |
45+
| controller.monitoring.podMonitor.port | string | `"http"` | |
46+
| controller.monitoring.prometheusRule.enabled | bool | `false` | |
47+
| controller.nameOverride | string | `nil` | |
48+
| controller.namespaceOverride | string | `nil` | |
49+
| controller.nodeSelector | object | `{}` | |
50+
| controller.podAnnotations | object | `{}` | |
51+
| controller.readinessProbe.httpGet.path | string | `"/health"` | |
52+
| controller.readinessProbe.httpGet.port | string | `"http"` | |
53+
| controller.readinessProbe.httpGet.scheme | string | `"HTTP"` | |
54+
| controller.readinessProbe.initialDelaySeconds | int | `5` | |
55+
| controller.readinessProbe.periodSeconds | int | `5` | |
56+
| controller.replicas | int | `1` | |
57+
| controller.resources.limits.cpu | string | `"1000m"` | |
58+
| controller.resources.limits.memory | string | `"256Mi"` | |
59+
| controller.resources.requests.cpu | string | `"250m"` | |
60+
| controller.resources.requests.memory | string | `"100Mi"` | |
61+
| controller.service.annotations | object | `{}` | |
62+
| controller.service.port | int | `80` | |
63+
| controller.service.targetPort | int | `8080` | |
64+
| controller.service.type | string | `"ClusterIP"` | |
65+
| controller.tolerations | list | `[]` | |
66+
| controller.upgradeStrategy | string | `"RollingUpdate"` | |
67+
| pod-init.affinity | object | `{}` | |
68+
| pod-init.annotations | object | `{}` | |
69+
| pod-init.extraEnv | object | `{}` | |
70+
| pod-init.image.pullPolicy | string | `"IfNotPresent"` | |
71+
| pod-init.image.repository | string | `"quay.io/tembo/tembo-pod-init"` | |
72+
| pod-init.image.tag | string | `"latest"` | |
73+
| pod-init.livenessProbe.httpGet.path | string | `"/health/liveness"` | |
74+
| pod-init.livenessProbe.httpGet.port | int | `8443` | |
75+
| pod-init.livenessProbe.httpGet.scheme | string | `"HTTPS"` | |
76+
| pod-init.livenessProbe.initialDelaySeconds | int | `15` | |
77+
| pod-init.logLevel | string | `"info"` | |
78+
| pod-init.nameOverride | string | `nil` | |
79+
| pod-init.namespaceOverride | string | `nil` | |
80+
| pod-init.nodeSelector | object | `{}` | |
81+
| pod-init.podAnnotations | object | `{}` | |
82+
| pod-init.readinessProbe.failureThreshold | int | `3` | |
83+
| pod-init.readinessProbe.httpGet.path | string | `"/health/readiness"` | |
84+
| pod-init.readinessProbe.httpGet.port | int | `8443` | |
85+
| pod-init.readinessProbe.httpGet.scheme | string | `"HTTPS"` | |
86+
| pod-init.readinessProbe.periodSeconds | int | `15` | |
87+
| pod-init.readinessProbe.timeoutSeconds | int | `15` | |
88+
| pod-init.replicas | int | `1` | |
89+
| pod-init.resources | object | `{}` | |
90+
| pod-init.service.annotations | object | `{}` | |
91+
| pod-init.service.port | int | `443` | |
92+
| pod-init.service.targetPort | int | `8443` | |
93+
| pod-init.service.type | string | `"ClusterIP"` | |
94+
| pod-init.tolerations | list | `[]` | |
95+
| pod-init.upgradeStrategy | string | `"RollingUpdate"` | |
96+
97+
----------------------------------------------
98+
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
108 KB
Binary file not shown.

0 commit comments

Comments
 (0)