You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
With version 3.3.1 the syncer forces me to configure in-cluster configuration, even if I have a valid kubeconfig.
kubeconfig is correct and syncer is using it (see log snippet)
we use out-of-cluster
Now we must configure:
KUBERNETES_SERVICE_HOST via environment
KUBERNETES_SERVICE_PORT via environment
and
/run/secrets/kubernetes.io/serviceaccount/token
/run/secrets/kubernetes.io/serviceaccount/ca.crt
all these stuff is already in kubeconfig
What you expected to happen:
syncer works without in-cluster config like all older versions
How to reproduce it (as minimally and precisely as possible):
Just run syncer out-of-cluster with kubeconfig
Anything else we need to know?:
vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.829749944+02:00","caller":"kubernetes/kubernetes.go:105","msg":"Kubeconfig path obtained from kubeconfig flag: \"/var/lib/kubernetes/csi-provisioner.kubeconfig\"","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.829757245+02:00","caller":"kubernetes/kubernetes.go:122","msg":"Final Kubeconfig path used: \"/var/lib/kubernetes/csi-provisioner.kubeconfig\"","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.829766765+02:00","caller":"kubernetes/kubernetes.go:75","msg":"k8s client using kubeconfig from /var/lib/kubernetes/csi-provisioner.kubeconfig","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.830562734+02:00","caller":"kubernetes/kubernetes.go:434","msg":"Setting client QPS to 100.000000 and Burst to 100.","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"error","time":"2024-09-17T07:09:03.830893072+02:00","caller":"syncer/main.go:302","msg":"failed to get InClusterConfig: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e","stacktrace":"main.main.initSyncerComponents.func8\n\t/root/vsphere-csi-driver/cmd/syncer/main.go:302\nmain.main.func5\n\t/root/vsphere-csi-driver/cmd/syncer/main.go:213"}
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
With version 3.3.1 the syncer forces me to configure in-cluster configuration, even if I have a valid kubeconfig.
kubeconfig is correct and syncer is using it (see log snippet)
we use out-of-cluster
Now we must configure:
KUBERNETES_SERVICE_HOST via environment
KUBERNETES_SERVICE_PORT via environment
and
/run/secrets/kubernetes.io/serviceaccount/token
/run/secrets/kubernetes.io/serviceaccount/ca.crt
all these stuff is already in kubeconfig
What you expected to happen:
syncer works without in-cluster config like all older versions
How to reproduce it (as minimally and precisely as possible):
Just run syncer out-of-cluster with kubeconfig
Anything else we need to know?:
vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.829749944+02:00","caller":"kubernetes/kubernetes.go:105","msg":"Kubeconfig path obtained from kubeconfig flag: \"/var/lib/kubernetes/csi-provisioner.kubeconfig\"","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.829757245+02:00","caller":"kubernetes/kubernetes.go:122","msg":"Final Kubeconfig path used: \"/var/lib/kubernetes/csi-provisioner.kubeconfig\"","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.829766765+02:00","caller":"kubernetes/kubernetes.go:75","msg":"k8s client using kubeconfig from /var/lib/kubernetes/csi-provisioner.kubeconfig","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"info","time":"2024-09-17T07:09:03.830562734+02:00","caller":"kubernetes/kubernetes.go:434","msg":"Setting client QPS to 100.000000 and Burst to 100.","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e"} vsphere-syncer[426263]: {"level":"error","time":"2024-09-17T07:09:03.830893072+02:00","caller":"syncer/main.go:302","msg":"failed to get InClusterConfig: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined","TraceId":"3e93f222-53ff-420f-9a66-dd046e56974e","stacktrace":"main.main.initSyncerComponents.func8\n\t/root/vsphere-csi-driver/cmd/syncer/main.go:302\nmain.main.func5\n\t/root/vsphere-csi-driver/cmd/syncer/main.go:213"}
Environment:
uname -a
): 5.15.0-209.161.7.2.el8uek.x86_64The text was updated successfully, but these errors were encountered: