Skip to content

Commit 3e0cf63

Browse files
ArmaanTJamieMagee
andauthored
Add redis subchart (#114)
Co-authored-by: Jamie Magee <JamieMagee@users.noreply.github.com>
1 parent 173c36a commit 3e0cf63

11 files changed

Lines changed: 94 additions & 0 deletions

File tree

.github/ct.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
helm-extra-args: --timeout 600s
22
check-version-increment: false
33
debug: true
4+
chart-repos: bitnami=https://charts.bitnami.com/bitnami

.github/kubeval.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ SCHEMA_LOCATION="https://raw.githubusercontent.com/instrumenta/kubernetes-json-s
1212
curl --silent --show-error --fail --location --output /tmp/kubeval.tar.gz https://github.com/instrumenta/kubeval/releases/download/"${KUBEVAL_VERSION}"/kubeval-linux-amd64.tar.gz
1313
tar -xf /tmp/kubeval.tar.gz kubeval
1414

15+
# add helm repos
16+
helm repo add bitnami https://charts.bitnami.com/bitnami
17+
1518
# validate charts
1619
for CHART_DIR in ${CHART_DIRS}; do
20+
(cd charts/${CHART_DIR}; helm dependency build)
1721
helm template --values charts/"${CHART_DIR}"/ci/ci-values.yaml charts/"${CHART_DIR}" | ./kubeval --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}"
1822
done

.github/workflows/release.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ jobs:
2626
with:
2727
version: 3.4.0 #renovate: datasource=github-releases depName=helm/helm
2828

29+
- name: Add external Helm repos
30+
run: helm repo add bitnami https://charts.bitnami.com/bitnami
31+
32+
- name: Build chart dependencies
33+
run: |
34+
for dir in charts/*/
35+
do
36+
(cd ${dir}; helm dependency build)
37+
done
38+
2939
- name: Run chart-releaser
3040
uses: helm/chart-releaser-action@v1.2.0
3141
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
charts/*/charts

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,13 @@ helm install --generate-name --set renovate.config='\{\"token\":\"...\"\}' renov
2929
```
3030

3131
**NOTE**: `renovate.config` must be a valid Renovate [self-hosted configuration](https://docs.renovatebot.com/self-hosted-configuration/)
32+
33+
## Contributing
34+
35+
When using this repo locally or contributing to this repo, you will need to build the dependencies used for each helm chart. You can run the following commands to do so:
36+
37+
```bash
38+
helm repo add bitnami https://charts.bitnami.com/bitnami
39+
cd charts/renovate
40+
helm dependency build
41+
```

charts/renovate/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: redis
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 12.8.3
5+
digest: sha256:e32b2c967bf376dc7e4b8d208818564a4c964f83bb039410c5c4835fbd6ea36f
6+
generated: "2021-03-18T10:13:46.296447946-04:00"

charts/renovate/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ annotations:
2929
artifacthub.io/links: |
3030
- name: docs
3131
url: https://docs.renovatebot.com
32+
dependencies:
33+
- name: redis
34+
repository: https://charts.bitnami.com/bitnami
35+
version: 12.8.3
36+
condition: redis.enabled

charts/renovate/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ The following table lists the configurable parameters of the chart and the defau
5555
| imagePullSecrets | object | `{}` | |
5656
| pod.annotations | object | `{}` | |
5757
| pod.labels | object | `{}` | |
58+
| redis.cluster.enabled | bool | `false` | |
59+
| redis.enabled | bool | `false` | |
60+
| redis.nameOverride | string | `"redis"` | |
61+
| redis.usePassword | bool | `false` | |
5862
| renovate.config | string | `""` | |
5963
| resources | object | `{}` | |
6064
| secrets | object | `{}` | |
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
imagePullSecrets:
2+
- name: myregistrykey
3+
envFrom:
4+
- configMapRef:
5+
name: my-config
6+
secrets:
7+
my-secret-1: |
8+
123
9+
my-secret-2: |
10+
456
11+
ssh_config:
12+
enabled: true
13+
config: |
14+
Host *
15+
ForwardAgent yes
16+
renovate:
17+
config: |
18+
{
19+
"platform": "gitlab",
20+
"endpoint": "https://gitlab.example.com/api/v4",
21+
"token": "your-gitlab-renovate-user-token",
22+
"autodiscover": "false",
23+
"dryRun": true,
24+
"printConfig": true,
25+
"logLevel": "debug",
26+
"repositories": ["username/repo", "orgname/repo"]
27+
}
28+
29+
redis:
30+
enabled: true

charts/renovate/templates/cronjob.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ spec:
5656
readOnly: true
5757
{{- end }}
5858
{{- if or .Values.secrets .Values.existingSecret .Values.envFrom }}
59+
{{- if .Values.redis.enabled }}
60+
env:
61+
- name: RENOVATE_REDIS_URL
62+
value: redis://{{ template "redis.fullname" (set (deepCopy .) "Values" .Values.redis) }}-master
63+
{{- end }}
5964
envFrom:
6065
{{- if or .Values.secrets .Values.existingSecret }}
6166
- secretRef:

0 commit comments

Comments
 (0)