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

BREAKING CHANGE: Making settings more precise #51

Merged
merged 3 commits into from
Sep 26, 2022
Merged

Conversation

jyejare
Copy link
Collaborator

@jyejare jyejare commented Sep 16, 2022

Introducing BREAKING CHANGEs to the cloudwash:

  • Introducing sections in settings for auth, criteria and exception. The auth should focus on authentication credentials for connection with cloud provider, the criteria should focus on criteria to delete the resource also the criteria could be defined per resource type and finally, the exception is the exception for resource type to skip the resource deletion and that is also per resource type based.
  • Introducing conf directory to define the configuration for dedicated cloud provider cleanup. To make use of them, the template files in conf directory should remove template extention and make them just the yaml file.
    e.g azure.yaml.template file should be renamed to azure.yaml for cloudwash to read the credentials from conf/azure.yaml for azure resources cleanup.
  • EC2 is renamed to AWS in the swach command as well in settings file, so now users has to rename their command and settings. The aws cleanup will have more than EC2 cleanup support , hence this change.
  • Some settings has been renamed for better understanding of user.
  • Disc, Nic and Public IP settings could now be set to false for deletion if they are not assigned to any VM in settings files using UNASSIGNED setting value to False.
  • The stable version dockerfile is no more supported/removed due to conflicts between versions and settings file changes, so instead the latest(points to the master/latest) and version-based images should be available in the form of tags on quay. The latest tag is same as latest version tag in quay.
  • The OCP build config only supports for cloudwash DEV (or master) for now, could be improved in future for quay image-based as a stable version.
  • The docker image comes with both settings.yaml and conf directory YAMLs giving higher priority to settings.yaml always.
  • Fixed skipped_vms formatting to show the actual list than the skipped_vms string.

Change and Impact on You:

Changes Impact
Introducing sections in settings for auth, criteria and exception. The auth should focus on authentication credentials for connection with cloud provider, the criteria should focus on criteria to delete the resource also the criteria could be defined per resource type and finally, the exception is the exception for resource type to skip the resource deletion and that is also per resource type based. - The old settings file especially its sections wont be anymore compatible with 1.0.0 release and hence you need to update the settings file to adopt the new style- If you are not yet ready for new settings file, please pin the cloudwash to oder version 0.3.4 and keep the older style setting file.- If you are exporting env vars to set the auth for sensitive settings like passwd for cloud providers the path is changed for them. Like earlier export CLEANUP_GCE__SERVICE_ACCOUNT now should be exported as ``export CLEANUP_GCE__AUTH__SERVICE_ACCOUNT`.
Introducing conf directory to define the configuration for dedicated cloud provider cleanup. To make use of them, the template files in conf directory should remove template extension and make them just the yaml file.e.g azure.yaml.template file should be renamed to azure.yaml for cloudwash to read the credentials from conf/azure.yaml for azure resources cleanup. No impact, additional support for dedicated settings file per cloud provider. But both settings file and conf dir settings file should work parallely.
EC2 is renamed to AWS in the swach command as well in settings file, so now users has to rename their command and settings. The aws cleanup will have more than EC2 cleanup support , hence this change. - Need to update swach command for EC2 to aws e.g swach aws --all- The setting file also renamed to aws from ec2, please change that.
Some settings has been renamed for better understanding of user. The settings name changed for some important settings, so please change them in settings file and env vars names. Naming changes settings all here:Azure - client_id and secret_idAWS - Access_key and Secret_key
Disc, Nic and Public IP settings could now be set to false for deletion if they are not assigned to any VM in settings files using UNASSIGNED setting value to False. No Impact but providing a criteria Disable / Enable the cleanup of these resources if they are unassigned to any VMs. Check new settings fils
The stable version dockerfile is no more supported/removed due to conflicts between versions and settings file changes, so instead the latest(points to the master/latest) and version-based images should be available in the form of tags on quay. The latest tag is same as latest version tag in quay. If you are using/subscribed to latest cloudwash image tag in quay then the new changes will impact so you need to prepare settings file to suit the new version and add that in cloudwash container for cloudwash to access.If you are not ready for new setting yet, please pin the tag to older version 0.3.4
The OCP build config only supports for cloudwash DEV (or master) for now, could be improved in future for quay image-based as a stable version. If you using cloudwash buidconfig then the stable version cloudwash image buildconfig wont be created anymore and the support is removed for now, also the image names and metadata for buildconfig is renamed to only cloudwash from 2 different versions earlier.
The docker image comes with both settings.yaml and conf directory YAMLs giving higher priority to settings.yaml always. No impact , but choose any one of them for settings so thats easy to maintain rather than setting at 2 different places unless required
Fixed skipped_vms formatting to show the actual list than the skipped_vms string. No impact, fixed bug

@jyejare jyejare marked this pull request as draft September 16, 2022 18:49
@jyejare jyejare self-assigned this Sep 16, 2022
@jyejare jyejare changed the title Making settings more precise BREAKING CHANGE: Making settings more precise Sep 16, 2022
@jyejare jyejare force-pushed the few_improvements branch 2 times, most recently from 5a1c819 to a899013 Compare September 20, 2022 18:44
@jyejare jyejare marked this pull request as ready for review September 20, 2022 18:46
settings.yaml.template Outdated Show resolved Hide resolved
@jyejare
Copy link
Collaborator Author

jyejare commented Sep 26, 2022

Merging for successful checks and testing completed !!

@jyejare jyejare merged commit 022b5d1 into master Sep 26, 2022
@franvila
Copy link

@jyejare there is no new quay latest image for 1.0.0 version. Is there any issue with that?

@jyejare
Copy link
Collaborator Author

jyejare commented Sep 27, 2022

@franvila Yeah it failed in building image automatically in GHA https://github.com/RedHatQE/cloudwash/actions/runs/3128512035/jobs/5076533645

Looking into it now !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants