-
Notifications
You must be signed in to change notification settings - Fork 161
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
generators: Use new cloud-init config keys #580
Conversation
c682281
to
c8aa0c7
Compare
c8aa0c7
to
8a56120
Compare
generators/cloud-init.go
Outdated
content = `{%- if config_get("cloud-init.user-data", properties.default) == properties.default -%} | ||
{{ config_get("user.user-data", properties.default) }} | ||
{%- else -%} | ||
{{- config_get("cloud-init.user-data", properties.default) }} | ||
{%- endif -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this should be vendor-data
, not user-data
, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
generators/cloud-init_test.go
Outdated
`{%- if config_get("cloud-init.user-data", properties.default) == properties.default -%} | ||
{{ config_get("user.user-data", properties.default) }} | ||
{%- else -%} | ||
{{- config_get("cloud-init.user-data", properties.default) }} | ||
{%- endif -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, all of this is supposed to be vendor-data
, not user-data
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
{{ config_get("user.network-config", "") }} | ||
{%- else -%} | ||
{{- config_get("cloud-init.network-config", "") }} | ||
{%- endif -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on here, where is our default network config going?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I moved that to properties["default"]
but had forgotten to include it. Fixed now.
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
8a56120
to
d18ac36
Compare
This uses and prefers the new
cloud-init
config keys (cloud-init.network-config
,cloud-init.user-data
, andcloud-init.vendor-data
) for anycloud-init
configuration. The old config keys (user.network-config
,user.user-data
, anduser.vendor-data
) are still available and will not be removed. They will serve a fallback keys if the new keys aren't used.Signed-off-by: Thomas Hipp thomas.hipp@canonical.com