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

remove addon manager #189

Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions .github/workflows/go-presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ jobs:
go-version: ${{ env.GO_VERSION }}
- name: install imagebuilder
run: go install github.com/openshift/imagebuilder/cmd/[email protected]
- name: addon-manager-image
run: make image-addon-manager
- name: addon-examples-image # will build and tag the examples image
run: imagebuilder --allow-pull -t quay.io/open-cluster-management/addon-examples:latest -t quay.io/ocm/addon-examples:latest -f ./build/Dockerfile.example .
- name: setup kind
Expand All @@ -124,7 +122,6 @@ jobs:
- name: Load image on the nodes of the cluster
run: |
kind load docker-image --name=cluster1 quay.io/open-cluster-management/addon-examples:latest
kind load docker-image --name=cluster1 quay.io/open-cluster-management/addon-manager:latest
kind load docker-image --name=cluster1 quay.io/ocm/addon-examples:latest
- name: Run e2e test
run: |
Expand Down
15 changes: 2 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ KUSTOMIZE_VERSION:=4.5.5
PWD=$(shell pwd)

# Image URL to use all building/pushing image targets;
MANAGER_IMAGE := addon-manager
EXAMPLE_IMAGE ?= addon-examples
IMAGE_REGISTRY ?= quay.io/open-cluster-management
IMAGE_TAG ?= latest
export MANAGER_IMAGE_NAME ?= $(IMAGE_REGISTRY)/$(MANAGER_IMAGE):$(IMAGE_TAG)
export EXAMPLE_IMAGE_NAME ?= $(IMAGE_REGISTRY)/$(EXAMPLE_IMAGE):$(IMAGE_TAG)

GIT_HOST ?= open-cluster-management.io
Expand All @@ -47,7 +45,6 @@ GO_TEST_PACKAGES :=./pkg/...
# $2 - Dockerfile path
# $3 - context directory for image build
# It will generate target "image-$(1)" for building the image and binding it as a prerequisite to target "images".
$(call build-image,$(MANAGER_IMAGE),$(IMAGE_REGISTRY)/$(MANAGER_IMAGE):$(IMAGE_TAG),./build/Dockerfile,.)
$(call build-image,$(EXAMPLE_IMAGE),$(IMAGE_REGISTRY)/$(EXAMPLE_IMAGE):$(IMAGE_TAG),./build/Dockerfile.example,.)

verify-gocilint:
Expand All @@ -62,12 +59,6 @@ deploy-ocm:
deploy-hosted-ocm:
examples/deploy/hosted-ocm/install.sh

deploy-addon-manager: ensure-kustomize
cp deploy/kustomization.yaml deploy/kustomization.yaml.tmp
cd deploy && ../$(KUSTOMIZE) edit set image quay.io/open-cluster-management/addon-manager=$(MANAGER_IMAGE_NAME)
$(KUSTOMIZE) build deploy | $(KUBECTL) apply -f -
mv deploy/kustomization.yaml.tmp deploy/kustomization.yaml

deploy-busybox: ensure-kustomize
cp examples/deploy/addon/busybox/kustomization.yaml examples/deploy/addon/busybox/kustomization.yaml.tmp
cd examples/deploy/addon/busybox && ../../../../$(KUSTOMIZE) edit set image quay.io/open-cluster-management/addon-examples=$(EXAMPLE_IMAGE_NAME)
Expand All @@ -94,8 +85,6 @@ deploy-helloworld-hosted: ensure-kustomize

deploy-helloworld-template: ensure-kustomize
$(KUBECTL) create namespace $(MANAGED_CLUSTER_NAME) --dry-run=client -o yaml | $(KUBECTL) apply -f -
# remove the following line when the registration-operator is supported to install the addon template CRD
$(KUBECTL) apply -f ./vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml
cp examples/deploy/addon/helloworld-template/kustomization.yaml examples/deploy/addon/helloworld-template/kustomization.yaml.tmp
cd examples/deploy/addon/helloworld-template && ../../../../$(KUSTOMIZE) edit set image quay.io/open-cluster-management/addon-examples=$(EXAMPLE_IMAGE_NAME)
$(KUSTOMIZE) build examples/deploy/addon/helloworld-template | $(KUBECTL) apply -f -
Expand All @@ -122,13 +111,13 @@ undeploy-helloworld-hosted: ensure-kustomize
build-e2e:
go test -c ./test/e2e

test-e2e: build-e2e deploy-ocm deploy-addon-manager deploy-helloworld deploy-helloworld-helm deploy-helloworld-template
test-e2e: build-e2e deploy-ocm deploy-helloworld deploy-helloworld-helm
./e2e.test -test.v -ginkgo.v

build-hosted-e2e:
go test -c ./test/e2ehosted

test-hosted-e2e: build-hosted-e2e deploy-hosted-ocm deploy-addon-manager deploy-helloworld-hosted
test-hosted-e2e: build-hosted-e2e deploy-hosted-ocm deploy-helloworld-hosted
./e2ehosted.test -test.v -ginkgo.v

include ./test/integration-test.mk
54 changes: 0 additions & 54 deletions cmd/addon-manager/main.go

This file was deleted.

4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ require (
github.com/onsi/gomega v1.24.1
github.com/openshift/build-machinery-go v0.0.0-20230306181456-d321ffa04533
github.com/openshift/library-go v0.0.0-20220525173854-9b950a41acdc
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
github.com/valyala/fasttemplate v1.2.2
helm.sh/helm/v3 v3.11.1
k8s.io/api v0.26.1
k8s.io/apiextensions-apiserver v0.26.1
Expand Down Expand Up @@ -75,6 +73,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
Expand All @@ -83,7 +82,6 @@ require (
github.com/shopspring/decimal v1.2.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
Expand Down
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,6 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
Expand Down
20 changes: 0 additions & 20 deletions pkg/cmd/hub/manager.go

This file was deleted.

120 changes: 0 additions & 120 deletions pkg/manager/controllers/addonmanagement/addon_install_reconciler.go

This file was deleted.

Loading