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

⚠️ Run webhooks with managers #3985

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
47 changes: 22 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ test-cover: ## Run tests with code coverage and code generate reports
.PHONY: docker-build-e2e
docker-build-e2e: ## Rebuild all Cluster API provider images to be used in the e2e tests
make docker-build REGISTRY=gcr.io/k8s-staging-cluster-api PULL_POLICY=IfNotPresent
$(MAKE) -C test/infrastructure/docker docker-build REGISTRY=gcr.io/k8s-staging-cluster-api
$(MAKE) -C test/infrastructure/docker docker-build REGISTRY=gcr.io/k8s-staging-cluster-api PULL_POLICY=IfNotPresent

.PHONY: test-e2e
test-e2e: ## Run the e2e tests
Expand Down Expand Up @@ -312,9 +312,6 @@ generate-core-manifests: $(CONTROLLER_GEN) ## Generate manifests for the core pr
paths=./cmd/clusterctl/api/... \
crd:crdVersions=v1 \
output:crd:dir=./cmd/clusterctl/config/crd/bases
## Copy files in CI folders.
cp -f ./config/rbac/*.yaml ./config/ci/rbac/
cp -f ./config/manager/manager*.yaml ./config/ci/manager/
vincepri marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: generate-kubeadm-bootstrap-manifests
generate-kubeadm-bootstrap-manifests: $(CONTROLLER_GEN) ## Generate manifests for the kubeadm bootstrap provider e.g. CRD, RBAC etc.
Expand Down Expand Up @@ -365,20 +362,20 @@ docker-build: docker-pull-prerequisites ## Build the docker images for controlle
.PHONY: docker-build-core
docker-build-core: ## Build the docker image for core controller manager
DOCKER_BUILDKIT=1 docker build --build-arg goproxy=$(GOPROXY) --build-arg ARCH=$(ARCH) --build-arg ldflags="$(LDFLAGS)" . -t $(CONTROLLER_IMG)-$(ARCH):$(TAG)
$(MAKE) set-manifest-image MANIFEST_IMG=$(CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./config/manager/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-image MANIFEST_IMG=$(CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./config/default/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./config/default/manager_pull_policy.yaml"

.PHONY: docker-build-kubeadm-bootstrap
docker-build-kubeadm-bootstrap: ## Build the docker image for kubeadm bootstrap controller manager
DOCKER_BUILDKIT=1 docker build --build-arg goproxy=$(GOPROXY) --build-arg ARCH=$(ARCH) --build-arg package=./bootstrap/kubeadm --build-arg ldflags="$(LDFLAGS)" . -t $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG)-$(ARCH):$(TAG)
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./bootstrap/kubeadm/config/manager/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./bootstrap/kubeadm/config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./bootstrap/kubeadm/config/default/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./bootstrap/kubeadm/config/default/manager_pull_policy.yaml"

.PHONY: docker-build-kubeadm-control-plane
docker-build-kubeadm-control-plane: ## Build the docker image for kubeadm control plane controller manager
DOCKER_BUILDKIT=1 docker build --build-arg goproxy=$(GOPROXY) --build-arg ARCH=$(ARCH) --build-arg package=./controlplane/kubeadm --build-arg ldflags="$(LDFLAGS)" . -t $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG)-$(ARCH):$(TAG)
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./controlplane/kubeadm/config/manager/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./controlplane/kubeadm/config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG)-$(ARCH) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./controlplane/kubeadm/config/default/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./controlplane/kubeadm/config/default/manager_pull_policy.yaml"

.PHONY: docker-push
docker-push: ## Push the docker images
Expand Down Expand Up @@ -411,26 +408,26 @@ docker-push-core-manifest: ## Push the fat manifest docker image for the core im
docker manifest create --amend $(CONTROLLER_IMG):$(TAG) $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(CONTROLLER_IMG)\-&:$(TAG)~g")
@for arch in $(ALL_ARCH); do docker manifest annotate --arch $${arch} ${CONTROLLER_IMG}:${TAG} ${CONTROLLER_IMG}-$${arch}:${TAG}; done
docker manifest push --purge $(CONTROLLER_IMG):$(TAG)
$(MAKE) set-manifest-image MANIFEST_IMG=$(CONTROLLER_IMG) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./config/manager/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-image MANIFEST_IMG=$(CONTROLLER_IMG) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./config/default/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./config/default/manager_pull_policy.yaml"

.PHONY: docker-push-kubeadm-bootstrap-manifest
docker-push-kubeadm-bootstrap-manifest: ## Push the fat manifest docker image for the kubeadm bootstrap image.
## Minimum docker version 18.06.0 is required for creating and pushing manifest images.
docker manifest create --amend $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG):$(TAG) $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG)\-&:$(TAG)~g")
@for arch in $(ALL_ARCH); do docker manifest annotate --arch $${arch} ${KUBEADM_BOOTSTRAP_CONTROLLER_IMG}:${TAG} ${KUBEADM_BOOTSTRAP_CONTROLLER_IMG}-$${arch}:${TAG}; done
docker manifest push --purge $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG):$(TAG)
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./bootstrap/kubeadm/config/manager/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./bootstrap/kubeadm/config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./bootstrap/kubeadm/config/default/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./bootstrap/kubeadm/config/default/manager_pull_policy.yaml"

.PHONY: docker-push-kubeadm-control-plane-manifest
docker-push-kubeadm-control-plane-manifest: ## Push the fat manifest docker image for the kubeadm control plane image.
## Minimum docker version 18.06.0 is required for creating and pushing manifest images.
docker manifest create --amend $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG):$(TAG) $(shell echo $(ALL_ARCH) | sed -e "s~[^ ]*~$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG)\-&:$(TAG)~g")
@for arch in $(ALL_ARCH); do docker manifest annotate --arch $${arch} ${KUBEADM_CONTROL_PLANE_CONTROLLER_IMG}:${TAG} ${KUBEADM_CONTROL_PLANE_CONTROLLER_IMG}-$${arch}:${TAG}; done
docker manifest push --purge $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG):$(TAG)
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./controlplane/kubeadm/config/manager/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./controlplane/kubeadm/config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-image MANIFEST_IMG=$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG) MANIFEST_TAG=$(TAG) TARGET_RESOURCE="./controlplane/kubeadm/config/default/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy TARGET_RESOURCE="./controlplane/kubeadm/config/default/manager_pull_policy.yaml"

.PHONY: set-manifest-pull-policy
set-manifest-pull-policy:
Expand Down Expand Up @@ -462,18 +459,18 @@ release: clean-release ## Builds and push container images using the latest git
# Set the core manifest image to the production bucket.
$(MAKE) set-manifest-image \
MANIFEST_IMG=$(PROD_REGISTRY)/$(IMAGE_NAME) MANIFEST_TAG=$(RELEASE_TAG) \
TARGET_RESOURCE="./config/manager/manager_image_patch.yaml"
TARGET_RESOURCE="./config/default/manager_image_patch.yaml"
# Set the kubeadm bootstrap image to the production bucket.
$(MAKE) set-manifest-image \
MANIFEST_IMG=$(PROD_REGISTRY)/$(KUBEADM_BOOTSTRAP_IMAGE_NAME) MANIFEST_TAG=$(RELEASE_TAG) \
TARGET_RESOURCE="./bootstrap/kubeadm/config/manager/manager_image_patch.yaml"
TARGET_RESOURCE="./bootstrap/kubeadm/config/default/manager_image_patch.yaml"
# Set the kubeadm control plane image to the production bucket.
$(MAKE) set-manifest-image \
MANIFEST_IMG=$(PROD_REGISTRY)/$(KUBEADM_CONTROL_PLANE_IMAGE_NAME) MANIFEST_TAG=$(RELEASE_TAG) \
TARGET_RESOURCE="./controlplane/kubeadm/config/manager/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent TARGET_RESOURCE="./config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent TARGET_RESOURCE="./bootstrap/kubeadm/config/manager/manager_pull_policy.yaml"
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent TARGET_RESOURCE="./controlplane/kubeadm/config/manager/manager_pull_policy.yaml"
TARGET_RESOURCE="./controlplane/kubeadm/config/default/manager_image_patch.yaml"
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent TARGET_RESOURCE="./config/default/manager_pull_policy.yaml"
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent TARGET_RESOURCE="./bootstrap/kubeadm/config/default/manager_pull_policy.yaml"
$(MAKE) set-manifest-pull-policy PULL_POLICY=IfNotPresent TARGET_RESOURCE="./controlplane/kubeadm/config/default/manager_pull_policy.yaml"
## Build the manifests
$(MAKE) release-manifests clean-release-git
## Build the development manifests
Expand All @@ -482,11 +479,11 @@ release: clean-release ## Builds and push container images using the latest git
.PHONY: release-manifests
release-manifests: $(RELEASE_DIR) $(KUSTOMIZE) ## Builds the manifests to publish with a release
# Build core-components.
$(KUSTOMIZE) build config > $(RELEASE_DIR)/core-components.yaml
$(KUSTOMIZE) build config/default > $(RELEASE_DIR)/core-components.yaml
# Build bootstrap-components.
$(KUSTOMIZE) build bootstrap/kubeadm/config > $(RELEASE_DIR)/bootstrap-components.yaml
$(KUSTOMIZE) build bootstrap/kubeadm/config/default > $(RELEASE_DIR)/bootstrap-components.yaml
# Build control-plane-components.
$(KUSTOMIZE) build controlplane/kubeadm/config > $(RELEASE_DIR)/control-plane-components.yaml
$(KUSTOMIZE) build controlplane/kubeadm/config/default > $(RELEASE_DIR)/control-plane-components.yaml

## Build cluster-api-components (aggregate of all of the above).
cat $(RELEASE_DIR)/core-components.yaml > $(RELEASE_DIR)/cluster-api-components.yaml
Expand Down
4 changes: 2 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ COPY manager .
#
# 1. Enables a local_resource go build of the provider's manager binary
# 2. Configures a docker build for the provider, with live updating of the manager binary
# 3. Runs kustomize for the provider's config/ and applies it
# 3. Runs kustomize for the provider's config/default and applies it
def enable_provider(name):
p = providers.get(name)

Expand Down Expand Up @@ -205,7 +205,7 @@ def enable_provider(name):
os.environ.update(substitutions)

# Apply the kustomized yaml for this provider
yaml = str(kustomize_with_envsubst(context + "/config"))
yaml = str(kustomize_with_envsubst(context + "/config/default"))
k8s_yaml(blob(yaml))

# Users may define their own Tilt customizations in tilt.d. This directory is excluded from git and these files will
Expand Down
52 changes: 52 additions & 0 deletions bootstrap/kubeadm/config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,61 @@
# Adds namespace to all resources.
namespace: capi-kubeadm-bootstrap-system

namePrefix: capi-kubeadm-bootstrap-

commonLabels:
cluster.x-k8s.io/provider: "bootstrap-kubeadm"

resources:
- namespace.yaml

bases:
- ../crd
- ../rbac
- ../manager
- ../webhook
- ../certmanager

patchesStrategicMerge:
# Provide customizable hook for make targets.
- manager_image_patch.yaml
- manager_pull_policy.yaml
# Protect the /metrics endpoint by putting it behind auth.
# Only one of manager_auth_proxy_patch.yaml and
# manager_prometheus_metrics_patch.yaml should be enabled.
- manager_auth_proxy_patch.yaml
# Enable webhook.
- manager_webhook_patch.yaml
# Inject certificate in the webhook definition.
- webhookcainjection_patch.yaml

vars:
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
objref:
kind: Certificate
group: cert-manager.io
version: v1alpha2
name: serving-cert # this name should match the one in certificate.yaml
fieldref:
fieldpath: metadata.namespace
- name: CERTIFICATE_NAME
objref:
kind: Certificate
group: cert-manager.io
version: v1alpha2
name: serving-cert # this name should match the one in certificate.yaml
- name: SERVICE_NAMESPACE # namespace of the service
objref:
kind: Service
version: v1
name: webhook-service
fieldref:
fieldpath: metadata.namespace
- name: SERVICE_NAME
objref:
kind: Service
version: v1
name: webhook-service

configurations:
- kustomizeconfig.yaml
4 changes: 4 additions & 0 deletions bootstrap/kubeadm/config/default/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This configuration is for teaching kustomize how to update name ref and var substitution
varReference:
- kind: Deployment
path: spec/template/spec/volumes/secret/secretName
Comment on lines +1 to +4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually needed? I feel like this was something that we previously used to hack together the separate manager and webhook deployments. I'm not seeing this in the upstream kubuebuilder examples: https://github.com/kubernetes-sigs/kubebuilder/tree/63b35350fe8b4d133c0bdb8fdd9a9a61fe30ac61/testdata/project-v3/config/default

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not in the kubuilder example, but I felt that we are on the safe path if we ensure all the webhook services get a different name for each provider, so during the reshuffle I preserved:

secretName: $(SERVICE_NAME)-cert # this secret will not be prefixed since it's not managed by kustomize

in bootstrap/kubeadm/config/certmanager/certificate.yaml and made the necessary changes for it being resolved in config/default/kustomize.yaml which basically consist of creating this file and referencing it

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ spec:
ports:
- containerPort: 8443
name: https
- name: manager
args:
- "--metrics-bind-addr=127.0.0.1:8080"
- "--leader-elect"
fabriziopandini marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ spec:
spec:
containers:
- name: manager
args:
- "--metrics-bind-addr=127.0.0.1:8080"
- "--webhook-port=9443"
ports:
- containerPort: 9443
name: webhook-server
Expand Down
23 changes: 0 additions & 23 deletions bootstrap/kubeadm/config/kustomization.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions bootstrap/kubeadm/config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
resources:
- manager.yaml

patchesStrategicMerge:
- manager_image_patch.yaml
- manager_pull_policy.yaml
- manager_auth_proxy_patch.yaml
5 changes: 3 additions & 2 deletions bootstrap/kubeadm/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ spec:
- command:
- /manager
args:
- --leader-elect
- --feature-gates=MachinePool=${EXP_MACHINE_POOL:=false}
- "--leader-elect"
- "--metrics-bind-addr=127.0.0.1:8080"
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=false}"
image: controller:latest
name: manager
terminationGracePeriodSeconds: 10
Expand Down
3 changes: 0 additions & 3 deletions bootstrap/kubeadm/config/patch_crd_webhook_namespace.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions bootstrap/kubeadm/config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ resources:
- role_binding.yaml
- leader_election_role.yaml
- leader_election_role_binding.yaml
# Comment the following 3 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
37 changes: 0 additions & 37 deletions bootstrap/kubeadm/config/webhook/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
namespace: capi-webhook-system

resources:
- manifests.yaml
- service.yaml
- ../certmanager
- ../manager

configurations:
- kustomizeconfig.yaml

patchesStrategicMerge:
- manager_webhook_patch.yaml
- webhookcainjection_patch.yaml

vars:
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
objref:
kind: Certificate
group: cert-manager.io
version: v1alpha2
name: serving-cert # this name should match the one in certificate.yaml
fieldref:
fieldpath: metadata.namespace
- name: CERTIFICATE_NAME
objref:
kind: Certificate
group: cert-manager.io
version: v1alpha2
name: serving-cert # this name should match the one in certificate.yaml
- name: SERVICE_NAMESPACE # namespace of the service
objref:
kind: Service
version: v1
name: webhook-service
fieldref:
fieldpath: metadata.namespace
- name: SERVICE_NAME
objref:
kind: Service
version: v1
name: webhook-service
2 changes: 0 additions & 2 deletions bootstrap/kubeadm/config/webhook/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ namespace:

varReference:
- path: metadata/annotations
- kind: Deployment
path: spec/template/spec/volumes/secret/secretName
12 changes: 2 additions & 10 deletions bootstrap/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ func InitFlags(fs *pflag.FlagSet) {
fs.DurationVar(&kubeadmbootstrapcontrollers.DefaultTokenTTL, "bootstrap-token-ttl", 15*time.Minute,
"The amount of time the bootstrap token will be valid")

fs.IntVar(&webhookPort, "webhook-port", 0,
"Webhook Server port, disabled by default. When enabled, the manager will only work as webhook server, no reconcilers are installed.")
fs.IntVar(&webhookPort, "webhook-port", 9443,
"Webhook Server port")

feature.MutableGates.AddFlag(fs)
}
Expand Down Expand Up @@ -160,10 +160,6 @@ func main() {
}

func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
fabriziopandini marked this conversation as resolved.
Show resolved Hide resolved
if webhookPort != 0 {
return
}

if err := (&kubeadmbootstrapcontrollers.KubeadmConfigReconciler{
Client: mgr.GetClient(),
}).SetupWithManager(ctx, mgr, concurrency(kubeadmConfigConcurrency)); err != nil {
Expand All @@ -173,10 +169,6 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) {
}

func setupWebhooks(mgr ctrl.Manager) {
if webhookPort == 0 {
return
}

if err := (&kubeadmbootstrapv1.KubeadmConfig{}).SetupWebhookWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create webhook", "webhook", "KubeadmConfig")
os.Exit(1)
Expand Down
8 changes: 4 additions & 4 deletions cmd/clusterctl/hack/create-local-repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@
'componentsFile': 'bootstrap-components.yaml',
'nextVersion': 'v0.3.8',
'type': 'BootstrapProvider',
'configFolder': 'bootstrap/kubeadm/config',
'configFolder': 'bootstrap/kubeadm/config/default',
},
'control-plane-kubeadm': {
'componentsFile': 'control-plane-components.yaml',
'nextVersion': 'v0.3.8',
'type': 'ControlPlaneProvider',
'configFolder': 'controlplane/kubeadm/config',
'configFolder': 'controlplane/kubeadm/config/default',
},
'infrastructure-docker': {
'componentsFile': 'infrastructure-components.yaml',
'nextVersion': 'v0.3.8',
'type': 'InfrastructureProvider',
'configFolder': 'test/infrastructure/docker/config',
'configFolder': 'test/infrastructure/docker/config/default',
},
}

Expand Down Expand Up @@ -147,7 +147,7 @@ def create_local_repositories():
assert p is not None, 'invalid configuration: please specify the configuration for the {} provider'.format(provider)

repo = p.get('repo', '.')
config_folder = p.get('configFolder', 'config')
config_folder = p.get('configFolder', 'config/default')

next_version = p.get('nextVersion')
assert next_version is not None, 'invalid configuration for provider {}: please provide nextVersion value'.format(provider)
Expand Down
Loading