jenkins-x-plugins / jenkins-x-plugins/jx-gitops

add insecure-skip-tls-verify flag to jx gitops helm release

Open
#991 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
35
Forks
53
Avg merge
1d 12h
Merged PRs (30d)
7

Description

Missing `insecure-skip-tls-verify` flag in command `jx gitops helm release`, so `jx gitops helm release` could not be used in minikube cluster for local development/tryout.

Command `jx gitops helm release` internally runs `helm push` command, however `jx gitops helm release` does not support the flag like `helm push --insecure-skip-tls-verify` does.
This bug causes error ` tls: failed to verify certificate: x509: certificate is valid for ingress.local`.
If flag would be added, docker-registry-jx could be used to store application promotion charts instead of the bucketrepo-jx.

jx-requirements.yml
cluster:
chartKind: oci
chartRepository: docker-registry-jx.A.B.C.D.nip.io

app pipeline:
```
- image: ghcr.io/jenkins-x/jx-boot:3.11.3
name: promote-helm-release
resources: {}
script: |
#!/usr/bin/env sh
source .jx/variables.sh
jx gitops helm release --oci --no-oci-login --repo-url $JX_CHART_REPOSITORY --version $VERSION
```

app pipeline does not work due to error ` tls: failed to verify certificate: x509: certificate is valid for ingress.local`
to fix the error internal `helm push` command triggered by `jx gitops helm release` must use flag ` --insecure-skip-tls-verify`.

working app pipeline:
```
- image: ghcr.io/jenkins-x/jx-boot:3.11.3
name: promote-helm-release
resources: {}
script: |
#!/usr/bin/env sh
source .jx/variables.sh

OCI_REGISTRY=docker-registry-jx.$DOMAIN
echo "Logging into OCI registry with insecure TLS skip..."
echo admin | helm registry login $OCI_REGISTRY --username admin --password-stdin --insecure

echo "Packaging Helm chart..."
CHART_DIR=./charts/$APP_NAME
helm package $CHART_DIR --version $VERSION

echo "Pushing Helm chart to OCI registry over HTTP..."
helm push ./$APP_NAME-$VERSION.tgz oci://$OCI_REGISTRY/charts --insecure-skip-tls-verify --debug
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.