Documentation ¶
Index ¶
- type K8sutilInterface
- func (k *K8sutilInterface) CreateSecret(namespace string, secret *v1.Secret) error
- func (k *K8sutilInterface) GetNamespaces() (*v1.NamespaceList, error)
- func (k *K8sutilInterface) GetSecret(namespace, secretname string) (*v1.Secret, error)
- func (k *K8sutilInterface) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
- func (k *K8sutilInterface) UpdateSecret(namespace string, secret *v1.Secret) error
- func (k *K8sutilInterface) UpdateServiceAccount(namespace string, sa *v1.ServiceAccount) error
- func (k *K8sutilInterface) WatchNamespaces(resyncPeriod time.Duration, handler func(*v1.Namespace) error)
- type KubeInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8sutilInterface ¶
type K8sutilInterface struct { Kclient KubeInterface MasterHost string }
func New ¶
func New(kubeCfgFile, masterHost string) (*K8sutilInterface, error)
New creates a new instance of k8sutil
func (*K8sutilInterface) CreateSecret ¶
func (k *K8sutilInterface) CreateSecret(namespace string, secret *v1.Secret) error
CreateSecret creates a secret
func (*K8sutilInterface) GetNamespaces ¶
func (k *K8sutilInterface) GetNamespaces() (*v1.NamespaceList, error)
GetNamespaces returns all namespaces
func (*K8sutilInterface) GetSecret ¶
func (k *K8sutilInterface) GetSecret(namespace, secretname string) (*v1.Secret, error)
GetSecret get a secret
func (*K8sutilInterface) GetServiceAccount ¶
func (k *K8sutilInterface) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
GetServiceAccount updates a secret
func (*K8sutilInterface) UpdateSecret ¶
func (k *K8sutilInterface) UpdateSecret(namespace string, secret *v1.Secret) error
UpdateSecret updates a secret
func (*K8sutilInterface) UpdateServiceAccount ¶
func (k *K8sutilInterface) UpdateServiceAccount(namespace string, sa *v1.ServiceAccount) error
UpdateServiceAccount updates a secret
func (*K8sutilInterface) WatchNamespaces ¶
type KubeInterface ¶
type KubeInterface interface { Secrets(namespace string) coreType.SecretInterface Namespaces() coreType.NamespaceInterface ServiceAccounts(namespace string) coreType.ServiceAccountInterface Core() coreType.CoreV1Interface }
KubeInterface abstracts the k8s api
Click to show internal directories.
Click to hide internal directories.