refactor(chart): replace the netcat command with the busybox wget variant (#26)

### Description of the change

replace the netcat command with wget commands.

### Benefits

Less noise in the log(s)

### Possible drawbacks

<!-- Describe any known limitations with your change -->
No limitations. As far as I am aware.

- Fixes #

https://gitea.com/gitea/helm-actions/pulls/23#issuecomment-1027779

### Additional information

As the PR Title suggests, it replaces the netcat command to a wget command which makes the noise in the log stop.

### Checklist

- [X] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm)
- [X] Breaking changes are documented in the `README.md`
- [X] Helm templating unittests are added (required when changing anything in `templates` folder)
- [X] Bash unittests are added (required when changing anything in `scripts` folder)
- [X] All added template resources MUST render a namespace in metadata

Co-authored-by: Daan Selen <dselen@systemec.nl>
Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/26
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com>
Co-authored-by: Daan Selen <dselen@nerthus.nl>
Co-committed-by: Daan Selen <dselen@nerthus.nl>
This commit is contained in:
Daan Selen
2025-08-13 21:27:56 +00:00
committed by DaanSelen
parent 8c95dcd282
commit a3d093702c
3 changed files with 20 additions and 28 deletions

View File

@ -86,23 +86,3 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- define "gitea.actions.local_root_url" -}}
{{- .Values.giteaRootURL -}}
{{- end -}}
{{/*
Parse the http url to hostname + port separated by space for the nc command
*/}}
{{- define "gitea.actions.nc" -}}
{{- $url := include "gitea.actions.local_root_url" . | urlParse -}}
{{- $host := get $url "host" -}}
{{- $scheme := get $url "scheme" -}}
{{- $port := "80" -}}
{{- if contains ":" $host -}}
{{- $hostAndPort := regexSplit ":" $host 2 -}}
{{- $host = index $hostAndPort 0 -}}
{{- $port = index $hostAndPort 1 -}}
{{- else if eq $scheme "https" -}}
{{- $port = "443" -}}
{{- else if eq $scheme "http" -}}
{{- $port = "80" -}}
{{- end -}}
{{- printf "%s %s" $host $port -}}
{{- end -}}