Skip to content

Commit

Permalink
moved to internal package and added alias.go
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanshuraj1333 committed Nov 22, 2021
1 parent c68a87c commit fdd12de
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ generate-manifests-core: $(CONTROLLER_GEN) $(KUSTOMIZE)
paths=./controllers/... \
paths=./webhooks/... \
paths=./$(EXP_DIR)/api/... \
paths=./$(EXP_DIR)/controllers/... \
paths=./$(EXP_DIR)/internal/... \
paths=./$(EXP_DIR)/addons/api/... \
paths=./$(EXP_DIR)/addons/internal/controllers/... \
crd:crdVersions=v1 \
Expand Down
1 change: 1 addition & 0 deletions docs/book/src/developer/providers/v1.0-to-v1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ are kept in sync with the versions used by `sigs.k8s.io/controller-runtime`.
* [exp/addons/controllers](https://github.com/kubernetes-sigs/cluster-api/pull/5639)
* [test/infrastructure/docker/controllers](https://github.com/kubernetes-sigs/cluster-api/pull/5595)
* [test/infrastructure/docker/exp/controllers](https://github.com/kubernetes-sigs/cluster-api/pull/5690)
* [exp/controllers](https://github.com/kubernetes-sigs/cluster-api/pull/5651)

### Other

Expand Down
41 changes: 41 additions & 0 deletions exp/controllers/alias.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package controllers

import (
"context"

machinepool "sigs.k8s.io/cluster-api/exp/internal/controllers"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
)

// MachinePoolReconciler reconciles a MachinePool object.
type MachinePoolReconciler struct {
Client client.Client

// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string
}

func (r *MachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
return (&machinepool.MachinePoolReconciler{
Client: r.Client,
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options)
}
18 changes: 18 additions & 0 deletions exp/internal/controllers/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package controllers implements experimental controllers.
package controllers
File renamed without changes.
File renamed without changes.

0 comments on commit fdd12de

Please sign in to comment.