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

Automation code for Cost management operator #81

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Pavan-Sadhana3
Copy link

CMO installation and validation

@ppc64le-cloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Pavan-Sadhana3
Once this PR has been reviewed and has the lgtm label, please assign pravin-dsilva for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ppc64le-cloud-bot ppc64le-cloud-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 12, 2024
@Pavan-Sadhana3
Copy link
Author

work in progress
@SurajGudaji please review this PR

@ppc64le-cloud-bot ppc64le-cloud-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 24, 2024
Copy link
Contributor

@SurajGudaji SurajGudaji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squash all your commits and make it a single commit.

- name: Deploy Compliance Operator
include_role:
name: ocp-compliance
roles:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these changes made in ocp-compliance role ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

| cost_management_setup | yes | false | to run cost management setup |
| cost_management_test | yes | false | to run cost management test |
| openshift_console_password | yes | false | oc login command password |

Copy link
Contributor

@SurajGudaji SurajGudaji Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add default values used for all the variables specified in README file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add default values used for all the variables defined in this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,112 @@
---
- name: Setup and Test Cost Management Operator in OpenShift
hosts: localhost
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"host" parameter is not required here, please remove it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

hosts: localhost
gather_facts: no
tasks:
- name: Log in to OpenShift
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this task is not required as we have specified the KUBECONFIG to be used in vars folder

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

sourceType: grpc
publisher: grpc
displayName: my-operator-catalog
image: brew.registry.redhat.io/rh-osbs/iib:{{ cost_management_catalogsource_image}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to create ImageContentSourcePolicy and custom catalogsource use the "set-custom-catalogsource" role

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

(default_storage_class is defined and not default_storage_class["storageclass.kubernetes.io/is-default-class"]|bool)

- name: Deploy Cost Management Operator
block:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use block statements only when conditional execution of the tasks is required

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,60 @@
---
- name: Setup and Test Cost Management Metrics Operator
hosts: localhost
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"host" parameter is not required here, please remove it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

sourceNamespace: openshift-marketplace

- name: Verification of operator installation
block:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use block statements only when conditional execution of the tasks is required

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

examples/all.yaml Show resolved Hide resolved
register: cost_management_pods
until: cost_management_pods.stdout | int == 1
retries: 15
delay: 60
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add new line

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants