mirror of https://github.com/rancher/shepherd.git
73 lines
2.7 KiB
Go
73 lines
2.7 KiB
Go
/*
|
|
Copyright 2025 Rancher Labs, Inc.
|
|
|
|
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.
|
|
*/
|
|
|
|
// Code generated by main. DO NOT EDIT.
|
|
|
|
package v1
|
|
|
|
import (
|
|
"github.com/rancher/lasso/pkg/controller"
|
|
"github.com/rancher/shepherd/pkg/session"
|
|
"github.com/rancher/shepherd/pkg/wrangler/pkg/generic"
|
|
"github.com/rancher/wrangler/v3/pkg/schemes"
|
|
v1 "k8s.io/api/apps/v1"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
)
|
|
|
|
func init() {
|
|
schemes.Register(v1.AddToScheme)
|
|
}
|
|
|
|
type Interface interface {
|
|
ControllerRevision() ControllerRevisionController
|
|
DaemonSet() DaemonSetController
|
|
Deployment() DeploymentController
|
|
ReplicaSet() ReplicaSetController
|
|
StatefulSet() StatefulSetController
|
|
}
|
|
|
|
func New(controllerFactory controller.SharedControllerFactory, ts *session.Session) Interface {
|
|
return &version{
|
|
controllerFactory: controllerFactory,
|
|
ts: ts,
|
|
}
|
|
}
|
|
|
|
type version struct {
|
|
controllerFactory controller.SharedControllerFactory
|
|
ts *session.Session
|
|
}
|
|
|
|
func (v *version) ControllerRevision() ControllerRevisionController {
|
|
return generic.NewController[*v1.ControllerRevision, *v1.ControllerRevisionList](schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"}, "controllerrevisions", true, v.controllerFactory, v.ts)
|
|
}
|
|
|
|
func (v *version) DaemonSet() DaemonSetController {
|
|
return generic.NewController[*v1.DaemonSet, *v1.DaemonSetList](schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"}, "daemonsets", true, v.controllerFactory, v.ts)
|
|
}
|
|
|
|
func (v *version) Deployment() DeploymentController {
|
|
return generic.NewController[*v1.Deployment, *v1.DeploymentList](schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"}, "deployments", true, v.controllerFactory, v.ts)
|
|
}
|
|
|
|
func (v *version) ReplicaSet() ReplicaSetController {
|
|
return generic.NewController[*v1.ReplicaSet, *v1.ReplicaSetList](schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"}, "replicasets", true, v.controllerFactory, v.ts)
|
|
}
|
|
|
|
func (v *version) StatefulSet() StatefulSetController {
|
|
return generic.NewController[*v1.StatefulSet, *v1.StatefulSetList](schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"}, "statefulsets", true, v.controllerFactory, v.ts)
|
|
}
|