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

Add openstack_crds_cleanup and openstack_patch_version target #964

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,12 @@ openstack_update_run:
$(eval $(call vars,$@,openstack))
bash scripts/openstack-update.sh

OV := $(shell oc get openstackversion -n $(NAMESPACE) -o name)
.PHONY: openstack_patch_version
openstack_patch_version: ## patches the openstackversion target version to the available version, if there is an update available
$(eval $(call vars,$@,openstack))
oc wait -n ${NAMESPACE} ${OV} --for=condition=MinorUpdateAvailable --timeout=${TIMEOUT} && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we strictly need this new condition to implement upgrade testing. If we add it we'll have it on main, but not on the FR1 maintenance branch so we won't be able to use the job there.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is enough to just check that the new catalog/index is deployed and that OpenStackVersion is in a ReadyCondition True state. Then if targetVersion != availableVersion you'd know there is an update (and this is shown clearly on the CLI too)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as mentioned in the other PR, it just makes it a lot easier and it we can backport it. I'd say its a simple change and could be useful for any automation (also done by customers)

oc patch -n ${NAMESPACE} ${OV} --type merge --patch '{"spec": {"targetVersion": "$(shell oc get -n $(NAMESPACE) ${OV} -o yaml | yq .status.availableVersion)"}}'

.PHONY: edpm_deploy_generate_keys
edpm_deploy_generate_keys:
Expand Down Expand Up @@ -937,6 +943,10 @@ edpm_nova_discover_hosts: ## trigger manual compute host discovery in nova
openstack_crds: namespace openstack_deploy_prep ## installs all openstack CRDs. Useful for infrastructure dev
OPENSTACK_BUNDLE_IMG=${OPENSTACK_BUNDLE_IMG} OUT=${OUT} OPENSTACK_CRDS_DIR=${OPENSTACK_CRDS_DIR} OPERATOR_BASE_DIR=${OPERATOR_BASE_DIR} bash scripts/openstack-crds.sh

.PHONY: openstack_crds_cleanup
openstack_crds_cleanup: ## deletes all openstack CRDs. Useful for installing a ga version. expects that all deployments are gone before
oc delete $$(oc get crd -o name |grep 'openstack\.org')

.PHONY: edpm_deploy_networker_prep
edpm_deploy_networker_prep: export KIND=OpenStackDataPlaneNodeSet
edpm_deploy_networker_prep: export EDPM_ANSIBLE_SECRET=${DATAPLANE_ANSIBLE_SECRET}
Expand Down