@@ -511,6 +511,12 @@ SWIFT_KUTTL_NAMESPACE ?= swift-kuttl-tests
511511CERTMANAGER_TIMEOUT ?= 300s
512512INSTALL_CERT_MANAGER ?= true
513513
514+ # Redis
515+ # REDIS_IMG ?= (this is unused because this is part of infra operator)
516+ REDIS ?= config/samples/redis_v1beta1_redis.yaml
517+ REDIS_CR ?= ${OPERATOR_BASE_DIR}/infra-operator-redis/${REDIS}
518+ REDIS_DEPL_IMG ?= unused
519+
514520# target vars for generic operator install info 1: target name , 2: operator name
515521define vars
516522${1}: export NAMESPACE=${NAMESPACE}
@@ -564,7 +570,7 @@ help: ## Display this help.
564570cleanup : heat_cleanup horizon_cleanup nova_cleanup octavia_cleanup designate_cleanup neutron_cleanup ovn_cleanup ironic_cleanup cinder_cleanup glance_cleanup placement_cleanup swift_cleanup barbican_cleanup keystone_cleanup mariadb_cleanup telemetry_cleanup ansibleee_cleanup rabbitmq_cleanup infra_cleanup manila_cleanup metallb_cleanup # # Delete all operators
565571
566572.PHONY : deploy_cleanup
567- deploy_cleanup : manila_deploy_cleanup heat_deploy_cleanup horizon_deploy_cleanup nova_deploy_cleanup octavia_deploy_cleanup designate_deploy_cleanup neutron_deploy_cleanup ovn_deploy_cleanup ironic_deploy_cleanup cinder_deploy_cleanup glance_deploy_cleanup placement_deploy_cleanup swift_deploy_cleanup barbican_deploy_cleanup keystone_deploy_cleanup mariadb_deploy_cleanup telemetry_deploy_cleanup memcached_deploy_cleanup rabbitmq_deploy_cleanup # # Delete all OpenStack service objects
573+ deploy_cleanup : manila_deploy_cleanup heat_deploy_cleanup horizon_deploy_cleanup nova_deploy_cleanup octavia_deploy_cleanup designate_deploy_cleanup neutron_deploy_cleanup ovn_deploy_cleanup ironic_deploy_cleanup cinder_deploy_cleanup glance_deploy_cleanup placement_deploy_cleanup swift_deploy_cleanup barbican_deploy_cleanup keystone_deploy_cleanup redis_deploy_cleanup mariadb_deploy_cleanup telemetry_deploy_cleanup memcached_deploy_cleanup rabbitmq_deploy_cleanup # # Delete all OpenStack service objects
568574
569575.PHONY : wait
570576wait : # # wait for an operator's controller-manager pod to be ready (requires OPERATOR_NAME to be explicitly passed!)
@@ -1783,7 +1789,7 @@ octavia_kuttl_run: ## runs kuttl tests for the octavia operator, assumes that ev
17831789
17841790.PHONY : octavia_kuttl
17851791octavia_kuttl : export NAMESPACE = ${OCTAVIA_KUTTL_NAMESPACE}
1786- octavia_kuttl : kuttl_common_prep ovn ovn_deploy neutron neutron_deploy placement placement_deploy nova nova_deploy glance glance_deploy octavia octavia_deploy_prep # # runs kuttl tests for the octavia operator. Installs octavia operator and cleans up previous deployments before running the tests, add cleanup after running the tests.
1792+ octavia_kuttl : kuttl_common_prep ovn ovn_deploy redis_deploy neutron neutron_deploy placement placement_deploy nova nova_deploy glance glance_deploy octavia octavia_deploy_prep # # runs kuttl tests for the octavia operator. Installs octavia operator and cleans up previous deployments before running the tests, add cleanup after running the tests.
17871793 make wait OPERATOR_NAME=neutron
17881794 make wait OPERATOR_NAME=placement
17891795 make wait OPERATOR_NAME=nova
@@ -2619,3 +2625,31 @@ ifeq ($(OKD), true)
26192625else
26202626 bash scripts/validate-marketplace.sh
26212627endif
2628+
2629+ # #@ REDIS
2630+ .PHONY : redis_deploy_prep
2631+ redis_deploy_prep : export KIND=Redis
2632+ redis_deploy_prep : export NAME=redis
2633+ redis_deploy_prep : export IMAGE=${REDIS_DEPL_IMG}
2634+ redis_deploy_prep : export REPO=${INFRA_REPO}
2635+ redis_deploy_prep : export BRANCH=${INFRA_BRANCH}
2636+ redis_deploy_prep : export HASH=${INFRA_COMMIT_HASH}
2637+ redis_deploy_prep : export ALT_CHECKOUT=redis
2638+ redis_deploy_prep : redis_deploy_cleanup # # prepares the CR to install the service based on the service sample file REDIS
2639+ $(eval $(call vars,$@ ,infra) )
2640+ mkdir -p ${OPERATOR_BASE_DIR} ${OPERATOR_DIR} ${OUT} /${NAMESPACE} /infra-redis/cr
2641+ bash scripts/clone-operator-repo.sh
2642+ cp ${REDIS_CR} ${OUT} /${NAMESPACE} /infra-redis/cr
2643+ DEPLOY_DIR=${OUT} /${NAMESPACE} /infra-redis/cr bash scripts/gen-service-kustomize.sh
2644+
2645+ .PHONY : redis_deploy
2646+ redis_deploy : input redis_deploy_prep # # installs the service instance using kustomize. Runs prep step in advance. Set INFRA_REPO and INFRA_BRANCH to deploy from a custom repo.
2647+ $(eval $(call vars,$@ ,infra) )
2648+ make wait
2649+ DEPLOY_DIR=${OUT} /${NAMESPACE} /infra-redis/cr bash scripts/operator-deploy-resources.sh
2650+
2651+ .PHONY : redis_deploy_cleanup
2652+ redis_deploy_cleanup : namespace # # cleans up the service instance, Does not affect the operator.
2653+ $(eval $(call vars,$@ ,infra) )
2654+ oc kustomize ${OUT} /${NAMESPACE} /infra-redis/cr | oc delete --ignore-not-found=true -f -
2655+ ${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR} /infra-operator-redis ${OUT} /${NAMESPACE} /infra-redis/cr
0 commit comments