Following instructions at https://jenkins-x.io/getting-started/multi-cluster/ leads to the installation of the environment controller not working properly. Log message from pod:
error: failed to create git provider for git URL https://github.com/myorg/environment-mine-staging kind github: Running in batch mode and no default API token found.
This is also referenced here: https://github.com/jenkins-x-charts/environment-controller/issues/64 and there have been similar reports in slack.
jx create addon envctl -s https://github.com/myorg/env-production.git --project-id myproject --docker-registry gcr.io --cluster-rbac true --user mygituser --token mygittoken -
2.0.294
Initial cluster created with --remote-environments flag, the cluster for the additional environment was created with GKE UI defaults.
OSX 10.14.3
I can reproduce this trivially.
After a day of debugging, I've found a workaround. Run:
kubectl edit deployment environment-controller
and make sure that the GIT_KIND environment variable is not set or has no value. That will make the code take a branch that will lead to successful loading of git credentials. Not great, but 馃し鈥嶁檪
Most helpful comment
I can reproduce this trivially.
After a day of debugging, I've found a workaround. Run:
kubectl edit deployment environment-controllerand make sure that the
GIT_KINDenvironment variable is not set or has no value. That will make the code take a branch that will lead to successful loading of git credentials. Not great, but 馃し鈥嶁檪