Documentation ¶
Overview ¶
Package kubernetes implements a convenience wrapper around Kubernetes clients.
Index ¶
- func CreateNamespace(client client.Client, name string) error
- func DeleteNamespace(client client.Client, name string) error
- type PersistentVolumeClaim
- func GetPersistentVolumeClaim(client client.Client, name string, namespace string) (PersistentVolumeClaim, error)
- func ListPersistentVolumeClaims(client client.Client, namespace string) ([]PersistentVolumeClaim, error)
- func NewPersistentVolumeClaim(client client.Client, persistentvolumeclaim corev1.PersistentVolumeClaim) (PersistentVolumeClaim, error)
- type Pod
- type Secret
- type SecretBuilder
- func (builder SecretBuilder) Do(client client.Client) (Secret, error)
- func (builder SecretBuilder) WithData(data map[string][]byte) SecretBuilder
- func (builder SecretBuilder) WithNamespace(namespace string) SecretBuilder
- func (builder SecretBuilder) WithStringData(data map[string]string) SecretBuilder
- type Service
- type StatefulSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNamespace ¶
CreateNamespace creates a namespace.
Types ¶
type PersistentVolumeClaim ¶ added in v0.2.0
type PersistentVolumeClaim struct { corev1.PersistentVolumeClaim // contains filtered or unexported fields }
PersistentVolumeClaim wraps a Kubernetes PersistentVolumeClaim.
func GetPersistentVolumeClaim ¶ added in v0.2.0
func GetPersistentVolumeClaim(client client.Client, name string, namespace string) (PersistentVolumeClaim, error)
GetPersistentVolumeClaim gets a persistentvolumeclaim in a namespace.
func ListPersistentVolumeClaims ¶ added in v0.2.0
func ListPersistentVolumeClaims(client client.Client, namespace string) ([]PersistentVolumeClaim, error)
ListPersistentVolumeClaims lists all persistentvolumeclaims in a namespace.
func NewPersistentVolumeClaim ¶ added in v0.2.0
func NewPersistentVolumeClaim(client client.Client, persistentvolumeclaim corev1.PersistentVolumeClaim) (PersistentVolumeClaim, error)
NewPersistentVolumeClaim creates a PersistentVolumeClaim from its Kubernetes PersistentVolumeClaim.
func (PersistentVolumeClaim) Delete ¶ added in v0.2.0
func (persistentvolumeclaim PersistentVolumeClaim) Delete() error
Delete deletes a PersistentVolumeClaim from the Kubernetes cluster.
func (*PersistentVolumeClaim) Update ¶ added in v0.2.0
func (persistentvolumeclaim *PersistentVolumeClaim) Update() error
Update gets the current PersistentVolumeClaim status.
type Pod ¶
Pod wraps a Kubernetes Pod.
func (Pod) ContainerExec ¶
Exec runs a command in a pod's container.
func (Pod) ContainerLogs ¶
Logs returns the (current) logs of a pod's container.
type Secret ¶ added in v0.2.0
Secret wraps a Kubernetes Secret.
func ListSecrets ¶ added in v0.2.0
ListSecrets lists all secrets in a namespace.
type SecretBuilder ¶ added in v0.2.0
type SecretBuilder struct { Name string Namespace string Data map[string][]byte StringData map[string]string }
SecretBuilder tracks the options set for a secret.
func CreateSecret ¶ added in v0.2.0
func CreateSecret(name string) SecretBuilder
CreateSecret creates a secret. Additional parameters can be added to this call. The creation is started by calling 'Do'.
func (SecretBuilder) Do ¶ added in v0.2.0
func (builder SecretBuilder) Do(client client.Client) (Secret, error)
Do creates the secret in the cluster.
func (SecretBuilder) WithData ¶ added in v0.2.0
func (builder SecretBuilder) WithData(data map[string][]byte) SecretBuilder
WithData sets the data the secret should hold.
func (SecretBuilder) WithNamespace ¶ added in v0.2.0
func (builder SecretBuilder) WithNamespace(namespace string) SecretBuilder
WithNamespace sets the namespace in which the secret will be created.
func (SecretBuilder) WithStringData ¶ added in v0.2.2
func (builder SecretBuilder) WithStringData(data map[string]string) SecretBuilder
WithStringData sets the data the secret should hold as string
type Service ¶ added in v0.2.0
Service wraps a Kubernetes Service.
func GetService ¶ added in v0.2.0
GetService gets a service in a namespace.
func ListServices ¶ added in v0.2.0
ListServices lists all services in a namespace.
func NewService ¶ added in v0.2.0
NewService creates a Service from its Kubernetes Service.
type StatefulSet ¶ added in v0.2.0
type StatefulSet struct { appsv1.StatefulSet // contains filtered or unexported fields }
StatefulSet wraps a Kubernetes StatefulSet.
func GetStatefulSet ¶ added in v0.2.0
GetStatefulSet gets a statefulset in a namespace.
func ListStatefulSets ¶ added in v0.2.0
func ListStatefulSets(client client.Client, namespace string) ([]StatefulSet, error)
ListStatefulSets lists all statefulsets in a namespace.
func NewStatefulSet ¶ added in v0.2.0
func NewStatefulSet(client client.Client, statefulset appsv1.StatefulSet) (StatefulSet, error)
NewStatefulSet creates a StatefulSet from its Kubernetes StatefulSet.
func (StatefulSet) Delete ¶ added in v0.2.0
func (statefulset StatefulSet) Delete() error
Delete deletes a StatefulSet from the Kubernetes cluster.
func (*StatefulSet) Update ¶ added in v0.2.0
func (statefulset *StatefulSet) Update() error
Update gets the current StatefulSet status.