diff --git a/.github/workflows/ossf-scorecard-action.yaml b/.github/workflows/ossf-scorecard-action.yaml index 30b153ae..06371916 100644 --- a/.github/workflows/ossf-scorecard-action.yaml +++ b/.github/workflows/ossf-scorecard-action.yaml @@ -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: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 15f7aeb2..f82bef70 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -6,6 +6,9 @@ on: paths: - "charts/**" +env: + HELM_DOCS_VERSION: "1.7.0" + permissions: read-all jobs: @@ -27,31 +30,16 @@ jobs: git config user.name "$GITHUB_ACTOR" git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - - 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 diff --git a/charts/node-red/Chart.yaml b/charts/node-red/Chart.yaml index 5c5a63f0..6384de9e 100644 --- a/charts/node-red/Chart.yaml +++ b/charts/node-red/Chart.yaml @@ -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 @@ -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 diff --git a/charts/node-red/README.md b/charts/node-red/README.md index f72d4c2f..6aab5033 100644 --- a/charts/node-red/README.md +++ b/charts/node-red/README.md @@ -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) -A Helm chart for Node-Red, a low-code programming for event-driven applications +## Description -**Homepage:** +A Helm chart for Node-Red, a low-code programming for event-driven applications ## Usage Adding node-red repository @@ -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 @@ -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: @@ -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) | @@ -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, @@ -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 + +* + ## Maintainers | Name | Email | Url | | ---- | ------ | --- | -| [@dirien](https://github.com/dirien) | engin.diri@mail.schwarz | https://jobs.schwarz | \ No newline at end of file +| dirien | engin.diri@mail.schwarz | https://jobs.schwarz | \ No newline at end of file diff --git a/charts/node-red/README.md.gotmpl b/charts/node-red/README.md.gotmpl new file mode 100644 index 00000000..926e2dc7 --- /dev/null +++ b/charts/node-red/README.md.gotmpl @@ -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) + + + + +## 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" . }} \ No newline at end of file diff --git a/charts/node-red/values.yaml b/charts/node-red/values.yaml index 309aeb4b..6a60c7ce 100644 --- a/charts/node-red/values.yaml +++ b/charts/node-red/values.yaml @@ -2,23 +2,34 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +# -- Number of nodes replicaCount: 1 image: + # -- The image registry to pull from registry: docker.io + # -- The image repository to pull from repository: nodered/node-red + # -- The image pull policy pullPolicy: IfNotPresent + # -- The image tag to pull, default: `Chart.appVersion` tag: "" +# -- The image pull secrets imagePullSecrets: "" +# -- Provide a name in place of node-red nameOverride: "" +# -- String to fully override "node-red.fullname" fullnameOverride: "" npmrc: + # -- Enable custom npmrc config enabled: false + # -- Configuration to use any compatible registry registry: "https://registry.npmjs.org" +# -- node-red env, see more environment variables in the [node-red documentation](https://nodered.org/docs/getting-started/docker) env: [] # Possible Values: # TZ: @@ -33,18 +44,24 @@ env: [] serviceAccount: # Specifies whether a service account should be created + # -- Create service account create: true # Annotations to add to the service account + # -- Additional ServiceAccount annotations annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template + # -- Service account name to use, when empty will be set to created account if name: "" +# -- Pod annotations podAnnotations: {} +# -- Pod Security Context see [values.yaml](values.yaml) podSecurityContext: {} # fsGroup: 2000 +# -- Security Context see [values.yaml](values.yaml) securityContext: {} # capabilities: # drop: @@ -54,10 +71,13 @@ securityContext: {} # runAsUser: 1000 service: + # -- Kubernetes service type type: ClusterIP + # -- Kubernetes port where service is exposed port: 1880 persistence: + # -- Use persistent volume to store data enabled: false ## node-red data Persistent Volume Storage Class ## If defined, storageClassName: @@ -66,30 +86,42 @@ persistence: ## set, choosing the default provisioner. (gp2 on AWS, standard on ## GKE, AWS & OpenStack) ## + # -- Type of persistent volume claim # storageClass: "-" ## ## If you want to reuse an existing claim, you can pass the name of the PVC using ## the existingClaim variable + # -- Use an existing PVC to persist data # existingClaim: your-claim + # -- Persistence access mode accessMode: ReadWriteOnce + # -- Size of persistent volume claim size: 5Gi ingress: + # -- Enable an ingress resource for the server enabled: false + # -- Defines which ingress controller will implement the resource className: "" + # -- Additional ingress annotations annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: + # -- Ingress accepted hostnames - host: chart-example.local paths: + # -- The base path - path: / + # -- Ingress type of path pathType: ImplementationSpecific + # -- Ingress TLS configuration tls: [] # - secretName: chart-example-tls # hosts: # - chart-example.local +# -- CPU/Memory resource requests/limits resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little @@ -102,8 +134,11 @@ resources: {} # cpu: 100m # memory: 128Mi +# -- Node selector nodeSelector: {} +# -- Toleration labels for pod assignment tolerations: [] +# -- The affinity constraint affinity: {}