jetstack / kube-oidc-proxy

Reverse proxy to authenticate to managed Kubernetes API servers via OIDC.
https://jetstack.io
Apache License 2.0
478 stars 92 forks source link

Helm3 Installation fails due incorrect indentation #169

Closed networkop closed 3 years ago

networkop commented 3 years ago

Description

Helm 3 fails to generate YAML do to indentation in secret_config.yaml.

git clone https://github.com/jetstack/kube-oidc-proxy /tmp/kube-oidc-proxy
helm upgrade --install --create-namespace --namespace kube-oidc-proxy kube-oidc-proxy /tmp/kube-oidc-proxy/deploy/charts/kube-oidc-proxy \
  --set usernameClaim=sub \
  --set clientId=clientid \
  --set issuerUrl=https://issuer.url
Error: YAML parse error on kube-oidc-proxy/templates/secret_config.yaml: error converting YAML to JSON: yaml: line 6: did not find expected key

Versions

helm version
version.BuildInfo{Version:"v3.2.2", GitCommit:"a6ea66349ae3015618da4f547677a14b9ecc09b3", GitTreeState:"clean", GoVersion:"go1.13.12"}

Proposed fix

The following patch fixes the issue. Happy to submit a PR if you're happy with the fix.

diff --git a/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml b/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml
index 41fbf3f9..8ab3bb30 100644
--- a/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml
+++ b/deploy/charts/kube-oidc-proxy/templates/secret_config.yaml
@@ -3,7 +3,7 @@ kind: Secret
 metadata:
   name: {{ include "kube-oidc-proxy.fullname" . }}-config
   labels:
-  {{ include "kube-oidc-proxy.labels" . | indent 4 }}
+{{ include "kube-oidc-proxy.labels" . | indent 4 }}
 type: Opaque
 data:
   {{- if .Values.oidc.caPEM }}
JoshVanL commented 3 years ago

Fixed in #171

/close

jetstack-bot commented 3 years ago

@JoshVanL: Closing this issue.

In response to [this](https://github.com/jetstack/kube-oidc-proxy/issues/169#issuecomment-704873842): >Fixed in #171 > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.