weaveworks / vscode-gitops-tools

GitOps Visual Studio Code Extension
Mozilla Public License 2.0
224 stars 22 forks source link

Cannot show logs of sealed secrets controller deployment #380

Open CapKenR opened 2 years ago

CapKenR commented 2 years ago

Expected behaviour

I deployed sealed secrets in my cluster according to the Flux documentation. I see the deployment in the extension. When I right-click on the deployment and select Show Logs I expect it to show the logs for that deployment as it does for the other deployments I have.

Actual behaviour

I get a message that says "No pods were found from sealed-secrets-controller deployment." when I right-click on the deployment and select Show Logs. However, there is a pod.

❯ k -n flux-system get pods
NAME                                         READY   STATUS    RESTARTS      AGE
helm-controller-5985c795f8-pzfwr             1/1     Running   0             56d
kustomize-controller-78cb866b68-w6w55        1/1     Running   1 (18d ago)   56d
notification-controller-6b7d7485fc-zqlqt     1/1     Running   0             56d
sealed-secrets-controller-7b6f5cdf8c-8wqjb   1/1     Running   0             7d
source-controller-644c69fbf7-dxsqf           1/1     Running   0             56d

If I click on the deployment it does show me the YAML.

One other discrepancy I noticed is the deployment of sealed secrets doesn't have a green checkbox next to it like the other deployments. It has an open white circle. I'm not sure of the significance of the icons.

No pods were found from sealed-secrets-controller deployment

Steps to reproduce

Install sealed secrets according to the Flux documentation, https://fluxcd.io/docs/guides/sealed-secrets/.

Versions

kubectl client v1.22.9+vmware.1 kubectl server v1.22.9+vmware.1 Flux: v0.31.1 Git: 2.25.1 Azure: 2.37.0 Azure extension "k8s-configuration": not installed Azure extension "k8s-extension": not installed VSCode: 1.71.0-insider Extension: 0.20.1660098061 OS: Linux x64 5.15.57.1-microsoft-standard-WSL2

kingdonb commented 2 years ago

Thanks for reporting this! I don't know why the sealed secrets controller shows up there, but it isn't something we intended.

I guess we're doing some kind of label matching that you've managed to trigger. I will try it out, since you've linked to our own documentation on the topic I'm going to assume that you've followed those without any divergence and I should be able to reproduce the issue there. 👍

The open white circle means it hasn't been checked to pass as healthy. I believe we have a specific health check for each Flux controller that also verifies the CRDs are in place? Not really sure what the iconography is supposed to signify, as we did not anticipate any other controllers landing in that list with our Flux controllers.

kingdonb commented 1 year ago

FWiW, this is surely still reproducible on the latest version, my cluster shows a number of controllers that are not Flux here:

Screenshot 2023-09-08 at 1 52 37 PM

Some of them are related to Flux, I'm honestly not sure why kube-rbac-proxy is shown so many times, it looks like it's an attachment of the weave gitops enterprise controllers. We should review how resources are selected for this list, and what treatment non-Flux resources get if any (if they should even be in this list, at all.)

I think it's a pretty nice feature to have WGE here, but it shouldn't look like this. It might be sealed secrets is in this list for the same reason, an opt-in association by label selector. I don't know how it works.