-
Notifications
You must be signed in to change notification settings - Fork 29
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
scheduler-plugins automation #98
base: main
Are you sure you want to change the base?
scheduler-plugins automation #98
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ananya-kumari 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 |
Welcome @Ananya-kumari! It looks like this is your first PR to ocp-power-automation/ocp4-playbooks-extras 🎉 |
Adhere to the Ansible directory structure, configure a README.md file. For references you can check various readme files under specific roles like this - https://github.com/ocp-power-automation/ocp4-playbooks-extras/tree/main/playbooks/roles/ocp-cli-plugins#ocp-cli-plug-ins-deployment-and-testing |
Add this scheduler-plugins role under playbook/main.yml file |
Identify any dynamic variables for this playbook. If required configure a vars file which can used as an extra_vars |
@AniruddhaNayek the suggested changes are done, please review. |
added a Readme.md file |
extra_vars are fetched and added in the examples/main.yaml |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash all commits and make it a single commit.
|
||
#scheduler-plugin vars: | ||
ocp_scheduler_plugins_enable: false | ||
kubeconfig_path: "/root/openstack-upi/auth/kubeconfig" # Path to the kubeconfig file for accessing the cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define the KUBECONFIG path variable in the vars folder by appending it to ansible_env.HOME var, then that kubeconfig will be used by default in this role.
|
||
- name: Create quota2 namespace | ||
k8s: | ||
kubeconfig: "{{ kubeconfig_path }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you append the kubeconfig file path in ansible_env.HOME, you can remove this line, as the default kubeconfig will be used.
- name: Apply PodGroup configuration | ||
command: oc apply -f /root/po.yaml | ||
register: podgroup_create_output | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of defining the resource PodGroup in templates file and using it to create, you can define and create it here itself using k8s module.
- name: Apply Deployment configuration | ||
command: oc apply -f /root/deploy.yaml | ||
register: deploy_create_output | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, you can define and create the deployment here itself using k8s module.
retries: 5 | ||
delay: 10 | ||
|
||
- name: Clean up temporary files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this task, if the above comments are implemented
namespace: scheduler-plugins | ||
dest: /root/cm.yaml | ||
when: cm_exists.rc != 0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the k8s module the create the resources, instead of defining the resource in a yaml file and copying it to /root folder
dest: '/root/scheduler-plugins' | ||
version: 'master' | ||
|
||
- name: Install scheduler-plugins Helm chart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can add a task to check if helm is installed
No description provided.