Skip to content

Adding loki and minio roles#3793

Open
lnatapov wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
lnatapov:Adding_Loki_and_Minio_roles
Open

Adding loki and minio roles#3793
lnatapov wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
lnatapov:Adding_Loki_and_Minio_roles

Conversation

@lnatapov
Copy link

Adding loki and minio roles

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 24, 2026

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@lnatapov lnatapov force-pushed the Adding_Loki_and_Minio_roles branch from c27b274 to 234412e Compare March 24, 2026 12:22
@softwarefactory-project-zuul
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/31a8ffddf00f47b0b5c670e611539d7d

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 02m 36s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 22m 17s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 27m 18s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 1h 49m 01s
cifmw-pod-zuul-files FAILURE in 4m 26s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 14s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 40s
✔️ cifmw-molecule-deploy_loki SUCCESS in 1m 40s
✔️ cifmw-molecule-deploy_minio SUCCESS in 2m 07s

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

@lnatapov lnatapov force-pushed the Adding_Loki_and_Minio_roles branch 2 times, most recently from 92166c4 to dad3cd0 Compare March 24, 2026 15:37
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>
Copy link
Contributor

@michburk michburk left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Same critique here as on the cifmw_deploy_loki: true line

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.

3 participants