Skip to content

Commit 578613e

Browse files
Merge pull request #946 from beagles/readd_redis
Readd redis
2 parents 9892d01 + 927cea5 commit 578613e

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

Makefile

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,12 @@ SWIFT_KUTTL_NAMESPACE ?= swift-kuttl-tests
521521
CERTMANAGER_TIMEOUT ?= 300s
522522
INSTALL_CERT_MANAGER ?= true
523523

524+
# Redis
525+
# REDIS_IMG ?= (this is unused because this is part of infra operator)
526+
REDIS ?= config/samples/redis_v1beta1_redis.yaml
527+
REDIS_CR ?= ${OPERATOR_BASE_DIR}/infra-operator-redis/${REDIS}
528+
REDIS_DEPL_IMG ?= unused
529+
524530
# target vars for generic operator install info 1: target name , 2: operator name
525531
define vars
526532
${1}: export NAMESPACE=${NAMESPACE}
@@ -574,7 +580,7 @@ help: ## Display this help.
574580
cleanup: 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
575581

576582
.PHONY: deploy_cleanup
577-
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
583+
deploy_cleanup: manila_deploy_cleanup heat_deploy_cleanup horizon_deploy_cleanup nova_deploy_cleanup redis_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
578584

579585
.PHONY: wait
580586
wait: ## wait for an operator's controller-manager pod to be ready (requires OPERATOR_NAME to be explicitly passed!)
@@ -1793,7 +1799,7 @@ octavia_kuttl_run: ## runs kuttl tests for the octavia operator, assumes that ev
17931799

17941800
.PHONY: octavia_kuttl
17951801
octavia_kuttl: export NAMESPACE = ${OCTAVIA_KUTTL_NAMESPACE}
1796-
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.
1802+
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.
17971803
make wait OPERATOR_NAME=neutron
17981804
make wait OPERATOR_NAME=placement
17991805
make wait OPERATOR_NAME=nova
@@ -1812,7 +1818,7 @@ octavia_kuttl: kuttl_common_prep ovn ovn_deploy neutron neutron_deploy placement
18121818

18131819
.PHONY: designate_kuttl
18141820
designate_kuttl: export NAMESPACE = ${DESIGNATE_KUTTL_NAMESPACE}
1815-
designate_kuttl: kuttl_common_prep ovn ovn_deploy designate designate_deploy_prep ## runs kuttl tests for the designate operator. Installs designate operator and cleans up previous deployments before running the tests and, add cleanup after running the tests.
1821+
designate_kuttl: kuttl_common_prep ovn ovn_deploy redis_deploy_prep designate designate_deploy_prep ## runs kuttl tests for the designate operator. Installs designate operator and cleans up previous deployments before running the tests and, add cleanup after running the tests.
18161822
$(eval $(call vars,$@,designate))
18171823
make wait
18181824
make designate_kuttl_run
@@ -2648,3 +2654,31 @@ ifeq ($(OKD), true)
26482654
else
26492655
bash scripts/validate-marketplace.sh
26502656
endif
2657+
2658+
##@ REDIS
2659+
.PHONY: redis_deploy_prep
2660+
redis_deploy_prep: export KIND=Redis
2661+
redis_deploy_prep: export NAME=redis
2662+
redis_deploy_prep: export IMAGE=${REDIS_DEPL_IMG}
2663+
redis_deploy_prep: export REPO=${INFRA_REPO}
2664+
redis_deploy_prep: export BRANCH=${INFRA_BRANCH}
2665+
redis_deploy_prep: export HASH=${INFRA_COMMIT_HASH}
2666+
redis_deploy_prep: export ALT_CHECKOUT=redis
2667+
redis_deploy_prep: redis_deploy_cleanup ## prepares the CR to install the service based on the service sample file REDIS
2668+
$(eval $(call vars,$@,infra))
2669+
mkdir -p ${OPERATOR_BASE_DIR} ${OPERATOR_DIR} ${OUT}/${NAMESPACE}/infra-redis/cr
2670+
bash scripts/clone-operator-repo.sh
2671+
cp ${REDIS_CR} ${OUT}/${NAMESPACE}/infra-redis/cr
2672+
DEPLOY_DIR=${OUT}/${NAMESPACE}/infra-redis/cr bash scripts/gen-service-kustomize.sh
2673+
2674+
.PHONY: redis_deploy
2675+
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.
2676+
$(eval $(call vars,$@,infra))
2677+
make wait
2678+
DEPLOY_DIR=${OUT}/${NAMESPACE}/infra-redis/cr bash scripts/operator-deploy-resources.sh
2679+
2680+
.PHONY: redis_deploy_cleanup
2681+
redis_deploy_cleanup: namespace ## cleans up the service instance, Does not affect the operator.
2682+
$(eval $(call vars,$@,infra))
2683+
oc kustomize ${OUT}/${NAMESPACE}/infra-redis/cr | oc delete --ignore-not-found=true -f -
2684+
${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR}/infra-operator-redis ${OUT}/${NAMESPACE}/infra-redis/cr

0 commit comments

Comments
 (0)