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

Unified kuadrant - Remove TLSPolicy and DNSPolicy #785

Merged
merged 2 commits into from
Feb 21, 2024
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
12 changes: 3 additions & 9 deletions .github/workflows/ci-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
- '**.md'
- 'samples/**'
- 'LICENSE'
workflow_dispatch:

jobs:
e2e_test_suite:
Expand Down Expand Up @@ -67,13 +68,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 +102,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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When deploying the multicluster gateway controller using the make targets, the f
* go >= 1.21

### 1. Running the controller in the cluster:
1. Set up your DNS Provider by following these [steps](./docs/dnspolicy/dns-provider.md)
1. Set up your DNS Provider by following these [steps](https://github.com/Kuadrant/dns-operator/blob/main/docs/provider.md)

1. Setup your local environment
```sh
Expand Down Expand Up @@ -63,7 +63,7 @@ When deploying the multicluster gateway controller using the make targets, the f
```

## 2. Running the controller locally:
1. Set up your DNS Provider by following these [steps](./docs/dnspolicy/dns-provider.md)
1. Set up your DNS Provider by following these [steps](https://github.com/Kuadrant/dns-operator/blob/main/docs/provider.md)

1. Setup your local environment

Expand Down
105 changes: 0 additions & 105 deletions bundle/manifests/kuadrant.io_dnshealthcheckprobes.yaml

This file was deleted.

Loading
Loading