Skip to content

Commit c7f6423

Browse files
Release 0.1.0 (#9)
Release 0.1.0
1 parent 95a66ca commit c7f6423

File tree

264 files changed

+10148
-2747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+10148
-2747
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
# Reference: https://github.com/helm/chart-testing-action
33
#
44
name: Linting and Testing
5-
on: pull_request
5+
on:
6+
pull_request:
7+
branches:
8+
- main
69
jobs:
7-
chart-test:
10+
chart-test:
811
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
helm-version: [ 'v3.5.4', 'v3.6.3', 'v3.7.1', 'v3.8.2', 'latest' ]
915
steps:
1016
- name: Checkout
1117
uses: actions/checkout@v2
@@ -14,6 +20,8 @@ jobs:
1420

1521
- name: Set up Helm
1622
uses: azure/setup-helm@v1
23+
with:
24+
version: '${{ matrix.helm-version }}'
1725

1826
- uses: actions/setup-python@v2
1927
with:

.github/workflows/release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
jobs:
88
release:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
1012
steps:
1113
- name: Checkout
1214
uses: actions/checkout@v2
@@ -32,6 +34,7 @@ jobs:
3234
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
3335

3436
deploy:
37+
needs: release
3538
runs-on: ubuntu-20.04
3639
concurrency:
3740
group: ${{ github.workflow }}-${{ github.ref }}

CONTRIBUTING.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Contributing Guidelines
2+
3+
We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
4+
5+
# How to Contribute
6+
7+
With these steps you can make a contribution:
8+
9+
1. Fork this repository, develop and test your changes on that fork.
10+
2. All commits have a meaningful description and are signed off as described above.
11+
3. Submit a pull request from your fork to this project.
12+
13+
## Code reviews
14+
15+
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. See the above stated requirements for PR on this project.
16+
17+
## Technical Requirements
18+
19+
Your PR has to fulfill the following points, to be considered:
20+
21+
* All Workflows must pass
22+
* DCO Check must pass
23+
* The title of the PR starts with the chart name (e.g. `[chart_name]: Additional options for SecurityContext`)
24+
* Changes must follow [Helm best practices](https://helm.sh/docs/chart_best_practices/).
25+
* Changes to a chart require a version bump for that chart following [semver standard](https://semver.org/).
26+
* New/Changed Configurations for the chart are documented in it's `README.md.gotmpl` file.
27+
28+
# Chart Requirements
29+
30+
There are certain requirements charts have to match, to be maintained in your Helm Repository. Most of the requirements are relevant when you are planning to add a new chart to the repository.
31+
32+
## Documentation
33+
34+
The documentation for each chart is done with [helm-docs](https://github.com/norwoodj/helm-docs). This way we can ensure that values are consistent with the chart documentation:
35+
36+
```
37+
make helm-docs
38+
```
39+
### Upgrades
40+
41+
If your chart requires manual interaction for version upgrades (might be the case for major upgrades) you need to mention the exact instructions in a dedicated documentation part of your chart. That's not the case for upgrades, where no specific interaction is required.
42+
43+
## Dependencies
44+
45+
Dependency versions should be set to a fixed version. We allow version fixing over all bugfix versions (eg. `~1.0.0`), since bugfix releases should not have big impact.
46+
47+
```
48+
dependencies:
49+
- name: "apache"
50+
version: "~1.3.0"
51+
repository: "https://charts.bitnami.com/bitnami"
52+
```
53+
54+
There might be cases where this rule can not be applied, we are open to discuss that.
55+
56+
57+
## ArtifactHub Annotations
58+
59+
Since we release our charts on [Artifacthub](https://artifacthub.io/) we encourage making use of the provided chart annotations for Artifacthub.
60+
61+
* [All Artifacthub Annotations](https://github.com/artifacthub/hub/blob/master/docs/helm_annotations.md)
62+
63+
In some cases they might not be required.
64+
65+
### Changelog
66+
67+
Changes on a chart must be documented in a chart specific changelog. For every new release the entire ```artifacthub.io/changes``` needs to be rewritten. Each change requires a new bullet point following the pattern `- "[{type}]: {description}"`. Please use the following template:
68+
69+
70+
```
71+
artifacthub.io/changes: |
72+
- "[Added]: Something New was added"
73+
- "[Changed]: Changed Something within this chart"
74+
- "[Changed]: Changed Something else within this chart"
75+
- "[Deprecated]: Something deprecated"
76+
- "[Removed]: Something was removed"
77+
- "[Fixed]: Something was fixed"
78+
- "[Security]": Some Security Patch was included"
79+
```

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Helm
2+
SRC_ROOT = $(shell git rev-parse --show-toplevel)
3+
4+
helm-docs: HELMDOCS_VERSION := v1.11.0
5+
helm-docs: docker
6+
@docker run -v "$(SRC_ROOT):/helm-docs" jnorwood/helm-docs:$(HELMDOCS_VERSION) --chart-search-root /helm-docs
7+
8+
lint: docker
9+
@docker run -v "$(SRC_ROOT):/workdir" --entrypoint /bin/sh quay.io/helmpack/chart-testing:v3.3.1 -c cd /workdir && ct lint --config ./charts/ct.yaml --lint-conf ./charts/lint.yaml --all --debug
10+
@docker run -v "$(SRC_ROOT):/workdir" --entrypoint /bin/sh quay.io/helmpack/chart-testing:v3.3.1 -c cd /workdir && ct lint --config ./examples/ct.yaml --all --debug
11+
12+
unit-test: docker
13+
14+
docker:
15+
@hash docker 2>/dev/null || {\
16+
echo "You need docker" &&\
17+
exit 1;\
18+
}

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
# helmize
2-
Helmize Documentation Repository
1+
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/helmize)](https://artifacthub.io/packages/search?repo=helmize)
2+
3+
<img src="hugo/icon/icon.png"
4+
alt="Markdown Monster icon"
5+
style="float: right; width:200px;margin-right: 10px;" />
6+
7+
# Helmize
8+
9+
Helmize is just a simple chart library which simplifies creating complex infrastructure deployments within helm charts. It's a powerful extension for which integrates into existing GitOps Toolskits. It's just a helm library..
10+
11+
## Documentation
12+
13+
The entire documentation can be found here:
14+
15+
* [helmize.dev](https://helmize.dev)
16+
17+
## Contributing
18+
19+
We'd love to have you contribute! Please refer to our [contribution guidelines](CONTRIBUTING.md) for details.

charts/helmize/Chart.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
apiVersion: v2
22
name: helmize
3-
description: Go Sprig based deployment engine deployed via Helm
3+
description: Go Sprig based deployment engine (GitOps Tool)
44
type: library
5-
version: "0.1.0-rc.4"
5+
version: "0.1.0"
66
appVersion: "0.1.0"
77
home: https://helmize.dev
8-
icon: https://raw.githubusercontent.com/buttahtoast/helmize/main/icon.png
8+
icon: https://raw.githubusercontent.com/buttahtoast/helmize/main/hugo/icon/icon.png
99
dependencies:
1010
- name: library
11-
version: "2.2.3"
11+
version: "3.0.0-rc.3"
1212
repository: https://buttahtoast.github.io/helm-charts/
1313
keywords:
1414
- library
@@ -18,4 +18,4 @@ maintainers:
1818
- name: oliverbaehler
1919
2020
annotations:
21-
artifacthub.io/prerelease: "true"
21+
artifacthub.io/prerelease: "false"

charts/helmize/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Helmize
22

3-
![Version: 0.1.0-rc.1](https://img.shields.io/badge/Version-0.1.0--rc.1-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
44

55
Helmize is a simple deployment library wrapped in a library helm chart. It's purpose is to simplify complex infrastructure deployments where you change deployed manifests based on given conditions. This project is thought for people that bootstrap complex infrastructure setup on kubernetes and want to simplify their file structure.
66

7-
**NOTE**: This project is in it's early stages of development. The code might be subject to change. However we are trying not to change the entire structure or config. Feel free to test it out, we need user feedback. :) Using it in production is your choice and your responsability.
8-
97
Read the entire documentation on the homepage.
108

11-
**Homepage:** <https://buttahtoast.github.io/helmize/>
9+
**Homepage:** <https://helmize.dev>
1210

1311
## Maintainers
1412

1513
| Name | Email | Url |
1614
| ---- | ------ | --- |
17-
| oliverbaehler | [email protected] | |
15+
| oliverbaehler | <[email protected]> | |

charts/helmize/README.md.gotmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
Helmize is a simple deployment library wrapped in a library helm chart. It's purpose is to simplify complex infrastructure deployments where you change deployed manifests based on given conditions. This project is thought for people that bootstrap complex infrastructure setup on kubernetes and want to simplify their file structure.
77

8-
**NOTE**: This project is in it's early stages of development. The code might be subject to change. However we are trying not to change the entire structure or config. Feel free to test it out, we need user feedback. :) Using it in production is your choice and your responsability.
9-
108
Read the entire documentation on the homepage.
119

1210
{{ template "chart.homepageLine" . }}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{{/* Deploy <Template>
2+
3+
Returns deployable kubernetes manifests. If any errors are found the template errrors
4+
5+
*/}}
6+
{{- define "helmize.deploy" -}}
7+
8+
{{/* Print Helmize Configuration */}}
9+
{{- if ((fromYaml (include "lib.utils.dicts.get" (dict "data" $.Values "path" (include "helmize.render.defaults.show_config" $)))).res) -}}
10+
{{- toYaml (dict "config" (fromYaml (include "helmize.config.func.get" $))) | nindent 0 }}
11+
12+
{{/* Resolve Train */}}
13+
{{- else -}}
14+
15+
{{/* Summary Output (Dedicated Call, Since SUmmary also resolves and serves as standalone template) */}}
16+
{{- if ((fromYaml (include "lib.utils.dicts.get" (dict "data" $.Values "path" (include "helmize.render.defaults.summary_value" $)))).res) -}}
17+
{{- include "helmize.render.func.summary" $ -}}
18+
19+
{{- else -}}
20+
{{/* Resolve */}}
21+
{{- $train_raw := include "helmize.render.func.resolve" $ -}}
22+
{{- $train := fromYaml ($train_raw) -}}
23+
24+
{{/* Check for YAML errors */}}
25+
{{- if (not (include "lib.utils.errors.unmarshalingError" $train)) -}}
26+
27+
{{/* Get Force Option */}}
28+
{{- $force := ((fromYaml (include "helmize.config.func.resolve" (dict "path" (include "helmize.config.defaults.force" $) "ctx" $))).res) -}}
29+
30+
{{/* Check if Errors were found (Or Force enabled) */}}
31+
{{- if or (not $train.errors) (and ($train.errors) ($force)) -}}
32+
33+
{{/* Benchmark Output */}}
34+
{{- if ((fromYaml (include "lib.utils.dicts.get" (dict "data" $.Values "path" (include "helmize.render.defaults.benchmark_value" $)))).res ) -}}
35+
{{- include "lib.utils.errors.fail" (printf "Exectuion Benchmarks:\n%s" (toYaml $train.timestamps | nindent 2)) -}}
36+
37+
{{/* Render */}}
38+
{{- else -}}
39+
{{- include ((fromYaml (include "helmize.config.func.resolve" (dict "path" (include "helmize.config.defaults.render_template" $) "ctx" $))).res) (dict "ctx" $ "train" $train) -}}
40+
{{- end -}}
41+
42+
{{- else -}}
43+
{{- include "lib.utils.errors.fail" (printf "Found errors, please resolve those errors or use the force option (--set helmize.force=true):\n%s" (toYaml $train.errors | nindent 2)) -}}
44+
{{- end -}}
45+
{{- else -}}
46+
{{- include "lib.utils.errors.fail" (printf "Render did not return valid YAML:\n%s" ($train_raw | nindent 2)) -}}
47+
{{- end -}}
48+
{{- end -}}
49+
{{- end -}}
50+
{{- end -}}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- define "helmize.helpers.ts" -}}
2+
{{- $_ := set $.ctx "timestamps" (append $.ctx.timestamps (dict "point" $.msg "time" now)) -}}
3+
{{- end -}}
4+
5+
{{- define "helmize.helpers.trailingPath" -}}
6+
{{- printf "%s" ($ | trimPrefix "/" | trimPrefix "./" | trimSuffix "/") -}}
7+
{{- end -}}

0 commit comments

Comments
 (0)