Skip to content

Commit 9b7096f

Browse files
committed
refactor config structure for split k0smotron installations
Signed-off-by: apedriza <[email protected]>
1 parent b1c8c55 commit 9b7096f

File tree

130 files changed

+2005
-11107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2005
-11107
lines changed

.github/workflows/capi-smoke-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ jobs:
7979
run: |
8080
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.24/deploy/local-path-storage.yaml
8181
82-
- name: Download install manifest for k0smotron
82+
- name: Download install manifest for k0smotron standalone
8383
uses: actions/download-artifact@v5
8484
with:
85-
name: install-yaml
85+
name: install-standalone-yaml
8686

8787
- name: Run inttest for CAPI with docker provider
8888
run: |

.github/workflows/go.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ jobs:
8080
config.yaml
8181
k0sproject-k0smotron/
8282
83-
- name: Generate install yaml
83+
- name: Generate install yaml for standalone mode
8484
run: |
85-
make release
85+
make release-standalone
8686
87-
- name: Upload install yaml
87+
- name: Upload install-standalone yaml
8888
uses: actions/upload-artifact@v4
8989
with:
90-
name: install-yaml
91-
path: install.yaml
90+
name: install-standalone-yaml
91+
path: install-standalone.yaml
9292

9393
unittest:
9494
name: Unit & Integration tests
@@ -176,7 +176,7 @@ jobs:
176176
- name: Download install manifest for k0smotron
177177
uses: actions/download-artifact@v5
178178
with:
179-
name: install-yaml
179+
name: install-standalone-yaml
180180

181181
- name: Load k0smotron image bundle
182182
run: |
@@ -271,11 +271,6 @@ jobs:
271271
run: |
272272
docker load -i k0smotron-image-bundle.tar
273273
274-
- name: Download install manifest
275-
uses: actions/download-artifact@v5
276-
with:
277-
name: install-yaml
278-
279274
- name: Run e2e test
280275
run: |
281276
export TEST_NAME=Test$(echo "${{ matrix.e2e-suite }}" | awk -F'-' '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2)}1' OFS='')

.github/workflows/publish-docs.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
echo STABLE="$STABLE" >> $GITHUB_OUTPUT
8282
8383
# Ensures the current branch is gh-pages,
84-
# Creates / updates the "install.yaml" file with the corresponding versions
84+
# Creates / updates the "install.yaml" and "install-standalone.yaml" files with the corresponding versions
8585
# Commits if the files were changed
8686
# Finally pushes if there are unpushed commits
8787
- name: Create install files
@@ -94,9 +94,12 @@ jobs:
9494
run: |
9595
STABLE=${{ steps.set_versions.outputs.STABLE }}
9696
make release IMG=quay.io/k0sproject/k0smotron:${STABLE}
97+
make release-standalone IMG=quay.io/k0sproject/k0smotron:${STABLE}
9798
cp install.yaml /tmp/install.yaml
99+
cp install-standalone.yaml /tmp/install-standalone.yaml
98100
git checkout gh-pages
99101
cp /tmp/install.yaml ${STABLE}/install.yaml
100-
git add ${STABLE}/install.yaml && git update-index --refresh
101-
git diff-index --quiet HEAD -- || git commit -m "Update install.yaml to ${STABLE}"
102+
cp /tmp/install-standalone.yaml ${STABLE}/install-standalone.yaml
103+
git add ${STABLE}/install.yaml ${STABLE}/install-standalone.yaml && git update-index --refresh
104+
git diff-index --quiet HEAD -- || git commit -m "Update install.yaml and install-standalone.yaml to ${STABLE}"
102105
git push origin gh-pages

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Generated files
22
install.yaml
3+
install-standalone.yaml
34
bootstrap-components.yaml
45
control-plane-components.yaml
56
infrastructure-components.yaml

Makefile

Lines changed: 77 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -63,33 +63,61 @@ help: ## Display this help.
6363
##@ Development
6464

6565
### CRD manifests (one per API group)
66-
.PHONY: manifests-bootstrap manifests-controlplane manifests-infrastructure manifests-k0smotron
66+
.PHONY: manifests-bootstrap manifests-controlplane manifests-infrastructure manifests-standalone
6767
manifests-bootstrap: $(CONTROLLER_GEN) ## Generate CRDs for bootstrap.cluster.x-k8s.io
68-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
69-
paths="./..." \
70-
output:crd:artifacts:config=config/crd/bases/bootstrap
71-
find ./config/crd/bases/bootstrap -type f ! -name "bootstrap*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
68+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true \
69+
paths="./api/bootstrap/v1beta1/..." \
70+
paths=./internal/controller/bootstrap/... \
71+
output:crd:artifacts:config=config/clusterapi/bootstrap/crd/bases \
72+
output:rbac:dir=config/clusterapi/bootstrap/rbac
7273

73-
manifests-controlplane: $(CONTROLLER_GEN) ## Generate CRDs for controlplane.cluster.x-k8s.io
74+
manifests-controlplane: $(CONTROLLER_GEN) ## Generate CRDs for controlplane.cluster.x-k8s.io.
75+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
76+
paths="./api/controlplane/v1beta1/..." \
77+
paths=./internal/controller/controlplane/... \
78+
output:crd:artifacts:config=config/clusterapi/controlplane/crd/bases
7479
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
75-
paths="./..." \
76-
output:crd:artifacts:config=config/crd/bases/controlplane
77-
find ./config/crd/bases/controlplane -type f ! -name "controlplane*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
80+
paths="./api/controlplane/v1beta1/..." \
81+
paths="./api/k0smotron.io/v1beta1/..." \
82+
paths=./internal/controller/controlplane/... \
83+
paths=./internal/controller/k0smotron.io/... \
84+
output:rbac:dir=config/clusterapi/controlplane/rbac \
85+
output:webhook:dir=config/clusterapi/controlplane/webhook
7886

7987
manifests-infrastructure: $(CONTROLLER_GEN) ## Generate CRDs for infrastructure.cluster.x-k8s.io
80-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
81-
paths="./..." \
82-
output:crd:artifacts:config=config/crd/bases/infrastructure
83-
find ./config/crd/bases/infrastructure -type f ! -name "infrastructure*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
88+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true \
89+
paths="./api/infrastructure/v1beta1/..." \
90+
paths=./internal/controller/infrastructure/... \
91+
output:crd:artifacts:config=config/clusterapi/infrastructure/crd/bases \
92+
output:rbac:dir=config/clusterapi/infrastructure/rbac
8493

85-
manifests-k0smotron: $(CONTROLLER_GEN) ## Generate CRDs for k0smotron.io
94+
manifests-standalone: $(CONTROLLER_GEN) ## Generate CRDs for k0smotron.io standalone
8695
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook \
87-
paths="./..." \
88-
output:crd:artifacts:config=config/crd/bases/k0smotron.io
89-
find ./config/crd/bases/k0smotron.io -type f ! -name "k0smotron.io*" ! -name "kustomization.yaml" -print0 | xargs -0 rm
96+
paths="./api/k0smotron.io/v1beta1/..." \
97+
paths=./internal/controller/k0smotron.io/... \
98+
output:crd:artifacts:config=config/standalone/crd/bases \
99+
output:rbac:dir=config/standalone/rbac \
100+
output:webhook:dir=config/standalone/webhook
101+
102+
.PHONY: manifests-capi-integration
103+
manifests-capi-integration: manifests manifests-capi-integration-without-crd
104+
105+
.PHONY: manifests-capi-integration-without-crd
106+
manifests-capi-integration-without-crd: $(CONTROLLER_GEN) # Generate RBAC and webhook manifests for all controllers except CRDs in order to reuse them from each config/clusterapi/{provider}
107+
$(CONTROLLER_GEN) rbac:roleName=manager-role webhook \
108+
paths="./api/bootstrap/v1beta1/..." \
109+
paths=./internal/controller/bootstrap/... \
110+
paths="./api/controlplane/v1beta1/..." \
111+
paths="./api/k0smotron.io/v1beta1/..." \
112+
paths=./internal/controller/controlplane/... \
113+
paths=./internal/controller/k0smotron.io/... \
114+
paths="./api/infrastructure/v1beta1/..." \
115+
paths=./internal/controller/infrastructure/... \
116+
output:rbac:dir=config/clusterapi/all/rbac \
117+
output:webhook:dir=config/clusterapi/all/webhook
90118

91119
.PHONY: manifests
92-
manifests: manifests-bootstrap manifests-controlplane manifests-infrastructure manifests-k0smotron ## Generate all CRD YAMLs per group
120+
manifests: manifests-bootstrap manifests-controlplane manifests-infrastructure manifests-standalone ## Generate all CRD YAMLs per group
93121

94122
### generate
95123
generate_targets += api/k0smotron.io/v1beta1/zz_generated.deepcopy.go
@@ -99,7 +127,7 @@ generate_targets += api/infrastructure/v1beta1/zz_generated.deepcopy.go
99127
$(generate_targets): $(CONTROLLER_GEN)
100128
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
101129

102-
generate: $(generate_targets) clusterapi-manifests ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
130+
generate: $(generate_targets) manifests ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
103131

104132

105133
GO_PKGS=$(shell go list ./...)
@@ -149,10 +177,6 @@ e2e-aws:
149177
build:
150178
go build -o bin/manager cmd/main.go
151179

152-
.PHONY: run
153-
run: manifests generate fmt vet ## Run a controller from your host.
154-
go run ./cmd/main.go
155-
156180
# If you wish built the manager image targeting other platforms you can use the --platform flag.
157181
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
158182
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
@@ -193,49 +217,43 @@ ifndef ignore-not-found
193217
ignore-not-found = false
194218
endif
195219

196-
.PHONY: install
197-
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
198-
$(KUSTOMIZE) build config/crd | kubectl create -f -
199-
200-
.PHONY: uninstall
201-
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
202-
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
203-
204220
.PHONY: deploy
205221
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
206-
cd config/manager && $(KUSTOMIZE) edit set image k0s/k0smotron=${IMG}
207-
$(KUSTOMIZE) build config/default | kubectl create -f -
222+
cd config/clusterapi/all/manager && $(KUSTOMIZE) edit set image k0s/k0smotron=${IMG}
223+
$(KUSTOMIZE) build config/clusterapi/all | kubectl create -f -
224+
git checkout config/clusterapi/all/manager/kustomization.yaml
208225

209226
.PHONY: undeploy
210227
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
211-
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
228+
$(KUSTOMIZE) build config/clusterapi/all | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
212229

213230
.PHONY: release
214-
release: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
215-
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
216-
$(KUSTOMIZE) build config/default > install.yaml
217-
git checkout config/manager/kustomization.yaml
218-
219-
clusterapi-manifests:
220-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./api/bootstrap/..." output:crd:artifacts:config=config/clusterapi/bootstrap/bases
221-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./api/controlplane/..." output:crd:artifacts:config=config/clusterapi/controlplane/bases
222-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./api/infrastructure/..." output:crd:artifacts:config=config/clusterapi/infrastructure/bases
223-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./api/k0smotron.io/..." output:crd:artifacts:config=config/clusterapi/k0smotron.io/bases
224-
225-
bootstrap-components.yaml: $(CONTROLLER_GEN) clusterapi-manifests kustomize
226-
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
231+
release: manifests-capi-integration kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
232+
cd config/clusterapi/all/manager && $(KUSTOMIZE) edit set image controller=${IMG}
233+
$(KUSTOMIZE) build config/clusterapi/all > install.yaml
234+
git checkout config/clusterapi/all/manager/kustomization.yaml
235+
236+
.PHONY: release-standalone
237+
release-standalone: manifests-standalone kustomize ## Generate install yaml for standalone mode
238+
cd config/standalone/manager && $(KUSTOMIZE) edit set image controller=${IMG}
239+
$(KUSTOMIZE) build config/standalone > install-standalone.yaml
240+
git checkout config/standalone/manager/kustomization.yaml
241+
242+
bootstrap-components.yaml: $(CONTROLLER_GEN) manifests-bootstrap kustomize
243+
cd config/clusterapi/bootstrap/manager && $(KUSTOMIZE) edit set image controller=${IMG}
227244
$(KUSTOMIZE) build config/clusterapi/bootstrap/ > bootstrap-components.yaml
228-
git checkout config/manager/kustomization.yaml
245+
git checkout config/clusterapi/bootstrap/manager/kustomization.yaml
229246

230-
control-plane-components.yaml: $(CONTROLLER_GEN) clusterapi-manifests kustomize
231-
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
247+
control-plane-components.yaml: $(CONTROLLER_GEN) manifests-controlplane kustomize
248+
cd config/clusterapi/controlplane/manager && $(KUSTOMIZE) edit set image controller=${IMG}
232249
$(KUSTOMIZE) build config/clusterapi/controlplane/ > control-plane-components.yaml
233-
git checkout config/manager/kustomization.yaml
250+
git checkout config/clusterapi/controlplane/manager/kustomization.yaml
234251

235-
infrastructure-components.yaml: $(CONTROLLER_GEN) clusterapi-manifests kustomize
236-
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
252+
infrastructure-components.yaml: $(CONTROLLER_GEN) manifests-infrastructure kustomize
253+
cd config/clusterapi/infrastructure/manager && $(KUSTOMIZE) edit set image controller=${IMG}
237254
$(KUSTOMIZE) build config/clusterapi/infrastructure/ > infrastructure-components.yaml
238-
git checkout config/manager/kustomization.yaml
255+
git checkout config/clusterapi/infrastructure/manager/kustomization.yaml
256+
239257
##@ Build Dependencies
240258

241259
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
@@ -270,23 +288,23 @@ $(CRDOC): Makefile.variables | $(LOCALBIN)
270288

271289
.PHONY: docs-generate-bootstrap docs-generate-controlplane docs-generate-infrastructure docs-generate-k0smotron docs-generate-reference
272290
docs-generate-bootstrap: $(CRDOC) ## Generate docs for bootstrap CRDs
273-
$(CRDOC) --resources config/crd/bases/bootstrap --output docs/resource-reference/bootstrap.cluster.x-k8s.io-v1beta1.md
291+
$(CRDOC) --resources config/clusterapi/bootstrap/crd/bases --output docs/resource-reference/bootstrap.cluster.x-k8s.io-v1beta1.md
274292

275293
docs-generate-controlplane: $(CRDOC) ## Generate docs for controlplane CRDs
276-
$(CRDOC) --resources config/crd/bases/controlplane --output docs/resource-reference/controlplane.cluster.x-k8s.io-v1beta1.md
294+
$(CRDOC) --resources config/clusterapi/controlplane/crd/bases --output docs/resource-reference/controlplane.cluster.x-k8s.io-v1beta1.md
277295

278296
docs-generate-infrastructure: $(CRDOC) ## Generate docs for infrastructure CRDs
279-
$(CRDOC) --resources config/crd/bases/infrastructure --output docs/resource-reference/infrastructure.cluster.x-k8s.io-v1beta1.md
297+
$(CRDOC) --resources config/clusterapi/infrastructure/crd/bases --output docs/resource-reference/infrastructure.cluster.x-k8s.io-v1beta1.md
280298

281299
docs-generate-k0smotron: $(CRDOC) ## Generate docs for k0smotron CRDs
282-
$(CRDOC) --resources config/crd/bases/k0smotron.io --output docs/resource-reference/k0smotron.io-v1beta1.md
300+
$(CRDOC) --resources config/standalone/crd/bases --output docs/resource-reference/k0smotron.io-v1beta1.md
283301

284302
# Generate docs for all CRDs apis
285303
docs-generate-reference: docs-generate-bootstrap docs-generate-controlplane docs-generate-infrastructure docs-generate-k0smotron
286304

287305
## Generate all code, manifests, documentation, and release artifacts
288306
.PHONY: generate-all
289-
generate-all: clean generate manifests clusterapi-manifests docs-generate-reference release
307+
generate-all: clean generate docs-generate-reference release
290308

291309
.PHONY: $(smoketests)
292310
$(smoketests): release k0smotron-image-bundle.tar

cmd/main.go

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"k8s.io/client-go/kubernetes"
3535
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
3636
_ "k8s.io/client-go/plugin/pkg/client/auth"
37+
"k8s.io/client-go/rest"
3738
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
3839
"sigs.k8s.io/cluster-api/util/flags"
3940
ctrl "sigs.k8s.io/controller-runtime"
@@ -42,6 +43,7 @@ import (
4243
capictrl "sigs.k8s.io/controller-runtime/pkg/controller"
4344
"sigs.k8s.io/controller-runtime/pkg/healthz"
4445
"sigs.k8s.io/controller-runtime/pkg/log/zap"
46+
"sigs.k8s.io/controller-runtime/pkg/manager"
4547
"sigs.k8s.io/controller-runtime/pkg/metrics/filters"
4648
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
4749

@@ -70,10 +72,13 @@ var (
7072
)
7173

7274
const (
73-
allControllers = "all"
75+
allControllers = "all"
76+
// CAPI controllers flags
7477
bootstrapController = "bootstrap"
7578
controlPlaneController = "control-plane"
7679
infrastructureController = "infrastructure"
80+
// Standalone controller flag
81+
standaloneController = "standalone"
7782
)
7883

7984
func init() {
@@ -273,32 +278,8 @@ func main() {
273278
}
274279

275280
if isControllerEnabled(controlPlaneController) {
276-
_ = mgr.AddReadyzCheck("webhook-check", mgr.GetWebhookServer().StartedChecker())
277-
if err = (&controller.ClusterReconciler{
278-
Client: mgr.GetClient(),
279-
Scheme: mgr.GetScheme(),
280-
ClientSet: clientSet,
281-
RESTConfig: restConfig,
282-
Recorder: mgr.GetEventRecorderFor("cluster-reconciler"),
283-
}).SetupWithManager(mgr, ctrlOptions); err != nil {
284-
setupLog.Error(err, "unable to create controller", "controller", "K0smotronCluster")
285-
os.Exit(1)
286-
}
287-
288-
if err = (&controller.ClusterDefaulter{}).SetupK0sControlPlaneWebhookWithManager(mgr); err != nil {
289-
setupLog.Error(err, "unable to create webhook", "webhook", "k0smotron.Cluster")
290-
os.Exit(1)
291-
}
292-
293-
if err = (&controller.JoinTokenRequestReconciler{
294-
Client: mgr.GetClient(),
295-
Scheme: mgr.GetScheme(),
296-
ClientSet: clientSet,
297-
RESTConfig: restConfig,
298-
}).SetupWithManager(mgr, ctrlOptions); err != nil {
299-
setupLog.Error(err, "unable to create controller", "controller", "JoinTokenRequest")
300-
os.Exit(1)
301-
}
281+
// If 'control-plane' CAPI controller is explicitly enabled, it means also standalone controllers must be enabled
282+
setStandaloneControllers(mgr, clientSet, restConfig, ctrlOptions)
302283

303284
if runCAPIControllers {
304285
if err = (&controlplane.K0smotronController{
@@ -332,6 +313,9 @@ func main() {
332313
os.Exit(1)
333314
}
334315
}
316+
} else if isControllerEnabled(standaloneController) {
317+
// If 'standalone' controller is explicitly enabled, run only standalone controllers.
318+
setStandaloneControllers(mgr, clientSet, restConfig, ctrlOptions)
335319
}
336320

337321
if isControllerEnabled(infrastructureController) && runCAPIControllers {
@@ -387,3 +371,33 @@ func main() {
387371
func isControllerEnabled(controllerName string) bool {
388372
return enabledControllers[controllerName]
389373
}
374+
375+
func setStandaloneControllers(mgr manager.Manager, clientSet *kubernetes.Clientset, restConfig *rest.Config, opts capictrl.Options) {
376+
_ = mgr.AddReadyzCheck("webhook-check", mgr.GetWebhookServer().StartedChecker())
377+
378+
if err := (&controller.ClusterReconciler{
379+
Client: mgr.GetClient(),
380+
Scheme: mgr.GetScheme(),
381+
ClientSet: clientSet,
382+
RESTConfig: restConfig,
383+
Recorder: mgr.GetEventRecorderFor("cluster-reconciler"),
384+
}).SetupWithManager(mgr, opts); err != nil {
385+
setupLog.Error(err, "unable to create controller", "controller", "K0smotronCluster")
386+
os.Exit(1)
387+
}
388+
389+
if err := (&controller.ClusterDefaulter{}).SetupK0sControlPlaneWebhookWithManager(mgr); err != nil {
390+
setupLog.Error(err, "unable to create webhook", "webhook", "k0smotron.Cluster")
391+
os.Exit(1)
392+
}
393+
394+
if err := (&controller.JoinTokenRequestReconciler{
395+
Client: mgr.GetClient(),
396+
Scheme: mgr.GetScheme(),
397+
ClientSet: clientSet,
398+
RESTConfig: restConfig,
399+
}).SetupWithManager(mgr, opts); err != nil {
400+
setupLog.Error(err, "unable to create controller", "controller", "JoinTokenRequest")
401+
os.Exit(1)
402+
}
403+
}

0 commit comments

Comments
 (0)