Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kapp deploy fails when K8s server host, port and kubeconfig is passed as env and port is empty. #615

Closed
rohitagg2020 opened this issue Sep 20, 2022 · 2 comments · Fixed by #621
Labels
bug This issue describes a defect or unexpected behavior carvel accepted This issue should be considered for future work and that the triage process has been completed good first issue An issue that will be a good candidate for a new contributor priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.

Comments

@rohitagg2020
Copy link
Contributor

What steps did you take:
kapp deploy fails when K8s server host, port and kubeconfig is passed as env and port is empty.

To reproduce the issue

$ export KUBERNETES_SERVICE_HOST=32.123.12.123
$ export KUBERNETES_SERVICE_PORT=
$ export KAPP_KUBECONFIG_YAML=`
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data:...
    server: https://${KAPP_KUBERNETES_SERVICE_HOST_PORT}
    ....
.....
`
$ kapp deploy -a samplepackage-ctrl -f package-resources.yml --kubeconfig=/dev/null

What happened:
kapp deploy errors out with following error:

kapp: Error: yaml: line 5: mapping values are not allowed in this context

What did you expect:
kapp deploy to succeed.

Anything else you would like to add:
Issue is easily reproducible on GKE cluster.

Environment:

  • kapp version (use kapp --version):
  • OS (e.g. from /etc/os-release):
  • Kubernetes version (use kubectl version)

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@rohitagg2020 rohitagg2020 added bug This issue describes a defect or unexpected behavior carvel triage This issue has not yet been reviewed for validity good first issue An issue that will be a good candidate for a new contributor labels Sep 20, 2022
@kumaritanushree kumaritanushree added carvel accepted This issue should be considered for future work and that the triage process has been completed priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome. and removed carvel triage This issue has not yet been reviewed for validity labels Sep 22, 2022
@vicmarbev
Copy link
Contributor

I'm willing to work on this. The issue asks that it succeeds if KUBERNETES_SERVICE_PORT is empty. Should we then default to 6443?

@rohitagg2020
Copy link
Contributor Author

@vicmarbev Thanks for showing your interest. We would be more than glad to have PR from you.

I'm willing to work on this. The issue asks that it succeeds if KUBERNETES_SERVICE_PORT is empty. Should we then default to 6443?

Yes, it should succeed if KUBERNETES_SERVICE_PORT is empty. We can default it to 443.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior carvel accepted This issue should be considered for future work and that the triage process has been completed good first issue An issue that will be a good candidate for a new contributor priority/unprioritized-backlog Higher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants