Documentation ¶
Index ¶
- func CreateNamespace(client client.Client, name string) error
- func DeleteNamespace(client client.Client, name string) error
- type ClusterRole
- type ClusterRoleBinding
- type Node
- 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 Role
- type RoleBinding
- 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 ServiceAccount
- type StatefulSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNamespace ¶
CreateNamespace creates a namespace.
Types ¶
type ClusterRole ¶
type ClusterRole struct { rbacv1.ClusterRole // contains filtered or unexported fields }
ClusterRole wraps a Kubernetes ClusterRole.
func GetClusterRole ¶
func GetClusterRole(client client.Client, name string) (ClusterRole, error)
GetClusterRole gets a clusterrole.
func ListClusterRoles ¶
func ListClusterRoles(client client.Client) ([]ClusterRole, error)
ListClusterRoles lists all clusterroles.
func NewClusterRole ¶
func NewClusterRole(client client.Client, clusterrole rbacv1.ClusterRole) (ClusterRole, error)
NewClusterRole creates a ClusterRole from its Kubernetes ClusterRole.
func (ClusterRole) Delete ¶
func (clusterrole ClusterRole) Delete() error
Delete deletes a ClusterRole from the Kubernetes cluster.
func (*ClusterRole) Save ¶
func (clusterrole *ClusterRole) Save() error
Save saves the current ClusterRole.
func (*ClusterRole) Update ¶
func (clusterrole *ClusterRole) Update() error
Update gets the current ClusterRole status.
type ClusterRoleBinding ¶
type ClusterRoleBinding struct { rbacv1.ClusterRoleBinding // contains filtered or unexported fields }
ClusterRoleBinding wraps a Kubernetes ClusterRoleBinding.
func GetClusterRoleBinding ¶
func GetClusterRoleBinding(client client.Client, name string) (ClusterRoleBinding, error)
GetClusterRoleBinding gets a clusterrolebinding.
func ListClusterRoleBindings ¶
func ListClusterRoleBindings(client client.Client) ([]ClusterRoleBinding, error)
ListClusterRoleBindings lists all clusterrolebindings.
func NewClusterRoleBinding ¶
func NewClusterRoleBinding(client client.Client, clusterrolebinding rbacv1.ClusterRoleBinding) (ClusterRoleBinding, error)
NewClusterRoleBinding creates a ClusterRoleBinding from its Kubernetes ClusterRoleBinding.
func (ClusterRoleBinding) Delete ¶
func (clusterrolebinding ClusterRoleBinding) Delete() error
Delete deletes a ClusterRoleBinding from the Kubernetes cluster.
func (*ClusterRoleBinding) Save ¶
func (clusterrolebinding *ClusterRoleBinding) Save() error
Save saves the current ClusterRoleBinding.
func (*ClusterRoleBinding) Update ¶
func (clusterrolebinding *ClusterRoleBinding) Update() error
Update gets the current ClusterRoleBinding status.
type Node ¶
Node wraps a Kubernetes Node.
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct { corev1.PersistentVolumeClaim // contains filtered or unexported fields }
PersistentVolumeClaim wraps a Kubernetes PersistentVolumeClaim.
func GetPersistentVolumeClaim ¶
func GetPersistentVolumeClaim(client client.Client, name string, namespace string) (PersistentVolumeClaim, error)
GetPersistentVolumeClaim gets a persistentvolumeclaim in a namespace.
func ListPersistentVolumeClaims ¶
func ListPersistentVolumeClaims(client client.Client, namespace string) ([]PersistentVolumeClaim, error)
ListPersistentVolumeClaims lists all persistentvolumeclaims in a namespace.
func NewPersistentVolumeClaim ¶
func NewPersistentVolumeClaim(client client.Client, persistentvolumeclaim corev1.PersistentVolumeClaim) (PersistentVolumeClaim, error)
NewPersistentVolumeClaim creates a PersistentVolumeClaim from its Kubernetes PersistentVolumeClaim.
func (PersistentVolumeClaim) Delete ¶
func (persistentvolumeclaim PersistentVolumeClaim) Delete() error
Delete deletes a PersistentVolumeClaim from the Kubernetes cluster.
func (*PersistentVolumeClaim) Save ¶
func (persistentvolumeclaim *PersistentVolumeClaim) Save() error
Save saves the current PersistentVolumeClaim.
func (*PersistentVolumeClaim) Update ¶
func (persistentvolumeclaim *PersistentVolumeClaim) Update() error
Update gets the current PersistentVolumeClaim status.
type Pod ¶
Pod wraps a Kubernetes Pod.
func (Pod) ContainerExec ¶
ContainerExec runs a command in a pod's container.
func (Pod) ContainerLogs ¶
ContainerLogs returns the (current) logs of a pod's container.
type Role ¶
Role wraps a Kubernetes Role.
type RoleBinding ¶
type RoleBinding struct { rbacv1.RoleBinding // contains filtered or unexported fields }
RoleBinding wraps a Kubernetes RoleBinding.
func GetRoleBinding ¶
GetRoleBinding gets a rolebinding in a namespace.
func ListRoleBindings ¶
func ListRoleBindings(client client.Client, namespace string) ([]RoleBinding, error)
ListRoleBindings lists all rolebindings in a namespace.
func NewRoleBinding ¶
func NewRoleBinding(client client.Client, rolebinding rbacv1.RoleBinding) (RoleBinding, error)
NewRoleBinding creates a RoleBinding from its Kubernetes RoleBinding.
func (RoleBinding) Delete ¶
func (rolebinding RoleBinding) Delete() error
Delete deletes a RoleBinding from the Kubernetes cluster.
func (*RoleBinding) Save ¶
func (rolebinding *RoleBinding) Save() error
Save saves the current RoleBinding.
func (*RoleBinding) Update ¶
func (rolebinding *RoleBinding) Update() error
Update gets the current RoleBinding status.
type Secret ¶
Secret wraps a Kubernetes Secret.
func ListSecrets ¶
ListSecrets lists all secrets in a namespace.
type SecretBuilder ¶
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 ¶
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 ¶
func (builder SecretBuilder) Do(client client.Client) (Secret, error)
Do creates the secret in the cluster.
func (SecretBuilder) WithData ¶
func (builder SecretBuilder) WithData(data map[string][]byte) SecretBuilder
WithData sets the data the secret should hold.
func (SecretBuilder) WithNamespace ¶
func (builder SecretBuilder) WithNamespace(namespace string) SecretBuilder
WithNamespace sets the namespace in which the secret will be created.
func (SecretBuilder) WithStringData ¶
func (builder SecretBuilder) WithStringData(data map[string]string) SecretBuilder
WithStringData sets the data the secret should hold as string
type Service ¶
Service wraps a Kubernetes Service.
func GetService ¶
GetService gets a service in a namespace.
func ListServices ¶
ListServices lists all services in a namespace.
func NewService ¶
NewService creates a Service from its Kubernetes Service.
type ServiceAccount ¶
type ServiceAccount struct { corev1.ServiceAccount // contains filtered or unexported fields }
ServiceAccount wraps a Kubernetes ServiceAccount.
func GetServiceAccount ¶
GetServiceAccount gets a serviceaccount in a namespace.
func ListServiceAccounts ¶
func ListServiceAccounts(client client.Client, namespace string) ([]ServiceAccount, error)
ListServiceAccounts lists all serviceaccounts in a namespace.
func NewServiceAccount ¶
func NewServiceAccount(client client.Client, serviceaccount corev1.ServiceAccount) (ServiceAccount, error)
NewServiceAccount creates a ServiceAccount from its Kubernetes ServiceAccount.
func (ServiceAccount) Delete ¶
func (serviceaccount ServiceAccount) Delete() error
Delete deletes a ServiceAccount from the Kubernetes cluster.
func (*ServiceAccount) Save ¶
func (serviceaccount *ServiceAccount) Save() error
Save saves the current ServiceAccount.
func (*ServiceAccount) Update ¶
func (serviceaccount *ServiceAccount) Update() error
Update gets the current ServiceAccount status.
type StatefulSet ¶
type StatefulSet struct { appsv1.StatefulSet // contains filtered or unexported fields }
StatefulSet wraps a Kubernetes StatefulSet.
func GetStatefulSet ¶
GetStatefulSet gets a statefulset in a namespace.
func ListStatefulSets ¶
func ListStatefulSets(client client.Client, namespace string) ([]StatefulSet, error)
ListStatefulSets lists all statefulsets in a namespace.
func NewStatefulSet ¶
func NewStatefulSet(client client.Client, statefulset appsv1.StatefulSet) (StatefulSet, error)
NewStatefulSet creates a StatefulSet from its Kubernetes StatefulSet.
func (StatefulSet) Delete ¶
func (statefulset StatefulSet) Delete() error
Delete deletes a StatefulSet from the Kubernetes cluster.
func (*StatefulSet) Save ¶
func (statefulset *StatefulSet) Save() error
Save saves the current StatefulSet.
func (*StatefulSet) Update ¶
func (statefulset *StatefulSet) Update() error
Update gets the current StatefulSet status.
Source Files ¶
- clusterrole.generated.go
- clusterrole.go
- clusterrolebinding.generated.go
- clusterrolebinding.go
- namespace.go
- node.generated.go
- node.go
- persistentvolumeclaim.generated.go
- persistentvolumeclaim.go
- pod.generated.go
- pod.go
- role.generated.go
- role.go
- rolebinding.generated.go
- rolebinding.go
- secret.generated.go
- secret.go
- service.generated.go
- service.go
- serviceaccount.generated.go
- serviceaccount.go
- statefulset.generated.go
- statefulset.go