Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Unified Kuadrant
Browse files Browse the repository at this point in the history
* Remove dnspolicy, tlspolicy, dnsrecord, dnshealth and managedzone api and reconcilers
* Remove all policy-controller related config and make targets
  • Loading branch information
mikenairn authored and maleck13 committed Feb 21, 2024
1 parent 81b873c commit 82f4bc6
Show file tree
Hide file tree
Showing 124 changed files with 311 additions and 19,348 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,10 @@ jobs:
make local-setup
- name: Deploy
run: |
make docker-build-gateway-controller kind-load-gateway-controller docker-build-policy-controller kind-load-policy-controller deploy-gateway-controller
make docker-build-gateway-controller kind-load-gateway-controller deploy-gateway-controller
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system get deployments/mgc-controller-manager -o yaml | yq .spec.template.spec.containers[0].image
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system get deployments/mgc-policy-controller -o yaml | yq .spec.template.spec.containers[0].image
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system wait --timeout=300s --for=condition=Available deployment/mgc-controller-manager
kubectl --context kind-mgc-control-plane -n multicluster-gateway-controller-system wait --timeout=300s --for=condition=Available deployment/mgc-policy-controller
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-controller-manager -n multicluster-gateway-controller-system
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-policy-controller -n multicluster-gateway-controller-system
kubectl get managedzones -n multi-cluster-gateways mgc-dev-mz-aws -o yaml
kubectl --context kind-mgc-control-plane -n multi-cluster-gateways wait --timeout=60s --for=condition=Ready managedzone/mgc-dev-mz-aws
kubectl get managedzones -n multi-cluster-gateways mgc-dev-mz-gcp -o yaml
Expand Down Expand Up @@ -104,8 +101,4 @@ jobs:
if: ${{ failure() }}
run: |
kubectl get deployments -A
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-controller-manager -n multicluster-gateway-controller-system
- name: Dump Policy Controller logs
if: ${{ failure() }}
run: |
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-policy-controller -n multicluster-gateway-controller-system
kubectl --context kind-mgc-control-plane logs --all-containers --ignore-errors deployment/mgc-controller-manager -n multicluster-gateway-controller-system
60 changes: 0 additions & 60 deletions .github/workflows/policy-controller-image.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ vendor/
#Ignore local directory (for stuff to keep locally)
local/
!config/deploy/local
!config/policy-controller/deploy/local

#Ignore .kcp directory
.kcp/
Expand Down
13 changes: 0 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ COPY pkg/ pkg/
FROM builder as controller_builder
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o controller cmd/gateway_controller/main.go

FROM builder as policy_builder
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o policy_controller cmd/policy_controller/main.go

FROM builder as addon_builder
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o add-on-manager cmd/ocm/main.go

Expand All @@ -46,13 +43,3 @@ COPY --from=addon_builder /workspace/add-on-manager .
USER 65532:65532

ENTRYPOINT ["/add-on-manager"]


# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot as policy-controller
WORKDIR /
COPY --from=policy_builder /workspace/policy_controller .
USER 65532:65532

ENTRYPOINT ["/policy_controller"]
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,8 @@ clean: ## Clean up temporary files.
gateway-manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role paths="./pkg/controllers/gateway" output:rbac:artifacts:config=config/rbac

.PHONY: policy-manifests
policy-manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=policy-role paths="./pkg/controllers/dnshealthcheckprobe" paths="./pkg/controllers/dnspolicy" paths="./pkg/controllers/dnsrecord" paths="./pkg/controllers/managedzone" paths="./pkg/controllers/tlspolicy" output:rbac:dir=config/policy-controller/rbac
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=config/policy-controller/crd/bases

.PHONY: manifests
manifests: gateway-manifests policy-manifests
manifests: gateway-manifests

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand All @@ -77,15 +72,14 @@ lint: ## Run golangci-lint against code.

.PHONY: imports
imports: openshift-goimports ## Run openshift goimports against code.
$(OPENSHIFT_GOIMPORTS) -m github.com/Kuadrant/multicluster-gateway-controller -i github.com/kuadrant/kuadrant-operator
$(OPENSHIFT_GOIMPORTS) -m github.com/Kuadrant/multicluster-gateway-controller -i github.com/kuadrant

.PHONY: test-unit
test-unit: manifests generate fmt vet envtest ## Run unit tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $(shell find ./pkg/_internal -mindepth 1 -type d) ./... -tags=unit -coverprofile cover-unit.out

.PHONY: test-integration
test-integration: ginkgo manifests generate fmt vet envtest ## Run integration tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -tags=integration -v --focus "${FOCUS}" ./test/policy_integration
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) -tags=integration -v --focus "${FOCUS}" ./test/gateway_integration

.PHONY: test
Expand Down Expand Up @@ -118,7 +112,7 @@ local-cleanup-mgc: ## Cleanup MGC from kind clusters
./hack/local-cleanup-mgc.sh

.PHONY: build
build: build-gateway-controller build-policy-controller ## Build all binaries.
build: build-gateway-controller ## Build all binaries.

##@ Deployment
ifndef ignore-not-found
Expand Down
16 changes: 0 additions & 16 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,6 @@ layout:
projectName: multicluster-gateway-controller
repo: github.com/Kuadrant/multicluster-gateway-controller
resources:
- api:
crdVersion: v1alpha1
namespaced: true
controller: true
group: kuadrant.io
kind: DNSRecord
path: github.com/Kuadrant/multicluster-gateway-controller/pkg/apis/v1alpha1
version: v1
- api:
crdVersion: v1
namespaced: true
controller: true
group: kuadrant.io
kind: ManagedZone
path: github.com/Kuadrant/multicluster-gateway-controller/api/v1alpha1
version: v1alpha1
- controller: true
domain: kuadrant.io
group: gateway.networking.k8s.io
Expand Down
105 changes: 0 additions & 105 deletions bundle/manifests/kuadrant.io_dnshealthcheckprobes.yaml

This file was deleted.

Loading

0 comments on commit 82f4bc6

Please sign in to comment.