kubernetes-sigs / cluster-api-addon-provider-helm

CAAPH uses Helm charts to manage the installation and lifecycle of Cluster API add-ons.
Apache License 2.0
98 stars 26 forks source link

CAAPH report log context "default-context" does not exist while preparing to patch HelmReleaseProxy #199

Open phuongvtn opened 3 months ago

phuongvtn commented 3 months ago

Hi, I'm newbie on clusterAPI operator and facing error log that appear continuously on caaph (addon-helm) I'm testing clusterAPI with Openstack Infra that can provision workload cluster and using helmchartproxy for deploying cni (calico and cilium) for target workload But, I see caaph pod report error log continuously about get kubeconfig for cluster

Below are logs that I collected about my facing:

1 helmreleaseproxy_controller.go:121] "Preparing to patch HelmReleaseProxy with return error" controller="helmreleaseproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="HelmReleaseProxy" HelmReleaseProxy="<namespace>/<name_of_helmreleaseproxy>" namespace="<namespace>" name="<name_of_helmreleaseproxy>" reconcileID="xxx-xxx-xxxx-xxx-xxx" helmReleaseProxy="<name_of_helmreleaseproxy>" reterr="failed to get kubeconfig for cluster: context \"default-context\" does not exist"
1 controller.go:329] "Reconciler error" err="failed to get kubeconfig for cluster: context \"default-context\" does not exist" controller="helmreleaseproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="HelmReleaseProxy" HelmReleaseProxy="<namespace>/<name_of_helmreleaseproxy>" namespace="<namespace>" name="<namespace>/<name_of_helmreleaseproxy>" reconcileID="xxx"
1 helmreleaseproxy_controller.go:121] "Preparing to patch HelmReleaseProxy with return error" controller="helmreleaseproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="HelmReleaseProxy" HelmReleaseProxy="<namespace>/<name_of_helmreleaseproxy>" namespace="<namespace>" name="<name_of_helmreleaseproxy>" reconcileID="xxx" helmReleaseProxy="<name_of_helmreleaseproxy>" reterr=null

These error logs have been appeared right after the first deployment of helmchartproxy on target workload cluster successfully. Seem they from result of func KubeconfigGetter.GetClusterKubeconfig but I not sure

Although I tested updating helm values via helmchartproxy of target workload cluster as well as check revision of helmreleaseproxy (with corresponding namespace) and configmap of target workload cluster, all still update successfully, I not sure how the above logs may affect helmchart 's lifecycle as well as values of cni on target workload cluster in future

Do I missing configure or we can ignore these logs at current? Thanks

Environment:

/kind bug /area logging

k8s-ci-robot commented 3 months ago

@phuongvtn: The label(s) area/logging cannot be applied, because the repository doesn't have them.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/issues/199): >Hi, >I'm newbie on clusterAPI operator and facing error log that appear continuously on caaph (addon-helm) >I'm testing clusterAPI with Openstack Infra that can provision workload cluster and using helmchartproxy for deploying cni (calico and cilium) for target workload >But, I see caaph pod report error log continuously about get kubeconfig for cluster > >Below are logs that I collected about my facing: >``` >1 helmreleaseproxy_controller.go:121] "Preparing to patch HelmReleaseProxy with return error" controller="helmreleaseproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="HelmReleaseProxy" HelmReleaseProxy="/" namespace="" name="" reconcileID="xxx-xxx-xxxx-xxx-xxx" helmReleaseProxy="" reterr="failed to get kubeconfig for cluster: context \"default-context\" does not exist" >1 controller.go:329] "Reconciler error" err="failed to get kubeconfig for cluster: context \"default-context\" does not exist" controller="helmreleaseproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="HelmReleaseProxy" HelmReleaseProxy="/" namespace="" name="/" reconcileID="xxx" >1 helmreleaseproxy_controller.go:121] "Preparing to patch HelmReleaseProxy with return error" controller="helmreleaseproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="HelmReleaseProxy" HelmReleaseProxy="/" namespace="" name="" reconcileID="xxx" helmReleaseProxy="" reterr=null >``` >These error logs have been appeared right after the first deployment of helmchartproxy on target workload cluster successfully. Seem they from result of func KubeconfigGetter.GetClusterKubeconfig but I not sure > >Although I tested updating helm values via helmchartproxy of target workload cluster as well as check revision of helmreleaseproxy (with corresponding namespace) and configmap of target workload cluster, all still update successfully, I not sure how the above logs may affect helmchart 's lifecycle as well as values of cni on target workload cluster in future > >Do I missing configure or we can ignore these logs at current? Thanks > >**Environment:** > >- Cluster API version: v1.6.0 >- Cluster API Add-on Provider for Helm version: v0.1.1-alpha.1 >- minikube/kind version: v1.6.0 >- Kubernetes version: (use `kubectl version`): v1.28.4 >- OS (e.g. from `/etc/os-release`): Ubuntu 20.04.4 > > >/kind bug >/area logging > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
k8s-triage-robot commented 2 weeks ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

Jont828 commented 2 weeks ago

@phuongvtn I believe the kubeconfig logic was changed in #248. Could you try to see if you're still having the same issue?