Documentation ¶
Overview ¶
Package operatorclient is a generated GoMock package.
Index ¶
- type Client
- func (c *Client) ApiextensionsV1beta1Interface() apiextensions.Interface
- func (c *Client) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, ...) error
- func (c *Client) CreateCustomResource(item *unstructured.Unstructured) error
- func (c *Client) CreateCustomResourceRaw(apiGroup, version, namespace, kind string, data []byte) error
- func (c *Client) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name string, data []byte) (bool, error)
- func (c *Client) CreateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, error)
- func (c *Client) CreateOrRollingUpdateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, bool, error)
- func (c *Client) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
- func (c *Client) CreateServiceAccount(ig *v1.ServiceAccount) (*v1.ServiceAccount, error)
- func (c *Client) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) error
- func (c *Client) DeleteDeployment(namespace, name string, options *metav1.DeleteOptions) error
- func (c *Client) DeleteServiceAccount(namespace, name string, options *metav1.DeleteOptions) error
- func (c *Client) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) (*unstructured.Unstructured, error)
- func (c *Client) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string) ([]byte, error)
- func (c *Client) GetDeployment(namespace, name string) (*appsv1.Deployment, error)
- func (c *Client) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
- func (c *Client) KubernetesInterface() kubernetes.Interface
- func (c *Client) ListCustomResource(apiGroup, version, namespace, resourceKind string) (*CustomResourceList, error)
- func (c *Client) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*appsv1.DeploymentList, error)
- func (c *Client) PatchDeployment(original, modified *appsv1.Deployment) (*appsv1.Deployment, bool, error)
- func (c *Client) RollingPatchDeployment(original, modified *appsv1.Deployment) (*appsv1.Deployment, bool, error)
- func (c *Client) RollingPatchDeploymentMigrations(namespace, name string, f PatchFunction) (*appsv1.Deployment, bool, error)
- func (c *Client) RollingUpdateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, bool, error)
- func (c *Client) RollingUpdateDeploymentMigrations(namespace, name string, f UpdateFunction) (*appsv1.Deployment, bool, error)
- func (c *Client) UpdateCustomResource(item *unstructured.Unstructured) error
- func (c *Client) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
- func (c *Client) UpdateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, bool, error)
- func (c *Client) UpdateServiceAccount(sa *v1.ServiceAccount) (*v1.ServiceAccount, error)
- type ClientInterface
- type CustomResourceClient
- type CustomResourceList
- type CustomResourceModifier
- type DeploymentClient
- type MockClientInterface
- func (m *MockClientInterface) ApiextensionsV1beta1Interface() clientset.Interface
- func (m *MockClientInterface) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, ...) error
- func (m *MockClientInterface) CreateCustomResource(item *unstructured.Unstructured) error
- func (m *MockClientInterface) CreateCustomResourceRaw(apiGroup, version, namespace, kind string, data []byte) error
- func (m *MockClientInterface) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name string, data []byte) (bool, error)
- func (m *MockClientInterface) CreateDeployment(arg0 *v1.Deployment) (*v1.Deployment, error)
- func (m *MockClientInterface) CreateOrRollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockClientInterface) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
- func (m *MockClientInterface) CreateServiceAccount(arg0 *v10.ServiceAccount) (*v10.ServiceAccount, error)
- func (m *MockClientInterface) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) error
- func (m *MockClientInterface) DeleteDeployment(namespace, name string, options *v11.DeleteOptions) error
- func (m *MockClientInterface) DeleteServiceAccount(namespace, name string, options *v11.DeleteOptions) error
- func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
- func (m *MockClientInterface) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) (*unstructured.Unstructured, error)
- func (m *MockClientInterface) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string) ([]byte, error)
- func (m *MockClientInterface) GetDeployment(namespace, name string) (*v1.Deployment, error)
- func (m *MockClientInterface) GetServiceAccount(namespace, name string) (*v10.ServiceAccount, error)
- func (m *MockClientInterface) KubernetesInterface() kubernetes.Interface
- func (m *MockClientInterface) ListCustomResource(apiGroup, version, namespace, resourceKind string) (*CustomResourceList, error)
- func (m *MockClientInterface) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*v1.DeploymentList, error)
- func (m *MockClientInterface) PatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockClientInterface) RollingPatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockClientInterface) RollingPatchDeploymentMigrations(namespace, name string, f PatchFunction) (*v1.Deployment, bool, error)
- func (m *MockClientInterface) RollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockClientInterface) RollingUpdateDeploymentMigrations(namespace, name string, f UpdateFunction) (*v1.Deployment, bool, error)
- func (m *MockClientInterface) UpdateCustomResource(item *unstructured.Unstructured) error
- func (m *MockClientInterface) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
- func (m *MockClientInterface) UpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockClientInterface) UpdateServiceAccount(modified *v10.ServiceAccount) (*v10.ServiceAccount, error)
- type MockClientInterfaceMockRecorder
- func (mr *MockClientInterfaceMockRecorder) ApiextensionsV1beta1Interface() *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateCustomResource(item interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateDeployment(arg0 interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateOrRollingUpdateDeployment(arg0 interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateServiceAccount(arg0 interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) DeleteDeployment(namespace, name, options interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) DeleteServiceAccount(namespace, name, options interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetDeployment(namespace, name interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetServiceAccount(namespace, name interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) KubernetesInterface() *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) ListDeploymentsWithLabels(namespace, labels interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) PatchDeployment(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) RollingPatchDeployment(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeployment(arg0 interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) UpdateCustomResource(item interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) UpdateDeployment(arg0 interface{}) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) UpdateServiceAccount(modified interface{}) *gomock.Call
- type MockCustomResourceClient
- func (m *MockCustomResourceClient) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, ...) error
- func (m *MockCustomResourceClient) CreateCustomResource(item *unstructured.Unstructured) error
- func (m *MockCustomResourceClient) CreateCustomResourceRaw(apiGroup, version, namespace, kind string, data []byte) error
- func (m *MockCustomResourceClient) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name string, data []byte) (bool, error)
- func (m *MockCustomResourceClient) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
- func (m *MockCustomResourceClient) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) error
- func (m *MockCustomResourceClient) EXPECT() *MockCustomResourceClientMockRecorder
- func (m *MockCustomResourceClient) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) (*unstructured.Unstructured, error)
- func (m *MockCustomResourceClient) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string) ([]byte, error)
- func (m *MockCustomResourceClient) ListCustomResource(apiGroup, version, namespace, resourceKind string) (*CustomResourceList, error)
- func (m *MockCustomResourceClient) UpdateCustomResource(item *unstructured.Unstructured) error
- func (m *MockCustomResourceClient) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
- type MockCustomResourceClientMockRecorder
- func (mr *MockCustomResourceClientMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) CreateCustomResource(item interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResource(item interface{}) *gomock.Call
- func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
- type MockDeploymentClient
- func (m *MockDeploymentClient) CreateDeployment(arg0 *v1.Deployment) (*v1.Deployment, error)
- func (m *MockDeploymentClient) CreateOrRollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockDeploymentClient) DeleteDeployment(namespace, name string, options *v11.DeleteOptions) error
- func (m *MockDeploymentClient) EXPECT() *MockDeploymentClientMockRecorder
- func (m *MockDeploymentClient) GetDeployment(namespace, name string) (*v1.Deployment, error)
- func (m *MockDeploymentClient) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*v1.DeploymentList, error)
- func (m *MockDeploymentClient) PatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockDeploymentClient) RollingPatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockDeploymentClient) RollingPatchDeploymentMigrations(namespace, name string, f PatchFunction) (*v1.Deployment, bool, error)
- func (m *MockDeploymentClient) RollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
- func (m *MockDeploymentClient) RollingUpdateDeploymentMigrations(namespace, name string, f UpdateFunction) (*v1.Deployment, bool, error)
- func (m *MockDeploymentClient) UpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
- type MockDeploymentClientMockRecorder
- func (mr *MockDeploymentClientMockRecorder) CreateDeployment(arg0 interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) CreateOrRollingUpdateDeployment(arg0 interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) DeleteDeployment(namespace, name, options interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) GetDeployment(namespace, name interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) ListDeploymentsWithLabels(namespace, labels interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) PatchDeployment(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) RollingPatchDeployment(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeployment(arg0 interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
- func (mr *MockDeploymentClientMockRecorder) UpdateDeployment(arg0 interface{}) *gomock.Call
- type MockServiceAccountClient
- func (m *MockServiceAccountClient) CreateServiceAccount(arg0 *v10.ServiceAccount) (*v10.ServiceAccount, error)
- func (m *MockServiceAccountClient) DeleteServiceAccount(namespace, name string, options *v11.DeleteOptions) error
- func (m *MockServiceAccountClient) EXPECT() *MockServiceAccountClientMockRecorder
- func (m *MockServiceAccountClient) GetServiceAccount(namespace, name string) (*v10.ServiceAccount, error)
- func (m *MockServiceAccountClient) UpdateServiceAccount(modified *v10.ServiceAccount) (*v10.ServiceAccount, error)
- type MockServiceAccountClientMockRecorder
- func (mr *MockServiceAccountClientMockRecorder) CreateServiceAccount(arg0 interface{}) *gomock.Call
- func (mr *MockServiceAccountClientMockRecorder) DeleteServiceAccount(namespace, name, options interface{}) *gomock.Call
- func (mr *MockServiceAccountClientMockRecorder) GetServiceAccount(namespace, name interface{}) *gomock.Call
- func (mr *MockServiceAccountClientMockRecorder) UpdateServiceAccount(modified interface{}) *gomock.Call
- type PatchFunction
- type ServiceAccountClient
- type UpdateFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { kubernetes.Interface // contains filtered or unexported fields }
Client is a kubernetes client that can talk to the API server.
func (*Client) ApiextensionsV1beta1Interface ¶
func (c *Client) ApiextensionsV1beta1Interface() apiextensions.Interface
ApiextensionsV1beta1Interface returns the API extention interface.
func (*Client) AtomicModifyCustomResource ¶
func (c *Client) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f CustomResourceModifier, data interface{}) error
AtomicModifyCustomResource gets the custom resource, modifies it and writes it back. If it's modified by other writers, we will retry until it succeeds.
func (*Client) CreateCustomResource ¶
func (c *Client) CreateCustomResource(item *unstructured.Unstructured) error
CreateCustomResource creates the custom resource.
func (*Client) CreateCustomResourceRaw ¶
func (c *Client) CreateCustomResourceRaw(apiGroup, version, namespace, kind string, data []byte) error
CreateCustomResourceRaw creates the raw bytes of the custom resource.
func (*Client) CreateCustomResourceRawIfNotFound ¶
func (c *Client) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name string, data []byte) (bool, error)
CreateCustomResourceRawIfNotFound creates the raw bytes of the custom resource if it doesn't exist. It also returns a boolean to indicate whether a new custom resource is created.
func (*Client) CreateDeployment ¶
func (c *Client) CreateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, error)
CreateDeployment creates the Deployment object.
func (*Client) CreateOrRollingUpdateDeployment ¶
func (c *Client) CreateOrRollingUpdateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, bool, error)
CreateOrRollingUpdateDeployment creates the Deployment if it doesn't exist. If the Deployment already exists, it will update the Deployment and wait for it to rollout. Returns true if the Deployment was created or updated, false if there was no update.
func (*Client) CreateOrUpdateCustomeResourceRaw ¶
func (c *Client) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
CreateOrUpdateCustomeResourceRaw creates the custom resource if it doesn't exist. If the custom resource exists, it updates the existing one.
func (*Client) CreateServiceAccount ¶
func (c *Client) CreateServiceAccount(ig *v1.ServiceAccount) (*v1.ServiceAccount, error)
CreateServiceAccount creates the serviceAccount.
func (*Client) DeleteCustomResource ¶
func (c *Client) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) error
DeleteCustomResource deletes the with the given name.
func (*Client) DeleteDeployment ¶
func (c *Client) DeleteDeployment(namespace, name string, options *metav1.DeleteOptions) error
DeleteDeployment deletes the Deployment object.
func (*Client) DeleteServiceAccount ¶
func (c *Client) DeleteServiceAccount(namespace, name string, options *metav1.DeleteOptions) error
DeleteServiceAccount deletes the serviceAccount.
func (*Client) GetCustomResource ¶
func (c *Client) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) (*unstructured.Unstructured, error)
GetCustomResource returns the custom resource as *unstructured.Unstructured by the given name.
func (*Client) GetCustomResourceRaw ¶
func (c *Client) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string) ([]byte, error)
GetCustomResourceRaw returns the custom resource's raw body data by the given name.
func (*Client) GetDeployment ¶
func (c *Client) GetDeployment(namespace, name string) (*appsv1.Deployment, error)
GetDeployment returns the Deployment object for the given namespace and name.
func (*Client) GetServiceAccount ¶
func (c *Client) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error)
GetServiceAccount returns the existing serviceAccount.
func (*Client) KubernetesInterface ¶
func (c *Client) KubernetesInterface() kubernetes.Interface
KubernetesInterface returns the Kubernetes interface.
func (*Client) ListCustomResource ¶
func (c *Client) ListCustomResource(apiGroup, version, namespace, resourceKind string) (*CustomResourceList, error)
ListCustomResource lists all custom resources for the given namespace.
func (*Client) ListDeploymentsWithLabels ¶
func (c *Client) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*appsv1.DeploymentList, error)
ListDeploymentsWithLabels returns a list of deployments that matches the label selector. An empty list will be returned if no such deployments is found.
func (*Client) PatchDeployment ¶
func (c *Client) PatchDeployment(original, modified *appsv1.Deployment) (*appsv1.Deployment, bool, error)
PatchDeployment updates a Deployment object by performing a 3-way patch merge between the existing Deployment and `original` and `modified` manifests.
Returns the latest Deployment and true if it was updated, or an error.
func (*Client) RollingPatchDeployment ¶
func (c *Client) RollingPatchDeployment(original, modified *appsv1.Deployment) (*appsv1.Deployment, bool, error)
RollingPatchDeployment performs a 3-way patch merge followed by rolling update on the given Deployment. It requires that the Deployment uses the RollingUpdateDeploymentStrategyType update strategy.
RollingPatchDeployment will run any before / after migrations that have been specified in the upgrade options.
func (*Client) RollingPatchDeploymentMigrations ¶
func (c *Client) RollingPatchDeploymentMigrations(namespace, name string, f PatchFunction) (*appsv1.Deployment, bool, error)
RollingPatchDeploymentMigrations performs a 3-way patch merge followed by rolling update on the given Deployment. It requires that the Deployment uses the RollingUpdateDeploymentStrategyType update strategy.
RollingPatchDeploymentMigrations will run any before / after migrations that have been specified in the upgrade options.
func (*Client) RollingUpdateDeployment ¶
func (c *Client) RollingUpdateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, bool, error)
RollingUpdateDeployment performs a rolling update on the given Deployment. It requires that the Deployment uses the RollingUpdateDeploymentStrategyType update strategy.
func (*Client) RollingUpdateDeploymentMigrations ¶
func (c *Client) RollingUpdateDeploymentMigrations(namespace, name string, f UpdateFunction) (*appsv1.Deployment, bool, error)
RollingUpdateDeploymentMigrations performs a rolling update on the given Deployment. It requires that the Deployment uses the RollingUpdateDeploymentStrategyType update strategy.
RollingUpdateDeploymentMigrations will run any before / during / after migrations that have been specified in the upgrade options.
func (*Client) UpdateCustomResource ¶
func (c *Client) UpdateCustomResource(item *unstructured.Unstructured) error
UpdateCustomResource updates the custom resource. To do an atomic update, use AtomicModifyCustomResource().
func (*Client) UpdateCustomResourceRaw ¶
func (c *Client) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
UpdateCustomResourceRaw updates the thirdparty resource with the raw data.
func (*Client) UpdateDeployment ¶
func (c *Client) UpdateDeployment(dep *appsv1.Deployment) (*appsv1.Deployment, bool, error)
UpdateDeployment updates a Deployment object by performing a 2-way patch between the existing Deployment and the result of the UpdateFunction.
Returns the latest Deployment and true if it was updated, or an error.
func (*Client) UpdateServiceAccount ¶
func (c *Client) UpdateServiceAccount(sa *v1.ServiceAccount) (*v1.ServiceAccount, error)
UpdateServiceAccount will update the given ServiceAccount resource.
type ClientInterface ¶
type ClientInterface interface { KubernetesInterface() kubernetes.Interface ApiextensionsV1beta1Interface() apiextensions.Interface CustomResourceClient ServiceAccountClient DeploymentClient }
func NewClient ¶
func NewClient(k8sClient kubernetes.Interface, extclient apiextensions.Interface) ClientInterface
NewClient creates a kubernetes client
func NewClientFromConfig ¶
func NewClientFromConfig(kubeconfig string) ClientInterface
NewClient creates a kubernetes client or bails out on on failures.
type CustomResourceClient ¶
type CustomResourceClient interface { GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) (*unstructured.Unstructured, error) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string) ([]byte, error) CreateCustomResource(item *unstructured.Unstructured) error CreateCustomResourceRaw(apiGroup, version, namespace, kind string, data []byte) error CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name string, data []byte) (bool, error) UpdateCustomResource(item *unstructured.Unstructured) error UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) error AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f CustomResourceModifier, data interface{}) error ListCustomResource(apiGroup, version, namespace, resourceKind string) (*CustomResourceList, error) }
CustomResourceClient contains methods for the Custom Resource.
type CustomResourceList ¶
type CustomResourceList struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Items []*unstructured.Unstructured `json:"items"` }
CustomResourceList represents a list of custom resource objects that will be returned from a List() operation.
type CustomResourceModifier ¶
type CustomResourceModifier func(*unstructured.Unstructured, interface{}) error
CustomResourceModifier takes the custom resource object, and modifies it in-place.
type DeploymentClient ¶
type DeploymentClient interface { GetDeployment(namespace, name string) (*appsv1.Deployment, error) CreateDeployment(*appsv1.Deployment) (*appsv1.Deployment, error) DeleteDeployment(namespace, name string, options *metav1.DeleteOptions) error UpdateDeployment(*appsv1.Deployment) (*appsv1.Deployment, bool, error) PatchDeployment(*appsv1.Deployment, *appsv1.Deployment) (*appsv1.Deployment, bool, error) RollingUpdateDeployment(*appsv1.Deployment) (*appsv1.Deployment, bool, error) RollingPatchDeployment(*appsv1.Deployment, *appsv1.Deployment) (*appsv1.Deployment, bool, error) RollingUpdateDeploymentMigrations(namespace, name string, f UpdateFunction) (*appsv1.Deployment, bool, error) RollingPatchDeploymentMigrations(namespace, name string, f PatchFunction) (*appsv1.Deployment, bool, error) CreateOrRollingUpdateDeployment(*appsv1.Deployment) (*appsv1.Deployment, bool, error) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*appsv1.DeploymentList, error) }
DeploymentClient contains methods for the Deployment resource.
type MockClientInterface ¶
type MockClientInterface struct {
// contains filtered or unexported fields
}
MockClientInterface is a mock of ClientInterface interface
func NewMockClientInterface ¶
func NewMockClientInterface(ctrl *gomock.Controller) *MockClientInterface
NewMockClientInterface creates a new mock instance
func (*MockClientInterface) ApiextensionsV1beta1Interface ¶
func (m *MockClientInterface) ApiextensionsV1beta1Interface() clientset.Interface
ApiextensionsV1beta1Interface mocks base method
func (*MockClientInterface) AtomicModifyCustomResource ¶
func (m *MockClientInterface) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f CustomResourceModifier, data interface{}) error
AtomicModifyCustomResource mocks base method
func (*MockClientInterface) CreateCustomResource ¶
func (m *MockClientInterface) CreateCustomResource(item *unstructured.Unstructured) error
CreateCustomResource mocks base method
func (*MockClientInterface) CreateCustomResourceRaw ¶
func (m *MockClientInterface) CreateCustomResourceRaw(apiGroup, version, namespace, kind string, data []byte) error
CreateCustomResourceRaw mocks base method
func (*MockClientInterface) CreateCustomResourceRawIfNotFound ¶
func (m *MockClientInterface) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name string, data []byte) (bool, error)
CreateCustomResourceRawIfNotFound mocks base method
func (*MockClientInterface) CreateDeployment ¶
func (m *MockClientInterface) CreateDeployment(arg0 *v1.Deployment) (*v1.Deployment, error)
CreateDeployment mocks base method
func (*MockClientInterface) CreateOrRollingUpdateDeployment ¶
func (m *MockClientInterface) CreateOrRollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
CreateOrRollingUpdateDeployment mocks base method
func (*MockClientInterface) CreateOrUpdateCustomeResourceRaw ¶
func (m *MockClientInterface) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
CreateOrUpdateCustomeResourceRaw mocks base method
func (*MockClientInterface) CreateServiceAccount ¶
func (m *MockClientInterface) CreateServiceAccount(arg0 *v10.ServiceAccount) (*v10.ServiceAccount, error)
CreateServiceAccount mocks base method
func (*MockClientInterface) DeleteCustomResource ¶
func (m *MockClientInterface) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) error
DeleteCustomResource mocks base method
func (*MockClientInterface) DeleteDeployment ¶
func (m *MockClientInterface) DeleteDeployment(namespace, name string, options *v11.DeleteOptions) error
DeleteDeployment mocks base method
func (*MockClientInterface) DeleteServiceAccount ¶
func (m *MockClientInterface) DeleteServiceAccount(namespace, name string, options *v11.DeleteOptions) error
DeleteServiceAccount mocks base method
func (*MockClientInterface) EXPECT ¶
func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClientInterface) GetCustomResource ¶
func (m *MockClientInterface) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) (*unstructured.Unstructured, error)
GetCustomResource mocks base method
func (*MockClientInterface) GetCustomResourceRaw ¶
func (m *MockClientInterface) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string) ([]byte, error)
GetCustomResourceRaw mocks base method
func (*MockClientInterface) GetDeployment ¶
func (m *MockClientInterface) GetDeployment(namespace, name string) (*v1.Deployment, error)
GetDeployment mocks base method
func (*MockClientInterface) GetServiceAccount ¶
func (m *MockClientInterface) GetServiceAccount(namespace, name string) (*v10.ServiceAccount, error)
GetServiceAccount mocks base method
func (*MockClientInterface) KubernetesInterface ¶
func (m *MockClientInterface) KubernetesInterface() kubernetes.Interface
KubernetesInterface mocks base method
func (*MockClientInterface) ListCustomResource ¶
func (m *MockClientInterface) ListCustomResource(apiGroup, version, namespace, resourceKind string) (*CustomResourceList, error)
ListCustomResource mocks base method
func (*MockClientInterface) ListDeploymentsWithLabels ¶
func (m *MockClientInterface) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*v1.DeploymentList, error)
ListDeploymentsWithLabels mocks base method
func (*MockClientInterface) PatchDeployment ¶
func (m *MockClientInterface) PatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
PatchDeployment mocks base method
func (*MockClientInterface) RollingPatchDeployment ¶
func (m *MockClientInterface) RollingPatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
RollingPatchDeployment mocks base method
func (*MockClientInterface) RollingPatchDeploymentMigrations ¶
func (m *MockClientInterface) RollingPatchDeploymentMigrations(namespace, name string, f PatchFunction) (*v1.Deployment, bool, error)
RollingPatchDeploymentMigrations mocks base method
func (*MockClientInterface) RollingUpdateDeployment ¶
func (m *MockClientInterface) RollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
RollingUpdateDeployment mocks base method
func (*MockClientInterface) RollingUpdateDeploymentMigrations ¶
func (m *MockClientInterface) RollingUpdateDeploymentMigrations(namespace, name string, f UpdateFunction) (*v1.Deployment, bool, error)
RollingUpdateDeploymentMigrations mocks base method
func (*MockClientInterface) UpdateCustomResource ¶
func (m *MockClientInterface) UpdateCustomResource(item *unstructured.Unstructured) error
UpdateCustomResource mocks base method
func (*MockClientInterface) UpdateCustomResourceRaw ¶
func (m *MockClientInterface) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
UpdateCustomResourceRaw mocks base method
func (*MockClientInterface) UpdateDeployment ¶
func (m *MockClientInterface) UpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
UpdateDeployment mocks base method
func (*MockClientInterface) UpdateServiceAccount ¶
func (m *MockClientInterface) UpdateServiceAccount(modified *v10.ServiceAccount) (*v10.ServiceAccount, error)
UpdateServiceAccount mocks base method
type MockClientInterfaceMockRecorder ¶
type MockClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockClientInterfaceMockRecorder is the mock recorder for MockClientInterface
func (*MockClientInterfaceMockRecorder) ApiextensionsV1beta1Interface ¶
func (mr *MockClientInterfaceMockRecorder) ApiextensionsV1beta1Interface() *gomock.Call
ApiextensionsV1beta1Interface indicates an expected call of ApiextensionsV1beta1Interface
func (*MockClientInterfaceMockRecorder) AtomicModifyCustomResource ¶
func (mr *MockClientInterfaceMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data interface{}) *gomock.Call
AtomicModifyCustomResource indicates an expected call of AtomicModifyCustomResource
func (*MockClientInterfaceMockRecorder) CreateCustomResource ¶
func (mr *MockClientInterfaceMockRecorder) CreateCustomResource(item interface{}) *gomock.Call
CreateCustomResource indicates an expected call of CreateCustomResource
func (*MockClientInterfaceMockRecorder) CreateCustomResourceRaw ¶
func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data interface{}) *gomock.Call
CreateCustomResourceRaw indicates an expected call of CreateCustomResourceRaw
func (*MockClientInterfaceMockRecorder) CreateCustomResourceRawIfNotFound ¶
func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data interface{}) *gomock.Call
CreateCustomResourceRawIfNotFound indicates an expected call of CreateCustomResourceRawIfNotFound
func (*MockClientInterfaceMockRecorder) CreateDeployment ¶
func (mr *MockClientInterfaceMockRecorder) CreateDeployment(arg0 interface{}) *gomock.Call
CreateDeployment indicates an expected call of CreateDeployment
func (*MockClientInterfaceMockRecorder) CreateOrRollingUpdateDeployment ¶
func (mr *MockClientInterfaceMockRecorder) CreateOrRollingUpdateDeployment(arg0 interface{}) *gomock.Call
CreateOrRollingUpdateDeployment indicates an expected call of CreateOrRollingUpdateDeployment
func (*MockClientInterfaceMockRecorder) CreateOrUpdateCustomeResourceRaw ¶
func (mr *MockClientInterfaceMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
CreateOrUpdateCustomeResourceRaw indicates an expected call of CreateOrUpdateCustomeResourceRaw
func (*MockClientInterfaceMockRecorder) CreateServiceAccount ¶
func (mr *MockClientInterfaceMockRecorder) CreateServiceAccount(arg0 interface{}) *gomock.Call
CreateServiceAccount indicates an expected call of CreateServiceAccount
func (*MockClientInterfaceMockRecorder) DeleteCustomResource ¶
func (mr *MockClientInterfaceMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
DeleteCustomResource indicates an expected call of DeleteCustomResource
func (*MockClientInterfaceMockRecorder) DeleteDeployment ¶
func (mr *MockClientInterfaceMockRecorder) DeleteDeployment(namespace, name, options interface{}) *gomock.Call
DeleteDeployment indicates an expected call of DeleteDeployment
func (*MockClientInterfaceMockRecorder) DeleteServiceAccount ¶
func (mr *MockClientInterfaceMockRecorder) DeleteServiceAccount(namespace, name, options interface{}) *gomock.Call
DeleteServiceAccount indicates an expected call of DeleteServiceAccount
func (*MockClientInterfaceMockRecorder) GetCustomResource ¶
func (mr *MockClientInterfaceMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
GetCustomResource indicates an expected call of GetCustomResource
func (*MockClientInterfaceMockRecorder) GetCustomResourceRaw ¶
func (mr *MockClientInterfaceMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
GetCustomResourceRaw indicates an expected call of GetCustomResourceRaw
func (*MockClientInterfaceMockRecorder) GetDeployment ¶
func (mr *MockClientInterfaceMockRecorder) GetDeployment(namespace, name interface{}) *gomock.Call
GetDeployment indicates an expected call of GetDeployment
func (*MockClientInterfaceMockRecorder) GetServiceAccount ¶
func (mr *MockClientInterfaceMockRecorder) GetServiceAccount(namespace, name interface{}) *gomock.Call
GetServiceAccount indicates an expected call of GetServiceAccount
func (*MockClientInterfaceMockRecorder) KubernetesInterface ¶
func (mr *MockClientInterfaceMockRecorder) KubernetesInterface() *gomock.Call
KubernetesInterface indicates an expected call of KubernetesInterface
func (*MockClientInterfaceMockRecorder) ListCustomResource ¶
func (mr *MockClientInterfaceMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind interface{}) *gomock.Call
ListCustomResource indicates an expected call of ListCustomResource
func (*MockClientInterfaceMockRecorder) ListDeploymentsWithLabels ¶
func (mr *MockClientInterfaceMockRecorder) ListDeploymentsWithLabels(namespace, labels interface{}) *gomock.Call
ListDeploymentsWithLabels indicates an expected call of ListDeploymentsWithLabels
func (*MockClientInterfaceMockRecorder) PatchDeployment ¶
func (mr *MockClientInterfaceMockRecorder) PatchDeployment(arg0, arg1 interface{}) *gomock.Call
PatchDeployment indicates an expected call of PatchDeployment
func (*MockClientInterfaceMockRecorder) RollingPatchDeployment ¶
func (mr *MockClientInterfaceMockRecorder) RollingPatchDeployment(arg0, arg1 interface{}) *gomock.Call
RollingPatchDeployment indicates an expected call of RollingPatchDeployment
func (*MockClientInterfaceMockRecorder) RollingPatchDeploymentMigrations ¶
func (mr *MockClientInterfaceMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
RollingPatchDeploymentMigrations indicates an expected call of RollingPatchDeploymentMigrations
func (*MockClientInterfaceMockRecorder) RollingUpdateDeployment ¶
func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeployment(arg0 interface{}) *gomock.Call
RollingUpdateDeployment indicates an expected call of RollingUpdateDeployment
func (*MockClientInterfaceMockRecorder) RollingUpdateDeploymentMigrations ¶
func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
RollingUpdateDeploymentMigrations indicates an expected call of RollingUpdateDeploymentMigrations
func (*MockClientInterfaceMockRecorder) UpdateCustomResource ¶
func (mr *MockClientInterfaceMockRecorder) UpdateCustomResource(item interface{}) *gomock.Call
UpdateCustomResource indicates an expected call of UpdateCustomResource
func (*MockClientInterfaceMockRecorder) UpdateCustomResourceRaw ¶
func (mr *MockClientInterfaceMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
UpdateCustomResourceRaw indicates an expected call of UpdateCustomResourceRaw
func (*MockClientInterfaceMockRecorder) UpdateDeployment ¶
func (mr *MockClientInterfaceMockRecorder) UpdateDeployment(arg0 interface{}) *gomock.Call
UpdateDeployment indicates an expected call of UpdateDeployment
func (*MockClientInterfaceMockRecorder) UpdateServiceAccount ¶
func (mr *MockClientInterfaceMockRecorder) UpdateServiceAccount(modified interface{}) *gomock.Call
UpdateServiceAccount indicates an expected call of UpdateServiceAccount
type MockCustomResourceClient ¶
type MockCustomResourceClient struct {
// contains filtered or unexported fields
}
MockCustomResourceClient is a mock of CustomResourceClient interface
func NewMockCustomResourceClient ¶
func NewMockCustomResourceClient(ctrl *gomock.Controller) *MockCustomResourceClient
NewMockCustomResourceClient creates a new mock instance
func (*MockCustomResourceClient) AtomicModifyCustomResource ¶
func (m *MockCustomResourceClient) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f CustomResourceModifier, data interface{}) error
AtomicModifyCustomResource mocks base method
func (*MockCustomResourceClient) CreateCustomResource ¶
func (m *MockCustomResourceClient) CreateCustomResource(item *unstructured.Unstructured) error
CreateCustomResource mocks base method
func (*MockCustomResourceClient) CreateCustomResourceRaw ¶
func (m *MockCustomResourceClient) CreateCustomResourceRaw(apiGroup, version, namespace, kind string, data []byte) error
CreateCustomResourceRaw mocks base method
func (*MockCustomResourceClient) CreateCustomResourceRawIfNotFound ¶
func (m *MockCustomResourceClient) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name string, data []byte) (bool, error)
CreateCustomResourceRawIfNotFound mocks base method
func (*MockCustomResourceClient) CreateOrUpdateCustomeResourceRaw ¶
func (m *MockCustomResourceClient) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
CreateOrUpdateCustomeResourceRaw mocks base method
func (*MockCustomResourceClient) DeleteCustomResource ¶
func (m *MockCustomResourceClient) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) error
DeleteCustomResource mocks base method
func (*MockCustomResourceClient) EXPECT ¶
func (m *MockCustomResourceClient) EXPECT() *MockCustomResourceClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockCustomResourceClient) GetCustomResource ¶
func (m *MockCustomResourceClient) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName string) (*unstructured.Unstructured, error)
GetCustomResource mocks base method
func (*MockCustomResourceClient) GetCustomResourceRaw ¶
func (m *MockCustomResourceClient) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string) ([]byte, error)
GetCustomResourceRaw mocks base method
func (*MockCustomResourceClient) ListCustomResource ¶
func (m *MockCustomResourceClient) ListCustomResource(apiGroup, version, namespace, resourceKind string) (*CustomResourceList, error)
ListCustomResource mocks base method
func (*MockCustomResourceClient) UpdateCustomResource ¶
func (m *MockCustomResourceClient) UpdateCustomResource(item *unstructured.Unstructured) error
UpdateCustomResource mocks base method
func (*MockCustomResourceClient) UpdateCustomResourceRaw ¶
func (m *MockCustomResourceClient) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName string, data []byte) error
UpdateCustomResourceRaw mocks base method
type MockCustomResourceClientMockRecorder ¶
type MockCustomResourceClientMockRecorder struct {
// contains filtered or unexported fields
}
MockCustomResourceClientMockRecorder is the mock recorder for MockCustomResourceClient
func (*MockCustomResourceClientMockRecorder) AtomicModifyCustomResource ¶
func (mr *MockCustomResourceClientMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data interface{}) *gomock.Call
AtomicModifyCustomResource indicates an expected call of AtomicModifyCustomResource
func (*MockCustomResourceClientMockRecorder) CreateCustomResource ¶
func (mr *MockCustomResourceClientMockRecorder) CreateCustomResource(item interface{}) *gomock.Call
CreateCustomResource indicates an expected call of CreateCustomResource
func (*MockCustomResourceClientMockRecorder) CreateCustomResourceRaw ¶
func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data interface{}) *gomock.Call
CreateCustomResourceRaw indicates an expected call of CreateCustomResourceRaw
func (*MockCustomResourceClientMockRecorder) CreateCustomResourceRawIfNotFound ¶
func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data interface{}) *gomock.Call
CreateCustomResourceRawIfNotFound indicates an expected call of CreateCustomResourceRawIfNotFound
func (*MockCustomResourceClientMockRecorder) CreateOrUpdateCustomeResourceRaw ¶
func (mr *MockCustomResourceClientMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
CreateOrUpdateCustomeResourceRaw indicates an expected call of CreateOrUpdateCustomeResourceRaw
func (*MockCustomResourceClientMockRecorder) DeleteCustomResource ¶
func (mr *MockCustomResourceClientMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
DeleteCustomResource indicates an expected call of DeleteCustomResource
func (*MockCustomResourceClientMockRecorder) GetCustomResource ¶
func (mr *MockCustomResourceClientMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
GetCustomResource indicates an expected call of GetCustomResource
func (*MockCustomResourceClientMockRecorder) GetCustomResourceRaw ¶
func (mr *MockCustomResourceClientMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call
GetCustomResourceRaw indicates an expected call of GetCustomResourceRaw
func (*MockCustomResourceClientMockRecorder) ListCustomResource ¶
func (mr *MockCustomResourceClientMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind interface{}) *gomock.Call
ListCustomResource indicates an expected call of ListCustomResource
func (*MockCustomResourceClientMockRecorder) UpdateCustomResource ¶
func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResource(item interface{}) *gomock.Call
UpdateCustomResource indicates an expected call of UpdateCustomResource
func (*MockCustomResourceClientMockRecorder) UpdateCustomResourceRaw ¶
func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call
UpdateCustomResourceRaw indicates an expected call of UpdateCustomResourceRaw
type MockDeploymentClient ¶
type MockDeploymentClient struct {
// contains filtered or unexported fields
}
MockDeploymentClient is a mock of DeploymentClient interface
func NewMockDeploymentClient ¶
func NewMockDeploymentClient(ctrl *gomock.Controller) *MockDeploymentClient
NewMockDeploymentClient creates a new mock instance
func (*MockDeploymentClient) CreateDeployment ¶
func (m *MockDeploymentClient) CreateDeployment(arg0 *v1.Deployment) (*v1.Deployment, error)
CreateDeployment mocks base method
func (*MockDeploymentClient) CreateOrRollingUpdateDeployment ¶
func (m *MockDeploymentClient) CreateOrRollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
CreateOrRollingUpdateDeployment mocks base method
func (*MockDeploymentClient) DeleteDeployment ¶
func (m *MockDeploymentClient) DeleteDeployment(namespace, name string, options *v11.DeleteOptions) error
DeleteDeployment mocks base method
func (*MockDeploymentClient) EXPECT ¶
func (m *MockDeploymentClient) EXPECT() *MockDeploymentClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDeploymentClient) GetDeployment ¶
func (m *MockDeploymentClient) GetDeployment(namespace, name string) (*v1.Deployment, error)
GetDeployment mocks base method
func (*MockDeploymentClient) ListDeploymentsWithLabels ¶
func (m *MockDeploymentClient) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*v1.DeploymentList, error)
ListDeploymentsWithLabels mocks base method
func (*MockDeploymentClient) PatchDeployment ¶
func (m *MockDeploymentClient) PatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
PatchDeployment mocks base method
func (*MockDeploymentClient) RollingPatchDeployment ¶
func (m *MockDeploymentClient) RollingPatchDeployment(arg0, arg1 *v1.Deployment) (*v1.Deployment, bool, error)
RollingPatchDeployment mocks base method
func (*MockDeploymentClient) RollingPatchDeploymentMigrations ¶
func (m *MockDeploymentClient) RollingPatchDeploymentMigrations(namespace, name string, f PatchFunction) (*v1.Deployment, bool, error)
RollingPatchDeploymentMigrations mocks base method
func (*MockDeploymentClient) RollingUpdateDeployment ¶
func (m *MockDeploymentClient) RollingUpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
RollingUpdateDeployment mocks base method
func (*MockDeploymentClient) RollingUpdateDeploymentMigrations ¶
func (m *MockDeploymentClient) RollingUpdateDeploymentMigrations(namespace, name string, f UpdateFunction) (*v1.Deployment, bool, error)
RollingUpdateDeploymentMigrations mocks base method
func (*MockDeploymentClient) UpdateDeployment ¶
func (m *MockDeploymentClient) UpdateDeployment(arg0 *v1.Deployment) (*v1.Deployment, bool, error)
UpdateDeployment mocks base method
type MockDeploymentClientMockRecorder ¶
type MockDeploymentClientMockRecorder struct {
// contains filtered or unexported fields
}
MockDeploymentClientMockRecorder is the mock recorder for MockDeploymentClient
func (*MockDeploymentClientMockRecorder) CreateDeployment ¶
func (mr *MockDeploymentClientMockRecorder) CreateDeployment(arg0 interface{}) *gomock.Call
CreateDeployment indicates an expected call of CreateDeployment
func (*MockDeploymentClientMockRecorder) CreateOrRollingUpdateDeployment ¶
func (mr *MockDeploymentClientMockRecorder) CreateOrRollingUpdateDeployment(arg0 interface{}) *gomock.Call
CreateOrRollingUpdateDeployment indicates an expected call of CreateOrRollingUpdateDeployment
func (*MockDeploymentClientMockRecorder) DeleteDeployment ¶
func (mr *MockDeploymentClientMockRecorder) DeleteDeployment(namespace, name, options interface{}) *gomock.Call
DeleteDeployment indicates an expected call of DeleteDeployment
func (*MockDeploymentClientMockRecorder) GetDeployment ¶
func (mr *MockDeploymentClientMockRecorder) GetDeployment(namespace, name interface{}) *gomock.Call
GetDeployment indicates an expected call of GetDeployment
func (*MockDeploymentClientMockRecorder) ListDeploymentsWithLabels ¶
func (mr *MockDeploymentClientMockRecorder) ListDeploymentsWithLabels(namespace, labels interface{}) *gomock.Call
ListDeploymentsWithLabels indicates an expected call of ListDeploymentsWithLabels
func (*MockDeploymentClientMockRecorder) PatchDeployment ¶
func (mr *MockDeploymentClientMockRecorder) PatchDeployment(arg0, arg1 interface{}) *gomock.Call
PatchDeployment indicates an expected call of PatchDeployment
func (*MockDeploymentClientMockRecorder) RollingPatchDeployment ¶
func (mr *MockDeploymentClientMockRecorder) RollingPatchDeployment(arg0, arg1 interface{}) *gomock.Call
RollingPatchDeployment indicates an expected call of RollingPatchDeployment
func (*MockDeploymentClientMockRecorder) RollingPatchDeploymentMigrations ¶
func (mr *MockDeploymentClientMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
RollingPatchDeploymentMigrations indicates an expected call of RollingPatchDeploymentMigrations
func (*MockDeploymentClientMockRecorder) RollingUpdateDeployment ¶
func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeployment(arg0 interface{}) *gomock.Call
RollingUpdateDeployment indicates an expected call of RollingUpdateDeployment
func (*MockDeploymentClientMockRecorder) RollingUpdateDeploymentMigrations ¶
func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f interface{}) *gomock.Call
RollingUpdateDeploymentMigrations indicates an expected call of RollingUpdateDeploymentMigrations
func (*MockDeploymentClientMockRecorder) UpdateDeployment ¶
func (mr *MockDeploymentClientMockRecorder) UpdateDeployment(arg0 interface{}) *gomock.Call
UpdateDeployment indicates an expected call of UpdateDeployment
type MockServiceAccountClient ¶
type MockServiceAccountClient struct {
// contains filtered or unexported fields
}
MockServiceAccountClient is a mock of ServiceAccountClient interface
func NewMockServiceAccountClient ¶
func NewMockServiceAccountClient(ctrl *gomock.Controller) *MockServiceAccountClient
NewMockServiceAccountClient creates a new mock instance
func (*MockServiceAccountClient) CreateServiceAccount ¶
func (m *MockServiceAccountClient) CreateServiceAccount(arg0 *v10.ServiceAccount) (*v10.ServiceAccount, error)
CreateServiceAccount mocks base method
func (*MockServiceAccountClient) DeleteServiceAccount ¶
func (m *MockServiceAccountClient) DeleteServiceAccount(namespace, name string, options *v11.DeleteOptions) error
DeleteServiceAccount mocks base method
func (*MockServiceAccountClient) EXPECT ¶
func (m *MockServiceAccountClient) EXPECT() *MockServiceAccountClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockServiceAccountClient) GetServiceAccount ¶
func (m *MockServiceAccountClient) GetServiceAccount(namespace, name string) (*v10.ServiceAccount, error)
GetServiceAccount mocks base method
func (*MockServiceAccountClient) UpdateServiceAccount ¶
func (m *MockServiceAccountClient) UpdateServiceAccount(modified *v10.ServiceAccount) (*v10.ServiceAccount, error)
UpdateServiceAccount mocks base method
type MockServiceAccountClientMockRecorder ¶
type MockServiceAccountClientMockRecorder struct {
// contains filtered or unexported fields
}
MockServiceAccountClientMockRecorder is the mock recorder for MockServiceAccountClient
func (*MockServiceAccountClientMockRecorder) CreateServiceAccount ¶
func (mr *MockServiceAccountClientMockRecorder) CreateServiceAccount(arg0 interface{}) *gomock.Call
CreateServiceAccount indicates an expected call of CreateServiceAccount
func (*MockServiceAccountClientMockRecorder) DeleteServiceAccount ¶
func (mr *MockServiceAccountClientMockRecorder) DeleteServiceAccount(namespace, name, options interface{}) *gomock.Call
DeleteServiceAccount indicates an expected call of DeleteServiceAccount
func (*MockServiceAccountClientMockRecorder) GetServiceAccount ¶
func (mr *MockServiceAccountClientMockRecorder) GetServiceAccount(namespace, name interface{}) *gomock.Call
GetServiceAccount indicates an expected call of GetServiceAccount
func (*MockServiceAccountClientMockRecorder) UpdateServiceAccount ¶
func (mr *MockServiceAccountClientMockRecorder) UpdateServiceAccount(modified interface{}) *gomock.Call
UpdateServiceAccount indicates an expected call of UpdateServiceAccount
type PatchFunction ¶
PatchFunction defines a function that is used to provide patch objects for a 3-way merge. The function provides the current instance of the object retrieved from the apiserver. The function should return the "original" and "modified" objects (in that order) for 3-way patch computation.
func Patch ¶
func Patch(original metav1.Object, modified metav1.Object) PatchFunction
Patch returns a default PatchFunction implementation that passes its arguments through to the patcher directly, ignoring the current object.
Example usage:
client.PatchDaemonSet(namespace, name, types.Patch(original, current))
type ServiceAccountClient ¶
type ServiceAccountClient interface { CreateServiceAccount(*v1.ServiceAccount) (*v1.ServiceAccount, error) GetServiceAccount(namespace, name string) (*v1.ServiceAccount, error) UpdateServiceAccount(modified *v1.ServiceAccount) (*v1.ServiceAccount, error) DeleteServiceAccount(namespace, name string, options *metav1.DeleteOptions) error }
ServiceAccountClient contains methods for manipulating ServiceAccount.
type UpdateFunction ¶
UpdateFunction defines a function that updates an object in an Update* function. The function provides the current instance of the object retrieved from the apiserver. The function should return the updated object to be applied.
func Update ¶
func Update(obj metav1.Object) UpdateFunction
Update returns a default UpdateFunction implementation that passes its argument through to the Update* function directly, ignoring the current object.
Example usage:
client.UpdateDaemonSet(namespace, name, types.Update(obj))