Files
my-rook-config/pkg/clusterd/context.go
T

65 lines
2.2 KiB
Go
Raw Normal View History

2016-11-05 17:09:05 -07:00
/*
Copyright 2016 The Rook Authors. All rights reserved.
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.
*/
2016-09-15 08:00:43 -07:00
package clusterd
import (
2020-04-01 09:58:04 +02:00
netclient "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/clientset/versioned/typed/k8s.cni.cncf.io/v1"
2017-12-04 08:37:39 -08:00
rookclient "github.com/rook/rook/pkg/client/clientset/versioned"
2016-10-26 00:38:39 +02:00
"github.com/rook/rook/pkg/util/exec"
2018-04-05 18:39:20 +00:00
"github.com/rook/rook/pkg/util/sys"
apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
2017-07-24 07:43:11 -07:00
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
2016-09-15 08:00:43 -07:00
)
// Context for loading or applying the configuration state of a service.
2016-09-15 08:00:43 -07:00
type Context struct {
// The kubernetes config used for this context
KubeConfig *rest.Config
2017-07-24 07:43:11 -07:00
// Clientset is a connection to the core kubernetes API
Clientset kubernetes.Interface
// Represents the Client provided by the controller-runtime package to interact with Kubernetes objects
Client client.Client
2017-12-04 08:37:39 -08:00
// RookClientset is a typed connection to the rook API
RookClientset rookclient.Interface
// ApiExtensionsClient is a typed connection to the CRD API extensions
ApiExtensionsClient apiextensionsclient.Interface
2016-09-15 08:00:43 -07:00
// The implementation of executing a console command
Executor exec.Executor
2016-09-15 08:00:43 -07:00
// The implementation of executing remotely a console command to a given pod
RemoteExecutor exec.RemotePodCommandExecutor
2016-10-14 14:41:15 -07:00
// The root configuration directory used by services
ConfigDir string
// The full path to a config file that can be used to override generated settings
ConfigFileOverride string
2020-04-01 09:58:04 +02:00
// NetworkClient is a connection to the CNI plugin API
NetworkClient netclient.K8sCniCncfIoV1Interface
2017-10-17 09:33:37 -07:00
// The local devices detected on the node
2018-04-05 18:39:20 +00:00
Devices []*sys.LocalDisk
2016-09-15 08:00:43 -07:00
}