Adding loki and minio roles#3793
Adding loki and minio roles#3793lnatapov wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
Conversation
|
Hi @lnatapov. Thanks for your PR. I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
c27b274 to
234412e
Compare
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/31a8ffddf00f47b0b5c670e611539d7d ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 02m 36s |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
92166c4 to
dad3cd0
Compare
Add deploy_loki and deploy_minio Ansible roles, the deploy-loki-for-ck hook playbook, and ci/config fragment so cifmw-molecule-deploy_loki runs when roles/deploy_minio changes. Regenerate zuul.d/molecule.yaml with the role_molecule script. Signed-off-by: Leonid Natapov <lnatapov@redhat.com>
283cab5 to
f950d83
Compare
michburk
left a comment
There was a problem hiding this comment.
Would it be possible to use kubernetes.core.k8s and kubernetes.core.k8s_info in place of running oc commands through anisble.builtin.shell/ansible.builtin.command?
Additionally, README files for each role would help explain the usage and purpose of each role. In particular, explaining how the deploy_loki role can deploy minio itself, and expectations around which vars are passed/set and where when using pre-deployed minio vs having the deploy_loki role deploy minio.
| # All variables intended for modification should be placed in this file. | ||
| # All variables within this role should have a prefix of "cifmw_deploy_loki" | ||
|
|
||
| cifmw_deploy_loki: true |
There was a problem hiding this comment.
Sorry if I am misunderstanding something here, but surely you want to deploy loki if you're calling the deploy_loki role? It would make more sense to me to add a when condition on importing/including the deploy_loki role in the first place rather than adding some when: cifmw_deploy_loki | bool conditions to some tasks in the deploy_loki role.
| # cifmw_deploy_loki_deploy_minio is true, defaults match roles/deploy_minio. | ||
| cifmw_deploy_minio_namespace: minio-dev | ||
| cifmw_deploy_minio_access_key: minio | ||
| cifmw_deploy_minio_secret_key: minio123 |
There was a problem hiding this comment.
These vars violate your own rule you set on L18 of this file:
# All variables within this role should have a prefix of "cifmw_deploy_loki".
There are a couple ways you could remedy this,
for example, you could define these vars as cifmw_deploy_loki_minio_* instead and do something like:
- name: Deploy MinIO for Loki object storage
vars:
cifmw_deploy_minio_namespace: "{{ cifmw_deploy_loki_minio_namespace }}"
cifmw_deploy_minio_access_key: "{{ cifmw_deploy_loki_minio_access_key }}"
cifmw_deploy_minio_secret_key: "{{ cifmw_deploy_loki_minio_secret_key }}"
ansible.builtin.include_role:
name: deploy_minio
when:
- cifmw_deploy_loki | bool
- cifmw_deploy_loki_deploy_minio | bool
This makes the data flow explicit and avoids defining two separate sources of truth for each variable.
|
|
||
| # All variables within this role should have a prefix of "cifmw_deploy_minio" | ||
|
|
||
| cifmw_deploy_minio: true |
There was a problem hiding this comment.
Same critique here as on the cifmw_deploy_loki: true line
Adding loki and minio roles