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

✨ Support bootstrap data in secret #270

Merged
merged 1 commit into from
Dec 17, 2019

Conversation

vincepri
Copy link
Member

Signed-off-by: Vince Prignano vincepri@vmware.com

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 16, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 16, 2019
@vincepri vincepri force-pushed the bootstra-data-secret branch 2 times, most recently from 5eceafc to ddc9414 Compare December 17, 2019 01:26
Copy link
Contributor

@nader-ziada nader-ziada left a comment

Choose a reason for hiding this comment

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

tried running it and got the following error:

Failed to list *v1.Secret: secrets is forbidden: User "system:serviceaccount:capg-system:default" cannot list resource "secrets" in API group "" at the cluster scope

It missing the secrets resource in the config/rbac/role.yaml file

- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
  - list
  - watch

Copy link
Contributor

@nader-ziada nader-ziada left a comment

Choose a reason for hiding this comment

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

After adding the secrets role in my local copy got the following error

E1217 09:42:18.186343       1 conversion.go:76] conversion-webhook "msg"="failed to convert" "error"="cannot convert KubeadmConfigStatus's bootstrap data from Secret reference to inline field"  "request"="527573f9-3d4c-47e2-9803-f7aeb512c77f"

@vincepri
Copy link
Member Author

The second error seems it's related to converting v1a3 -> v1a2, which isn't supported

secret := &corev1.Secret{}
key := types.NamespacedName{Namespace: m.Namespace(), Name: *m.Machine.Spec.Bootstrap.DataSecretName}
if err := m.client.Get(context.TODO(), key, secret); err != nil {
return "", errors.Wrapf(err, "failed to retrieve bootstrap data secret for AWSMachine %s/%s", m.Namespace(), m.Name())
Copy link
Contributor

Choose a reason for hiding this comment

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

AWSMachine

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed, thanks!

Signed-off-by: Vince Prignano <vincepri@vmware.com>
@ncdc
Copy link
Contributor

ncdc commented Dec 17, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 17, 2019
@k8s-ci-robot k8s-ci-robot merged commit 3547127 into kubernetes-sigs:master Dec 17, 2019
@k8s-ci-robot
Copy link
Contributor

@vincepri: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-cluster-api-provider-gcp-make-conformance bd17a71 link /test pull-cluster-api-provider-gcp-make-conformance

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants