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

Facing problems with non expected secrets #1

Merged
merged 1 commit into from
May 18, 2023

Conversation

betonetotbo
Copy link
Contributor

This workaround was listing an unexpected secret and assuming it was an kubeconfig: secret/istio-reader-service-account-istio-remote-secret-token. The result was the cron fails:

Getting cluster name for remote cluster from secret/istio-reader-service-account-istio-remote-secret-token
Got cluster name: 
Getting kubeconfig for remote cluster from secret/istio-reader-service-account-istio-remote-secret-token
Got kubeconfig
Getting eastwestgateway's hostname
error: error loading config file "/tmp/kubeconfig": couldn't get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string "json:\"apiVersion,omitempty\""; Kind string "json:\"kind,omitempty\"" }

After inspecting the secrets, I found the ofensor and I was able to skip it by its type:

kubectl get secrets -n istio-system
NAME                                                     TYPE                                  DATA   AGE
cacerts                                                  Opaque                                4      5d5h
istio-ca-secret                                          istio.io/ca-root                      5      7d5h
istio-reader-service-account-istio-remote-secret-token   kubernetes.io/service-account-token   3      6d2h
istio-remote-secret-platform-arquitetura                 Opaque                                1      5d5h

Using the secret type, I was able to skip this invalid secret using the filter --field-selector type=Opaque

This workaround was listing an unexpected secret and assuming it was an kubeconfig: secret/istio-reader-service-account-istio-remote-secret-token

Using the secret type, I was able to skip this invalid secret.
@markszabo markszabo self-requested a review May 18, 2023 00:22
Copy link
Owner

@markszabo markszabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you very much for the contribution and the detailed explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants