Skip to content

Commit

Permalink
feat: add option for custom content in npmrc file (#197)
Browse files Browse the repository at this point in the history
Signed-off-by: Engin Diri <[email protected]>

Signed-off-by: Engin Diri <[email protected]>
  • Loading branch information
dirien authored Jan 4, 2023
1 parent 7537fa1 commit 225ce68
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions charts/node-red/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ icon: https://nodered.org/about/resources/media/node-red-icon-2.png

type: application

version: 0.21.3
version: 0.22.0
appVersion: 3.0.2

keywords:
Expand All @@ -29,7 +29,7 @@ maintainers:
annotations:
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/changes: |
- remove replicas from values.yaml
- add option for custom content in npmrc file
artifacthub.io/images: |
- name: node-red
image: docker.io/nodered/node-red:3.0.2
Expand Down
7 changes: 4 additions & 3 deletions charts/node-red/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# node-red ⚙

![Version: 0.21.3](https://img.shields.io/badge/Version-0.21.3-informational?style=for-the-badge) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) ![AppVersion: 3.0.2](https://img.shields.io/badge/AppVersion-3.0.2-informational?style=for-the-badge)
![Version: 0.22.0](https://img.shields.io/badge/Version-0.22.0-informational?style=for-the-badge) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge) ![AppVersion: 3.0.2](https://img.shields.io/badge/AppVersion-3.0.2-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)
Expand All @@ -16,7 +16,7 @@ A Helm chart for Node-Red, a low-code programming for event-driven applications
To install the chart using the OCI artifact, run:

```bash
helm install node-red oci://ghcr.io/schwarzit/charts/node-red --version 0.21.3
helm install node-red oci://ghcr.io/schwarzit/charts/node-red --version 0.22.0
```

## Usage
Expand All @@ -32,7 +32,7 @@ helm repo update
To install the chart with the release name node-red run:

```bash
helm install node-red node-red/node-red --version 0.21.3
helm install node-red node-red/node-red --version 0.22.0
```

After a few seconds, node-red should be running.
Expand Down Expand Up @@ -93,6 +93,7 @@ The command removes all the Kubernetes components associated with the chart and
| metrics.serviceMonitor.selector | object | `{}` | Prometheus ServiceMonitor selector |
| nameOverride | string | `""` | Provide a name in place of node-red |
| nodeSelector | object | `{}` | Node selector |
| npmrc.content | string | `"# Custom npmrc config\n"` | Configuration to add custom npmrc config |
| npmrc.enabled | bool | `false` | Enable custom npmrc config |
| npmrc.registry | string | `"https://registry.npmjs.org"` | Configuration to use any compatible registry |
| persistence.accessMode | string | `"ReadWriteOnce"` | Persistence access mode |
Expand Down
7 changes: 6 additions & 1 deletion charts/node-red/templates/npmrc-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ metadata:
name: {{ include "node-red.configMapName" . }}
data:
npmrc: |
{{- if .Values.npmrc.registry }}
registry={{ .Values.npmrc.registry }}
{{- end -}}
{{- end }}
{{- if .Values.npmrc.content }}
{{- .Values.npmrc.content | nindent 4 }}
{{- end }}
{{- end -}}
3 changes: 3 additions & 0 deletions charts/node-red/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ npmrc:
enabled: false
# -- Configuration to use any compatible registry
registry: "https://registry.npmjs.org"
# -- Configuration to add custom npmrc config
content: |
# Custom npmrc config
# -- node-red env, see more environment variables in the [node-red documentation](https://nodered.org/docs/getting-started/docker)
env: []
Expand Down

0 comments on commit 225ce68

Please sign in to comment.