Using triggermesh with rancher kubeconfig
eddiewang opened this issue · 5 comments
Hi there!
I've been successfully using the tm cli in production for about a week now. I noticed an interesting bug if using a rancher setup. When I use the rancher provided kubeconfig from the dashboard:
Unfortunately, tm deploy seems to fail. I assume this is due to how the proxy auth works. The specific step it fails at is pushing the local repo up to the cluster (this was discovered with the --debug flag on).
I don't know if anyone else has experienced a similar issue, but if any can shed some light as to way this would fail, would be greatly appreciated!
Hey @eddiewang, thanks for filing an issue!
Could you show an output of a failing command with --debug flag?
I've been successfully using the tm cli in production for about a week now
❤️
Hi @tzununbekov ! Can definitely provide that whenever i get a cluster setup with rancher again (maybe this weekend).
For now, anyone experiencing this issue should just directly copy the kubeconfig from /etc/rancher/k3s/... and replace 127.0.0.1
with the ip of the host.
Feel free to close, as above is technically a solution, or open if you think this is an edgecase we want resolve for tm. :)
@tzununbekov here's my debug log. to fix this bug below I must ssh into one of the master nodes on the cluster, and copy over the rancher kubeconfig manually, rather than relying on the rancher proxy service.
DEBU[2020-07-05T14:37:19-05:00] "./kaniko-tekton.yaml" is a task
DEBU[2020-07-05T14:37:19-05:00] adding source uploading step to task "default/seo-hashprice-img-generator-"
DEBU[2020-07-05T14:37:20-05:00] taskrun "default/seo-hashprice-img-generator" output image will be "knative.registry.svc.cluster.local/default/seo-hashprice-img-generator:q0Eoal"
DEBU[2020-07-05T14:37:20-05:00] function path is "seo-functions"
DEBU[2020-07-05T14:37:20-05:00] taskrun "default/seo-hashprice-img-generator-ct2ps" created
DEBU[2020-07-05T14:37:20-05:00] setting task "default/seo-hashprice-img-generator-pm72z" owner to TaskRun/seo-hashprice-img-generator-ct2ps
INFO[2020-07-05T14:37:28-05:00] Uploading "seo-functions" to seo-hashprice-img-generator-ct2ps-pod-9t6ws
DEBU[2020-07-05T14:37:28-05:00] sources are packed into "/tmp/tm/upload/uq5FrLWaxt" archive, opening reader
DEBU[2020-07-05T14:37:28-05:00] starting remote untar proccess
DEBU[2020-07-05T14:37:28-05:00] remote exec request URL: "https://rancher.xxxxxxxx.dev/k8s/clusters/c-t4vntapi/v1/namespaces/default/pods/seo-hashprice-img-generator-ct2ps-pod-9t6ws/exec?stderr=true&stdin=true&stdout=true&container=step-sources-receiver&command=tar&command=-xvf&command=-&command=-C&command=/home&timeout=32s"
DEBU[2020-07-05T14:37:28-05:00] stdout:
DEBU[2020-07-05T14:37:28-05:00] stderr:
DEBU[2020-07-05T14:37:28-05:00] setting taskrun "default/seo-hashprice-img-generator-ct2ps" owner to Configuration/
Deploying builder: injecting sources:
FATA[2020-07-05T14:37:29-05:00] There were errors during manifest deployment
I removed the url with xxxxxx
but otherwise logs are original. it seems to break down during the file transfer step, i'm assuming bc rancher isn't in the same network as the cluster.
weird that the only faulty log entry that I see is this one:
setting taskrun "default/seo-hashprice-img-generator-ct2ps" owner to Configuration/
i.e. it looks like the taskrun owner name is missing (it should be Configuration/Name
). There must be some error in previous steps that we didn't catch - yes, it could be something in file transfer step. Is https://rancher.xxxxxxxx.dev/...
URL accessible from the machine where tm deploy
command being executed?
@tzununbekov yes, the url is a publically accessible endpoint with proper DNS records. It's a single VPS hosting a Rancher instance, with LE certs.
Worth mentioning that the cluster I tested this on was a single node K3S instance hosted at Hetzner.