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

Reduce the operator bundle sizes #1185

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dprince
Copy link
Contributor

@dprince dprince commented Nov 14, 2024

This PR creates a new "initialization resource" to reduce bundle size and streamline deployment

The initialization resource takes care of installing CRDs, RBAC, and also creates deployments for operators

When compared to the old mechanism (i.e. using OLM) this new approach:
-only installs webhooks on the top level openstack-operator (may need them for infra/test operators too though)
-uses Certmanager directly for webhook certs (vs. having OLM create them)
-requires no other Openstack bundle dependencies (simpler)
-no bundle size limit as we store all things in the openstack-operator container

Implementation details:
-Dockerfile is updated to include new 'operator' binary and bindata directory. Bindata will contain all the CRDs, RBAC, and deployment files needed to deploy all the operators.
-Add Makefile targets for bindata, and run-operator.
-Forklift bindata impl from old CNOSP compute_node_operator.
-Implement new controllers/operator/openstack_controller.go which process files in /bindata using bindata impl (uses k8s unstructured client).
-Calling 'make bindata' during a Renovate sync should keep it in sync.

Jira: OSPRH-11244

Depends-On: openstack-k8s-operators/ci-framework#2631

Copy link
Contributor

openshift-ci bot commented Nov 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprince

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

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/b38fc0f49ef14e869d3e407b5e0dc55d

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 55m 23s
podified-multinode-edpm-deployment-crc FAILURE in 31m 41s
cifmw-crc-podified-edpm-baremetal FAILURE in 33m 58s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 40m 38s
openstack-operator-tempest-multinode FAILURE in 38m 35s
✔️ openstack-operator-docs-preview SUCCESS in 2m 06s

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/6e091c5f71e84cc3addb4875b8075781

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 34m 54s
podified-multinode-edpm-deployment-crc FAILURE in 33m 05s
cifmw-crc-podified-edpm-baremetal FAILURE in 39m 36s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 40m 50s
openstack-operator-tempest-multinode FAILURE in 35m 31s
✔️ openstack-operator-docs-preview SUCCESS in 2m 00s

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/21a654ede32742b580a01cbe43a0e3ae

openstack-k8s-operators-content-provider FAILURE in 8m 02s
⚠️ 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
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
✔️ openstack-operator-docs-preview SUCCESS in 1m 59s

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/7828a64b64024513997c9b44d8e99b66

openstack-k8s-operators-content-provider FAILURE in 4m 18s
⚠️ 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
⚠️ adoption-standalone-to-crc-ceph-provider SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ openstack-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
✔️ openstack-operator-docs-preview SUCCESS in 1m 55s

@bogdando

This comment was marked as resolved.

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/d02a9d8fa37c440bb90bb4e77621079b

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 35m 57s
podified-multinode-edpm-deployment-crc FAILURE in 32m 45s
cifmw-crc-podified-edpm-baremetal FAILURE in 36m 42s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 39m 23s
openstack-operator-tempest-multinode FAILURE in 36m 49s
✔️ openstack-operator-docs-preview SUCCESS in 2m 21s

@bshephar
Copy link
Contributor

I'm all for this. I think OLM is great, but it's really designed for simpler operators. We have a lot of complexity, so the more of that complexity that we can handle on our own, independent of OLM, the better I think the overall experience will be. For users, but also for developers.

@bogdando
Copy link

I'm all for this. I think OLM is great, but it's really designed for simpler operators. We have a lot of complexity, so the more of that complexity that we can handle on our own, independent of OLM, the better I think the overall experience will be. For users, but also for developers.

complexity is pain, indeed.
We could, however, decouple everything and install simple operators with OLM. And do whatever we need to meta operators

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/33706df2396a45c9be1c54c083349fd7

✔️ openstack-k8s-operators-content-provider SUCCESS in 54m 43s
podified-multinode-edpm-deployment-crc FAILURE in 31m 03s
cifmw-crc-podified-edpm-baremetal FAILURE in 41m 15s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 40m 32s
openstack-operator-tempest-multinode FAILURE in 36m 02s
✔️ openstack-operator-docs-preview SUCCESS in 1m 59s

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/1f257e4277c9467181e84ee9e28981e7

✔️ openstack-k8s-operators-content-provider SUCCESS in 51m 29s
podified-multinode-edpm-deployment-crc FAILURE in 32m 12s
cifmw-crc-podified-edpm-baremetal FAILURE in 36m 32s
adoption-standalone-to-crc-ceph-provider RETRY_LIMIT in 37m 45s
openstack-operator-tempest-multinode FAILURE in 36m 23s
✔️ openstack-operator-docs-preview SUCCESS in 1m 56s

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/0e619b2d599b4d9d876ce8913a228fad

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 24m 26s
podified-multinode-edpm-deployment-crc POST_FAILURE in 1h 14m 24s
cifmw-crc-podified-edpm-baremetal POST_FAILURE in 1h 11m 35s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 10m 01s
openstack-operator-tempest-multinode POST_FAILURE in 1h 31m 05s
✔️ openstack-operator-docs-preview SUCCESS in 2m 06s

@abays
Copy link
Contributor

abays commented Jan 8, 2025

recheck

Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/openstack-operator for 1185,c5ed271934bac3bc30238427083295640dd7f528

operator-sdk create api --group operator --version v1beta1 --kind OpenStack

Jira: OSPRH-11244
Dockerfile is updated to include new 'operator' binary
and bindata directory. Bindata will contain
all the CRDs, RBAC, and deployment files needed
to deploy all the operators.

Add Makefile targets for bindata, and run-operator.

Forklift bindata impl from old CNOSP compute_node_operator.

Implement new controllers/operator/openstack_controller.go
which process files in /bindata.

Calling 'make bindata' during a Renovate sync should keep
things in sync.

Jira: OSPRH-11244
This is so it doesn't catch bindata files which we want to be checked in
after running 'make bindata'
Currently configured just to extra webhooks for the
infra operator as it is also a multigroup operator
which requires webhooks to be enabled
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/3e4d885c8f924fe693794c02e97cd3eb

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 33m 49s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 15m 11s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 18m 23s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 20m 38s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 29m 01s
✔️ openstack-operator-docs-preview SUCCESS in 2m 00s

@abays
Copy link
Contributor

abays commented Jan 9, 2025

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/3e4d885c8f924fe693794c02e97cd3eb

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 33m 49s ✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 15m 11s ✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 18m 23s ❌ adoption-standalone-to-crc-ceph-provider FAILURE in 2h 20m 38s ✔️ openstack-operator-tempest-multinode SUCCESS in 1h 29m 01s ✔️ openstack-operator-docs-preview SUCCESS in 2m 00s

I don't think the error is related to this PR, but perhaps:

FAILED - RETRYING: [localhost]: wait for Aodh to start up (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 60, "changed": true, "cmd": "set -euxo pipefail\n\n\noc wait pod --for condition=Ready --selector=service=aodh\n", "delta": "0:00:00.199179", "end": "2025-01-09 08:57:43.382967", "msg": "non-zero return code", "rc": 1, "start": "2025-01-09 08:57:43.183788", "stderr": "+ oc wait pod --for condition=Ready --selector=service=aodh\nerror: no matching resources found", "stderr_lines": ["+ oc wait pod --for condition=Ready --selector=service=aodh", "error: no matching resources found"], "stdout": "", "stdout_lines": []}

We'll try again...

@abays
Copy link
Contributor

abays commented Jan 9, 2025

recheck

Copy link

This change depends on a change that failed to merge.

Change openstack-k8s-operators/ci-framework#2631 is needed.

@abays
Copy link
Contributor

abays commented Jan 9, 2025

recheck

@abays
Copy link
Contributor

abays commented Jan 9, 2025

/test openstack-operator-build-deploy-kuttl

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/1420437ead764a6795293991ed6fa575

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 55m 19s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 10m 41s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 20m 52s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 11m 39s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 32m 04s
✔️ openstack-operator-docs-preview SUCCESS in 2m 03s

@abays
Copy link
Contributor

abays commented Jan 10, 2025

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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/866483e41c0343b7929c370a8200816b

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 39m 15s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 14m 31s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 20m 55s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 10m 48s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 33m 49s
✔️ openstack-operator-docs-preview SUCCESS in 2m 04s

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/76c6e80b45d64e4cac5e24e66c431669

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 30m 14s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 15m 52s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 24m 12s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 10m 55s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 39m 57s
✔️ openstack-operator-docs-preview SUCCESS in 2m 02s

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/8019eeef55e641f98099b5c4762aa975

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 22m 07s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 13m 52s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 21m 40s
adoption-standalone-to-crc-ceph-provider FAILURE in 2h 09m 20s
✔️ openstack-operator-tempest-multinode SUCCESS in 1h 29m 00s
✔️ openstack-operator-docs-preview SUCCESS in 2m 05s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants