diff --git a/.gitignore b/.gitignore index a9b45ed2..5959d984 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ Dockerfile.cross # Temporary files and directories tmp + +config/local-setup/**/*.env diff --git a/Makefile b/Makefile index 82e83c38..27de9413 100644 --- a/Makefile +++ b/Makefile @@ -149,7 +149,9 @@ local-setup: $(KIND) ## Setup local development kind cluster and dependencies $(MAKE) kind-create-cluster .PHONY: local-deploy -local-deploy: docker-build kind-load-image deploy ## Deploy the dns operator into local kind cluster from the current code +local-deploy: docker-build kind-load-image ## Deploy the dns operator into local kind cluster from the current code + $(KUBECTL) config use-context kind-$(KIND_CLUSTER_NAME) + $(MAKE) deploy ##@ Build @@ -165,7 +167,7 @@ run: manifests generate fmt vet ## Run a controller from your host. # (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. # More info: https://docs.docker.com/develop/develop-images/build_enhancements/ .PHONY: docker-build -docker-build: test ## Build docker image with the manager. +docker-build: ## Build docker image with the manager. $(CONTAINER_TOOL) build -t ${IMG} . .PHONY: docker-push diff --git a/config/local-setup/managedzone/aws/kustomization.yaml b/config/local-setup/managedzone/aws/kustomization.yaml new file mode 100644 index 00000000..b69e4dd4 --- /dev/null +++ b/config/local-setup/managedzone/aws/kustomization.yaml @@ -0,0 +1,40 @@ +resources: + - managed_zone.yaml + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: + - name: aws-managed-zone-config + envs: + - managed-zone-config.env + +secretGenerator: + - name: aws-credentials + envs: + - aws-credentials.env + type: "kuadrant.io/aws" + +replacements: + - source: + kind: ConfigMap + name: aws-managed-zone-config + version: v1 + fieldPath: data.AWS_DNS_PUBLIC_ZONE_ID + targets: + - select: + kind: ManagedZone + name: dev-mz-aws + fieldPaths: + - spec.id + - source: + kind: ConfigMap + name: aws-managed-zone-config + version: v1 + fieldPath: data.ZONE_ROOT_DOMAIN + targets: + - select: + kind: ManagedZone + name: dev-mz-aws + fieldPaths: + - spec.domainName diff --git a/config/local-setup/managedzone/aws/managed_zone.yaml b/config/local-setup/managedzone/aws/managed_zone.yaml new file mode 100644 index 00000000..7b02cb64 --- /dev/null +++ b/config/local-setup/managedzone/aws/managed_zone.yaml @@ -0,0 +1,10 @@ +apiVersion: kuadrant.io/v1alpha1 +kind: ManagedZone +metadata: + name: dev-mz-aws +spec: + id: DUMMY_ID + domainName: DUMMY_DOMAIN_NAME + description: "Dev Managed Zone" + dnsProviderSecretRef: + name: aws-credentials diff --git a/config/local-setup/managedzone/gcp/kustomization.yaml b/config/local-setup/managedzone/gcp/kustomization.yaml new file mode 100644 index 00000000..a0e92cfa --- /dev/null +++ b/config/local-setup/managedzone/gcp/kustomization.yaml @@ -0,0 +1,40 @@ +resources: + - managed_zone.yaml + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: + - name: gcp-managed-zone-config + envs: + - managed-zone-config.env + +secretGenerator: + - name: gcp-credentials + envs: + - gcp-credentials.env + type: "kuadrant.io/gcp" + +replacements: + - source: + kind: ConfigMap + name: gcp-managed-zone-config + version: v1 + fieldPath: data.ZONE_NAME + targets: + - select: + kind: ManagedZone + name: dev-mz-gcp + fieldPaths: + - spec.id + - source: + kind: ConfigMap + name: gcp-managed-zone-config + version: v1 + fieldPath: data.ZONE_DNS_NAME + targets: + - select: + kind: ManagedZone + name: dev-mz-gcp + fieldPaths: + - spec.domainName diff --git a/config/local-setup/managedzone/gcp/managed_zone.yaml b/config/local-setup/managedzone/gcp/managed_zone.yaml new file mode 100644 index 00000000..634ae75a --- /dev/null +++ b/config/local-setup/managedzone/gcp/managed_zone.yaml @@ -0,0 +1,10 @@ +apiVersion: kuadrant.io/v1alpha1 +kind: ManagedZone +metadata: + name: dev-mz-gcp +spec: + id: DUMMY_ID + domainName: DUMMY_DOMAIN_NAME + description: "Dev Managed Zone" + dnsProviderSecretRef: + name: gcp-credentials