-
Notifications
You must be signed in to change notification settings - Fork 0
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
[DEV] Add grouplevel key-value pairs to the metadata for use on the node #17
Comments
The current merge logic that allows any group to specify any portion of the cloud-init payload may be problematic for admins who make a change to one group, expecting it to manifest, but then a merge removes their changes. A concrete usecase that we need to support is a default cloud-init for all nodes in the The current logic allows an admin to target a node directly with a singleton cloud-init payload which will supersede all group related cloud-init information. We should review this from an admin perspective to identify desired behavior when a custom cloud-init for a particular node is no longer useful. Another thought for consideration is how to handle things like |
I was able to get achieve something similar just using the {
"name": "IDENTIFIER",
"cloud-init": {
"userdata": {
"write_files": [
{
"content": "hello world",
"path": "/etc/hello"
}
]
},
"metadata": {
"groups": [
{
"x3000": {
"syslog_aggregator": "192.168.0.1"
}
}
]
}
}
} Then, doing groups:
- x3000:
syslog_aggregator: 192.168.0.1 Is this already doing what is expected? I think we'd still want to the following:
Other than that, it seems to me that this is already doing the above. |
Why are we removing the SMD query again? |
I think the idea here is that since group names can be any arbitrary thing without any validation from SMD, there's no need to do a query. |
The query finds the SMD groups the requesting node is a member of. I don't know how you are going to provide cloud-init data to groups of nodes without making that query |
when generating the payload to send to the client, the cloud-init server needs to call SMD to find out what groups the node is a part of. |
Short Description
SMD can provide the cloud-init server with a set of group names that an individual node is a part of. It cannot provide the key/value pairs that are needed by the node at boot time. We need to store key value pairs in the cloud-init server that are then added to the payload.
For example, we might want a different remote syslog aggregator for each rack of nodes. On the SMD side, the admin can create a group that represents that rack, possibly even by xname, (x3000) and when cloud-init retrieves the list of groups per node, it will be included.
If the admin then also adds a key/value pair to the cloud-init server named for the group, that can be included in the client payload as well.
The mechanics of adding key/value pairs for a group should be via POST with standard CRUD operations.
/cloud-init/groups/ PUT --> {key: value, key: value}
/cloud-init/groups POST --> {key:value, key:value}
No need to query SMD in order to add/update. This means that admins can put typo groups into cloud-init and nothing will stop them.
require jwt for changes and log operations with information about who made the changes through JWT interrogation
The text was updated successfully, but these errors were encountered: