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

InfrastructureProvider do not pass configSecret #592

Open
k0da opened this issue Aug 30, 2024 · 3 comments
Open

InfrastructureProvider do not pass configSecret #592

k0da opened this issue Aug 30, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@k0da
Copy link

k0da commented Aug 30, 2024

What steps did you take and what happened:
[A clear and concise description on how to REPRODUCE the bug.]

apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider
metadata:
 name: vsphere
 namespace: capi-system
spec:
 version: v1.10.0
 configSecret:
   name: vsphere-secret
apiVersion: v1
data:
  VSPHERE_PASSWORD: XXXXXX
  VSPHERE_USERNAME: XXXX
kind: Secret

Once provider is installed, resulting bootstrap-secret do not contain provided credentials

apiVersion: v1
data:
  credentials.yaml: dXNlcm5hbWU6ICcnCnBhc3N3b3JkOiAnJw==
kind: Secret
metadata:
  labels:
    cluster.x-k8s.io/provider: infrastructure-vsphere
    clusterctl.cluster.x-k8s.io: ""
  name: capv-manager-bootstrap-credentials
  namespace: capi-system
  ownerReferences:
  - apiVersion: operator.cluster.x-k8s.io/v1alpha2
    kind: InfrastructureProvider
    name: vsphere
    uid: f94a5b43-e7e6-4def-9540-c3d8c178083f
type: Opaque

Which is equal to:

username: ''
password: ''%

What did you expect to happen:
bootstrap-credentials to contain secret data from spec.configSecret

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api-operator version: v0.12.0
  • Cluster-api version: v1.8.0
  • Minikube/KIND version: --
  • Kubernetes version: (use kubectl version):
  • Client Version: v1.30.2
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.29.4+rke2r1
  • OS (e.g. from /etc/os-release):

/kind bug
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api-operator/labels?q=area for the list of labels]

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 30, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If CAPI Operator contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 30, 2024
@k0da
Copy link
Author

k0da commented Sep 3, 2024

I did run clusterctl generate and see secret is created properly

apiVersion: v1
kind: Secret
metadata:
  labels:
    cluster.x-k8s.io/provider: infrastructure-vsphere
    clusterctl.cluster.x-k8s.io: ""
  name: capv-manager-bootstrap-credentials
  namespace: capv-system
stringData:
  credentials.yaml: |-
    username: 'foo'
    password: 'bar'
type: Opaque

@antonblr
Copy link

@k0da can you check the secret namespace. The empty one is in capi-system:

  name: capv-manager-bootstrap-credentials
  namespace: capi-system

And generated with clusterctl generate is from capv-system:

name: capv-manager-bootstrap-credentials
namespace: capv-system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants