Documentation ¶
Index ¶
- Constants
- Variables
- func DockerClientFromEnv(ctx context.Context, env docker.Env) (docker.Client, error)
- func KubernetesClientFromEnv(ctx context.Context, contextOverride k8s.KubeContextOverride, ...) (k8s.Client, error)
- type ConnectionManager
- type DockerClientFactory
- type DockerClientFunc
- type KubernetesClientFactory
- type KubernetesClientFunc
- type Reconciler
Constants ¶
View Source
const ArchUnknown string = "unknown"
Variables ¶
View Source
var WireSet = wire.NewSet( NewConnectionManager, wire.Bind(new(cluster.ClientProvider), new(*ConnectionManager)), wire.InterfaceValue(new(KubernetesClientFactory), KubernetesClientFunc(KubernetesClientFromEnv)), wire.InterfaceValue(new(DockerClientFactory), DockerClientFunc(DockerClientFromEnv)), )
Functions ¶
func DockerClientFromEnv ¶ added in v0.26.3
func KubernetesClientFromEnv ¶ added in v0.26.3
func KubernetesClientFromEnv(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)
KubernetesClientFromEnv creates a client based on the machine environment.
The Kubernetes Client APIs are really defined for automatic dependency injection. (as opposed to the Kubernetes convention of nested factory structs.)
If you have to edit the below, it's easier to let wire generate the factory code for you, then adapt it here.
Types ¶
type ConnectionManager ¶ added in v0.23.4
type ConnectionManager struct {
// contains filtered or unexported fields
}
func NewConnectionManager ¶ added in v0.23.4
func NewConnectionManager() *ConnectionManager
func (*ConnectionManager) GetComposeDockerClient ¶ added in v0.23.4
func (k *ConnectionManager) GetComposeDockerClient(key types.NamespacedName) (docker.Client, error)
GetComposeDockerClient gets the Docker client for the instance that Docker Compose is deploying to.
This is not currently exposed by the ClientCache interface as Docker Compose logic has not been migrated to the apiserver.
func (*ConnectionManager) GetK8sClient ¶ added in v0.23.4
func (k *ConnectionManager) GetK8sClient(clusterKey types.NamespacedName) (k8s.Client, metav1.MicroTime, error)
type DockerClientFactory ¶ added in v0.26.3
type DockerClientFactory interface {
New(ctx context.Context, env docker.Env) (docker.Client, error)
}
func FakeDockerClientOrError ¶ added in v0.26.3
func FakeDockerClientOrError(client docker.Client, err error) DockerClientFactory
type DockerClientFunc ¶ added in v0.26.3
type KubernetesClientFactory ¶ added in v0.26.3
type KubernetesClientFactory interface {
New(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)
}
func FakeKubernetesClientOrError ¶ added in v0.26.3
func FakeKubernetesClientOrError(client k8s.Client, err error) KubernetesClientFactory
type KubernetesClientFunc ¶ added in v0.26.3
type KubernetesClientFunc func(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)
func (KubernetesClientFunc) New ¶ added in v0.26.3
func (k KubernetesClientFunc) New(ctx context.Context, contextOverride k8s.KubeContextOverride, namespaceOverride k8s.NamespaceOverride) (k8s.Client, error)
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
func NewReconciler ¶
func NewReconciler( globalCtx context.Context, ctrlClient ctrlclient.Client, store store.RStore, clock clockwork.Clock, connManager *ConnectionManager, localDockerEnv docker.LocalEnv, dockerClientFactory DockerClientFactory, k8sClientFactory KubernetesClientFactory, wsList *server.WebsocketList, base xdg.Base, apiServerName model.APIServerName, ) *Reconciler
func (*Reconciler) CreateBuilder ¶
Click to show internal directories.
Click to hide internal directories.