-
Notifications
You must be signed in to change notification settings - Fork 45
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
schema: deprecate placement
and introduce machines
in the juju_application
resource
#695
Comments
A set (of strings) is better than a comma separated string. Could you also consider what plans would break with this change (or will become deprecated) and add a section to show how they should change to adopt the new machines directive. |
Some questions: firstOptional: true, So basically it's either set by the user otherwise we compute a default secondThis is the scenario for IAAS right? For CAAS you can't select the machine, i think we have a validator for that and we have a field on application called third
Plus, can you add the reason why we are deprecating |
|
I don't think we can validate the model type from the plan alone. We need to have access to an actual model to be able to validate this.. |
maybe we can do something similar to what i did for the |
if i remove a machine from the list will it scale down without replacing the application? |
yes, that should be possible |
Type of change
Changing existing schema
Description
I propose a change to the schema of the
juju_application
resource.It currently contains a
placement
field, which contains the placement directive for the application. It is a string that contains a comma separated list of machines/containers upon which application is to be deployed. It is also closely (and confusingly) tied to theunits
field - the number of placement targets in theplacement
field may not be lower than the number ofunits
, but we may request more units of the application to be created than there are placement directives.I propose that we deprecate the
placement
field and replace it withmachines
field, which would contain a list of machine IDs upon which application is to be deployed. The newmachines
key would be mutually exclusive with both theplacement
and theunits
fields.The confusion around
placement
is the source of bugs. See #443Details
Proposed schema for the
machines
fieldExample terraform plan
Example of migration
If you have a plan like
you can simply migrate to the the use of the
machines
field by removingunits
andplacement
and addingto the
juju_application
resource.Notes & References
No response
The text was updated successfully, but these errors were encountered: