From e0fcb1e8c181a9e1be24766b9830f5a4d657bd3d Mon Sep 17 00:00:00 2001 From: Andrew Bays Date: Fri, 15 Nov 2024 17:24:29 +0000 Subject: [PATCH] Support new OpenStack initialization resource for RHOSO install --- examples/common/README.md | 24 ++++++++++++++++---- examples/common/openstack/kustomization.yaml | 3 +++ lib/openstack/kustomization.yaml | 6 +++++ lib/openstack/openstack_deploy.yaml | 6 +++++ 4 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 examples/common/openstack/kustomization.yaml create mode 100644 lib/openstack/kustomization.yaml create mode 100644 lib/openstack/openstack_deploy.yaml diff --git a/examples/common/README.md b/examples/common/README.md index 8c999f312..e43e11e07 100644 --- a/examples/common/README.md +++ b/examples/common/README.md @@ -16,14 +16,12 @@ Create the CRs. ``` oc apply -k examples/common/olm/ ``` -Watch the OpenStack operator pods start. -``` -oc get pods -w -n openstack-operators -``` The following commands can be used to confirm that each step of this procedure is complete. ``` -while ! (oc get pod --no-headers=true -l name=cert-manager-operator -n cert-manager-operator| grep "cert-manager-operator"); do sleep 10; done +while ! (oc get pod --no-headers=true -l openstack.org/operator-name=openstack-controller -n openstack-operators | grep "controller-operator"); do sleep 10; done +oc wait pod -n openstack-operators --for condition=Ready -l openstack.org/operator-name=openstack-controller --timeout=300s +while ! (oc get pod --no-headers=true -l name=cert-manager-operator -n cert-manager-operator | grep "cert-manager-operator"); do sleep 10; done oc wait pod -n cert-manager-operator --for condition=Ready -l name=cert-manager-operator --timeout=300s while ! (oc get pod --no-headers=true -l app=cainjector -n cert-manager | grep "cert-manager-cainjector"); do sleep 10; done oc wait pod -n cert-manager -l app=cainjector --for condition=Ready --timeout=300s @@ -76,3 +74,19 @@ oc wait pod -n openshift-nmstate -l component=kubernetes-nmstate-handler --for c timeout 300 bash -c "while ! (oc get deployments/nmstate-webhook -n openshift-nmstate); do sleep 10; done" oc wait deployments/nmstate-webhook -n openshift-nmstate --for condition=Available --timeout=300s ``` + +# OpenStack + +Observe CRs which will be generated. +``` +kustomize build examples/common/openstack/ +``` +Create the CRs. +``` +oc apply -k examples/common/openstack/ +``` +The following command can be used to confirm that each step of this +procedure is complete. +``` +oc wait -n openstack-operators openstack openstack --for condition=Ready --timeout=300s +``` \ No newline at end of file diff --git a/examples/common/openstack/kustomization.yaml b/examples/common/openstack/kustomization.yaml new file mode 100644 index 000000000..48f993e16 --- /dev/null +++ b/examples/common/openstack/kustomization.yaml @@ -0,0 +1,3 @@ +--- +components: + - ../../../lib/openstack diff --git a/lib/openstack/kustomization.yaml b/lib/openstack/kustomization.yaml new file mode 100644 index 000000000..5255e4ece --- /dev/null +++ b/lib/openstack/kustomization.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - openstack_deploy.yaml diff --git a/lib/openstack/openstack_deploy.yaml b/lib/openstack/openstack_deploy.yaml new file mode 100644 index 000000000..b751993f1 --- /dev/null +++ b/lib/openstack/openstack_deploy.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: operator.openstack.org/v1beta1 +kind: OpenStack +metadata: + name: openstack + namespace: openstack-operators