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

The "dev guide is not working" any more #100

Closed
panpan0000 opened this issue Aug 22, 2022 · 5 comments
Closed

The "dev guide is not working" any more #100

panpan0000 opened this issue Aug 22, 2022 · 5 comments

Comments

@panpan0000
Copy link
Member

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/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:121
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
\t/root/work/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:320
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
\t/root/work/pkg/mod/sigs.k8s.io/controller-runtime@v0.12.3/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/controller-runtime@v0.12.3/pkg/internal/controller/controller.go:234
runtime.goexit
@panpan0000
Copy link
Member Author

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
Copy link
Member Author

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 panpan0000 changed the title The "dev guide is not working" The "dev guide is not working" any more Aug 22, 2022
@calvin0327
Copy link
Collaborator

@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.

@github-actions
Copy link

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
Copy link

github-actions bot commented Dec 8, 2022

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants