Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement CI for helm chart #15

Merged
merged 11 commits into from
Mar 17, 2021
37 changes: 37 additions & 0 deletions .github/ct_chart_schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: str()
home: str(required=False)
version: str()
type: str(required=False)
apiVersion: str()
appVersion: any(str(), num())
description: str()
keywords: list(str(), required=False)
sources: list(str(), required=False)
maintainers: list(include('maintainer'), required=False)
icon: str(required=False)
engine: str(required=False)
condition: str(required=False)
tags: str(required=False)
deprecated: bool(required=False)
kubeVersion: str(required=False)
annotations: map(str(), str(), required=False)
dependencies: list(include('dependency'), required=False)
---
maintainer:
name: str(required=False)
email: str(required=False)
url: str(required=False)
---
dependency:
name: str()
version: str()
repository: str(required=False)
condition: str(required=False)
tags: list(str(), required=False)
enabled: bool(required=False)
import-values: any(list(str()), list(include('import-value')), required=False)
alias: str(required=False)
---
import-value:
child: str()
parent: str()
42 changes: 42 additions & 0 deletions .github/ct_lintconf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
colons:
max-spaces-before: 0
max-spaces-after: 1
commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
require-starting-space: true
min-spaces-from-content: 1
document-end: disable
document-start: disable # No --- to start a file
empty-lines:
max: 2
max-start: 0
max-end: 1
hyphens:
max-spaces-after: 1
indentation:
spaces: consistent
indent-sequences: whatever # - list indentation will handle both indentation and without
check-multi-line-strings: false
key-duplicates: enable
line-length: disable # Lines can be any length
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: enable
truthy:
level: warning
32 changes: 32 additions & 0 deletions .github/workflows/helm-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint helm chart

on:
push:
# run pipeline on push on master
branches:
- main
- development
paths:
- "charts/**"
pull_request:
paths:
- "charts/**"

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"

- name: chart-testing (ct lint)
uses: helm/chart-testing-action@v2.0.1

- name: Run Helm Chart lint
run: |
ct lint --lint-conf=.github/ct_lintconf.yaml \
--chart-yaml-schema=.github/ct_chart_schema.yaml \
--target-branch=main --validate-maintainers=false \
--chart-dirs charts
9 changes: 9 additions & 0 deletions charts/policy-reporter/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: monitoring
repository: ""
version: 0.3.0
- name: policy-reporter-ui
repository: ""
version: 0.3.1
digest: sha256:e97dcecd7cb9a7270e6a644513aebc689fd4ddd01f373af066e53183b7607baf
generated: "2021-03-17T01:40:03.488467+02:00"
6 changes: 5 additions & 1 deletion charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord

type: application
version: 0.17.0
version: 0.17.1
appVersion: 0.12.0

dependencies:
- name: monitoring
condition: monitoring.enabled
repository: ""
version: "0.3.0"
- name: policy-reporter-ui
condition: ui.enabled
repository: ""
version: "0.3.1"