Documentation ¶
Index ¶
- func InstallPackage(kc *Client, resources *packages.Resources, skipInstance bool, ...) error
- func UpgradeOperatorVersion(kc *Client, newOv *v1beta1.OperatorVersion, instanceName, namespace string, ...) error
- type Client
- func (c *Client) DeleteInstance(instanceName, namespace string) error
- func (c *Client) GetInstance(name, namespace string) (*v1beta1.Instance, error)
- func (c *Client) GetOperatorVersion(name, namespace string) (*v1beta1.OperatorVersion, error)
- func (c *Client) InstallInstanceObjToCluster(obj *v1beta1.Instance, namespace string) (*v1beta1.Instance, error)
- func (c *Client) InstallOperatorObjToCluster(obj *v1beta1.Operator, namespace string) (*v1beta1.Operator, error)
- func (c *Client) InstallOperatorVersionObjToCluster(obj *v1beta1.OperatorVersion, namespace string) (*v1beta1.OperatorVersion, error)
- func (c *Client) InstanceExistsInCluster(operatorName, namespace, version, instanceName string) (bool, error)
- func (c *Client) ListInstances(namespace string) ([]string, error)
- func (c *Client) OperatorExistsInCluster(name, namespace string) bool
- func (c *Client) OperatorVersionsInstalled(operatorName, namespace string) ([]string, error)
- func (c *Client) UpdateInstance(instanceName, namespace string, operatorVersionName *string, ...) error
- func (c *Client) ValidateServerForOperator(operator *v1beta1.Operator) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallPackage ¶ added in v0.8.0
func InstallPackage(kc *Client, resources *packages.Resources, skipInstance bool, instanceName, namespace string, parameters map[string]string) error
InstallPackage installs package resources. If skipInstance is set to true, only a package's Operator and OperatorVersion is installed.
func UpgradeOperatorVersion ¶ added in v0.8.0
func UpgradeOperatorVersion(kc *Client, newOv *v1beta1.OperatorVersion, instanceName, namespace string, parameters map[string]string) error
UpgradeOperatorVersion upgrades an OperatorVersion and its Instance. For the updated Instance, new parameters can be provided.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a KUDO Client providing access to a clientset
func NewClientFromK8s ¶ added in v0.3.2
NewClientFromK8s creates KUDO client from kubernetes client interface
func (*Client) DeleteInstance ¶ added in v0.8.0
DeleteInstance deletes an instance.
func (*Client) GetInstance ¶ added in v0.5.0
GetInstance queries kubernetes api for instance of given name in given namespace returns error for error conditions. Instance not found is not considered an error and will result in 'nil, nil'
func (*Client) GetOperatorVersion ¶ added in v0.5.0
func (c *Client) GetOperatorVersion(name, namespace string) (*v1beta1.OperatorVersion, error)
GetOperatorVersion queries kubernetes api for operatorversion of given name in given namespace returns error for all other errors that not found, not found is treated as result being 'nil, nil'
func (*Client) InstallInstanceObjToCluster ¶
func (c *Client) InstallInstanceObjToCluster(obj *v1beta1.Instance, namespace string) (*v1beta1.Instance, error)
InstallInstanceObjToCluster expects a valid Instance obj to install
func (*Client) InstallOperatorObjToCluster ¶ added in v0.3.0
func (c *Client) InstallOperatorObjToCluster(obj *v1beta1.Operator, namespace string) (*v1beta1.Operator, error)
InstallOperatorObjToCluster expects a valid Operator obj to install
func (*Client) InstallOperatorVersionObjToCluster ¶ added in v0.3.0
func (c *Client) InstallOperatorVersionObjToCluster(obj *v1beta1.OperatorVersion, namespace string) (*v1beta1.OperatorVersion, error)
InstallOperatorVersionObjToCluster expects a valid Operator obj to install
func (*Client) InstanceExistsInCluster ¶ added in v0.3.0
func (c *Client) InstanceExistsInCluster(operatorName, namespace, version, instanceName string) (bool, error)
InstanceExistsInCluster checks if any OperatorVersion object matches to the given Operator name in the cluster. An Instance has two identifiers:
- Spec.OperatorVersion.Name spec: operatorVersion: name: kafka-2.11-2.4.0
- LabelSelector metadata: creationTimestamp: "2019-02-28T14:39:20Z" generation: 1 labels: controller-tools.k8s.io: "1.0" kudo.dev/operator: kafka
This function also just returns true if the Instance matches a specific OperatorVersion of an Operator
func (*Client) ListInstances ¶ added in v0.3.2
ListInstances lists all instances of given operator installed in the cluster in a given ns
func (*Client) OperatorExistsInCluster ¶ added in v0.3.0
OperatorExistsInCluster checks if a given Operator object is installed on the current k8s cluster
func (*Client) OperatorVersionsInstalled ¶ added in v0.4.0
OperatorVersionsInstalled lists all the versions of given operator installed in the cluster in given ns