-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#18541 from wallyworld/remove-k8s-operator-sto…
…rage juju#18541 We no longer support specifying operator storage for k8s charms since this was only required for Juju prior to 2.8 and only for older operator charms. This PR removes the model config attributes and associated processing when performing add-k8s etc. It's essentially all code deletion except for the items below. When migrating an older model, we also want to not import the deprecated model config attribute. There's also other attributes which fall into this category, eg secret-backend, logging-output etc. So the import service for model config has extra logic added - it loads up the model defaults and extracts the attribute names. Any incoming attributes not in this list are excluded from the import. The other extra change is to ensure workload storage is validated against the k8s cluster at deploy time. This was being done for operator storage but not workload storage, which was an omission. ## QA steps We need to check that add-k8s correctly probes for storage and sets cloud config. This can be done on microk8s Without explicitly specifying workload storage ``` microk8s config > ~/.kube/config juju add-k8s mtest k8s substrate "microk8s/localhost" added as cloud "mtest". You can now bootstrap to this cloud by running 'juju bootstrap mtest'. juju show-cloud mtest ... config: workload-storage: microk8s-hostpath ... ``` Specifying a non default storage class - create a storage class called "test" on the cluster. ``` juju add-k8s mtest2 --storage test k8s substrate "microk8s/localhost" added as cloud "mtest2" with storage provisioned by the existing "test" storage class. You can now bootstrap to this cloud by running 'juju bootstrap mtest2' juju show-cloud mtest2 ... config: workload-storage: test ... ``` deploy a charm ``` juju deploy mysql-k8s --channel=8.0 ``` or ``` juju deploy mysql-k8s --channel=8.0 --storage database=test ``` migrate a 3.6 model ``` juju40 bootstrap microk8s c40 juju bootstrap microk8s c36 juju add-model foo juju model-config workload-storage=foo juju migrate foo c40 juju switch c40:foo juju model-config ``` ## Documentation changes @tmihoc we'll need to update the doc to remove any references to "operator-storage" config on k8s clouds. ## Links **Jira card:** [JUJU-6352](https://warthogs.atlassian.net/browse/JUJU-6352) [JUJU-6352]: https://warthogs.atlassian.net/browse/JUJU-6352?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information
Showing
27 changed files
with
104 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.