Documentation
¶
Index ¶
- type KubeInterface
- type UtilInterface
- func (k *UtilInterface) CreateSecret(namespace string, secret *v1.Secret) error
- func (k *UtilInterface) GetNamespaces() (*v1.NamespaceList, error)
- func (k *UtilInterface) GetSecret(namespace, secretname string) (*v1.Secret, error)
- func (k *UtilInterface) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
- func (k *UtilInterface) UpdateSecret(namespace string, secret *v1.Secret) error
- func (k *UtilInterface) UpdateServiceAccount(namespace string, sa *v1.ServiceAccount) error
- func (k *UtilInterface) WatchNamespaces(resyncPeriod time.Duration, handler func(*v1.Namespace) error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
type UtilInterface ¶
type UtilInterface struct { Kclient KubeInterface MasterHost string Log logrus.FieldLogger }
UtilInterface is the struct behind
func New ¶
func New(kubeCfgFile, masterHost string) (*UtilInterface, error)
New creates a new instance of k8sutil
func (*UtilInterface) CreateSecret ¶
func (k *UtilInterface) CreateSecret(namespace string, secret *v1.Secret) error
CreateSecret creates a secret
func (*UtilInterface) GetNamespaces ¶
func (k *UtilInterface) GetNamespaces() (*v1.NamespaceList, error)
GetNamespaces returns all namespaces
func (*UtilInterface) GetSecret ¶
func (k *UtilInterface) GetSecret(namespace, secretname string) (*v1.Secret, error)
GetSecret get a secret
func (*UtilInterface) GetServiceAccount ¶
func (k *UtilInterface) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
GetServiceAccount updates a secret
func (*UtilInterface) UpdateSecret ¶
func (k *UtilInterface) UpdateSecret(namespace string, secret *v1.Secret) error
UpdateSecret updates a secret
func (*UtilInterface) UpdateServiceAccount ¶
func (k *UtilInterface) UpdateServiceAccount(namespace string, sa *v1.ServiceAccount) error
UpdateServiceAccount updates a secret
func (*UtilInterface) WatchNamespaces ¶
Click to show internal directories.
Click to hide internal directories.