Skip to content

Commit c4945e9

Browse files
authored
Ensure chart is properly tested (#17)
Fixes issue #16 with bad values in chart. Does not fix version bump checking as not supported by ct.
1 parent 07b0f9f commit c4945e9

File tree

8 files changed

+67
-36
lines changed

8 files changed

+67
-36
lines changed

.github/helm-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
HELM_DOCS_VERSION="1.11.0"
4+
HELM_DOCS_VERSION="1.11.3"
55

66
# install helm-docs
77
curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz

.github/workflows/ci.yaml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,42 @@ jobs:
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v1
13-
- name: Run chart-testing (lint)
14-
uses: helm/chart-testing-action@v2.1.0
13+
- name: Set up Helm
14+
uses: azure/setup-helm@v3
1515
with:
16-
command: lint
17-
config: .github/ct.yaml
16+
version: v3.13.2
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.10'
20+
check-latest: true
21+
- name: Setup chart-testing
22+
uses: helm/chart-testing-action@v2.6.1
23+
- name: Dependency install
24+
run: helm dependency update
25+
working-directory: helm/featurehub
26+
- name: Run basic lint
27+
run: helm lint
28+
working-directory: helm/featurehub
29+
- name: Run lint
30+
run: |
31+
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
32+
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
33+
ct lint --config ../../.github/ct.yaml --chart-dirs . --charts . --target-branch ${{ github.event.repository.default_branch }}
34+
working-directory: helm/featurehub
1835

1936
lint-docs:
2037
runs-on: ubuntu-latest
2138
needs: lint-chart
2239
steps:
2340
- name: Checkout
2441
uses: actions/checkout@v1
42+
- name: Set up Helm
43+
uses: azure/setup-helm@v3
44+
with:
45+
version: v3.13.2
46+
- name: Dependency install
47+
run: helm dependency update
48+
working-directory: helm/featurehub
2549
- name: Run helm-docs
2650
run: bash .github/helm-docs.sh
2751

helm/featurehub/Chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ apiVersion: v2
22
name: featurehub
33
description: FeatureHub Release
44
type: application
5-
version: 4.0.7
5+
version: 4.0.8
66
icon: https://raw.githubusercontent.com/featurehub-io/featurehub/main/docs/modules/ROOT/images/fh_icon.png
77
appVersion: "1.7.0"
8+
maintainers:
9+
- name: FeatureHub
10+
email: info@featurehub.io
811
dependencies:
912
- name: postgresql
1013
version: 12.1.13
@@ -14,4 +17,3 @@ dependencies:
1417
version: 0.19.6
1518
repository: https://nats-io.github.io/k8s/helm/charts/
1619
condition: nats.enabled
17-

helm/featurehub/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# featurehub
22

3-
![Version: 4.0.7](https://img.shields.io/badge/Version-4.0.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.7.0](https://img.shields.io/badge/AppVersion-1.7.0-informational?style=flat-square)
3+
![Version: 4.0.8](https://img.shields.io/badge/Version-4.0.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.7.0](https://img.shields.io/badge/AppVersion-1.7.0-informational?style=flat-square)
44

55
FeatureHub Release
66

7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| FeatureHub | <info@featurehub.io> | |
12+
713
## Requirements
814

915
| Repository | Name | Version |
@@ -140,4 +146,4 @@ FeatureHub Release
140146
| postgresql | object | `{"enabled":true,"global":{"postgresql":{"auth":{"postgresPassword":"postgresql"}}},"primary":{"initdb":{"scripts":{"featurehub.sql":"CREATE USER featurehub PASSWORD 'featurehub' LOGIN;\nCREATE DATABASE featurehub;\nGRANT ALL PRIVILEGES ON DATABASE featurehub TO featurehub;\n\\connect featurehub\nGRANT ALL ON SCHEMA public TO featurehub;"}},"persistence":{"accessModes":["ReadWriteOnce"],"enabled":true,"size":"128Mi","storageClassName":"standard"}}}` | ----------------------------------------------------------------------------- # |
141147

142148
----------------------------------------------
143-
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
149+
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)

helm/featurehub/templates/dacha/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ spec:
6060
- configMapRef:
6161
name: {{ include "featurehub.fullname" . }}-global-common-env
6262
{{- end }}
63-
{{- if Values.global.envFromSecret}}
63+
{{- if .Values.global.envFromSecret}}
6464
- secretRef:
65-
name: {{ Values.global.envFromSecret }}
65+
name: {{ .Values.global.envFromSecret }}
6666
{{- end }}
6767
{{- if .Values.dacha.environmentVars }}
6868
- configMapRef:

helm/featurehub/templates/edge/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ spec:
6060
- configMapRef:
6161
name: {{ include "featurehub.fullname" . }}-global-common-env
6262
{{- end }}
63-
{{- if Values.global.envFromSecret}}
63+
{{- if .Values.global.envFromSecret}}
6464
- secretRef:
65-
name: {{ Values.global.envFromSecret }}
65+
name: {{ .Values.global.envFromSecret }}
6666
{{- end }}
6767
{{- if .Values.edge.environmentVars }}
6868
- configMapRef:

helm/featurehub/templates/management-repository/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ spec:
6868
- configMapRef:
6969
name: {{ include "featurehub.fullname" . }}-global-common-env
7070
{{- end }}
71-
{{- if Values.global.envFromSecret}}
71+
{{- if .Values.global.envFromSecret}}
7272
- secretRef:
73-
name: {{ Values.global.envFromSecret }}
73+
name: {{ .Values.global.envFromSecret }}
7474
{{- end }}
7575
{{- if .Values.managementRepository.environmentVars }}
7676
- configMapRef:

helm/featurehub/values.yaml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ global:
4545

4646
# -- List of extra mounts to add to Management Repository Deployment
4747
extraVolumeMounts: []
48-
#- mountPath: /etc/app-config/secrets.properties
49-
# name: secrets-properties
50-
# subPath: secrets.properties
48+
# - mountPath: /etc/app-config/secrets.properties
49+
# name: secrets-properties
50+
# subPath: secrets.properties
5151

5252
# -- List of extra volumes to add to Management Repository Deployment
5353
extraVolumes: []
54-
#- name: secrets-properties
54+
# - name: secrets-properties
5555
# secret:
5656
# secretName: featurehub-management-repository-secrets-properties
5757
# items:
@@ -104,7 +104,7 @@ managementRepository:
104104
replicaCount: 1
105105

106106
strategy: {}
107-
#type: RollingUpdate
107+
# type: RollingUpdate
108108

109109
image:
110110
repository: featurehub/mr
@@ -189,7 +189,7 @@ managementRepository:
189189
# kubernetes.io/ingress.class: nginx
190190
# kubernetes.io/tls-acme: "true"
191191
hosts: []
192-
#- localhost
192+
# - localhost
193193
# paths:
194194
# - path: /mr-api
195195
# pathType: Prefix
@@ -240,7 +240,7 @@ managementRepository:
240240

241241
# -- List of extra containers to add to Management Repository Pod
242242
extraContainers: []
243-
#- name: do-something
243+
# - name: do-something
244244
# image: busybox
245245
# command: ['do', 'something']
246246

@@ -250,13 +250,13 @@ managementRepository:
250250
#
251251
# -- List of extra mounts to add to Management Repository Deployment
252252
extraVolumeMounts: []
253-
#- mountPath: /etc/app-config/secrets.properties
253+
# - mountPath: /etc/app-config/secrets.properties
254254
# name: secrets-properties
255255
# subPath: secrets.properties
256256

257257
# -- List of extra volumes to add to Management Repository Deployment
258258
extraVolumes: []
259-
#- name: secrets-properties
259+
# - name: secrets-properties
260260
# secret:
261261
# secretName: featurehub-management-repository-secrets-properties
262262
# items:
@@ -269,7 +269,7 @@ edge:
269269
replicaCount: 2
270270

271271
strategy: {}
272-
#type: RollingUpdate
272+
# type: RollingUpdate
273273

274274
image:
275275
repository: featurehub/edge
@@ -387,18 +387,18 @@ edge:
387387

388388
# -- List of extra containers to add to Edge Pod
389389
extraContainers: []
390-
#- name: do-something
390+
# - name: do-something
391391
# image: busybox
392392
# command: ['do', 'something']
393393

394394
# -- List of extra mounts to add to Edge Deployment
395395
extraVolumeMounts: []
396-
#- mountPath: /tmp/foobar
396+
# - mountPath: /tmp/foobar
397397
# name: foobar
398398

399399
# -- List of extra volumes to add to Edge Deployment
400400
extraVolumes: []
401-
#- name: foobar
401+
# - name: foobar
402402
# emptyDir: {}
403403

404404

@@ -408,7 +408,7 @@ dacha:
408408
replicaCount: 2
409409

410410
strategy: {}
411-
#type: RollingUpdate
411+
# type: RollingUpdate
412412

413413
image:
414414
repository: featurehub/dacha2
@@ -522,18 +522,18 @@ dacha:
522522

523523
# -- List of extra containers to add to Dacha Pod
524524
extraContainers: []
525-
#- name: do-something
525+
# - name: do-something
526526
# image: busybox
527527
# command: ['do', 'something']
528528

529529
# -- List of extra mounts to add to Dacha Deployment
530530
extraVolumeMounts: []
531-
#- mountPath: /tmp/foobar
531+
# - mountPath: /tmp/foobar
532532
# name: foobar
533533

534534
# -- List of extra volumes to add to Dacha Deployment
535535
extraVolumes: []
536-
#- name: foobar
536+
# - name: foobar
537537
# emptyDir: {}
538538

539539
# ------------------------------------------------------------------------------- #
@@ -547,9 +547,9 @@ nats:
547547
name: featurehub
548548
replicas: 3
549549
topologyKeys: []
550-
#- "kubernetes.io/hostname"
551-
#- "topology.kubernetes.io/zone"
552-
#- "topology.kubernetes.io/region"
550+
# - "kubernetes.io/hostname"
551+
# - "topology.kubernetes.io/zone"
552+
# - "topology.kubernetes.io/region"
553553

554554
# ------------------------------------------------------------------------------- #
555555
# PostgreSQL Helm Chart from Bitnami:
@@ -581,4 +581,3 @@ postgresql:
581581
GRANT ALL PRIVILEGES ON DATABASE featurehub TO featurehub;
582582
\connect featurehub
583583
GRANT ALL ON SCHEMA public TO featurehub;
584-

0 commit comments

Comments
 (0)