-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use extra_vars and CostManagement CR to drive data collection. #56
base: master
Are you sure you want to change the base?
Conversation
81aeeff
to
4e18d35
Compare
4e18d35
to
a7a060b
Compare
roles/setup/tasks/collect.yml
Outdated
|
||
- name: Format current_month string if less than 10 | ||
set_fact: | ||
current_month: '{{ "0" + (current_month | string) }}' |
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.
When I run this it results in the following error:
Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ current_month }}'.
ansible/ansible#39369 might have some helpful info
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.
fixed
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.
Left some initial feedback. Overall this approach is looking good - we will just want to test it really well before we merge. There might be some weirdness in getting defaults (I left a comment about the error I'm seeing) so we will need to work through that & there is still some cleanup to do in the tests/README.
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.
This is looking great! Can you remove the CostManagementData CR & CRD from the deploy/crds
directory and update the README here https://github.com/project-koku/korekuta-operator#creating-the-dependencies & fix the make command for deploying dependencies.
The ansible operator is passed extra_vars based on the Custom Resource it is reconciling. We should be using the CR data passed to us instead of looking up a defined name.
Use k8s_status to set and capture upload_attempt_time for executing data collection.
Remove usage of CostManagementData for reconciliation.
cost-mgmt-operator-7bb6b87fdd-zz67f.log