mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-22 09:03:35 +00:00
release 0.13.1 csv bundle (#416)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
This commit is contained in:
@@ -12,9 +12,7 @@ KLUSTERLET_NAME?=klusterlet
|
||||
|
||||
SED_CMD:=sed
|
||||
ifeq ($(GOHOSTOS),darwin)
|
||||
ifeq ($(GOHOSTARCH),amd64)
|
||||
SED_CMD:=gsed
|
||||
endif
|
||||
SED_CMD:=gsed
|
||||
endif
|
||||
|
||||
hub-kubeconfig:
|
||||
@@ -29,7 +27,7 @@ deploy-hub-operator: ensure-kustomize
|
||||
mv deploy/cluster-manager/config/kustomization.yaml.tmp deploy/cluster-manager/config/kustomization.yaml
|
||||
|
||||
apply-hub-cr:
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/placement,$(PLACEMENT_IMAGE)," -e "s,quay.io/open-cluster-management/addon-manager,$(ADDON_MANAGER_IMAGE)," deploy/cluster-manager/config/samples/operator_open-cluster-management_clustermanagers.cr.yaml | $(KUBECTL) apply -f -
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration:latest,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work:latest,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/placement:latest,$(PLACEMENT_IMAGE)," -e "s,quay.io/open-cluster-management/addon-manager:latest,$(ADDON_MANAGER_IMAGE)," deploy/cluster-manager/config/samples/operator_open-cluster-management_clustermanagers.cr.yaml | $(KUBECTL) apply -f -
|
||||
|
||||
test-e2e: deploy-hub deploy-spoke-operator run-e2e
|
||||
|
||||
@@ -62,7 +60,7 @@ deploy-spoke-operator: ensure-kustomize
|
||||
|
||||
apply-spoke-cr: bootstrap-secret
|
||||
$(KUSTOMIZE) build deploy/klusterlet/config/samples \
|
||||
| $(SED_CMD) -e "s,quay.io/open-cluster-management/registration$$,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/registration-operator,$(OPERATOR_IMAGE_NAME)," -e "s,cluster1,$(MANAGED_CLUSTER_NAME)," \
|
||||
| $(SED_CMD) -e "s,quay.io/open-cluster-management/registration:latest,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work:latest,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/registration-operator:latest,$(OPERATOR_IMAGE_NAME)," -e "s,cluster1,$(MANAGED_CLUSTER_NAME)," \
|
||||
| $(KUBECTL) apply -f -
|
||||
|
||||
clean-hub-cr:
|
||||
@@ -95,7 +93,7 @@ deploy-hub-hosted: deploy-hub-operator apply-hub-cr-hosted hub-kubeconfig-hosted
|
||||
deploy-spoke-hosted: deploy-spoke-operator apply-spoke-cr-hosted
|
||||
|
||||
apply-hub-cr-hosted: external-hub-secret
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/placement,$(PLACEMENT_IMAGE)," -e "s,quay.io/open-cluster-management/addon-manager,$(ADDON_MANAGER_IMAGE)," deploy/cluster-manager/config/samples/operator_open-cluster-management_clustermanagers_hosted.cr.yaml | $(KUBECTL) apply -f -
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration:latest,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work:latest,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/placement:latest,$(PLACEMENT_IMAGE)," -e "s,quay.io/open-cluster-management/addon-manager:latest,$(ADDON_MANAGER_IMAGE)," deploy/cluster-manager/config/samples/operator_open-cluster-management_clustermanagers_hosted.cr.yaml | $(KUBECTL) apply -f -
|
||||
|
||||
clean-spoke-hosted: clean-spoke-cr-hosted clean-spoke-operator
|
||||
|
||||
@@ -115,7 +113,7 @@ bootstrap-secret-hosted:
|
||||
$(KUSTOMIZE) build deploy/klusterlet/config/samples/bootstrap | $(SED_CMD) -e "s,namespace: open-cluster-management-agent,namespace: $(KLUSTERLET_NAME)," | $(KUBECTL) apply -f -
|
||||
|
||||
apply-spoke-cr-hosted: bootstrap-secret-hosted external-managed-secret
|
||||
$(KUSTOMIZE) build deploy/klusterlet/config/samples | $(SED_CMD) -e "s,mode: Singleton,mode: SingletonHosted," -e "s,quay.io/open-cluster-management/registration$$,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/registration-operator,$(OPERATOR_IMAGE_NAME)," -e "s,cluster1,$(MANAGED_CLUSTER_NAME)," -e "s,name: klusterlet,name: $(KLUSTERLET_NAME)," -r | $(KUBECTL) apply -f -
|
||||
$(KUSTOMIZE) build deploy/klusterlet/config/samples | $(SED_CMD) -e "s,mode: Singleton,mode: SingletonHosted," -e "s,quay.io/open-cluster-management/registration:latest,$(REGISTRATION_IMAGE)," -e "s,quay.io/open-cluster-management/work:latest,$(WORK_IMAGE)," -e "s,quay.io/open-cluster-management/registration-operator:latest,$(OPERATOR_IMAGE_NAME)," -e "s,cluster1,$(MANAGED_CLUSTER_NAME)," -e "s,name: klusterlet,name: $(KLUSTERLET_NAME)," -r | $(KUBECTL) apply -f -
|
||||
|
||||
clean-hub-cr-hosted:
|
||||
$(KUBECTL) delete managedcluster --all --ignore-not-found
|
||||
|
||||
@@ -76,8 +76,8 @@ var _ = ginkgo.BeforeSuite(func() {
|
||||
testEnv = &envtest.Environment{
|
||||
ErrorIfCRDPathMissing: true,
|
||||
CRDDirectoryPaths: []string{
|
||||
filepath.Join(".", "deploy", "cluster-manager", "olm-catalog", "cluster-manager", "manifests"),
|
||||
filepath.Join(".", "deploy", "klusterlet", "olm-catalog", "klusterlet", "manifests"),
|
||||
filepath.Join(".", "deploy", "cluster-manager", "olm-catalog", "latest", "manifests"),
|
||||
filepath.Join(".", "deploy", "klusterlet", "olm-catalog", "latest", "manifests"),
|
||||
},
|
||||
}
|
||||
cfg, err := testEnv.Start()
|
||||
@@ -104,8 +104,8 @@ var _ = ginkgo.BeforeSuite(func() {
|
||||
hostedTestEnv = &envtest.Environment{
|
||||
ErrorIfCRDPathMissing: true,
|
||||
CRDDirectoryPaths: []string{
|
||||
filepath.Join(".", "deploy", "cluster-manager", "olm-catalog", "cluster-manager", "manifests"),
|
||||
filepath.Join(".", "deploy", "klusterlet", "olm-catalog", "klusterlet", "manifests"),
|
||||
filepath.Join(".", "deploy", "cluster-manager", "olm-catalog", "latest", "manifests"),
|
||||
filepath.Join(".", "deploy", "klusterlet", "olm-catalog", "latest", "manifests"),
|
||||
},
|
||||
}
|
||||
hostedConfig, err := hostedTestEnv.Start()
|
||||
|
||||
@@ -7,15 +7,34 @@ install-olm: ensure-operator-sdk
|
||||
$(KUBECTL) get ns open-cluster-management ; if [ $$? -ne 0 ] ; then $(KUBECTL) create ns open-cluster-management ; fi
|
||||
|
||||
deploy-hub-operator-olm: install-olm
|
||||
$(OPERATOR_SDK) run packagemanifests deploy/cluster-manager/olm-catalog/cluster-manager/ --namespace open-cluster-management --version $(CSV_VERSION) --install-mode OwnNamespace --timeout=10m
|
||||
$(OPERATOR_SDK) run packagemanifests deploy/cluster-manager/olm-catalog/ --namespace open-cluster-management --version $(CSV_VERSION) --install-mode OwnNamespace --timeout=10m
|
||||
|
||||
clean-hub-olm: ensure-operator-sdk
|
||||
$(KUBECTL) delete -f deploy/cluster-manager/config/samples/operator_open-cluster-management_clustermanagers.cr.yaml --ignore-not-found
|
||||
$(OPERATOR_SDK) cleanup cluster-manager --namespace open-cluster-management --timeout 10m
|
||||
|
||||
deploy-spoke-operator-olm: install-olm
|
||||
$(OPERATOR_SDK) run packagemanifests deploy/klusterlet/olm-catalog/klusterlet/ --namespace open-cluster-management --version $(CSV_VERSION) --install-mode OwnNamespace --timeout=10m
|
||||
$(OPERATOR_SDK) run packagemanifests deploy/klusterlet/olm-catalog/ --namespace open-cluster-management --version $(CSV_VERSION) --install-mode OwnNamespace --timeout=10m
|
||||
|
||||
clean-spoke-olm: ensure-operator-sdk
|
||||
$(KUBECTL) delete -f deploy/klusterlet/config/samples/operator_open-cluster-management_klusterlets.cr.yaml --ignore-not-found
|
||||
$(OPERATOR_SDK) cleanup klusterlet --namespace open-cluster-management --timeout 10m
|
||||
|
||||
# generate a released csv bundle files, the released version should be set to RELEASED_CSV_VERSION.
|
||||
release-csv: ensure-operator-sdk
|
||||
# generate released csv bundle files
|
||||
cd deploy/cluster-manager && ../../$(OPERATOR_SDK) generate bundle --version $(RELEASED_CSV_VERSION) --package cluster-manager --channels stable --default-channel stable --input-dir config --output-dir olm-catalog/$(RELEASED_CSV_VERSION)
|
||||
cd deploy/klusterlet && ../../$(OPERATOR_SDK) generate bundle --version $(RELEASED_CSV_VERSION) --package klusterlet --channels stable --default-channel stable --input-dir config --output-dir olm-catalog/$(RELEASED_CSV_VERSION)
|
||||
|
||||
# update the image in the csv
|
||||
$(SED_CMD) -e "s,quay.io/open-cluster-management/registration-operator:latest,quay.io/open-cluster-management/registration-operator:v$(RELEASED_CSV_VERSION),"\
|
||||
-e "s,quay.io/open-cluster-management/registration:latest,quay.io/open-cluster-management/registration:v$(RELEASED_CSV_VERSION),"\
|
||||
-e "s,quay.io/open-cluster-management/work:latest,quay.io/open-cluster-management/work:v$(RELEASED_CSV_VERSION),"\
|
||||
-e "s,quay.io/open-cluster-management/placement:latest,quay.io/open-cluster-management/placement:v$(RELEASED_CSV_VERSION),"\
|
||||
-e "s,quay.io/open-cluster-management/addon-manager:latest,quay.io/open-cluster-management/addon-manager:v$(RELEASED_CSV_VERSION),"\
|
||||
-i deploy/cluster-manager/olm-catalog/$(RELEASED_CSV_VERSION)/manifests/cluster-manager.clusterserviceversion.yaml\
|
||||
-i deploy/klusterlet/olm-catalog/$(RELEASED_CSV_VERSION)/manifests/klusterlet.clusterserviceversion.yaml
|
||||
|
||||
# delete bundle.Dockerfile since we do not use it to build image.
|
||||
rm ./deploy/cluster-manager/bundle.Dockerfile
|
||||
rm ./deploy/klusterlet/bundle.Dockerfile
|
||||
|
||||
Reference in New Issue
Block a user