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

Allow to inject custom wait_conditions during stages #1392

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

cjeanner
Copy link
Collaborator

@cjeanner cjeanner commented Apr 3, 2024

This feature is needed, especially in HCI scenario, when we want to
scale-out the deployment:
in order to do so, we have to create a new OpenStackDataPlaneDeployment
resource, with a new name to trigger the deployment of the new
compute(s).

In such a use-case, using [1] and the following parameters, we're able
to wait for the right resource to be ready:

cifmw_architecture_user_kustomize:
  stage_2:
    edpm-values:
      data:
        deployment:
          name: edpm-scale-out
cifmw_architecture_wait_condition:
  stage_2:
    - >-
      oc -n openstack wait
      osdpd edpm-scale-out --for condition=Ready
      --timeout=1500s

In this example, the first snippet will inject a user kustomization in
the ci_gen_kustomize_values role in order to override the resource name.
The second snippet will then inject a new wait_condition to the existing
one.
When the deployment hits the wait_conditions loop, it will pass over the
first one (since it's already done), and run the second condition until
it ends.

[1] openstack-k8s-operators/architecture#158

As a pull request owner and reviewers, I checked that:

  • Appropriate documentation exists and/or is up-to-date:
    • Content of the docs/source is reflecting the changes
  • I could run this on my local env, and it correctly generated the contents

@openshift-ci openshift-ci bot requested review from arxcruz and dsariel April 3, 2024 18:09
@openshift-ci openshift-ci bot added the lgtm label Apr 3, 2024
@cjeanner cjeanner force-pushed the architecture/extend-wait_conditions branch from b4c6314 to 7dbc6b1 Compare April 4, 2024 05:23
@openshift-ci openshift-ci bot removed the lgtm label Apr 4, 2024
This feature is needed, especially in HCI scenario, when we want to
scale-out the deployment:
in order to do so, we have to create a new OpenStackDataPlaneDeployment
resource, with a new name to trigger the deployment of the new
compute(s).

In such a use-case, using [1] and the following parameters, we're able
to wait for the right resource to be ready:

```YAML
cifmw_architecture_user_kustomize:
  stage_2:
    edpm-values:
      data:
        deployment:
          name: edpm-scale-out
cifmw_architecture_wait_condition:
  stage_2:
    - >-
      oc -n openstack wait
      osdpd edpm-scale-out --for condition=Ready
      --timeout=1500s
```

In this example, the first snippet will inject a user kustomization in
the ci_gen_kustomize_values role in order to override the resource name.
The second snippet will then inject a new wait_condition to the existing
one.
When the deployment hits the wait_conditions loop, it will pass over the
first one (since it's already done), and run the second condition until
it ends.

[1] openstack-k8s-operators/architecture#158
@cjeanner cjeanner force-pushed the architecture/extend-wait_conditions branch from 7dbc6b1 to 31ba93a Compare April 4, 2024 06:47
@cjeanner cjeanner requested a review from fao89 April 4, 2024 07:43
@pablintino
Copy link
Collaborator

/approve

Copy link
Contributor

openshift-ci bot commented Apr 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pablintino

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved label Apr 4, 2024
@openshift-ci openshift-ci bot added the lgtm label Apr 4, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 1632065 into main Apr 4, 2024
8 checks passed
@openshift-merge-bot openshift-merge-bot bot deleted the architecture/extend-wait_conditions branch April 4, 2024 08:47
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.

4 participants