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

Cleanup services/userdata package #877

Merged
merged 1 commit into from Jul 9, 2019

Conversation

vincepri
Copy link
Member

@vincepri vincepri commented Jul 8, 2019

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

What this PR does / why we need it:
This PR cleans up the userdata package and simplifies handling a large amount of files that need to be written to disk. In a future PR, this work is going to be used to store extra files on disk.

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

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 8, 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 8, 2019
@vincepri vincepri force-pushed the userdata-tidy branch 2 times, most recently from 8e10045 to 4179459 Compare July 8, 2019 20:56
Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

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

i noticed what may be tabs in the yaml, looks like fine otherwise. Oh whoops, this is a WIP, sorry about that, I only just noticed, you probably already caught these

const (
writeFilesTemplate = `write_files:{{ range . }}
- path: {{.Path}}
encoding: "base64"
Copy link
Contributor

Choose a reason for hiding this comment

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

This appears to be a tab

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching that!

encoding: "base64"
owner: {{.Owner}}
permissions: '{{.Permissions}}'
content: |
Copy link
Contributor

Choose a reason for hiding this comment

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

This also appears to be a tab

Copy link
Member Author

Choose a reason for hiding this comment

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

:D Seems like my editor loves tabs


const (
writeFilesTemplate = `write_files:{{ range . }}
- path: {{.Path}}
Copy link
Contributor

Choose a reason for hiding this comment

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

the spacing here looks funny, but it might still be valid YAML i honestly don't know

hello:
-    path: item

Copy link
Member Author

Choose a reason for hiding this comment

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

Should be the same as before in controlplane.go

@vincepri vincepri force-pushed the userdata-tidy branch 2 times, most recently from d1e153c to ed17a3b Compare July 9, 2019 15:34
@vincepri vincepri changed the title WIP: Cleanup services/userdata package Cleanup services/userdata package Jul 9, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 9, 2019
Signed-off-by: Vince Prignano <vincepri@vmware.com>
@vincepri
Copy link
Member Author

vincepri commented Jul 9, 2019

Tested this PR with an HA cluster and it came up fine

/assign @chuckha @ncdc

Copy link
Contributor

@chuckha chuckha left a comment

Choose a reason for hiding this comment

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

👍

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 9, 2019
@k8s-ci-robot k8s-ci-robot merged commit df5163d into kubernetes-sigs:master Jul 9, 2019
ncdc pushed a commit to ncdc/cluster-api-provider-aws that referenced this pull request Jul 10, 2019
Signed-off-by: Vince Prignano <vincepri@vmware.com>
(cherry picked from commit df5163d)
@ncdc ncdc mentioned this pull request Jul 10, 2019
richardchen-db pushed a commit to databricks/cluster-api-provider-aws-1 that referenced this pull request Jan 14, 2023
Signed-off-by: Vince Prignano <vincepri@vmware.com>
(cherry picked from commit df5163d)
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants