cloudtty icon indicating copy to clipboard operation
cloudtty copied to clipboard

The "dev guide is not working" any more

Open panpan0000 opened this issue 3 years ago • 3 comments

After make run, then apply the sample CR, it failed with KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined

{"controller": "cloudshell", "controllerGroup": "cloudshell.cloudtty.io", "controllerKind": "CloudShell", "cloudShell": {"name":"local-cluster-sample","namespace":"default"}, "namespace": "default", "name": "local-cluster-sample", "reconcileID": "848b38e1-3e8e-40e0-a3ed-47843ceb2581"}
1.6611414647583098e+09  ERROR   Reconciler error        {"controller": "cloudshell", "controllerGroup": "cloudshell.cloudtty.io", "controllerKind": "CloudShell", "cloudShell": {"name":"local-cluster-sample","namespace":"default"}, "namespace": "default", "name": "local-cluster-sample", "reconcileID": "848b38e1-3e8e-40e0-a3ed-47843ceb2581", "error": "unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined", "errorVerbose": "unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
github.com/cloudtty/cloudtty/controllers.GenerateKubeconfigInCluster
\t/root/cloudtty/controllers/cloudshell_controller.go:730
github.com/cloudtty/cloudtty/controllers.(*CloudShellReconciler).CreateCloudShellJob
\t/root/cloudtty/controllers/cloudshell_controller.go:213
github.com/cloudtty/cloudtty/controllers.(*CloudShellReconciler).Reconcile
\t/root/cloudtty/controllers/cloudshell_controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:121
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:320
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
\t/root/work/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:234
runtime.goexit

panpan0000 avatar Aug 22 '22 04:08 panpan0000

Even I added

export KUBERNETES_SERVICE_HOST=https://x.y.z.w
export KUBERNETES_SERVICE_PORT=6443

then do make run still failed : open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory

panpan0000 avatar Aug 22 '22 04:08 panpan0000

maybe we will have to find a new way to do debug work.. should I find a way to generate those 2 files locally ?

		tokenFile  = "/var/run/secrets/kubernetes.io/serviceaccount/token"
		rootCAFile = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"

@calvin0327

panpan0000 avatar Aug 22 '22 04:08 panpan0000

@panpan0000 If we run the program locally, because we are outside the cluster, operator cannot generate kubeconfig for us. In other words, to run outside the cluster, we must specify configmap of kubeconfig.

calvin0327 avatar Aug 24 '22 05:08 calvin0327

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Nov 23 '22 20:11 github-actions[bot]

This issue has not seen any activity since it was marked stale. Closing.

github-actions[bot] avatar Dec 08 '22 20:12 github-actions[bot]