Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Update kustomize examples #764

Merged

Conversation

fao89
Copy link
Collaborator

@fao89 fao89 commented Mar 13, 2024

No description provided.

Copy link
Contributor

openshift-ci bot commented Mar 13, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

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://review.rdoproject.org/zuul/buildset/b98b4dba17244f668c3bf46166dff9af

dataplane-operator-docs-preview POST_FAILURE in 2m 48s

@fao89
Copy link
Collaborator Author

fao89 commented Mar 14, 2024

@slagle @igallagh-redhat I moved the nova case into a kustomize example,
I noticed if I change the examples to only customize the nodeset, the deployment part of the doc would be totally based on the sample, as kustomize needs nodeset and deployment in the same kustomization.yaml to be clever about replacing the nodeset name in the right place.

@fao89
Copy link
Collaborator Author

fao89 commented Mar 14, 2024

For users familiar with kustomize docs, just sharing the examples is enough,
but for users that are not familiar with kustomize we would end up rewriting kustomize documentation.
Maybe we should use inline samples: #769

@SeanMooney
Copy link
Contributor

i find this quite simple to understand https://github.com/openstack-k8s-operators/dataplane-operator/pull/769/files is less clear to me with regards to what that is adding

@SeanMooney
Copy link
Contributor

SeanMooney commented Mar 14, 2024

i do like the approch of testing the example with kuttl and ectra and reusign the examples in the docs. perhaps you could expalin one vers the other approch in general.

one thing i will say is i foudn the numeric callouts (1,2,3,4) ectra to be quite distracting and i would stongly prefer if we did no pullutate the examples like taht

instead we should repeat the section taht we wnat to calll out aftre the exampel and describe it rather then anotating in line.

https://logserver.rdoproject.org/69/769/f66663a134d4128710f779a83554543c65e369da/github-check/dataplane-operator-docs-preview/aeab6fd/docs_build/docs_build/dataplane/index-upstream.html#ref_example-OpenStackDataPlaneNodeSet-CR-for-preprovisioned-nodes_dataplane


* Pre-provisioned nodes:

kustomize build preprovisioned > openstack-edpm.yaml
kustomize build preprovisioned_nodeset > openstack-edpm.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think we want to use oc kustomize in all the examples b/c that is how it comes packaged with the ocp client.

Copy link
Collaborator

Choose a reason for hiding this comment

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

also anywhere we are saying to modify the generated CR, can we use a kustomize example instead. For instance, steps 7 and 10.

- libvirt
- *nova-cell-custom*
- telemetry
----
Copy link
Collaborator

Choose a reason for hiding this comment

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

since this is dropped, where is it done in the kustomize (adding the custom service to the NodeSet)?

We need to think about how a user is going to combine the kustomize examples to generate the desired set of CRs. For example, what would be the process for using both examples/baremetal and examples/nova_cell_custom?

@fao89 fao89 force-pushed the kustomizeupdate branch 2 times, most recently from 43d1cb6 to 574b9fa Compare March 19, 2024 12:10
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://review.rdoproject.org/zuul/buildset/f864f33b77684237a01f6d6727f0a4b4

dataplane-operator-docs-preview POST_FAILURE in 2m 51s

@fao89 fao89 force-pushed the kustomizeupdate branch 3 times, most recently from 30fb205 to 45f3444 Compare March 19, 2024 13:54
@fao89 fao89 changed the title Update kustomize examples and docs Update kustomize examples Mar 19, 2024
@fao89 fao89 marked this pull request as ready for review March 19, 2024 13:54
@openshift-ci openshift-ci bot requested review from frenzyfriday and viroel March 19, 2024 13:54
Comment on lines +1 to +3
[compute]
cpu_shared_set = 2,6
cpu_dedicated_set = 1,3,5,7
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@SeanMooney @gibizer is this a valid extra conf?

Copy link
Contributor

Choose a reason for hiding this comment

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

If the edpm node has at least 8 cpus available then yes. If the node does not have that many cpus then nova-compute will fail to start

Copy link
Collaborator Author

@fao89 fao89 left a comment

Choose a reason for hiding this comment

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

this PR will be about updating the kustomize examples, the docs change will be addressed at: #769

Comment on lines +1 to +3
[compute]
cpu_shared_set = 2,6
cpu_dedicated_set = 1,3,5,7
Copy link
Contributor

Choose a reason for hiding this comment

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

If the edpm node has at least 8 cpus available then yes. If the node does not have that many cpus then nova-compute will fail to start

examples/nova_cell_custom/kustomization.yaml Show resolved Hide resolved
patches:
- target:
kind: OpenStackDataPlaneService
name: nova
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we kustomize the nova service directly? I thought that dataplane-operator reconciles that automatically back to the stored sample in the repo

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

kustomize will just use the service as a base, patch it and then create nova-cell-custom

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, so we're kustomizing the name in kustomization.yaml so it won't get overwritten during service reconcile.

I agree though, this is confusing as openstackdataplanenovaservice.yaml is just a copy of config/services/dataplane_v1beta1_openstackdataplaneservice_nova.yaml. Now we'd have to maintain that in 2 places with this change.

This would be more powerful if we could figure out how to run this example directly against config/services/dataplane_v1beta1_openstackdataplaneservice_nova.yaml, and then document for a user how they would do that, b/c that is the most likely workflow for a user.

When I tried this diff:

Mon Mar 25 04:26:58 (jslagle@teletran-1) [~/code/osp-ng/openstack-k8s-operators/dataplane-operator/examples/nova_cell_custom] (kustomizeupdate)$ git diff
diff --git a/examples/nova_cell_custom/kustomization.yaml b/examples/nova_cell_custom/kustomization.yaml
index cb20d6b..441c4f0 100644
--- a/examples/nova_cell_custom/kustomization.yaml
+++ b/examples/nova_cell_custom/kustomization.yaml
@@ -7,7 +7,7 @@ components:
 - ../preprovisioned # for baremetal nodes, replace with baremetal
 
 resources:
-- openstackdataplanenovaservice.yaml
+- ../../config/services/dataplane_v1beta1_openstackdataplaneservice_nova.yaml
 
 configMapGenerator:
 - name: nova-extra-config

oc kustomize results in an error:

Mon Mar 25 04:28:09 (jslagle@teletran-1) [~/code/osp-ng/openstack-k8s-operators/dataplane-operator/examples/nova_cell_custom] (kustomizeupdate)$ oc kustomize .
error: accumulating resources: accumulation err='accumulating resources from '../../config/services/dataplane_v1beta1_openstackdataplaneservice_nova.yaml': security; file '/home/jslagle/code/osp-ng/openstack-k8s-operators/dataplane-operator/config/services/dataplane_v1beta1_openstackdataplaneservice_nova.yaml' is not in or below '/home/jslagle/code/osp-ng/openstack-k8s-operators/dataplane-operator/examples/nova_cell_custom'': must build at directory: '/home/jslagle/code/osp-ng/openstack-k8s-operators/dataplane-operator/config/services/dataplane_v1beta1_openstackdataplaneservice_nova.yaml': file is not directory

Is there a way we could make this work?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, so this works with the diff above:

oc kustomize --load-restrictor LoadRestrictionsNone .

I think we need to get rid of the file duplication and document it this way, unless there are other options?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed the duplication of the nodeset and deployment samples, now all the kustomize examples needs this, I started this: openstack-k8s-operators/install_yamls#787

@fao89
Copy link
Collaborator Author

fao89 commented Mar 19, 2024

/test dataplane-operator-build-deploy-kuttl

1 similar comment
@fao89
Copy link
Collaborator Author

fao89 commented Mar 19, 2024

/test dataplane-operator-build-deploy-kuttl

@fao89 fao89 force-pushed the kustomizeupdate branch from 45f3444 to 7099ef0 Compare March 25, 2024 21:49
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://review.rdoproject.org/zuul/buildset/af591cc2051946919a6f0bee3d6c1a8a

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 49m 46s
podified-multinode-edpm-deployment-crc FAILURE in 50m 25s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 26m 58s
✔️ dataplane-operator-docs-preview SUCCESS in 2m 17s

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://review.rdoproject.org/zuul/buildset/4c680c2d2550400c873a37a16eba611c

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 56m 51s
podified-multinode-edpm-deployment-crc FAILURE in 50m 32s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 25m 14s
✔️ dataplane-operator-docs-preview SUCCESS in 2m 30s

@fao89 fao89 force-pushed the kustomizeupdate branch from 8fc6c5c to cf45c3f Compare March 26, 2024 16:18
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://review.rdoproject.org/zuul/buildset/bca36f04245b48de98be45befca74322

openstack-k8s-operators-content-provider FAILURE in 17m 57s
⚠️ podified-multinode-edpm-deployment-crc SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ cifmw-crc-podified-edpm-baremetal SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
✔️ dataplane-operator-docs-preview SUCCESS in 2m 36s

@fao89 fao89 force-pushed the kustomizeupdate branch 2 times, most recently from 291eec0 to 0278223 Compare March 26, 2024 16:54
@fao89
Copy link
Collaborator Author

fao89 commented Mar 26, 2024

pre-commit fix: openshift/release#50256

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://review.rdoproject.org/zuul/buildset/62a78d66f8d547eda35c8a190ca72fbb

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 53m 29s
podified-multinode-edpm-deployment-crc FAILURE in 50m 36s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 31m 34s
✔️ dataplane-operator-docs-preview SUCCESS in 2m 32s

@fao89
Copy link
Collaborator Author

fao89 commented Mar 26, 2024

/test precommit-check

@fao89 fao89 force-pushed the kustomizeupdate branch 2 times, most recently from 8603e1f to f3d3a67 Compare March 26, 2024 23:32
@fao89
Copy link
Collaborator Author

fao89 commented Mar 26, 2024

needs: openshift/release#50266

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://review.rdoproject.org/zuul/buildset/bea1c7c1839f471383d19b751d97bb36

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 13m 02s
podified-multinode-edpm-deployment-crc FAILURE in 50m 22s
cifmw-crc-podified-edpm-baremetal FAILURE in 19m 33s
✔️ dataplane-operator-docs-preview SUCCESS in 2m 24s

@fao89
Copy link
Collaborator Author

fao89 commented Mar 27, 2024

/test precommit-check

@fao89
Copy link
Collaborator Author

fao89 commented Mar 27, 2024

recheck

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://review.rdoproject.org/zuul/buildset/a0e461c9fbc64ec0ab9159b213f6d595

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 35m 14s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 12m 22s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 34m 02s
✔️ dataplane-operator-docs-preview SUCCESS in 2m 27s

@fao89
Copy link
Collaborator Author

fao89 commented Mar 27, 2024

recheck unreachable

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://review.rdoproject.org/zuul/buildset/775f6394bb4148908e7e38133f8cd91f

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 01m 10s
podified-multinode-edpm-deployment-crc FAILURE in 1h 11m 15s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 28m 29s
✔️ dataplane-operator-docs-preview SUCCESS in 2m 33s

@fao89
Copy link
Collaborator Author

fao89 commented Mar 28, 2024

recheck

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://review.rdoproject.org/zuul/buildset/b0aeea0b42a2471dae53d82caac128a2

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 22m 31s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 07m 51s
cifmw-crc-podified-edpm-baremetal FAILURE in 1h 28m 12s
✔️ dataplane-operator-docs-preview SUCCESS in 3m 08s

Renaming values to make easier to compose i.e.  replace components with other scenarios

Signed-off-by: Fabricio Aguiar <[email protected]>
@fao89 fao89 force-pushed the kustomizeupdate branch from f3d3a67 to 1a4ef53 Compare March 28, 2024 12:49
Signed-off-by: Fabricio Aguiar <[email protected]>
@fao89 fao89 force-pushed the kustomizeupdate branch from 1a4ef53 to b8e5e96 Compare March 28, 2024 13:27
@fao89 fao89 requested a review from slagle March 28, 2024 16:37
Copy link
Contributor

openshift-ci bot commented Mar 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fao89, slagle

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-merge-bot openshift-merge-bot bot merged commit 7f01dea into openstack-k8s-operators:main Mar 29, 2024
8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants