kubernetes

package
v0.24.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 22 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigMapGVK = schema.GroupVersionKind{
		Version: "kubernetes",
		Group:   "kubernetes.solo.io",
		Kind:    "ConfigMap",
	}
)
View Source
var (
	CustomResourceDefinitionGVK = schema.GroupVersionKind{
		Version: "kubernetes",
		Group:   "kubernetes.solo.io",
		Kind:    "CustomResourceDefinition",
	}
)
View Source
var (
	DeploymentGVK = schema.GroupVersionKind{
		Version: "kubernetes",
		Group:   "kubernetes.solo.io",
		Kind:    "Deployment",
	}
)
View Source
var (
	JobGVK = schema.GroupVersionKind{
		Version: "kubernetes",
		Group:   "kubernetes.solo.io",
		Kind:    "Job",
	}
)
View Source
var (
	KubeNamespaceGVK = schema.GroupVersionKind{
		Version: "kubernetes",
		Group:   "kubernetes.solo.io",
		Kind:    "KubeNamespace",
	}
)
View Source
var (
	PodGVK = schema.GroupVersionKind{
		Version: "kubernetes",
		Group:   "kubernetes.solo.io",
		Kind:    "Pod",
	}
)
View Source
var (
	ServiceGVK = schema.GroupVersionKind{
		Version: "kubernetes",
		Group:   "kubernetes.solo.io",
		Kind:    "Service",
	}
)

Functions

This section is empty.

Types

type CloneableJob added in v0.11.11

type ConfigMap

func NewConfigMap

func NewConfigMap(namespace, name string) *ConfigMap

func (*ConfigMap) Clone

func (r *ConfigMap) Clone() resources.Resource

func (*ConfigMap) GroupVersionKind added in v0.10.4

func (r *ConfigMap) GroupVersionKind() schema.GroupVersionKind

func (*ConfigMap) Hash

func (r *ConfigMap) Hash(hasher hash.Hash64) (uint64, error)

func (*ConfigMap) MustHash added in v0.11.16

func (r *ConfigMap) MustHash() uint64

type ConfigMapClient

type ConfigMapClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*ConfigMap, error)
	Write(resource *ConfigMap, opts clients.WriteOpts) (*ConfigMap, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (ConfigMapList, error)
	ConfigMapWatcher
}

func NewConfigMapClient

func NewConfigMapClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (ConfigMapClient, error)

func NewConfigMapClientWithBase

func NewConfigMapClientWithBase(rc clients.ResourceClient) ConfigMapClient

func NewConfigMapClientWithToken

func NewConfigMapClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (ConfigMapClient, error)

type ConfigMapList

type ConfigMapList []*ConfigMap

func (ConfigMapList) AsInterfaces

func (list ConfigMapList) AsInterfaces() []interface{}

func (ConfigMapList) AsResources

func (list ConfigMapList) AsResources() resources.ResourceList

func (ConfigMapList) Clone

func (list ConfigMapList) Clone() ConfigMapList

func (ConfigMapList) Each

func (list ConfigMapList) Each(f func(element *ConfigMap))

func (ConfigMapList) EachResource

func (list ConfigMapList) EachResource(f func(element resources.Resource))

func (ConfigMapList) Find

func (list ConfigMapList) Find(namespace, name string) (*ConfigMap, error)

func (ConfigMapList) Names

func (list ConfigMapList) Names() []string

func (ConfigMapList) NamespacesDotNames

func (list ConfigMapList) NamespacesDotNames() []string

func (ConfigMapList) Sort

func (list ConfigMapList) Sort() ConfigMapList

type ConfigMapReconciler

type ConfigMapReconciler interface {
	Reconcile(namespace string, desiredResources ConfigMapList, transition TransitionConfigMapFunc, opts clients.ListOpts) error
}

func NewConfigMapReconciler

func NewConfigMapReconciler(client ConfigMapClient, statusSetter resources.StatusSetter) ConfigMapReconciler

type ConfigMapWatcher

type ConfigMapWatcher interface {
	// watch namespace-scoped configmaps
	Watch(namespace string, opts clients.WatchOpts) (<-chan ConfigMapList, <-chan error, error)
}

type CustomResourceDefinition

func NewCustomResourceDefinition

func NewCustomResourceDefinition(namespace, name string) *CustomResourceDefinition

func (*CustomResourceDefinition) Clone

func (*CustomResourceDefinition) GroupVersionKind added in v0.10.4

func (r *CustomResourceDefinition) GroupVersionKind() schema.GroupVersionKind

func (*CustomResourceDefinition) Hash

func (r *CustomResourceDefinition) Hash(hasher hash.Hash64) (uint64, error)

func (*CustomResourceDefinition) MustHash added in v0.11.16

func (r *CustomResourceDefinition) MustHash() uint64

type CustomResourceDefinitionList

type CustomResourceDefinitionList []*CustomResourceDefinition

func (CustomResourceDefinitionList) AsInterfaces

func (list CustomResourceDefinitionList) AsInterfaces() []interface{}

func (CustomResourceDefinitionList) AsResources

func (CustomResourceDefinitionList) Clone

func (CustomResourceDefinitionList) Each

func (list CustomResourceDefinitionList) Each(f func(element *CustomResourceDefinition))

func (CustomResourceDefinitionList) EachResource

func (list CustomResourceDefinitionList) EachResource(f func(element resources.Resource))

func (CustomResourceDefinitionList) Find

func (list CustomResourceDefinitionList) Find(namespace, name string) (*CustomResourceDefinition, error)

func (CustomResourceDefinitionList) Names

func (list CustomResourceDefinitionList) Names() []string

func (CustomResourceDefinitionList) NamespacesDotNames

func (list CustomResourceDefinitionList) NamespacesDotNames() []string

func (CustomResourceDefinitionList) Sort

type CustomResourceDefinitionReconciler

type CustomResourceDefinitionReconciler interface {
	Reconcile(namespace string, desiredResources CustomResourceDefinitionList, transition TransitionCustomResourceDefinitionFunc, opts clients.ListOpts) error
}

type CustomResourceDefinitionWatcher

type CustomResourceDefinitionWatcher interface {
	// watch cluster-scoped customresourcedefinition
	Watch(opts clients.WatchOpts) (<-chan CustomResourceDefinitionList, <-chan error, error)
}

type Deployment

func NewDeployment

func NewDeployment(namespace, name string) *Deployment

func (*Deployment) Clone

func (r *Deployment) Clone() resources.Resource

func (*Deployment) GroupVersionKind added in v0.10.4

func (r *Deployment) GroupVersionKind() schema.GroupVersionKind

func (*Deployment) Hash

func (r *Deployment) Hash(hasher hash.Hash64) (uint64, error)

func (*Deployment) MustHash added in v0.11.16

func (r *Deployment) MustHash() uint64

type DeploymentClient

type DeploymentClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*Deployment, error)
	Write(resource *Deployment, opts clients.WriteOpts) (*Deployment, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (DeploymentList, error)
	DeploymentWatcher
}

func NewDeploymentClient

func NewDeploymentClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (DeploymentClient, error)

func NewDeploymentClientWithBase

func NewDeploymentClientWithBase(rc clients.ResourceClient) DeploymentClient

func NewDeploymentClientWithToken

func NewDeploymentClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (DeploymentClient, error)

type DeploymentList

type DeploymentList []*Deployment

func (DeploymentList) AsInterfaces

func (list DeploymentList) AsInterfaces() []interface{}

func (DeploymentList) AsResources

func (list DeploymentList) AsResources() resources.ResourceList

func (DeploymentList) Clone

func (list DeploymentList) Clone() DeploymentList

func (DeploymentList) Each

func (list DeploymentList) Each(f func(element *Deployment))

func (DeploymentList) EachResource

func (list DeploymentList) EachResource(f func(element resources.Resource))

func (DeploymentList) Find

func (list DeploymentList) Find(namespace, name string) (*Deployment, error)

func (DeploymentList) Names

func (list DeploymentList) Names() []string

func (DeploymentList) NamespacesDotNames

func (list DeploymentList) NamespacesDotNames() []string

func (DeploymentList) Sort

func (list DeploymentList) Sort() DeploymentList

type DeploymentReconciler

type DeploymentReconciler interface {
	Reconcile(namespace string, desiredResources DeploymentList, transition TransitionDeploymentFunc, opts clients.ListOpts) error
}

func NewDeploymentReconciler

func NewDeploymentReconciler(client DeploymentClient, statusSetter resources.StatusSetter) DeploymentReconciler

type DeploymentWatcher

type DeploymentWatcher interface {
	// watch namespace-scoped deployments
	Watch(namespace string, opts clients.WatchOpts) (<-chan DeploymentList, <-chan error, error)
}

type Job added in v0.11.11

func NewJob added in v0.11.11

func NewJob(namespace, name string) *Job

func (*Job) Clone added in v0.11.11

func (r *Job) Clone() resources.Resource

func (*Job) GroupVersionKind added in v0.11.11

func (r *Job) GroupVersionKind() schema.GroupVersionKind

func (*Job) Hash added in v0.11.11

func (r *Job) Hash(hasher hash.Hash64) (uint64, error)

func (*Job) MustHash added in v0.11.16

func (r *Job) MustHash() uint64

type JobClient added in v0.11.11

type JobClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*Job, error)
	Write(resource *Job, opts clients.WriteOpts) (*Job, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (JobList, error)
	JobWatcher
}

func NewJobClient added in v0.11.11

func NewJobClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (JobClient, error)

func NewJobClientWithBase added in v0.11.11

func NewJobClientWithBase(rc clients.ResourceClient) JobClient

func NewJobClientWithToken added in v0.11.11

func NewJobClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (JobClient, error)

type JobList added in v0.11.11

type JobList []*Job

func (JobList) AsInterfaces added in v0.11.11

func (list JobList) AsInterfaces() []interface{}

func (JobList) AsResources added in v0.11.11

func (list JobList) AsResources() resources.ResourceList

func (JobList) Clone added in v0.11.11

func (list JobList) Clone() JobList

func (JobList) Each added in v0.11.11

func (list JobList) Each(f func(element *Job))

func (JobList) EachResource added in v0.11.11

func (list JobList) EachResource(f func(element resources.Resource))

func (JobList) Find added in v0.11.11

func (list JobList) Find(namespace, name string) (*Job, error)

func (JobList) Names added in v0.11.11

func (list JobList) Names() []string

func (JobList) NamespacesDotNames added in v0.11.11

func (list JobList) NamespacesDotNames() []string

func (JobList) Sort added in v0.11.11

func (list JobList) Sort() JobList

type JobReconciler added in v0.11.11

type JobReconciler interface {
	Reconcile(namespace string, desiredResources JobList, transition TransitionJobFunc, opts clients.ListOpts) error
}

func NewJobReconciler added in v0.11.11

func NewJobReconciler(client JobClient, statusSetter resources.StatusSetter) JobReconciler

type JobWatcher added in v0.11.11

type JobWatcher interface {
	// watch namespace-scoped jobs
	Watch(namespace string, opts clients.WatchOpts) (<-chan JobList, <-chan error, error)
}

type KubeNamespace

func NewKubeNamespace

func NewKubeNamespace(namespace, name string) *KubeNamespace

func (*KubeNamespace) Clone

func (r *KubeNamespace) Clone() resources.Resource

func (*KubeNamespace) GroupVersionKind added in v0.10.4

func (r *KubeNamespace) GroupVersionKind() schema.GroupVersionKind

func (*KubeNamespace) Hash

func (r *KubeNamespace) Hash(hasher hash.Hash64) (uint64, error)

func (*KubeNamespace) MustHash added in v0.11.16

func (r *KubeNamespace) MustHash() uint64

type KubeNamespaceClient

type KubeNamespaceClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(name string, opts clients.ReadOpts) (*KubeNamespace, error)
	Write(resource *KubeNamespace, opts clients.WriteOpts) (*KubeNamespace, error)
	Delete(name string, opts clients.DeleteOpts) error
	List(opts clients.ListOpts) (KubeNamespaceList, error)
	KubeNamespaceWatcher
}

func NewKubeNamespaceClient

func NewKubeNamespaceClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (KubeNamespaceClient, error)

func NewKubeNamespaceClientWithBase

func NewKubeNamespaceClientWithBase(rc clients.ResourceClient) KubeNamespaceClient

func NewKubeNamespaceClientWithToken

func NewKubeNamespaceClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (KubeNamespaceClient, error)

type KubeNamespaceList

type KubeNamespaceList []*KubeNamespace

func (KubeNamespaceList) AsInterfaces

func (list KubeNamespaceList) AsInterfaces() []interface{}

func (KubeNamespaceList) AsResources

func (list KubeNamespaceList) AsResources() resources.ResourceList

func (KubeNamespaceList) Clone

func (list KubeNamespaceList) Clone() KubeNamespaceList

func (KubeNamespaceList) Each

func (list KubeNamespaceList) Each(f func(element *KubeNamespace))

func (KubeNamespaceList) EachResource

func (list KubeNamespaceList) EachResource(f func(element resources.Resource))

func (KubeNamespaceList) Find

func (list KubeNamespaceList) Find(namespace, name string) (*KubeNamespace, error)

func (KubeNamespaceList) Names

func (list KubeNamespaceList) Names() []string

func (KubeNamespaceList) NamespacesDotNames

func (list KubeNamespaceList) NamespacesDotNames() []string

func (KubeNamespaceList) Sort

type KubeNamespaceReconciler

type KubeNamespaceReconciler interface {
	Reconcile(namespace string, desiredResources KubeNamespaceList, transition TransitionKubeNamespaceFunc, opts clients.ListOpts) error
}

func NewKubeNamespaceReconciler

func NewKubeNamespaceReconciler(client KubeNamespaceClient, statusSetter resources.StatusSetter) KubeNamespaceReconciler

type KubeNamespaceWatcher

type KubeNamespaceWatcher interface {
	// watch cluster-scoped kubenamespaces
	Watch(opts clients.WatchOpts) (<-chan KubeNamespaceList, <-chan error, error)
}

type Pod

func NewPod

func NewPod(namespace, name string) *Pod

func (*Pod) Clone

func (r *Pod) Clone() resources.Resource

func (*Pod) GroupVersionKind added in v0.10.4

func (r *Pod) GroupVersionKind() schema.GroupVersionKind

func (*Pod) Hash

func (r *Pod) Hash(hasher hash.Hash64) (uint64, error)

func (*Pod) MustHash added in v0.11.16

func (r *Pod) MustHash() uint64

type PodClient

type PodClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*Pod, error)
	Write(resource *Pod, opts clients.WriteOpts) (*Pod, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (PodList, error)
	PodWatcher
}

func NewPodClient

func NewPodClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (PodClient, error)

func NewPodClientWithBase

func NewPodClientWithBase(rc clients.ResourceClient) PodClient

func NewPodClientWithToken

func NewPodClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (PodClient, error)

type PodList

type PodList []*Pod

func (PodList) AsInterfaces

func (list PodList) AsInterfaces() []interface{}

func (PodList) AsResources

func (list PodList) AsResources() resources.ResourceList

func (PodList) Clone

func (list PodList) Clone() PodList

func (PodList) Each

func (list PodList) Each(f func(element *Pod))

func (PodList) EachResource

func (list PodList) EachResource(f func(element resources.Resource))

func (PodList) Find

func (list PodList) Find(namespace, name string) (*Pod, error)

func (PodList) Names

func (list PodList) Names() []string

func (PodList) NamespacesDotNames

func (list PodList) NamespacesDotNames() []string

func (PodList) Sort

func (list PodList) Sort() PodList

type PodReconciler

type PodReconciler interface {
	Reconcile(namespace string, desiredResources PodList, transition TransitionPodFunc, opts clients.ListOpts) error
}

func NewPodReconciler

func NewPodReconciler(client PodClient, statusSetter resources.StatusSetter) PodReconciler

type PodWatcher

type PodWatcher interface {
	// watch namespace-scoped pods
	Watch(namespace string, opts clients.WatchOpts) (<-chan PodList, <-chan error, error)
}

type Service

func NewService

func NewService(namespace, name string) *Service

func (*Service) Clone

func (r *Service) Clone() resources.Resource

func (*Service) GroupVersionKind added in v0.10.4

func (r *Service) GroupVersionKind() schema.GroupVersionKind

func (*Service) Hash

func (r *Service) Hash(hasher hash.Hash64) (uint64, error)

func (*Service) MustHash added in v0.11.16

func (r *Service) MustHash() uint64

type ServiceClient

type ServiceClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*Service, error)
	Write(resource *Service, opts clients.WriteOpts) (*Service, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (ServiceList, error)
	ServiceWatcher
}

func NewServiceClient

func NewServiceClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (ServiceClient, error)

func NewServiceClientWithBase

func NewServiceClientWithBase(rc clients.ResourceClient) ServiceClient

func NewServiceClientWithToken

func NewServiceClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (ServiceClient, error)

type ServiceList

type ServiceList []*Service

func (ServiceList) AsInterfaces

func (list ServiceList) AsInterfaces() []interface{}

func (ServiceList) AsResources

func (list ServiceList) AsResources() resources.ResourceList

func (ServiceList) Clone

func (list ServiceList) Clone() ServiceList

func (ServiceList) Each

func (list ServiceList) Each(f func(element *Service))

func (ServiceList) EachResource

func (list ServiceList) EachResource(f func(element resources.Resource))

func (ServiceList) Find

func (list ServiceList) Find(namespace, name string) (*Service, error)

func (ServiceList) Names

func (list ServiceList) Names() []string

func (ServiceList) NamespacesDotNames

func (list ServiceList) NamespacesDotNames() []string

func (ServiceList) Sort

func (list ServiceList) Sort() ServiceList

type ServiceReconciler

type ServiceReconciler interface {
	Reconcile(namespace string, desiredResources ServiceList, transition TransitionServiceFunc, opts clients.ListOpts) error
}

func NewServiceReconciler

func NewServiceReconciler(client ServiceClient, statusSetter resources.StatusSetter) ServiceReconciler

type ServiceWatcher

type ServiceWatcher interface {
	// watch namespace-scoped services
	Watch(namespace string, opts clients.WatchOpts) (<-chan ServiceList, <-chan error, error)
}

type TransitionConfigMapFunc

type TransitionConfigMapFunc func(original, desired *ConfigMap) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionCustomResourceDefinitionFunc

type TransitionCustomResourceDefinitionFunc func(original, desired *CustomResourceDefinition) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionDeploymentFunc

type TransitionDeploymentFunc func(original, desired *Deployment) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionJobFunc added in v0.11.11

type TransitionJobFunc func(original, desired *Job) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionKubeNamespaceFunc

type TransitionKubeNamespaceFunc func(original, desired *KubeNamespace) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionPodFunc

type TransitionPodFunc func(original, desired *Pod) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionServiceFunc

type TransitionServiceFunc func(original, desired *Service) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL