Skip to content

Commit

Permalink
Readme (#36)
Browse files Browse the repository at this point in the history
* feat: rework chart readme generation (#35)

Signed-off-by: Engin Diri <[email protected]>
  • Loading branch information
Engin Diri authored Jan 31, 2022
1 parent be297b0 commit 4dcdd9d
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 53 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ossf-scorecard-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
contents: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@14dc64f30986eaa2ad2dddcec073f5aab18e5a24
with:
egress-policy: audit
- name: "Checkout code"
uses: actions/checkout@230611dbd0eb52da1e1f4f7bc8bb0c3a339fc8b7
with:
Expand Down
36 changes: 12 additions & 24 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
paths:
- "charts/**"

env:
HELM_DOCS_VERSION: "1.7.0"

permissions: read-all

jobs:
Expand All @@ -27,31 +30,16 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Get Chart Version
id: lookUpChartVersion
uses: mikefarah/yq@915e9de437b645435e004ef13c5dc347f855658d # v4.16.2
with:
cmd: yq e '.version' charts/node-red/Chart.yaml

- name: replace placeholder for chart version
uses: jacobtomlinson/gha-find-replace@f485fdc3f67a6d87ae6e3d11e41f648c26d7aee3 # v2
with:
find: "chart_version"
replace: ${{ steps.lookUpChartVersion.outputs.result }}
include: "**README.md"

- name: Get App Version
id: lookUpAppVersion
uses: mikefarah/yq@915e9de437b645435e004ef13c5dc347f855658d # v4.16.2
with:
cmd: yq e '.appVersion' charts/node-red/Chart.yaml
- name: install helm-docs
run: |
cd /tmp
wget https://github.com/norwoodj/helm-docs/releases/download/v${{env.HELM_DOCS_VERSION}}/helm-docs_${{env.HELM_DOCS_VERSION}}_Linux_x86_64.tar.gz
tar -xvf helm-docs_${{env.HELM_DOCS_VERSION}}_Linux_x86_64.tar.gz
sudo mv helm-docs /usr/local/sbin
- name: replace placeholder for a version
uses: jacobtomlinson/gha-find-replace@f485fdc3f67a6d87ae6e3d11e41f648c26d7aee3 # v2
with:
find: "app_version"
replace: ${{ steps.lookUpAppVersion.outputs.result }}
include: "**README.md"
- name: run helm-docs
run: |
helm-docs -t README.md.gotmpl -o README.md
- name: Run chart-releaser
uses: helm/chart-releaser-action@1fa3377857fddeb03de4cc76dbedca289f227ed3
Expand Down
6 changes: 4 additions & 2 deletions charts/node-red/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ icon: https://nodered.org/about/resources/media/node-red-icon-2.png

type: application

version: 0.3.3
appVersion: "2.1.4"
version: 0.4.0
appVersion: 2.2.0

keywords:
- node-red
Expand All @@ -26,6 +26,8 @@ maintainers:
annotations:
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/changes: |
- Upgrade node-red image to 2.2.0
- Autgenerate readme
- Added initcontainer to deployment
- Updated node-red image to 2.1.4
- Updated node-red image to 2.1.3
Expand Down
47 changes: 24 additions & 23 deletions charts/node-red/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# node-red ⚙

![Version: chart_version](https://img.shields.io/badge/Version-chart_version-informational?style=flat-square)
![AppVersion: app_version](https://img.shields.io/badge/AppVersion-app_version-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
[![Linting and Testing](https://github.com/dirien/node-red-chart/actions/workflows/lint-and-test.yml/badge.svg)](https://github.com/dirien/node-red-chart/actions/workflows/lint-and-test.yml)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/node-red)](https://artifacthub.io/packages/search?repo=node-red)
[![SIT](https://img.shields.io/badge/SIT-awesome-blueviolet.svg)](https://jobs.schwarz)
![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=for-the-badge)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge)
![AppVersion: 2.2.0](https://img.shields.io/badge/AppVersion-2.2.0-informational?style=for-the-badge)

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/node-red&style=for-the-badge)](https://artifacthub.io/packages/search?repo=node-red)
[![SIT](https://img.shields.io/badge/SIT-awesome-blueviolet.svg?style=for-the-badge)](https://jobs.schwarz)

<img src="https://nodered.org/about/resources/media/node-red-icon-2.png" width="80" height="80">

A Helm chart for Node-Red, a low-code programming for event-driven applications
## Description

**Homepage:** <https://nodered.org/>
A Helm chart for Node-Red, a low-code programming for event-driven applications

## Usage
Adding node-red repository
Expand All @@ -23,7 +22,7 @@ helm repo add node-red https://schwarzit.github.io/node-red-chart/
helm repo update
```

## Installing the Chart
### Installing the Chart
To install the chart with the release name node-red run:

```bash
Expand All @@ -35,13 +34,13 @@ After a few seconds, node-red should be running.
To install the chart in a specific namespace use following commands:

```bash
kubectl create ns node-red
kubectl create ns node-red
helm install node-red node-red/node-red --namespace node-red
```

> **Tip**: List all releases using `helm list`, a release is a name used to track a specific deployment
## Uninstalling the Chart
### Uninstalling the Chart

To uninstall the `node-red` deployment:

Expand All @@ -66,18 +65,16 @@ The command removes all the Kubernetes components associated with the chart and
| ingress.annotations | object | `{}` | Additional ingress annotations |
| ingress.className | string | `""` | Defines which ingress controller will implement the resource |
| ingress.enabled | bool | `false` | Enable an ingress resource for the server |
| ingress.hosts[0].host | string | `"chart-example.local"` | Ingress accepted hostnames |
| ingress.hosts[0].paths[0].path | string | `"/"` | The base path |
| ingress.hosts[0] | object | `{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}` | Ingress accepted hostnames |
| ingress.hosts[0].paths[0] | object | `{"path":"/","pathType":"ImplementationSpecific"}` | The base path |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | Ingress type of path |
| ingress.tls | list | `[]` | Ingress TLS configuration |
| nameOverride | string | `"node-red"` | Provide a name in place of node-red |
| nameOverride | string | `""` | Provide a name in place of node-red |
| nodeSelector | object | `{}` | Node selector |
| npmrc.enabled | bool | `false` | Enable custom npmrc config |
| npmrc.registry | string | `"https://registry.npmjs.org"` | Configuration to use any compatible registry |
| nodeSelector | object | `{}` | Node selector |
| persistence.accessMode | string | `"ReadWriteOnce"` | Persistence access modes |
| persistence.accessMode | string | `"ReadWriteOnce"` | Persistence access mode |
| persistence.enabled | bool | `false` | Use persistent volume to store data |
| persistence.storageClass | string | `"-"` | Type of persistent volume claim |
| persistence.existingClaim | string | `""` | Use an existing PVC to persist data |
| persistence.size | string | `"5Gi"` | Size of persistent volume claim |
| podAnnotations | object | `{}` | Pod annotations |
| podSecurityContext | object | `{}` | Pod Security Context see [values.yaml](values.yaml) |
Expand All @@ -88,7 +85,7 @@ The command removes all the Kubernetes components associated with the chart and
| service.type | string | `"ClusterIP"` | Kubernetes service type |
| serviceAccount.annotations | object | `{}` | Additional ServiceAccount annotations |
| serviceAccount.create | bool | `true` | Create service account |
| serviceAccount.name | string | `"default"` | Service account name to use, when empty will be set to created account if serviceAccount.create is set else to default |
| serviceAccount.name | string | `""` | Service account name to use, when empty will be set to created account if |
| tolerations | list | `[]` | Toleration labels for pod assignment |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
Expand All @@ -105,18 +102,22 @@ helm install node-red node-red/node-red -f values.yaml

> **Tip**: You can use the default [values.yaml](values.yaml)
### Contributing 🤝
## Contributing 🤝

#### Contributing via GitHub
### Contributing via GitHub

Feel free to join. Checkout the [contributing guide](CONTRIBUTING.md)

#### License
## License

Apache License, Version 2.0

## Source Code

* <https://github.com/SchwarzIT/node-red-chart>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| [@dirien](https://github.com/dirien) | [email protected] | https://jobs.schwarz |
| dirien | [email protected] | https://jobs.schwarz |
82 changes: 82 additions & 0 deletions charts/node-red/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# node-red ⚙

![Version: {{ .Version }}](https://img.shields.io/badge/Version-{{ .Version | replace "-" "--" }}-informational?style=for-the-badge)
{{ if .Type }}![Type: {{ .Type }}](https://img.shields.io/badge/Type-{{ .Type }}-informational?style=for-the-badge) {{ end }}
{{ if .AppVersion }}![AppVersion: {{ .AppVersion }}](https://img.shields.io/badge/AppVersion-{{ .AppVersion | replace "-" "--" }}-informational?style=for-the-badge) {{ end }}

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/node-red&style=for-the-badge)](https://artifacthub.io/packages/search?repo=node-red)
[![SIT](https://img.shields.io/badge/SIT-awesome-blueviolet.svg?style=for-the-badge)](https://jobs.schwarz)


<img src="https://nodered.org/about/resources/media/node-red-icon-2.png" width="80" height="80">

## Description

{{ template "chart.description" . }}

## Usage
Adding node-red repository
Before installing any chart provided by this repository, add the node-red Charts Repository:

```bash
helm repo add node-red https://schwarzit.github.io/node-red-chart/
helm repo update
```

### Installing the Chart
To install the chart with the release name node-red run:

```bash
helm install node-red node-red/node-red
```

After a few seconds, node-red should be running.

To install the chart in a specific namespace use following commands:

```bash
kubectl create ns node-red
helm install node-red node-red/node-red --namespace node-red
```

> **Tip**: List all releases using `helm list`, a release is a name used to track a specific deployment

### Uninstalling the Chart

To uninstall the `node-red` deployment:

```bash
helm uninstall node-red
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

{{ template "chart.valuesSection" . }}

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

```bash
helm install node-red node-red/node-red --set image.tag=latest
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
helm install node-red node-red/node-red -f values.yaml
```

> **Tip**: You can use the default [values.yaml](values.yaml)

## Contributing 🤝

### Contributing via GitHub

Feel free to join. Checkout the [contributing guide](CONTRIBUTING.md)

## License

Apache License, Version 2.0

{{ template "chart.sourcesSection" . }}

{{ template "chart.maintainersSection" . }}
Loading

0 comments on commit 4dcdd9d

Please sign in to comment.