Documentation ¶
Index ¶
- type ConfigMap
- type ConfigMapOption
- func (p *ConfigMapOption) CreateConfigMap(namespace string, configMap *corev1.ConfigMap) error
- func (p *ConfigMapOption) CreateIfNotExistsConfigMap(namespace string, configMap *corev1.ConfigMap) error
- func (p *ConfigMapOption) CreateOrUpdateConfigMap(namespace string, configMap *corev1.ConfigMap) error
- func (p *ConfigMapOption) DeleteConfigMap(namespace string, name string) error
- func (p *ConfigMapOption) GetConfigMap(namespace string, name string) (*corev1.ConfigMap, error)
- func (p *ConfigMapOption) ListConfigMaps(namespace string) (*corev1.ConfigMapList, error)
- func (p *ConfigMapOption) UpdateConfigMap(namespace string, configMap *corev1.ConfigMap) error
- type Deployment
- type DeploymentOption
- func (d *DeploymentOption) CreateDeployment(namespace string, deployment *appsv1.Deployment) error
- func (d *DeploymentOption) CreateOrUpdateDeployment(namespace string, deployment *appsv1.Deployment) error
- func (d *DeploymentOption) DeleteDeployment(namespace, name string) error
- func (d *DeploymentOption) GetDeployment(namespace, name string) (*appsv1.Deployment, error)
- func (d *DeploymentOption) GetDeploymentPods(namespace, name string) (*corev1.PodList, error)
- func (d *DeploymentOption) ListDeployments(namespace string) (*appsv1.DeploymentList, error)
- func (d *DeploymentOption) RolloutRestartDeployment(namespace, name string) (*appsv1.Deployment, error)
- func (d *DeploymentOption) UpdateDeployment(namespace string, deployment *appsv1.Deployment) error
- type NameSpaces
- type NameSpacesOption
- type Pod
- type PodDisruptionBudget
- type PodDisruptionBudgetOption
- func (p *PodDisruptionBudgetOption) CreateIfNotExistsPodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
- func (p *PodDisruptionBudgetOption) CreateOrUpdatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
- func (p *PodDisruptionBudgetOption) CreatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
- func (p *PodDisruptionBudgetOption) DeletePodDisruptionBudget(namespace string, name string) error
- func (p *PodDisruptionBudgetOption) GetPodDisruptionBudget(namespace string, name string) (*policyv1beta1.PodDisruptionBudget, error)
- func (p *PodDisruptionBudgetOption) UpdatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
- type PodOption
- func (p *PodOption) CreateOrUpdatePod(namespace string, pod *corev1.Pod) error
- func (p *PodOption) CreatePod(namespace string, pod *corev1.Pod) error
- func (p *PodOption) DeletePod(namespace string, name string) error
- func (p *PodOption) GetPod(namespace string, name string) (*corev1.Pod, error)
- func (p *PodOption) ListPods(namespace string) (*corev1.PodList, error)
- func (p *PodOption) UpdatePod(namespace string, pod *corev1.Pod) error
- type Secret
- type SecretOption
- func (s *SecretOption) CreateIfNotExistsSecret(namespace string, secret *v1.Secret) error
- func (s *SecretOption) CreateOrUpdateSecret(namespace string, secret *v1.Secret) error
- func (s *SecretOption) CreateSecret(namespace string, secret *v1.Secret) error
- func (s *SecretOption) DeleteSecret(namespace string, name string) error
- func (s *SecretOption) GetSecret(namespace string, name string) (*v1.Secret, error)
- func (s *SecretOption) ListSecret(namespace string) (*v1.SecretList, error)
- func (s *SecretOption) UpdateSecret(namespace string, secret *v1.Secret) error
- type Service
- type ServiceOption
- func (s *ServiceOption) CreateIfNotExistsService(namespace string, service *corev1.Service) error
- func (s *ServiceOption) CreateOrUpdateService(namespace string, service *corev1.Service) error
- func (s *ServiceOption) CreateService(namespace string, service *corev1.Service) error
- func (s *ServiceOption) DeleteService(namespace string, name string) error
- func (s *ServiceOption) GetService(namespace string, name string) (*corev1.Service, error)
- func (s *ServiceOption) ListServices(namespace string) (*corev1.ServiceList, error)
- func (s *ServiceOption) UpdateService(namespace string, service *corev1.Service) error
- type Services
- type StatefulSet
- type StatefulSetOption
- func (s *StatefulSetOption) CreateIfNotExistsStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
- func (s *StatefulSetOption) CreateOrUpdateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
- func (s *StatefulSetOption) CreateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
- func (s *StatefulSetOption) DeleteStatefulSet(namespace, name string) error
- func (s *StatefulSetOption) GetStatefulSet(namespace, name string) (*appsv1.StatefulSet, error)
- func (s *StatefulSetOption) GetStatefulSetPods(namespace, name string) (*corev1.PodList, error)
- func (s *StatefulSetOption) ListStatefulSets(namespace string) (*appsv1.StatefulSetList, error)
- func (s *StatefulSetOption) UpdateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigMap ¶
type ConfigMap interface { // GetConfigMap get ConfigMap from kubernetes with namespace and name GetConfigMap(namespace string, name string) (*corev1.ConfigMap, error) // CreateConfigMap create the given ConfigMap CreateConfigMap(namespace string, configMap *corev1.ConfigMap) error // UpdateConfigMap update the given ConfigMap UpdateConfigMap(namespace string, configMap *corev1.ConfigMap) error // CreateOrUpdateConfigMap if the ConfigMap Already exists, create it, otherwise update it CreateOrUpdateConfigMap(namespace string, np *corev1.ConfigMap) error // DeleteConfigMap delete ConfigMap from kubernetes with namespace and name DeleteConfigMap(namespace string, name string) error // ListConfigMaps get set of ConfigMaps on a given namespace ListConfigMaps(namespace string) (*corev1.ConfigMapList, error) CreateIfNotExistsConfigMap(namespace string, configMap *corev1.ConfigMap) error }
ConfigMap the client that knows how to interact with kubernetes to manage them
type ConfigMapOption ¶
type ConfigMapOption struct {
// contains filtered or unexported fields
}
ConfigMapOption is the configMap client interface implementation that using API calls to kubernetes.
func (*ConfigMapOption) CreateConfigMap ¶
func (p *ConfigMapOption) CreateConfigMap(namespace string, configMap *corev1.ConfigMap) error
CreateConfigMap implement the ConfigMap.Interface
func (*ConfigMapOption) CreateIfNotExistsConfigMap ¶
func (p *ConfigMapOption) CreateIfNotExistsConfigMap(namespace string, configMap *corev1.ConfigMap) error
CreateIfNotExistsConfigMap implement the ConfigMap.Interface
func (*ConfigMapOption) CreateOrUpdateConfigMap ¶
func (p *ConfigMapOption) CreateOrUpdateConfigMap(namespace string, configMap *corev1.ConfigMap) error
CreateOrUpdateConfigMap implement the ConfigMap.Interface
func (*ConfigMapOption) DeleteConfigMap ¶
func (p *ConfigMapOption) DeleteConfigMap(namespace string, name string) error
DeleteConfigMap implement the ConfigMap.Interface
func (*ConfigMapOption) GetConfigMap ¶
GetConfigMap implement the ConfigMap.Interface
func (*ConfigMapOption) ListConfigMaps ¶
func (p *ConfigMapOption) ListConfigMaps(namespace string) (*corev1.ConfigMapList, error)
ListConfigMaps implement the ConfigMap.Interface
func (*ConfigMapOption) UpdateConfigMap ¶
func (p *ConfigMapOption) UpdateConfigMap(namespace string, configMap *corev1.ConfigMap) error
UpdateConfigMap implement the ConfigMap.Interface
type Deployment ¶
type Deployment interface { // GetDeployment get deployment from kubernetes with namespace and name GetDeployment(namespace, name string) (*appsv1.Deployment, error) // GetDeploymentPods will retrieve the pods managed by a given deployment GetDeploymentPods(namespace, name string) (*corev1.PodList, error) // CreateDeployment will create the given deployment CreateDeployment(namespace string, deployment *appsv1.Deployment) error // UpdateDeployment will update the given deployment UpdateDeployment(namespace string, deployment *appsv1.Deployment) error // CreateOrUpdateDeployment will update the given deployment or create it if does not exist CreateOrUpdateDeployment(namespace string, deployment *appsv1.Deployment) error // DeleteDeployment will delete the given deployment DeleteDeployment(namespace string, name string) error // ListDeployments get set of deployment on a given namespace ListDeployments(namespace string) (*appsv1.DeploymentList, error) RolloutRestartDeployment(namespace, name string) (*appsv1.Deployment, error) }
Deployment the client that knows how to interact with kubernetes to manage them
func NewDeployment ¶
func NewDeployment(kubeClient client.Client, logger logr.Logger) Deployment
NewDeployment returns a new Deployment client.
type DeploymentOption ¶
type DeploymentOption struct {
// contains filtered or unexported fields
}
DeploymentOption is the deployment client interface implementation that using API calls to kubernetes.
func (*DeploymentOption) CreateDeployment ¶
func (d *DeploymentOption) CreateDeployment(namespace string, deployment *appsv1.Deployment) error
CreateDeployment implement the Deployment.Interface
func (*DeploymentOption) CreateOrUpdateDeployment ¶
func (d *DeploymentOption) CreateOrUpdateDeployment(namespace string, deployment *appsv1.Deployment) error
CreateOrUpdateDeployment implement the Deployment.Interface
func (*DeploymentOption) DeleteDeployment ¶
func (d *DeploymentOption) DeleteDeployment(namespace, name string) error
DeleteDeployment implement the Deployment.Interface
func (*DeploymentOption) GetDeployment ¶
func (d *DeploymentOption) GetDeployment(namespace, name string) (*appsv1.Deployment, error)
GetDeployment implement the Deployment.Interface
func (*DeploymentOption) GetDeploymentPods ¶
func (d *DeploymentOption) GetDeploymentPods(namespace, name string) (*corev1.PodList, error)
GetDeploymentPods implement the Deployment.Interface
func (*DeploymentOption) ListDeployments ¶
func (d *DeploymentOption) ListDeployments(namespace string) (*appsv1.DeploymentList, error)
ListDeployments implement the Deployment.Interface
func (*DeploymentOption) RolloutRestartDeployment ¶
func (d *DeploymentOption) RolloutRestartDeployment(namespace, name string) (*appsv1.Deployment, error)
func (*DeploymentOption) UpdateDeployment ¶
func (d *DeploymentOption) UpdateDeployment(namespace string, deployment *appsv1.Deployment) error
UpdateDeployment implement the Deployment.Interface
type NameSpaces ¶
type NameSpaces interface { // GetNameSpace get namespace info form kubernetes GetNameSpace(namespace string) (*corev1.Namespace, error) }
NameSpaces the client that knows how to interact with kubernetes to manage them
func NewNameSpaces ¶
func NewNameSpaces(logger logr.Logger) NameSpaces
NewNameSpaces returns a new NameSpaces client.
type NameSpacesOption ¶
type NameSpacesOption struct {
// contains filtered or unexported fields
}
NameSpacesOption is the NameSpaces client implementation using API calls to kubernetes.
func (*NameSpacesOption) GetNameSpace ¶
func (n *NameSpacesOption) GetNameSpace(namespace string) (*corev1.Namespace, error)
GetNameSpace implement the NameSpaces.Interface
type Pod ¶
type Pod interface { // GetPod get pod from kubernetes with namespace and name GetPod(namespace string, name string) (*corev1.Pod, error) // CreatePod will create the given pod CreatePod(namespace string, pod *corev1.Pod) error // UpdatePod will update the given pod UpdatePod(namespace string, pod *corev1.Pod) error // CreateOrUpdatePod will update the given pod or create it if does not exist CreateOrUpdatePod(namespace string, pod *corev1.Pod) error // DeletePod will delete the given pod DeletePod(namespace string, name string) error // ListPods get set of pod on a given namespace ListPods(namespace string) (*corev1.PodList, error) }
Pod the client that knows how to interact with kubernetes to manage them
type PodDisruptionBudget ¶
type PodDisruptionBudget interface { // GetPodDisruptionBudget get podDisruptionBudget from kubernetes with namespace and name GetPodDisruptionBudget(namespace string, name string) (*policyv1beta1.PodDisruptionBudget, error) // CreatePodDisruptionBudget will create the given podDisruptionBudget CreatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error // UpdatePodDisruptionBudget will update the given podDisruptionBudget UpdatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error // CreateOrUpdatePodDisruptionBudget will update the given podDisruptionBudget or create it if does not exist CreateOrUpdatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error // DeletePodDisruptionBudget will delete the given podDisruptionBudget DeletePodDisruptionBudget(namespace string, name string) error CreateIfNotExistsPodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error }
PodDisruptionBudget the client that knows how to interact with kubernetes to manage them
func NewPodDisruptionBudget ¶
func NewPodDisruptionBudget(kubeClient client.Client, logger logr.Logger) PodDisruptionBudget
NewPodDisruptionBudget returns a new PodDisruptionBudget client.
type PodDisruptionBudgetOption ¶
type PodDisruptionBudgetOption struct {
// contains filtered or unexported fields
}
PodDisruptionBudgetOption is the podDisruptionBudget client implementation using API calls to kubernetes.
func (*PodDisruptionBudgetOption) CreateIfNotExistsPodDisruptionBudget ¶
func (p *PodDisruptionBudgetOption) CreateIfNotExistsPodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
CreateIfNotExistsPodDisruptionBudget implement the PodDisruptionBudget.Interface
func (*PodDisruptionBudgetOption) CreateOrUpdatePodDisruptionBudget ¶
func (p *PodDisruptionBudgetOption) CreateOrUpdatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
CreateOrUpdatePodDisruptionBudget implement the PodDisruptionBudget.Interface
func (*PodDisruptionBudgetOption) CreatePodDisruptionBudget ¶
func (p *PodDisruptionBudgetOption) CreatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
CreatePodDisruptionBudget implement the PodDisruptionBudget.Interface
func (*PodDisruptionBudgetOption) DeletePodDisruptionBudget ¶
func (p *PodDisruptionBudgetOption) DeletePodDisruptionBudget(namespace string, name string) error
DeletePodDisruptionBudget implement the PodDisruptionBudget.Interface
func (*PodDisruptionBudgetOption) GetPodDisruptionBudget ¶
func (p *PodDisruptionBudgetOption) GetPodDisruptionBudget(namespace string, name string) (*policyv1beta1.PodDisruptionBudget, error)
GetPodDisruptionBudget implement the PodDisruptionBudget.Interface
func (*PodDisruptionBudgetOption) UpdatePodDisruptionBudget ¶
func (p *PodDisruptionBudgetOption) UpdatePodDisruptionBudget(namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) error
UpdatePodDisruptionBudget implement the PodDisruptionBudget.Interface
type PodOption ¶
type PodOption struct {
// contains filtered or unexported fields
}
PodOption is the pod client interface implementation using API calls to kubernetes.
func (*PodOption) CreateOrUpdatePod ¶
CreateOrUpdatePod implement the Pod.Interface
type Secret ¶
type Secret interface { GetSecret(namespace string, name string) (*v1.Secret, error) CreateSecret(namespace string, secret *v1.Secret) error UpdateSecret(namespace string, secret *v1.Secret) error CreateOrUpdateSecret(namespace string, secret *v1.Secret) error DeleteSecret(namespace string, name string) error ListSecret(namespace string) (*v1.SecretList, error) CreateIfNotExistsSecret(namespace string, secret *v1.Secret) error }
type SecretOption ¶
type SecretOption struct {
// contains filtered or unexported fields
}
func (*SecretOption) CreateIfNotExistsSecret ¶
func (s *SecretOption) CreateIfNotExistsSecret(namespace string, secret *v1.Secret) error
func (*SecretOption) CreateOrUpdateSecret ¶
func (s *SecretOption) CreateOrUpdateSecret(namespace string, secret *v1.Secret) error
func (*SecretOption) CreateSecret ¶
func (s *SecretOption) CreateSecret(namespace string, secret *v1.Secret) error
func (*SecretOption) DeleteSecret ¶
func (s *SecretOption) DeleteSecret(namespace string, name string) error
func (*SecretOption) ListSecret ¶
func (s *SecretOption) ListSecret(namespace string) (*v1.SecretList, error)
func (*SecretOption) UpdateSecret ¶
func (s *SecretOption) UpdateSecret(namespace string, secret *v1.Secret) error
type Service ¶
type Service interface { // GetService get service from kubernetes with namespace and name GetService(namespace string, name string) (*corev1.Service, error) // CreateService will create the given service CreateService(namespace string, service *corev1.Service) error //CreateIfNotExistsService create service if it does not exist CreateIfNotExistsService(namespace string, service *corev1.Service) error // UpdateService will update the given service UpdateService(namespace string, service *corev1.Service) error // CreateOrUpdateService will update the given service or create it if does not exist CreateOrUpdateService(namespace string, service *corev1.Service) error // DeleteService will delete the given service DeleteService(namespace string, name string) error // ListServices get set of service on a given namespace ListServices(namespace string) (*corev1.ServiceList, error) }
Service the client that knows how to interact with kubernetes to manage them
type ServiceOption ¶
type ServiceOption struct {
// contains filtered or unexported fields
}
ServiceOption is the service client implementation using API calls to kubernetes.
func (*ServiceOption) CreateIfNotExistsService ¶
func (s *ServiceOption) CreateIfNotExistsService(namespace string, service *corev1.Service) error
CreateIfNotExistsService implement the Service.Interface
func (*ServiceOption) CreateOrUpdateService ¶
func (s *ServiceOption) CreateOrUpdateService(namespace string, service *corev1.Service) error
CreateOrUpdateService implement the Service.Interface
func (*ServiceOption) CreateService ¶
func (s *ServiceOption) CreateService(namespace string, service *corev1.Service) error
CreateService implement the Service.Interface
func (*ServiceOption) DeleteService ¶
func (s *ServiceOption) DeleteService(namespace string, name string) error
DeleteService implement the Service.Interface
func (*ServiceOption) GetService ¶
GetService implement the Service.Interface
func (*ServiceOption) ListServices ¶
func (s *ServiceOption) ListServices(namespace string) (*corev1.ServiceList, error)
ListServices implement the Service.Interface
func (*ServiceOption) UpdateService ¶
func (s *ServiceOption) UpdateService(namespace string, service *corev1.Service) error
UpdateService implement the Service.Interface
type Services ¶
type Services interface { ConfigMap Pod PodDisruptionBudget Service NameSpaces Deployment StatefulSet Secret }
Service is the kubernetes service entrypoint.
type StatefulSet ¶
type StatefulSet interface { // GetStatefulSet get StatefulSet from kubernetes with namespace and name GetStatefulSet(namespace, name string) (*appsv1.StatefulSet, error) // GetStatefulSetPods will retrieve the pods managed by a given StatefulSet GetStatefulSetPods(namespace, name string) (*corev1.PodList, error) // CreateStatefulSet will create the given StatefulSet CreateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error // UpdateStatefulSet will update the given StatefulSet UpdateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error // CreateOrUpdateStatefulSet will update the given StatefulSet or create it if does not exist CreateOrUpdateStatefulSet(namespace string, StatefulSet *appsv1.StatefulSet) error // DeleteStatefulSet will delete the given StatefulSet DeleteStatefulSet(namespace string, name string) error // ListStatefulSets get set of StatefulSet on a given namespace ListStatefulSets(namespace string) (*appsv1.StatefulSetList, error) CreateIfNotExistsStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error }
StatefulSet the StatefulSet client that knows how to interact with kubernetes to manage them
func NewStatefulSet ¶
func NewStatefulSet(kubeClient client.Client, logger logr.Logger) StatefulSet
NewStatefulSet returns a new StatefulSet client.
type StatefulSetOption ¶
type StatefulSetOption struct {
// contains filtered or unexported fields
}
StatefulSetOption is the StatefulSet client implementation using API calls to kubernetes.
func (*StatefulSetOption) CreateIfNotExistsStatefulSet ¶
func (s *StatefulSetOption) CreateIfNotExistsStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
CreateIfNotExistsStatefulSet implement the StatefulSet.Interface
func (*StatefulSetOption) CreateOrUpdateStatefulSet ¶
func (s *StatefulSetOption) CreateOrUpdateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
CreateOrUpdateStatefulSet implement the StatefulSet.Interface
func (*StatefulSetOption) CreateStatefulSet ¶
func (s *StatefulSetOption) CreateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
CreateStatefulSet implement the StatefulSet.Interface
func (*StatefulSetOption) DeleteStatefulSet ¶
func (s *StatefulSetOption) DeleteStatefulSet(namespace, name string) error
DeleteStatefulSet implement the StatefulSet.Interface
func (*StatefulSetOption) GetStatefulSet ¶
func (s *StatefulSetOption) GetStatefulSet(namespace, name string) (*appsv1.StatefulSet, error)
GetStatefulSet implement the StatefulSet.Interface
func (*StatefulSetOption) GetStatefulSetPods ¶
func (s *StatefulSetOption) GetStatefulSetPods(namespace, name string) (*corev1.PodList, error)
GetStatefulSetPods implement the StatefulSet.Interface
func (*StatefulSetOption) ListStatefulSets ¶
func (s *StatefulSetOption) ListStatefulSets(namespace string) (*appsv1.StatefulSetList, error)
ListStatefulSets implement the StatefulSet.Interface
func (*StatefulSetOption) UpdateStatefulSet ¶
func (s *StatefulSetOption) UpdateStatefulSet(namespace string, statefulSet *appsv1.StatefulSet) error
UpdateStatefulSet implement the StatefulSet.Interface