Documentation ¶
Index ¶
- func CanNeedRetry(err error) bool
- func ExecToPodThroughAPI(command []string, containerName, podName, namespace string, stdin io.Reader) (string, string, error)
- func GetClientset() kubernetes.Interface
- func GetCoreV1() corev1api.CoreV1Interface
- func GetV1Csr() v1cert.CertificateSigningRequestInterface
- func IsOpenshift() bool
- func Md5Sum(v []byte) string
- func SetClientset(v1 corev1api.CoreV1Interface, clset kubernetes.Interface)
- func SetDeployerType(client client.Client) error
- func SetDeployerTypeE(v bool)
- func UpdateNetworkStatus(client client.Client) error
- func YamlToStruct(yamlString string, structPointer interface{}) error
- type ConfigMap
- type Kubernetes
- func (k *Kubernetes) ConfigMap(name, ownerType string, owner v1.Object) *ConfigMap
- func (k *Kubernetes) Owner(owner object) *Owner
- func (k *Kubernetes) Secret(name, ownerType string, owner v1.Object) *Secret
- func (k *Kubernetes) Service(name string, servType core.ServiceType, ports map[int32]string, ...) *Service
- type Owner
- type Secret
- type SecretFiller
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanNeedRetry ¶
CanNeedRetry works for errors from request for update, and returns true if object was changed at server side and client needs to read it again and retry update operation
func ExecToPodThroughAPI ¶
func ExecToPodThroughAPI(command []string, containerName, podName, namespace string, stdin io.Reader) (string, string, error)
ExecToPodThroughAPI uninterractively exec to the pod with the command specified. :param string command: list of the str which specify the command. :param string pod_name: Pod name :param string namespace: namespace of the Pod. :param io.Reader stdin: Standerd Input if necessary, otherwise `nil` :return: string: Output of the command. (STDOUT)
string: Errors. (STDERR) error: If any error has occurred otherwise `nil`
func GetClientset ¶
func GetClientset() kubernetes.Interface
func GetCoreV1 ¶
func GetCoreV1() corev1api.CoreV1Interface
GetCoreV1 first tries to get a config object which uses the service account kubernetes gives to pods,
func GetV1Csr ¶
func GetV1Csr() v1cert.CertificateSigningRequestInterface
func IsOpenshift ¶
func IsOpenshift() bool
func SetClientset ¶
func SetClientset(v1 corev1api.CoreV1Interface, clset kubernetes.Interface)
Allows to overwrite clientset for unittests
func SetDeployerType ¶
func SetDeployerTypeE ¶
func SetDeployerTypeE(v bool)
func UpdateNetworkStatus ¶
func YamlToStruct ¶
Types ¶
type ConfigMap ¶
type ConfigMap struct {
// contains filtered or unexported fields
}
ConfigMap is used to create and modify config maps to configure owner
func (*ConfigMap) EnsureExists ¶
EnsureExists is used to ensure that specific config map exists and is filled properly
type Kubernetes ¶
type Kubernetes struct {
// contains filtered or unexported fields
}
Kubernetes is used to create and update meaningful objects
func New ¶
func New(client client.Client, scheme *runtime.Scheme) *Kubernetes
New is used to create a new Kubernetes
func (*Kubernetes) ConfigMap ¶
func (k *Kubernetes) ConfigMap(name, ownerType string, owner v1.Object) *ConfigMap
ConfigMap is used to create ConfigMap object
func (*Kubernetes) Owner ¶
func (k *Kubernetes) Owner(owner object) *Owner
Owner is used to create Owner object
type Owner ¶
type Owner struct {
// contains filtered or unexported fields
}
Owner is used to manipulate Kubernetes's owner relationships
func (Owner) EnsureOwns ¶
EnsureOwns is used to ensure that relation between owner and dependent object exist
type Secret ¶
func (*Secret) EnsureExists ¶
func (s *Secret) EnsureExists(dataSetter SecretFiller, force bool) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is used to create and manage kubernetes services
func (*Service) EnsureExists ¶
EnsureExists is used to make sure that kubernetes service exists and is correctly configured