Skip to content

Commit

Permalink
Merge pull request #18 from oliverbaehler/master
Browse files Browse the repository at this point in the history
[housekeeping] Bugfixes & Documentation
  • Loading branch information
oliverbaehler authored Jan 11, 2021
2 parents 982d1b8 + 1f81f0f commit 7c5b804
Show file tree
Hide file tree
Showing 23 changed files with 229 additions and 276 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Helm Documentation
on: push
jobs:
documentation:
runs-on: ubuntu-latest
container:
image: alpine
steps:
- name: Install Dependencies
run: |
apk add jq git curl
- name: Checkout
uses: actions/checkout@v2

- name: Fetch history
run: git fetch --prune --unshallow

- name: Install Helm Docs
run: |
curl -s -L -o /usr/local/bin/helm-docs.tar.gz "https://github.com/norwoodj/helm-docs/releases/download/$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name)/helm-docs_$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name | cut -d "v" -f2-)_Linux_x86_64.tar.gz"
cd /usr/local/bin/ && tar xfv helm-docs.tar.gz
chmod +x ./helm-docs
- name: Update Documentation
run: |
git status
CHARTS_ROOT="./charts"
if [ -d "${CHARTS_ROOT}" ]; then
## Generate Documentation
helm-docs
## Push Changes
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add -A
git commit -sam "Update Documentation" || true
git push || true
else
echo -e "\n\e[33m-- Root Direcoty not found: $CHART_ROOT\e[0m" && exit 0;
fi
39 changes: 0 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,8 @@ on:
branches:
- master
jobs:
documentation:
runs-on: ubuntu-latest
container:
image: alpine
steps:
- name: Install Dependencies
run: |
apk add jq git curl
- name: Checkout
uses: actions/checkout@v2

- name: Fetch history
run: git fetch --prune --unshallow

- name: Install Helm Docs
run: |
curl -s -L -o /usr/local/bin/helm-docs.tar.gz "https://github.com/norwoodj/helm-docs/releases/download/$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name)/helm-docs_$(curl --silent "https://api.github.com/repos/norwoodj/helm-docs/releases/latest" | jq -r .tag_name | cut -d "v" -f2-)_Linux_x86_64.tar.gz"
cd /usr/local/bin/ && tar xfv helm-docs.tar.gz
chmod +x ./helm-docs
- name: Update Documentation
run: |
git status
CHARTS_ROOT="./charts"
if [ -d "${CHARTS_ROOT}" ]; then
## Generate Documentation
helm-docs
## Push Changes
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add -A
git commit -sam "Update Documentation" || true
git push || true
else
echo -e "\n\e[33m-- Root Direcoty not found: $CHART_ROOT\e[0m" && exit 0;
fi
release:
runs-on: ubuntu-latest
needs:
- documentation
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ Sessionx.vim
.idea/
.intellij/
*.iml

# Custom Files
charts/manifests/plugin/values-generator/charts/
charts/manifests/plugin/values-generator/Chart.lock
25 changes: 4 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See git help commit:
With these steps you can make a contribution:

1. Fork this repository, develop and test your changes on that fork.
2. All commits have a meaningful description and are signed off as described above and also verified.
2. All commits have a meaningful description, are signed off as described above and verified.
3. Submit a pull request from your fork to this project.

## Code reviews
Expand All @@ -42,6 +42,7 @@ All submissions, including submissions by project members, require review. We us

To have consistent README documentations for each chart we use the [helm-docs plugin](https://github.com/norwoodj/helm-docs). Make sure to write the chart README in a compatible format. Helm-Docs is executed on Push events.

**NOTE**: When creating your own `README.md.gotmpl`, don't forget to add it to your `.helmignore` file.

## Release Action

Expand All @@ -59,6 +60,8 @@ Unit Tests can be created on a chart basis. Unit Tests are optional.

Your PR has to fulfill the following points, to be considered:

* Chart should use [Bedag Manifests Library](./charts/manifests/README.md), if possible
* Make use of [Artifacthub Annotations](https://github.com/artifacthub/hub/blob/master/docs/helm_annotations.md)
* CI Jobs for linting must pass.
* The title of the PR starts with the chart name (e.g. `[chart_name] Additional options for SecurityContext`)
* Changes must follow [Helm best practices](https://helm.sh/docs/chart_best_practices/).
Expand All @@ -85,23 +88,3 @@ Currently these are the only requirements to add a new chart:
* **Only Helm Version 3+ Charts ([ApiVersion 2](https://helm.sh/docs/topics/v2_v3_migration/)) are accepted/supported.**
* The chart has it's on `README.md` describing it's configuration options with default values. The documentation should also cover some basic configuration examples.
* Follow a best practice structure for the layout of the chart directory (A good reference is [bitnami's blog](https://docs.bitnami.com/tutorials/production-ready-charts/) on this topic)

## Recommendations

We have some recommendations for creating a new chart.

### Chart Schema

A [Chart Schema](https://helm.sh/docs/topics/charts#schema-files) helps improving the value validations of the given chart values. But it's also used in solutions, where you can deploy charts over a gui. For example [Rancher](https://rancher.com/products/rancher/) uses the Chart Schema to render a user friendly page, where you can change the chart values. To get a good first layout of your values you might want to use [this Helm Plugin](https://github.com/karuppiah7890/helm-schema-gen). It automatically creates the schema file according to your values file.

Install the Plugin

```
helm plugin install https://github.com/karuppiah7890/helm-schema-gen
```

Generate Schema file

```
helm schema-gen values.yaml
```
1 change: 0 additions & 1 deletion charts/manifests/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@

# Custom
README.md.gotmpl
plugin/
2 changes: 1 addition & 1 deletion charts/manifests/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: manifests
description: "Bedag's Manifest chart. Library full of basic kubernetes manifests."
type: library
version: 0.4.0
version: 0.4.1
icon: "https://www.bedag.ch/wGlobal/wGlobal/layout/images/logo.svg"
keywords:
- Bedag
Expand Down
14 changes: 9 additions & 5 deletions charts/manifests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Manifests Library

![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)

This library's purpose is to have more flexibility as chart author but at the same time have kubernetes manifests managed in a central library. This way you can avoid big surprises when Kubernetes has breaking changes in any of their APIs. Currently we support a base set of resources. Resources may be added as soon as we see or get a request that there's a need for it. This chart is still under development and testing, since it's rather complex. Feel free to use it. Our goal is to get it as reliable as possible.

Expand Down Expand Up @@ -39,6 +39,12 @@ Major Changes to functions are documented with the version affected. **Before up
| :----------- | :---------------- | :--------------------- | :-------------- |
|||||

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://buttahtoast.github.io/helm-charts/ | library | ~0.3.0 |

# Documentation

For Artifacthub Users: The entire documentation can be found in the GitHub Repository.
Expand All @@ -53,8 +59,6 @@ We recommend looking thirst through the **Kubernetes Manifests** section.
* **[Values](./templates/values/README.md)**
* **[Utilities](./templates/utils/README.md)**

## Requirements
## Quickstart

| Repository | Name | Version |
|------------|------|---------|
| https://buttahtoast.github.io/helm-charts/ | library | ~0.3.0 |
[See this page for a quickstart](./templates/Quickstart.md)
21 changes: 13 additions & 8 deletions charts/manifests/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ Major Changes to functions are documented with the version affected. **Before up
|||||


{{/*
Chart Sources
*/}}
{{ template "chart.sourcesSection" . }}

{{/*
Chart Requirements
*/}}
{{ template "chart.requirementsSection" . }}


# Documentation

For Artifacthub Users: The entire documentation can be found in the GitHub Repository.
Expand All @@ -55,12 +66,6 @@ We recommend looking thirst through the **Kubernetes Manifests** section.
* **[Values](./templates/values/README.md)**
* **[Utilities](./templates/utils/README.md)**

{{/*
Chart Sources
*/}}
{{ template "chart.sourcesSection" . }}
## Quickstart

{{/*
Chart Requirements
*/}}
{{ template "chart.requirementsSection" . }}
[See this page for a quickstart](./templates/Quickstart.md)
30 changes: 0 additions & 30 deletions charts/manifests/plugin/README.md

This file was deleted.

70 changes: 0 additions & 70 deletions charts/manifests/plugin/generator.sh

This file was deleted.

6 changes: 0 additions & 6 deletions charts/manifests/plugin/plugin.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions charts/manifests/plugin/values-generator/.helmignore

This file was deleted.

10 changes: 0 additions & 10 deletions charts/manifests/plugin/values-generator/Chart.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions charts/manifests/plugin/values-generator/README.md

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7c5b804

Please sign in to comment.