Skip to content

Commit

Permalink
Fix4 (#101)
Browse files Browse the repository at this point in the history
* fix: add Release.Namespace to svc url

Signed-off-by: Engin Diri <[email protected]>
  • Loading branch information
Engin Diri authored Apr 1, 2022
1 parent 8cca22d commit 69dd20a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 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.15.3
version: 0.15.4
appVersion: 2.2.2

keywords:
Expand All @@ -29,7 +29,7 @@ maintainers:
annotations:
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/changes: |
- fix defaultMode on refresh script
- fix the internal svc url
artifacthub.io/images: |
- name: node-red
image: docker.io/nodered/node-red:2.2.2
Expand Down
4 changes: 2 additions & 2 deletions charts/node-red/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# node-red ⚙

![Version: 0.15.3](https://img.shields.io/badge/Version-0.15.3-informational?style=for-the-badge)
![Version: 0.15.4](https://img.shields.io/badge/Version-0.15.4-informational?style=for-the-badge)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=for-the-badge)
![AppVersion: 2.2.2](https://img.shields.io/badge/AppVersion-2.2.2-informational?style=for-the-badge)

Expand All @@ -26,7 +26,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.15.3
helm install node-red node-red/node-red --version 0.15.4
```

After a few seconds, node-red should be running.
Expand Down
2 changes: 1 addition & 1 deletion charts/node-red/scripts/flow_refresh.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
echo "node-red flow refresh api"
sleep $SLEEP_TIME_SIDECAR
token=$(curl -X POST -sSk --connect-timeout 30 --retry 50 --retry-delay 10 --data "client_id=node-red-admin&grant_type=password&scope=*&username=$USERNAME&password=$PASSWORD" $URL/auth/token | grep "^{" | jq -r .access_token)
Expand Down
2 changes: 1 addition & 1 deletion charts/node-red/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
value: /app/{{ .Values.sidecar.env.script }}
{{- end }}
- name: URL
value: {{ printf "http://%s.svc.cluster.local:%d" (include "node-red.fullname" .) (.Values.service.port | int) }}
value: {{ printf "http://%s.%s.svc.cluster.local:%d" (include "node-red.fullname" .) .Release.Namespace (.Values.service.port | int) }}
- name: USERNAME
value: {{ required "please set the username for API refresh call" .Values.sidecar.env.username }}
{{- if or .Values.sidecar.env.password .Values.sidecar.env.passwordFromExistingSecret }}
Expand Down
2 changes: 1 addition & 1 deletion charts/node-red/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tests:
value: /app/flow_refresh.sh
- equal:
path: spec.template.spec.containers[0].env[6].value
value: http://RELEASE-NAME-node-red.svc.cluster.local:1880
value: http://RELEASE-NAME-node-red.NAMESPACE.svc.cluster.local:1880
- equal:
path: spec.template.spec.containers[0].env[7].value
value: x
Expand Down

0 comments on commit 69dd20a

Please sign in to comment.