const ( ServiceBindingKind = "ServiceBinding" BindableKindsResource = "bindablekinds" )
const ( DeploymentKind = "Deployment" DeploymentAPIVersion = "apps/v1" )
constants for volumes
const ( JobsKind = "Job" JobsAPIVersion = "batch/v1" // JobNameOdoMaxLength is the max length of a job name // To be on the safe side, we keep the max length less than the original(k8s) max length; // we do this because k8s job in odo is created to run exec commands in Deploy mode and this is not a user created resource, // so we do not want to break because of any error with job JobNameOdoMaxLength = 60 )
constants for volumes
const ( PersistentVolumeClaimKind = "PersistentVolumeClaim" PersistentVolumeClaimAPIVersion = "v1" )
ComponentPortAnnotationName annotation is used on the secrets that are created for each exposed port of the component
const ComponentPortAnnotationName = "component-port"
const FieldManager = "odo"
var ( NativeWorkloadKinds = []schema.GroupVersionKind{ appsv1.SchemeGroupVersion.WithKind("DaemonSet"), appsv1.SchemeGroupVersion.WithKind("Deployment"), appsv1.SchemeGroupVersion.WithKind("ReplicaSet"), corev1.SchemeGroupVersion.WithKind("ReplicationController"), appsv1.SchemeGroupVersion.WithKind("StatefulSet"), } CustomWorkloadKinds = []schema.GroupVersionKind{ ocappsv1.SchemeGroupVersion.WithKind("DeploymentConfig"), } )
var ( RouteGVK = schema.GroupVersionKind{ Group: "route.openshift.io", Version: "v1", Kind: "Route", } )
var SecretGVK = corev1.SchemeGroupVersion.WithKind("Secret")
func APIServiceBindingFromBinding( binding bindingApi.ServiceBinding, ) (api.ServiceBinding, error)
APIServiceBindingFromBinding returns a common api.ServiceBinding structure from a ServiceBinding.binding.operators.coreos.com/v1alpha1
func APIServiceBindingFromSpec(spec specApi.ServiceBinding) api.ServiceBinding
APIServiceBindingFromSpec returns a common api.ServiceBinding structure from a ServiceBinding.servicebinding.io/v1alpha3
func Bool(b bool) *bool
func ConvertK8sResourceToUnstructured(resource interface{}) (unstructuredResource unstructured.Unstructured, err error)
ConvertK8sResourceToUnstructured converts any K8s resource to unstructured.Unstructured format TODO: Remove this method and use https://github.com/redhat-developer/service-binding-operator/blob/master/pkg/converter/unstructured.go#L11
func ConvertUnstructuredListToResource(u unstructured.UnstructuredList, obj interface{}) error
func ConvertUnstructuredToResource(u unstructured.Unstructured, obj interface{}) error
func FakeNew() (*Client, *FakeClientset)
FakeNew creates new fake client for testing returns Client that is filled with fake clients and FakeClientSet that holds fake Clientsets to access Actions, Reactors etc... in fake client fake ingress support is set to default ie only extension v1 beta 1 is supported
func FakeNewWithIngressSupports(networkingv1Supported, extensionV1Supported bool) (*Client, *FakeClientset)
FakeNewWithIngressSupports creates new fake client for testing returns Client that is filled with fake clients and FakeClientSet that holds fake Clientsets to access Actions, Reactors etc... in fake
func FakePodStatus(status corev1.PodPhase, podName string) *corev1.Pod
FakePodStatus returns a pod with the status
func GetGVRFromCR(cr *olm.CRDDescription) schema.GroupVersionResource
GetGVRFromCR parses and returns the values for group, version and resource for a given Custom Resource (CR).
func GetInputEnvVarsFromStrings(envVars []string) ([]corev1.EnvVar, error)
GetInputEnvVarsFromStrings generates corev1.EnvVar values from the array of string key=value pairs envVars is the array containing the key=value pairs
func NewKubernetesFakedDiscovery(extv1b1supported, nwv1suppored bool) *odoFake.FakeDiscovery
func NewServiceBindingObject( bindingName string, bindAsFiles bool, workloadName string, namingStrategy string, workloadGVK schema.GroupVersionKind, mappings []bindingApi.Mapping, services []bindingApi.Service, status bindingApi.ServiceBindingStatus, ) *bindingApi.ServiceBinding
NewServiceBindingObject returns the bindingApi.ServiceBinding object
Client is a collection of fields used for client configuration and interaction
type Client struct { KubeClient kubernetes.Interface KubeConfig clientcmd.ClientConfig KubeClientConfig *rest.Config Namespace string OperatorClient *operatorsclientset.OperatorsV1alpha1Client // DynamicClient interacts with client-go's `dynamic` package. It is used // to dynamically create service from an operator. It can take an arbitrary // yaml and create k8s/OpenShift resource from it. DynamicClient dynamic.Interface // contains filtered or unexported fields }
func New() (*Client, error)
New creates a new client
func NewForConfig(config clientcmd.ClientConfig) (client *Client, err error)
NewForConfig creates a new client with the provided configuration or initializes the configuration if none is provided
func (c *Client) ApplyDeployment(deploy appsv1.Deployment) (*appsv1.Deployment, error)
ApplyDeployment creates or updates a deployment based on the given deployment spec It is using force:true to make sure that if someone changed one of the values that odo manages, odo overrides it with the value it expects instead of failing due to conflict.
func (c *Client) CreateDeployment(deploy appsv1.Deployment) (*appsv1.Deployment, error)
CreateDeployment creates a deployment based on the given deployment spec
func (c *Client) CreateJob(job batchv1.Job, namespace string) (*batchv1.Job, error)
CreateJobs creates a K8s job to execute task
func (c *Client) CreateNamespace(name string) (*corev1.Namespace, error)
CreateNamespace creates new namespace
func (c *Client) CreateNewProject(projectName string, wait bool) error
CreateNewProject creates project with given projectName
func (c *Client) CreatePVC(pvc corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error)
CreatePVC creates a PVC resource in the cluster with the given name, size and labels
func (c *Client) CreateSecret(objectMeta metav1.ObjectMeta, data map[string]string, ownerReference metav1.OwnerReference) error
CreateSecret generates and creates the secret commonObjectMeta is the ObjectMeta for the service
func (c *Client) CreateSecrets(componentName string, commonObjectMeta metav1.ObjectMeta, svc *corev1.Service, ownerReference metav1.OwnerReference) error
CreateSecrets creates a secret for each port, containing the host and port of the component This is done so other components can later inject the secret into the environment and have the "coordinates" to communicate with this component
func (c *Client) CreateService(svc corev1.Service) (*corev1.Service, error)
CreateService generates and creates the service commonObjectMeta is the ObjectMeta for the service
func (c *Client) CreateTLSSecret(tlsCertificate []byte, tlsPrivKey []byte, objectMeta metav1.ObjectMeta) (*corev1.Secret, error)
CreateTLSSecret creates a TLS Secret with the given certificate and private key serviceName is the name of the service for the target reference ingressDomain is the ingress domain to use for the ingress
func (c *Client) DeleteDynamicResource(name string, gvr schema.GroupVersionResource, wait bool) error
DeleteDynamicResource deletes an instance, specified by name, of a Custom Resource if wait is true, it will set the PropagationPolicy to DeletePropagationForeground to wait for owned resources to be deleted (only for resources with a BlockOwnerDeletion set to true)
func (c *Client) DeleteJob(jobName string) error
func (c *Client) DeleteNamespace(name string, wait bool) error
DeleteNamespace deletes namespace if wait=true , it will wait for deletion
func (c *Client) DeletePVC(pvcName string) error
DeletePVC deletes the required PVC resource from the cluster
func (c *Client) DeleteProject(name string, wait bool) error
DeleteProject deletes given project
NOTE: There is a very specific edge case that may happen during project deletion when deleting a project and then immediately creating another. Unfortunately, despite the watch interface, we cannot safely determine if the project is 100% deleted. See this link: https://stackoverflow.com/questions/48208001/deleted-openshift-online-pro-project-has-left-a-trace-so-cannot-create-project-o Will Gordon (Engineer @ Red Hat) describes the issue:
"Projects are deleted asynchronously after you send the delete command. So it's possible that the deletion just hasn't been reconciled yet. It should happen within a minute or so, so try again. Also, please be aware that in a multitenant environment, like OpenShift Online, you are prevented from creating a project with the same name as any other project in the cluster, even if it's not your own. So if you can't create the project, it's possible that someone has already created a project with the same name."
func (c *Client) DeleteSecret(secretName, namespace string) error
DeleteSecret updates the given Secret object in the given namespace
func (c *Client) DeleteService(serviceName string) error
DeleteService deletes the service with the given service name
func (c *Client) DeploymentWatcher(ctx context.Context, selector string) (watch.Interface, error)
DeploymentWatcher returns a watcher on Deployments into the current namespace with the given label selector
func (c *Client) ExecCMDInContainer(ctx context.Context, containerName, podName string, cmd []string, stdout, stderr io.Writer, stdin io.Reader, tty bool) error
ExecCMDInContainer execute command in the container of a pod, pass an empty string for containerName to execute in the first container of the pod
func (c *Client) GeneratePortForwardReq(podName string) *rest.Request
GeneratePortForwardReq builds a port forward request
func (c *Client) GetAllPodsInNamespaceMatchingSelector(selector string, ns string) (*corev1.PodList, error)
func (c *Client) GetAllResourcesFromSelector(selector string, ns string) ([]unstructured.Unstructured, error)
GetAllResourcesFromSelector returns all resources of any kind (including CRs) matching the given label selector
func (c Client) GetBindableKindStatusRestMapping(bindableKindStatuses []bindingApi.BindableKindsStatus) ([]*meta.RESTMapping, error)
GetBindableKindStatusRestMapping returns a list of *meta.RESTMapping of all the bindable kind operator CRD
func (c *Client) GetBindableKinds() (bindingApi.BindableKinds, error)
GetBindableKinds returns BindableKinds of name "bindable-kinds". "bindable-kinds" is the default resource provided by SBO
func (c Client) GetBindingServiceBinding(name string) (bindingApi.ServiceBinding, error)
GetBindingServiceBinding returns a ServiceBinding from group binding.operators.coreos.com/v1alpha1
func (c *Client) GetCSVWithCR(name string) (*olm.ClusterServiceVersion, error)
GetCSVWithCR returns the CSV (Operator) that contains the CR (service)
func (c *Client) GetClient() kubernetes.Interface
func (c *Client) GetClientConfig() *rest.Config
func (c *Client) GetConfig() clientcmd.ClientConfig
func (c *Client) GetCurrentNamespace() string
func (c *Client) GetCurrentNamespacePolicy() (psaApi.Policy, error)
func (c *Client) GetCurrentProjectName() string
GetCurrentProjectName returns the current project name
func (c *Client) GetCustomResourcesFromCSV(csv *olm.ClusterServiceVersion) *[]olm.CRDDescription
GetCustomResourcesFromCSV returns a list of CRs provided by an operator/CSV.
func (c *Client) GetDeploymentAPIVersion() (schema.GroupVersionKind, error)
GetDeploymentAPIVersion returns a map with Group, Version, Resource information of Deployment objects depending on the GVR supported by the cluster
func (c *Client) GetDeploymentByName(name string) (*appsv1.Deployment, error)
GetDeploymentByName gets a deployment by querying by name
func (c *Client) GetDeploymentFromSelector(selector string) ([]appsv1.Deployment, error)
GetDeploymentFromSelector returns an array of Deployment resources which match the given selector
func (c *Client) GetDynamicClient() dynamic.Interface
func (c *Client) GetDynamicResource(gvr schema.GroupVersionResource, name string) (*unstructured.Unstructured, error)
GetDynamicResource returns an unstructured instance of a Custom Resource currently deployed in the active namespace
func (c *Client) GetGVKFromGVR(gvr schema.GroupVersionResource) (schema.GroupVersionKind, error)
func (c *Client) GetGVRFromGVK(gvk schema.GroupVersionKind) (schema.GroupVersionResource, error)
func (c *Client) GetJobLogs(job *batchv1.Job, containerName string) (io.ReadCloser, error)
GetJobLogs retrieves pod logs of a job
func (c *Client) GetNamespace(name string) (*corev1.Namespace, error)
GetNamespace returns Namespace based on its name Errors related to project not being found or forbidden are translated to nil project for compatibility
func (c *Client) GetNamespaceNormal(name string) (*corev1.Namespace, error)
GetNamespace returns Namespace based on its name
func (c *Client) GetNamespaces() ([]string, error)
GetNamespaces return list of existing namespaces that user has access to.
func (c *Client) GetOCVersion() (string, error)
func (c *Client) GetOneDeployment(componentName, appName string, isPartOfComponent bool) (*appsv1.Deployment, error)
GetOneDeployment returns the Deployment object associated with the given component and app
func (c *Client) GetOneDeploymentFromSelector(selector string) (*appsv1.Deployment, error)
GetOneDeploymentFromSelector returns the Deployment object associated with the given selector. An error is thrown when exactly one Deployment is not found for the selector.
func (c *Client) GetOneService(componentName, appName string, isPartOfComponent bool) (*corev1.Service, error)
GetOneService retrieves the service with the given component and app name An error is thrown when exactly one service is not found for the selector.
func (c *Client) GetOneServiceFromSelector(selector string) (*corev1.Service, error)
GetOneServiceFromSelector returns the service object associated with the given selector. An error is thrown when exactly one service is not found for the selector.
func (c *Client) GetOperatorGVRList() ([]meta.RESTMapping, error)
GetOperatorGVRList creates a slice of rest mappings that are provided by Operators (CSV)
func (c *Client) GetPVCFromName(pvcName string) (*corev1.PersistentVolumeClaim, error)
GetPVCFromName returns the PVC of the given name
func (c *Client) GetPodLogs(podName, containerName string, followLog bool) (io.ReadCloser, error)
GetPodLogs prints the log from pod to stdout
func (c *Client) GetPodUsingComponentName(componentName string) (*corev1.Pod, error)
GetPodUsingComponentName gets a pod using the component name
func (c *Client) GetPodsMatchingSelector(selector string) (*corev1.PodList, error)
func (c *Client) GetProject(projectName string) (*projectv1.Project, error)
GetProject returns project based on the name of the project errors related to project not being found or forbidden are translated to nil project for compatibility
func (c *Client) GetRegistryList() ([]api.Registry, error)
func (c *Client) GetResourceSpecDefinition(group, version, kind string) (*spec.Schema, error)
GetResourceSpecDefinition returns the OpenAPI v2 definition of the Kubernetes resource of a given group/version/kind
func (c *Client) GetRestMappingFromGVK(gvk schema.GroupVersionKind) (*meta.RESTMapping, error)
func (c *Client) GetRestMappingFromUnstructured(u unstructured.Unstructured) (*meta.RESTMapping, error)
GetRestMappingFromUnstructured returns rest mappings from unstructured data
func (c *Client) GetRunningPodFromSelector(selector string) (*corev1.Pod, error)
GetRunningPodFromSelector gets a pod from the selector
func (c *Client) GetSecret(name, namespace string) (*corev1.Secret, error)
GetSecret returns the Secret object in the given namespace
func (c *Client) GetServerVersion(timeout time.Duration) (*ServerInfo, error)
GetServerVersion will fetch the Server Host, OpenShift and Kubernetes Version It will be shown on the execution of odo version command
func (c Client) GetSpecServiceBinding(name string) (specApi.ServiceBinding, error)
GetSpecServiceBinding returns a ServiceBinding from group servicebinding.io/v1alpha3
func (c Client) GetWorkloadKinds() ([]string, []schema.GroupVersionKind, error)
GetWorkloadKinds returns all the workload kinds present in the cluster It considers that all native resources are present and tests only for custom resources Returns an array of Kinds and an array of GVKs
func (c *Client) IsCSVSupported() (bool, error)
IsCSVSupported checks if resource of type service binding request present on the cluster
func (c *Client) IsDeploymentExtensionsV1Beta1() (bool, error)
func (c *Client) IsPodNameMatchingSelector(ctx context.Context, podname string, selector string) (bool, error)
func (c *Client) IsProjectSupported() (bool, error)
IsProjectSupported checks if Project resource type is present on the cluster
func (c *Client) IsResourceSupported(apiGroup, apiVersion, resourceName string) (bool, error)
func (c *Client) IsSSASupported() bool
IsSSASupported checks if Server Side Apply is supported by cluster SSA was introduced in Kubernetes 1.16 If there is an error while parsing versions, it assumes that SSA is supported by cluster. Most of clusters these days are 1.16 and up
func (c *Client) IsServiceBindingSupported() (bool, error)
IsServiceBindingSupported checks if resource of type service binding request present on the cluster
func (c *Client) ListClusterServiceVersions() (*olm.ClusterServiceVersionList, error)
ListClusterServiceVersions returns a list of CSVs in the cluster It is equivalent to doing `oc get csvs` using oc cli
func (c *Client) ListClusterWideDynamicResources(gvr schema.GroupVersionResource, selector string) (*unstructured.UnstructuredList, error)
ListClusterWideDynamicResources returns an unstructured list of instances of a Custom Resource currently deployed cluster-wide in the cluster. If a selector is passed, then it will be used as a label selector to list the resources.
func (c *Client) ListConfigMaps(labelSelector string) ([]corev1.ConfigMap, error)
ListConfigMaps lists all the configmaps based on the given label selector
func (c *Client) ListDynamicResources(namespace string, gvr schema.GroupVersionResource, selector string) (*unstructured.UnstructuredList, error)
ListDynamicResources returns an unstructured list of instances of a Custom Resource currently deployed in the specified namespace of the cluster. The current namespace is used if the namespace is not specified. If a selector is passed, then it will be used as a label selector to list the resources.
func (c *Client) ListIngresses(namespace, selector string) (*v1.IngressList, error)
func (c *Client) ListJobs(selector string) (*batchv1.JobList, error)
func (c *Client) ListPVCNames(selector string) ([]string, error)
ListPVCNames returns the PVC names for the given selector
func (c *Client) ListPVCs(selector string) ([]corev1.PersistentVolumeClaim, error)
ListPVCs returns the PVCs based on the given selector
func (c *Client) ListProjectNames() ([]string, error)
ListProjectNames return list of existing project names that user has access to.
func (c *Client) ListProjects() (*projectv1.ProjectList, error)
ListProjects return list of existing projects that user has access to.
func (c *Client) ListSecrets(labelSelector string) ([]corev1.Secret, error)
ListSecrets lists all the secrets based on the given label selector
func (c Client) ListServiceBindingsFromAllGroups() ([]specApi.ServiceBinding, []bindingApi.ServiceBinding, error)
ListServiceBindingsFromAllGroups returns the list of ServiceBindings in the cluster in the current namespace. The first list on the result contains ServiceBinding resources from group servicebinding.io/v1alpha3 the second list contains ServiceBinding resources from group binding.operators.coreos.com/v1alpha1
func (c *Client) ListServices(selector string) ([]corev1.Service, error)
ListServices returns an array of Service resources which match the given selector
func (c *Client) NewServiceBindingServiceObject(serviceNs string, unstructuredService unstructured.Unstructured, bindingName string) (bindingApi.Service, error)
NewServiceBindingServiceObject returns the bindingApi.Service object based on the RESTMapping
func (c *Client) PatchDynamicResource(resource unstructured.Unstructured) (bool, error)
PatchDynamicResource patches a dynamic custom resource and returns true if the generation of the resource increased or the resource is created
func (c *Client) PodWarningEventWatcher(ctx context.Context) (result watch.Interface, isForbidden bool, err error)
PodWarningEventWatcher watch for events in the current directory. If the watch is forbidden, a NoOp implementation of watch.Interface is returned
func (c *Client) PodWatcher(ctx context.Context, selector string) (watch.Interface, error)
func (c *Client) Refresh() (bool, error)
Refresh re-creates a new Kubernetes client and checks if the Config changes If config changed, updates the Kubernetes client with the new configuration and returns true If the namespace or cluster of the current context has changed since the last time the config has been loaded, the function will not update the configuration
func (c *Client) RunLogout(stdout io.Writer) error
RunLogout logs out the current user from cluster
func (c *Client) SetCurrentNamespace(namespace string) error
SetCurrentNamespace change current namespace in kubeconfig
func (c *Client) SetDiscoveryInterface(client discovery.DiscoveryInterface)
func (c *Client) SetDynamicClient(scheme *runtime.Scheme, objects ...runtime.Object)
func (c *Client) SetNamespace(ns string)
func (c *Client) SetupPortForwarding(pod *corev1.Pod, portPairs []string, out io.Writer, errOut io.Writer, stopChan chan struct{}, address string) error
func (c *Client) TryWithBlockOwnerDeletion(ownerReference metav1.OwnerReference, exec func(ownerReference metav1.OwnerReference) error) error
TryWithBlockOwnerDeletion will execute `exec` a first time with `BlockOwnerDeletion` set to true in `ownerReference` If a Forbidden errors occurs, it will call `exec` again with the original `ownerReference`
func (c *Client) UpdateDeployment(deploy appsv1.Deployment) (*appsv1.Deployment, error)
UpdateDeployment updates a deployment based on the given deployment spec
func (c *Client) UpdateDynamicResource(gvr schema.GroupVersionResource, name string, u *unstructured.Unstructured) error
UpdateDynamicResource updates a dynamic resource
func (c *Client) UpdatePVCLabels(pvc *corev1.PersistentVolumeClaim, labels map[string]string) error
UpdatePVCLabels updates the given PVC with the given labels
func (c *Client) UpdateSecret(secret *corev1.Secret, namespace string) (*corev1.Secret, error)
UpdateSecret updates the given Secret object in the given namespace
func (c *Client) UpdateService(svc corev1.Service) (*corev1.Service, error)
UpdateService updates a service based on the given service spec
func (c *Client) UpdateStorageOwnerReference(pvc *corev1.PersistentVolumeClaim, ownerReference ...metav1.OwnerReference) error
UpdateStorageOwnerReference updates the given storage with the given owner references
func (c *Client) WaitAndGetSecret(name string, namespace string) (*corev1.Secret, error)
WaitAndGetSecret blocks and waits until the secret is available
func (c *Client) WaitDynamicResourceDeleted(gvr schema.GroupVersionResource, name string) error
WaitDynamicResourceDeleted waits for the given resource to be deleted, with a timeout
func (c *Client) WaitForJobToComplete(job *batchv1.Job) (*batchv1.Job, error)
WaitForJobToComplete to wait until a job completes or fails; it starts printing log or error if the job does not complete execution after 2 minutes
func (c *Client) WaitForServiceAccountInNamespace(namespace, serviceAccountName string) error
WaitForServiceAccountInNamespace waits for the given service account to be ready
type ClientInterface interface { platform.Client // binding.go IsServiceBindingSupported() (bool, error) GetBindableKinds() (bindingApi.BindableKinds, error) GetBindableKindStatusRestMapping(bindableKindStatuses []bindingApi.BindableKindsStatus) ([]*meta.RESTMapping, error) GetBindingServiceBinding(name string) (bindingApi.ServiceBinding, error) GetSpecServiceBinding(name string) (specApi.ServiceBinding, error) ListServiceBindingsFromAllGroups() ([]specApi.ServiceBinding, []bindingApi.ServiceBinding, error) NewServiceBindingServiceObject(serviceNs string, unstructuredService unstructured.Unstructured, bindingName string) (bindingApi.Service, error) GetWorkloadKinds() ([]string, []schema.GroupVersionKind, error) // configmap.go ListConfigMaps(labelSelector string) ([]corev1.ConfigMap, error) // deployment.go GetDeploymentByName(name string) (*appsv1.Deployment, error) GetOneDeployment(componentName, appName string, isPartOfComponent bool) (*appsv1.Deployment, error) GetOneDeploymentFromSelector(selector string) (*appsv1.Deployment, error) GetDeploymentFromSelector(selector string) ([]appsv1.Deployment, error) CreateDeployment(deploy appsv1.Deployment) (*appsv1.Deployment, error) UpdateDeployment(deploy appsv1.Deployment) (*appsv1.Deployment, error) ApplyDeployment(deploy appsv1.Deployment) (*appsv1.Deployment, error) GetDeploymentAPIVersion() (schema.GroupVersionKind, error) IsDeploymentExtensionsV1Beta1() (bool, error) DeploymentWatcher(ctx context.Context, selector string) (watch.Interface, error) // dynamic.go PatchDynamicResource(exampleCustomResource unstructured.Unstructured) (bool, error) ListDynamicResources(namespace string, gvr schema.GroupVersionResource, selector string) (*unstructured.UnstructuredList, error) GetDynamicResource(gvr schema.GroupVersionResource, name string) (*unstructured.Unstructured, error) UpdateDynamicResource(gvr schema.GroupVersionResource, name string, u *unstructured.Unstructured) error DeleteDynamicResource(name string, gvr schema.GroupVersionResource, wait bool) error // events.go PodWarningEventWatcher(ctx context.Context) (result watch.Interface, isForbidden bool, err error) // kclient.go GetClient() kubernetes.Interface GetConfig() clientcmd.ClientConfig GetClientConfig() *rest.Config GetDynamicClient() dynamic.Interface GeneratePortForwardReq(podName string) *rest.Request SetDiscoveryInterface(client discovery.DiscoveryInterface) IsResourceSupported(apiGroup, apiVersion, resourceName string) (bool, error) IsSSASupported() bool Refresh() (newConfig bool, err error) // namespace.go GetCurrentNamespace() string SetNamespace(ns string) GetNamespaces() ([]string, error) GetNamespace(name string) (*corev1.Namespace, error) GetNamespaceNormal(name string) (*corev1.Namespace, error) CreateNamespace(name string) (*corev1.Namespace, error) DeleteNamespace(name string, wait bool) error SetCurrentNamespace(namespace string) error WaitForServiceAccountInNamespace(namespace, serviceAccountName string) error GetCurrentNamespacePolicy() (psaApi.Policy, error) // oc_server.go GetServerVersion(timeout time.Duration) (*ServerInfo, error) GetOCVersion() (string, error) // operators.go IsCSVSupported() (bool, error) ListClusterServiceVersions() (*olm.ClusterServiceVersionList, error) GetCustomResourcesFromCSV(csv *olm.ClusterServiceVersion) *[]olm.CRDDescription GetCSVWithCR(name string) (*olm.ClusterServiceVersion, error) GetResourceSpecDefinition(group, version, kind string) (*spec.Schema, error) GetRestMappingFromUnstructured(unstructured.Unstructured) (*meta.RESTMapping, error) GetRestMappingFromGVK(gvk schema.GroupVersionKind) (*meta.RESTMapping, error) GetOperatorGVRList() ([]meta.RESTMapping, error) GetGVKFromGVR(gvr schema.GroupVersionResource) (schema.GroupVersionKind, error) GetGVRFromGVK(gvk schema.GroupVersionKind) (schema.GroupVersionResource, error) // owner_reference.go TryWithBlockOwnerDeletion(ownerReference metav1.OwnerReference, exec func(ownerReference metav1.OwnerReference) error) error // pods.go GetPodUsingComponentName(componentName string) (*corev1.Pod, error) PodWatcher(ctx context.Context, selector string) (watch.Interface, error) IsPodNameMatchingSelector(ctx context.Context, podname string, selector string) (bool, error) // port_forwarding.go // SetupPortForwarding creates port-forwarding for the pod on the port pairs provided in the // ["<localhost-port>":"<remote-pod-port>"] format. errOut is used by the client-go library to output any errors // encountered while the port-forwarding is running SetupPortForwarding(pod *corev1.Pod, portPairs []string, out io.Writer, errOut io.Writer, stopChan chan struct{}, address string) error // projects.go CreateNewProject(projectName string, wait bool) error DeleteProject(name string, wait bool) error GetCurrentProjectName() string GetProject(projectName string) (*projectv1.Project, error) IsProjectSupported() (bool, error) ListProjectNames() ([]string, error) // secrets.go CreateTLSSecret(tlsCertificate []byte, tlsPrivKey []byte, objectMeta metav1.ObjectMeta) (*corev1.Secret, error) GetSecret(name, namespace string) (*corev1.Secret, error) UpdateSecret(secret *corev1.Secret, namespace string) (*corev1.Secret, error) DeleteSecret(secretName, namespace string) error CreateSecret(objectMeta metav1.ObjectMeta, data map[string]string, ownerReference metav1.OwnerReference) error CreateSecrets(componentName string, commonObjectMeta metav1.ObjectMeta, svc *corev1.Service, ownerReference metav1.OwnerReference) error ListSecrets(labelSelector string) ([]corev1.Secret, error) WaitAndGetSecret(name string, namespace string) (*corev1.Secret, error) // service.go CreateService(svc corev1.Service) (*corev1.Service, error) UpdateService(svc corev1.Service) (*corev1.Service, error) ListServices(selector string) ([]corev1.Service, error) DeleteService(serviceName string) error GetOneService(componentName, appName string, isPartOfComponent bool) (*corev1.Service, error) GetOneServiceFromSelector(selector string) (*corev1.Service, error) // user.go RunLogout(stdout io.Writer) error // volumes.go CreatePVC(pvc corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) DeletePVC(pvcName string) error ListPVCs(selector string) ([]corev1.PersistentVolumeClaim, error) ListPVCNames(selector string) ([]string, error) GetPVCFromName(pvcName string) (*corev1.PersistentVolumeClaim, error) UpdatePVCLabels(pvc *corev1.PersistentVolumeClaim, labels map[string]string) error UpdateStorageOwnerReference(pvc *corev1.PersistentVolumeClaim, ownerReference ...metav1.OwnerReference) error // ingress_routes.go ListIngresses(namespace, selector string) (*v1.IngressList, error) ListJobs(selector string) (*batchv1.JobList, error) // CreateJob creates a K8s job to execute task CreateJob(job batchv1.Job, namespace string) (*batchv1.Job, error) // WaitForJobToComplete to wait until a job completes or fails; it starts printing log or error if the job does not complete execution after 1 minute WaitForJobToComplete(job *batchv1.Job) (*batchv1.Job, error) // GetJobLogs retrieves pod logs of a job GetJobLogs(job *batchv1.Job, containerName string) (io.ReadCloser, error) DeleteJob(jobName string) error // registry.go // GetRegistryList returns all Devfile registries from both ClusterDevfileRegistriesList (cluster-scoped) // and DevfileRegistriesList (namespace-scoped) resources. // Registries from DevfileRegistriesList resources are returned first in the list. GetRegistryList() ([]api.Registry, error) }
DeploymentNotFoundError returns an error if no deployment is found with the selector
type DeploymentNotFoundError struct { Selector string }
func (e *DeploymentNotFoundError) Error() string
FakeClientset holds fake ClientSets this is returned by FakeNew to access methods of fake client sets
type FakeClientset struct { Kubernetes *fakeKubeClientset.Clientset ServiceCatalogClientSet *fakeServiceCatalogClientSet.Clientset ProjClientset *fakeProjClientset.Clientset RouteClientset *fakeRouteClientset.Clientset AppsClientset *fakeAppsClientset.Clientset }
type GVRN struct {
// contains filtered or unexported fields
}
MockClientInterface is a mock of ClientInterface interface.
type MockClientInterface struct {
// contains filtered or unexported fields
}
func NewMockClientInterface(ctrl *gomock.Controller) *MockClientInterface
NewMockClientInterface creates a new mock instance.
func (m *MockClientInterface) ApplyDeployment(deploy v10.Deployment) (*v10.Deployment, error)
ApplyDeployment mocks base method.
func (m *MockClientInterface) CreateDeployment(deploy v10.Deployment) (*v10.Deployment, error)
CreateDeployment mocks base method.
func (m *MockClientInterface) CreateJob(job v11.Job, namespace string) (*v11.Job, error)
CreateJob mocks base method.
func (m *MockClientInterface) CreateNamespace(name string) (*v12.Namespace, error)
CreateNamespace mocks base method.
func (m *MockClientInterface) CreateNewProject(projectName string, wait bool) error
CreateNewProject mocks base method.
func (m *MockClientInterface) CreatePVC(pvc v12.PersistentVolumeClaim) (*v12.PersistentVolumeClaim, error)
CreatePVC mocks base method.
func (m *MockClientInterface) CreateSecret(objectMeta v14.ObjectMeta, data map[string]string, ownerReference v14.OwnerReference) error
CreateSecret mocks base method.
func (m *MockClientInterface) CreateSecrets(componentName string, commonObjectMeta v14.ObjectMeta, svc *v12.Service, ownerReference v14.OwnerReference) error
CreateSecrets mocks base method.
func (m *MockClientInterface) CreateService(svc v12.Service) (*v12.Service, error)
CreateService mocks base method.
func (m *MockClientInterface) CreateTLSSecret(tlsCertificate, tlsPrivKey []byte, objectMeta v14.ObjectMeta) (*v12.Secret, error)
CreateTLSSecret mocks base method.
func (m *MockClientInterface) DeleteDynamicResource(name string, gvr schema.GroupVersionResource, wait bool) error
DeleteDynamicResource mocks base method.
func (m *MockClientInterface) DeleteJob(jobName string) error
DeleteJob mocks base method.
func (m *MockClientInterface) DeleteNamespace(name string, wait bool) error
DeleteNamespace mocks base method.
func (m *MockClientInterface) DeletePVC(pvcName string) error
DeletePVC mocks base method.
func (m *MockClientInterface) DeleteProject(name string, wait bool) error
DeleteProject mocks base method.
func (m *MockClientInterface) DeleteSecret(secretName, namespace string) error
DeleteSecret mocks base method.
func (m *MockClientInterface) DeleteService(serviceName string) error
DeleteService mocks base method.
func (m *MockClientInterface) DeploymentWatcher(ctx context.Context, selector string) (watch.Interface, error)
DeploymentWatcher mocks base method.
func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClientInterface) ExecCMDInContainer(ctx context.Context, containerName, podName string, cmd []string, stdout, stderr io.Writer, stdin io.Reader, tty bool) error
ExecCMDInContainer mocks base method.
func (m *MockClientInterface) GeneratePortForwardReq(podName string) *rest.Request
GeneratePortForwardReq mocks base method.
func (m *MockClientInterface) GetAllPodsInNamespaceMatchingSelector(selector, ns string) (*v12.PodList, error)
GetAllPodsInNamespaceMatchingSelector mocks base method.
func (m *MockClientInterface) GetAllResourcesFromSelector(selector, ns string) ([]unstructured.Unstructured, error)
GetAllResourcesFromSelector mocks base method.
func (m *MockClientInterface) GetBindableKindStatusRestMapping(bindableKindStatuses []v1alpha10.BindableKindsStatus) ([]*meta.RESTMapping, error)
GetBindableKindStatusRestMapping mocks base method.
func (m *MockClientInterface) GetBindableKinds() (v1alpha10.BindableKinds, error)
GetBindableKinds mocks base method.
func (m *MockClientInterface) GetBindingServiceBinding(name string) (v1alpha10.ServiceBinding, error)
GetBindingServiceBinding mocks base method.
func (m *MockClientInterface) GetCSVWithCR(name string) (*v1alpha1.ClusterServiceVersion, error)
GetCSVWithCR mocks base method.
func (m *MockClientInterface) GetClient() kubernetes.Interface
GetClient mocks base method.
func (m *MockClientInterface) GetClientConfig() *rest.Config
GetClientConfig mocks base method.
func (m *MockClientInterface) GetConfig() clientcmd.ClientConfig
GetConfig mocks base method.
func (m *MockClientInterface) GetCurrentNamespace() string
GetCurrentNamespace mocks base method.
func (m *MockClientInterface) GetCurrentNamespacePolicy() (api0.Policy, error)
GetCurrentNamespacePolicy mocks base method.
func (m *MockClientInterface) GetCurrentProjectName() string
GetCurrentProjectName mocks base method.
func (m *MockClientInterface) GetCustomResourcesFromCSV(csv *v1alpha1.ClusterServiceVersion) *[]v1alpha1.CRDDescription
GetCustomResourcesFromCSV mocks base method.
func (m *MockClientInterface) GetDeploymentAPIVersion() (schema.GroupVersionKind, error)
GetDeploymentAPIVersion mocks base method.
func (m *MockClientInterface) GetDeploymentByName(name string) (*v10.Deployment, error)
GetDeploymentByName mocks base method.
func (m *MockClientInterface) GetDeploymentFromSelector(selector string) ([]v10.Deployment, error)
GetDeploymentFromSelector mocks base method.
func (m *MockClientInterface) GetDynamicClient() dynamic.Interface
GetDynamicClient mocks base method.
func (m *MockClientInterface) GetDynamicResource(gvr schema.GroupVersionResource, name string) (*unstructured.Unstructured, error)
GetDynamicResource mocks base method.
func (m *MockClientInterface) GetGVKFromGVR(gvr schema.GroupVersionResource) (schema.GroupVersionKind, error)
GetGVKFromGVR mocks base method.
func (m *MockClientInterface) GetGVRFromGVK(gvk schema.GroupVersionKind) (schema.GroupVersionResource, error)
GetGVRFromGVK mocks base method.
func (m *MockClientInterface) GetJobLogs(job *v11.Job, containerName string) (io.ReadCloser, error)
GetJobLogs mocks base method.
func (m *MockClientInterface) GetNamespace(name string) (*v12.Namespace, error)
GetNamespace mocks base method.
func (m *MockClientInterface) GetNamespaceNormal(name string) (*v12.Namespace, error)
GetNamespaceNormal mocks base method.
func (m *MockClientInterface) GetNamespaces() ([]string, error)
GetNamespaces mocks base method.
func (m *MockClientInterface) GetOCVersion() (string, error)
GetOCVersion mocks base method.
func (m *MockClientInterface) GetOneDeployment(componentName, appName string, isPartOfComponent bool) (*v10.Deployment, error)
GetOneDeployment mocks base method.
func (m *MockClientInterface) GetOneDeploymentFromSelector(selector string) (*v10.Deployment, error)
GetOneDeploymentFromSelector mocks base method.
func (m *MockClientInterface) GetOneService(componentName, appName string, isPartOfComponent bool) (*v12.Service, error)
GetOneService mocks base method.
func (m *MockClientInterface) GetOneServiceFromSelector(selector string) (*v12.Service, error)
GetOneServiceFromSelector mocks base method.
func (m *MockClientInterface) GetOperatorGVRList() ([]meta.RESTMapping, error)
GetOperatorGVRList mocks base method.
func (m *MockClientInterface) GetPVCFromName(pvcName string) (*v12.PersistentVolumeClaim, error)
GetPVCFromName mocks base method.
func (m *MockClientInterface) GetPodLogs(podName, containerName string, followLog bool) (io.ReadCloser, error)
GetPodLogs mocks base method.
func (m *MockClientInterface) GetPodUsingComponentName(componentName string) (*v12.Pod, error)
GetPodUsingComponentName mocks base method.
func (m *MockClientInterface) GetPodsMatchingSelector(selector string) (*v12.PodList, error)
GetPodsMatchingSelector mocks base method.
func (m *MockClientInterface) GetProject(projectName string) (*v1.Project, error)
GetProject mocks base method.
func (m *MockClientInterface) GetRegistryList() ([]api.Registry, error)
GetRegistryList mocks base method.
func (m *MockClientInterface) GetResourceSpecDefinition(group, version, kind string) (*spec.Schema, error)
GetResourceSpecDefinition mocks base method.
func (m *MockClientInterface) GetRestMappingFromGVK(gvk schema.GroupVersionKind) (*meta.RESTMapping, error)
GetRestMappingFromGVK mocks base method.
func (m *MockClientInterface) GetRestMappingFromUnstructured(arg0 unstructured.Unstructured) (*meta.RESTMapping, error)
GetRestMappingFromUnstructured mocks base method.
func (m *MockClientInterface) GetRunningPodFromSelector(selector string) (*v12.Pod, error)
GetRunningPodFromSelector mocks base method.
func (m *MockClientInterface) GetSecret(name, namespace string) (*v12.Secret, error)
GetSecret mocks base method.
func (m *MockClientInterface) GetServerVersion(timeout time.Duration) (*ServerInfo, error)
GetServerVersion mocks base method.
func (m *MockClientInterface) GetSpecServiceBinding(name string) (v1alpha3.ServiceBinding, error)
GetSpecServiceBinding mocks base method.
func (m *MockClientInterface) GetWorkloadKinds() ([]string, []schema.GroupVersionKind, error)
GetWorkloadKinds mocks base method.
func (m *MockClientInterface) IsCSVSupported() (bool, error)
IsCSVSupported mocks base method.
func (m *MockClientInterface) IsDeploymentExtensionsV1Beta1() (bool, error)
IsDeploymentExtensionsV1Beta1 mocks base method.
func (m *MockClientInterface) IsPodNameMatchingSelector(ctx context.Context, podname, selector string) (bool, error)
IsPodNameMatchingSelector mocks base method.
func (m *MockClientInterface) IsProjectSupported() (bool, error)
IsProjectSupported mocks base method.
func (m *MockClientInterface) IsResourceSupported(apiGroup, apiVersion, resourceName string) (bool, error)
IsResourceSupported mocks base method.
func (m *MockClientInterface) IsSSASupported() bool
IsSSASupported mocks base method.
func (m *MockClientInterface) IsServiceBindingSupported() (bool, error)
IsServiceBindingSupported mocks base method.
func (m *MockClientInterface) ListClusterServiceVersions() (*v1alpha1.ClusterServiceVersionList, error)
ListClusterServiceVersions mocks base method.
func (m *MockClientInterface) ListConfigMaps(labelSelector string) ([]v12.ConfigMap, error)
ListConfigMaps mocks base method.
func (m *MockClientInterface) ListDynamicResources(namespace string, gvr schema.GroupVersionResource, selector string) (*unstructured.UnstructuredList, error)
ListDynamicResources mocks base method.
func (m *MockClientInterface) ListIngresses(namespace, selector string) (*v13.IngressList, error)
ListIngresses mocks base method.
func (m *MockClientInterface) ListJobs(selector string) (*v11.JobList, error)
ListJobs mocks base method.
func (m *MockClientInterface) ListPVCNames(selector string) ([]string, error)
ListPVCNames mocks base method.
func (m *MockClientInterface) ListPVCs(selector string) ([]v12.PersistentVolumeClaim, error)
ListPVCs mocks base method.
func (m *MockClientInterface) ListProjectNames() ([]string, error)
ListProjectNames mocks base method.
func (m *MockClientInterface) ListSecrets(labelSelector string) ([]v12.Secret, error)
ListSecrets mocks base method.
func (m *MockClientInterface) ListServiceBindingsFromAllGroups() ([]v1alpha3.ServiceBinding, []v1alpha10.ServiceBinding, error)
ListServiceBindingsFromAllGroups mocks base method.
func (m *MockClientInterface) ListServices(selector string) ([]v12.Service, error)
ListServices mocks base method.
func (m *MockClientInterface) NewServiceBindingServiceObject(serviceNs string, unstructuredService unstructured.Unstructured, bindingName string) (v1alpha10.Service, error)
NewServiceBindingServiceObject mocks base method.
func (m *MockClientInterface) PatchDynamicResource(exampleCustomResource unstructured.Unstructured) (bool, error)
PatchDynamicResource mocks base method.
func (m *MockClientInterface) PodWarningEventWatcher(ctx context.Context) (watch.Interface, bool, error)
PodWarningEventWatcher mocks base method.
func (m *MockClientInterface) PodWatcher(ctx context.Context, selector string) (watch.Interface, error)
PodWatcher mocks base method.
func (m *MockClientInterface) Refresh() (bool, error)
Refresh mocks base method.
func (m *MockClientInterface) RunLogout(stdout io.Writer) error
RunLogout mocks base method.
func (m *MockClientInterface) SetCurrentNamespace(namespace string) error
SetCurrentNamespace mocks base method.
func (m *MockClientInterface) SetDiscoveryInterface(client discovery.DiscoveryInterface)
SetDiscoveryInterface mocks base method.
func (m *MockClientInterface) SetNamespace(ns string)
SetNamespace mocks base method.
func (m *MockClientInterface) SetupPortForwarding(pod *v12.Pod, portPairs []string, out, errOut io.Writer, stopChan chan struct{}, address string) error
SetupPortForwarding mocks base method.
func (m *MockClientInterface) TryWithBlockOwnerDeletion(ownerReference v14.OwnerReference, exec func(v14.OwnerReference) error) error
TryWithBlockOwnerDeletion mocks base method.
func (m *MockClientInterface) UpdateDeployment(deploy v10.Deployment) (*v10.Deployment, error)
UpdateDeployment mocks base method.
func (m *MockClientInterface) UpdateDynamicResource(gvr schema.GroupVersionResource, name string, u *unstructured.Unstructured) error
UpdateDynamicResource mocks base method.
func (m *MockClientInterface) UpdatePVCLabels(pvc *v12.PersistentVolumeClaim, labels map[string]string) error
UpdatePVCLabels mocks base method.
func (m *MockClientInterface) UpdateSecret(secret *v12.Secret, namespace string) (*v12.Secret, error)
UpdateSecret mocks base method.
func (m *MockClientInterface) UpdateService(svc v12.Service) (*v12.Service, error)
UpdateService mocks base method.
func (m *MockClientInterface) UpdateStorageOwnerReference(pvc *v12.PersistentVolumeClaim, ownerReference ...v14.OwnerReference) error
UpdateStorageOwnerReference mocks base method.
func (m *MockClientInterface) WaitAndGetSecret(name, namespace string) (*v12.Secret, error)
WaitAndGetSecret mocks base method.
func (m *MockClientInterface) WaitForJobToComplete(job *v11.Job) (*v11.Job, error)
WaitForJobToComplete mocks base method.
func (m *MockClientInterface) WaitForServiceAccountInNamespace(namespace, serviceAccountName string) error
WaitForServiceAccountInNamespace mocks base method.
MockClientInterfaceMockRecorder is the mock recorder for MockClientInterface.
type MockClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
func (mr *MockClientInterfaceMockRecorder) ApplyDeployment(deploy interface{}) *gomock.Call
ApplyDeployment indicates an expected call of ApplyDeployment.
func (mr *MockClientInterfaceMockRecorder) CreateDeployment(deploy interface{}) *gomock.Call
CreateDeployment indicates an expected call of CreateDeployment.
func (mr *MockClientInterfaceMockRecorder) CreateJob(job, namespace interface{}) *gomock.Call
CreateJob indicates an expected call of CreateJob.
func (mr *MockClientInterfaceMockRecorder) CreateNamespace(name interface{}) *gomock.Call
CreateNamespace indicates an expected call of CreateNamespace.
func (mr *MockClientInterfaceMockRecorder) CreateNewProject(projectName, wait interface{}) *gomock.Call
CreateNewProject indicates an expected call of CreateNewProject.
func (mr *MockClientInterfaceMockRecorder) CreatePVC(pvc interface{}) *gomock.Call
CreatePVC indicates an expected call of CreatePVC.
func (mr *MockClientInterfaceMockRecorder) CreateSecret(objectMeta, data, ownerReference interface{}) *gomock.Call
CreateSecret indicates an expected call of CreateSecret.
func (mr *MockClientInterfaceMockRecorder) CreateSecrets(componentName, commonObjectMeta, svc, ownerReference interface{}) *gomock.Call
CreateSecrets indicates an expected call of CreateSecrets.
func (mr *MockClientInterfaceMockRecorder) CreateService(svc interface{}) *gomock.Call
CreateService indicates an expected call of CreateService.
func (mr *MockClientInterfaceMockRecorder) CreateTLSSecret(tlsCertificate, tlsPrivKey, objectMeta interface{}) *gomock.Call
CreateTLSSecret indicates an expected call of CreateTLSSecret.
func (mr *MockClientInterfaceMockRecorder) DeleteDynamicResource(name, gvr, wait interface{}) *gomock.Call
DeleteDynamicResource indicates an expected call of DeleteDynamicResource.
func (mr *MockClientInterfaceMockRecorder) DeleteJob(jobName interface{}) *gomock.Call
DeleteJob indicates an expected call of DeleteJob.
func (mr *MockClientInterfaceMockRecorder) DeleteNamespace(name, wait interface{}) *gomock.Call
DeleteNamespace indicates an expected call of DeleteNamespace.
func (mr *MockClientInterfaceMockRecorder) DeletePVC(pvcName interface{}) *gomock.Call
DeletePVC indicates an expected call of DeletePVC.
func (mr *MockClientInterfaceMockRecorder) DeleteProject(name, wait interface{}) *gomock.Call
DeleteProject indicates an expected call of DeleteProject.
func (mr *MockClientInterfaceMockRecorder) DeleteSecret(secretName, namespace interface{}) *gomock.Call
DeleteSecret indicates an expected call of DeleteSecret.
func (mr *MockClientInterfaceMockRecorder) DeleteService(serviceName interface{}) *gomock.Call
DeleteService indicates an expected call of DeleteService.
func (mr *MockClientInterfaceMockRecorder) DeploymentWatcher(ctx, selector interface{}) *gomock.Call
DeploymentWatcher indicates an expected call of DeploymentWatcher.
func (mr *MockClientInterfaceMockRecorder) ExecCMDInContainer(ctx, containerName, podName, cmd, stdout, stderr, stdin, tty interface{}) *gomock.Call
ExecCMDInContainer indicates an expected call of ExecCMDInContainer.
func (mr *MockClientInterfaceMockRecorder) GeneratePortForwardReq(podName interface{}) *gomock.Call
GeneratePortForwardReq indicates an expected call of GeneratePortForwardReq.
func (mr *MockClientInterfaceMockRecorder) GetAllPodsInNamespaceMatchingSelector(selector, ns interface{}) *gomock.Call
GetAllPodsInNamespaceMatchingSelector indicates an expected call of GetAllPodsInNamespaceMatchingSelector.
func (mr *MockClientInterfaceMockRecorder) GetAllResourcesFromSelector(selector, ns interface{}) *gomock.Call
GetAllResourcesFromSelector indicates an expected call of GetAllResourcesFromSelector.
func (mr *MockClientInterfaceMockRecorder) GetBindableKindStatusRestMapping(bindableKindStatuses interface{}) *gomock.Call
GetBindableKindStatusRestMapping indicates an expected call of GetBindableKindStatusRestMapping.
func (mr *MockClientInterfaceMockRecorder) GetBindableKinds() *gomock.Call
GetBindableKinds indicates an expected call of GetBindableKinds.
func (mr *MockClientInterfaceMockRecorder) GetBindingServiceBinding(name interface{}) *gomock.Call
GetBindingServiceBinding indicates an expected call of GetBindingServiceBinding.
func (mr *MockClientInterfaceMockRecorder) GetCSVWithCR(name interface{}) *gomock.Call
GetCSVWithCR indicates an expected call of GetCSVWithCR.
func (mr *MockClientInterfaceMockRecorder) GetClient() *gomock.Call
GetClient indicates an expected call of GetClient.
func (mr *MockClientInterfaceMockRecorder) GetClientConfig() *gomock.Call
GetClientConfig indicates an expected call of GetClientConfig.
func (mr *MockClientInterfaceMockRecorder) GetConfig() *gomock.Call
GetConfig indicates an expected call of GetConfig.
func (mr *MockClientInterfaceMockRecorder) GetCurrentNamespace() *gomock.Call
GetCurrentNamespace indicates an expected call of GetCurrentNamespace.
func (mr *MockClientInterfaceMockRecorder) GetCurrentNamespacePolicy() *gomock.Call
GetCurrentNamespacePolicy indicates an expected call of GetCurrentNamespacePolicy.
func (mr *MockClientInterfaceMockRecorder) GetCurrentProjectName() *gomock.Call
GetCurrentProjectName indicates an expected call of GetCurrentProjectName.
func (mr *MockClientInterfaceMockRecorder) GetCustomResourcesFromCSV(csv interface{}) *gomock.Call
GetCustomResourcesFromCSV indicates an expected call of GetCustomResourcesFromCSV.
func (mr *MockClientInterfaceMockRecorder) GetDeploymentAPIVersion() *gomock.Call
GetDeploymentAPIVersion indicates an expected call of GetDeploymentAPIVersion.
func (mr *MockClientInterfaceMockRecorder) GetDeploymentByName(name interface{}) *gomock.Call
GetDeploymentByName indicates an expected call of GetDeploymentByName.
func (mr *MockClientInterfaceMockRecorder) GetDeploymentFromSelector(selector interface{}) *gomock.Call
GetDeploymentFromSelector indicates an expected call of GetDeploymentFromSelector.
func (mr *MockClientInterfaceMockRecorder) GetDynamicClient() *gomock.Call
GetDynamicClient indicates an expected call of GetDynamicClient.
func (mr *MockClientInterfaceMockRecorder) GetDynamicResource(gvr, name interface{}) *gomock.Call
GetDynamicResource indicates an expected call of GetDynamicResource.
func (mr *MockClientInterfaceMockRecorder) GetGVKFromGVR(gvr interface{}) *gomock.Call
GetGVKFromGVR indicates an expected call of GetGVKFromGVR.
func (mr *MockClientInterfaceMockRecorder) GetGVRFromGVK(gvk interface{}) *gomock.Call
GetGVRFromGVK indicates an expected call of GetGVRFromGVK.
func (mr *MockClientInterfaceMockRecorder) GetJobLogs(job, containerName interface{}) *gomock.Call
GetJobLogs indicates an expected call of GetJobLogs.
func (mr *MockClientInterfaceMockRecorder) GetNamespace(name interface{}) *gomock.Call
GetNamespace indicates an expected call of GetNamespace.
func (mr *MockClientInterfaceMockRecorder) GetNamespaceNormal(name interface{}) *gomock.Call
GetNamespaceNormal indicates an expected call of GetNamespaceNormal.
func (mr *MockClientInterfaceMockRecorder) GetNamespaces() *gomock.Call
GetNamespaces indicates an expected call of GetNamespaces.
func (mr *MockClientInterfaceMockRecorder) GetOCVersion() *gomock.Call
GetOCVersion indicates an expected call of GetOCVersion.
func (mr *MockClientInterfaceMockRecorder) GetOneDeployment(componentName, appName, isPartOfComponent interface{}) *gomock.Call
GetOneDeployment indicates an expected call of GetOneDeployment.
func (mr *MockClientInterfaceMockRecorder) GetOneDeploymentFromSelector(selector interface{}) *gomock.Call
GetOneDeploymentFromSelector indicates an expected call of GetOneDeploymentFromSelector.
func (mr *MockClientInterfaceMockRecorder) GetOneService(componentName, appName, isPartOfComponent interface{}) *gomock.Call
GetOneService indicates an expected call of GetOneService.
func (mr *MockClientInterfaceMockRecorder) GetOneServiceFromSelector(selector interface{}) *gomock.Call
GetOneServiceFromSelector indicates an expected call of GetOneServiceFromSelector.
func (mr *MockClientInterfaceMockRecorder) GetOperatorGVRList() *gomock.Call
GetOperatorGVRList indicates an expected call of GetOperatorGVRList.
func (mr *MockClientInterfaceMockRecorder) GetPVCFromName(pvcName interface{}) *gomock.Call
GetPVCFromName indicates an expected call of GetPVCFromName.
func (mr *MockClientInterfaceMockRecorder) GetPodLogs(podName, containerName, followLog interface{}) *gomock.Call
GetPodLogs indicates an expected call of GetPodLogs.
func (mr *MockClientInterfaceMockRecorder) GetPodUsingComponentName(componentName interface{}) *gomock.Call
GetPodUsingComponentName indicates an expected call of GetPodUsingComponentName.
func (mr *MockClientInterfaceMockRecorder) GetPodsMatchingSelector(selector interface{}) *gomock.Call
GetPodsMatchingSelector indicates an expected call of GetPodsMatchingSelector.
func (mr *MockClientInterfaceMockRecorder) GetProject(projectName interface{}) *gomock.Call
GetProject indicates an expected call of GetProject.
func (mr *MockClientInterfaceMockRecorder) GetRegistryList() *gomock.Call
GetRegistryList indicates an expected call of GetRegistryList.
func (mr *MockClientInterfaceMockRecorder) GetResourceSpecDefinition(group, version, kind interface{}) *gomock.Call
GetResourceSpecDefinition indicates an expected call of GetResourceSpecDefinition.
func (mr *MockClientInterfaceMockRecorder) GetRestMappingFromGVK(gvk interface{}) *gomock.Call
GetRestMappingFromGVK indicates an expected call of GetRestMappingFromGVK.
func (mr *MockClientInterfaceMockRecorder) GetRestMappingFromUnstructured(arg0 interface{}) *gomock.Call
GetRestMappingFromUnstructured indicates an expected call of GetRestMappingFromUnstructured.
func (mr *MockClientInterfaceMockRecorder) GetRunningPodFromSelector(selector interface{}) *gomock.Call
GetRunningPodFromSelector indicates an expected call of GetRunningPodFromSelector.
func (mr *MockClientInterfaceMockRecorder) GetSecret(name, namespace interface{}) *gomock.Call
GetSecret indicates an expected call of GetSecret.
func (mr *MockClientInterfaceMockRecorder) GetServerVersion(timeout interface{}) *gomock.Call
GetServerVersion indicates an expected call of GetServerVersion.
func (mr *MockClientInterfaceMockRecorder) GetSpecServiceBinding(name interface{}) *gomock.Call
GetSpecServiceBinding indicates an expected call of GetSpecServiceBinding.
func (mr *MockClientInterfaceMockRecorder) GetWorkloadKinds() *gomock.Call
GetWorkloadKinds indicates an expected call of GetWorkloadKinds.
func (mr *MockClientInterfaceMockRecorder) IsCSVSupported() *gomock.Call
IsCSVSupported indicates an expected call of IsCSVSupported.
func (mr *MockClientInterfaceMockRecorder) IsDeploymentExtensionsV1Beta1() *gomock.Call
IsDeploymentExtensionsV1Beta1 indicates an expected call of IsDeploymentExtensionsV1Beta1.
func (mr *MockClientInterfaceMockRecorder) IsPodNameMatchingSelector(ctx, podname, selector interface{}) *gomock.Call
IsPodNameMatchingSelector indicates an expected call of IsPodNameMatchingSelector.
func (mr *MockClientInterfaceMockRecorder) IsProjectSupported() *gomock.Call
IsProjectSupported indicates an expected call of IsProjectSupported.
func (mr *MockClientInterfaceMockRecorder) IsResourceSupported(apiGroup, apiVersion, resourceName interface{}) *gomock.Call
IsResourceSupported indicates an expected call of IsResourceSupported.
func (mr *MockClientInterfaceMockRecorder) IsSSASupported() *gomock.Call
IsSSASupported indicates an expected call of IsSSASupported.
func (mr *MockClientInterfaceMockRecorder) IsServiceBindingSupported() *gomock.Call
IsServiceBindingSupported indicates an expected call of IsServiceBindingSupported.
func (mr *MockClientInterfaceMockRecorder) ListClusterServiceVersions() *gomock.Call
ListClusterServiceVersions indicates an expected call of ListClusterServiceVersions.
func (mr *MockClientInterfaceMockRecorder) ListConfigMaps(labelSelector interface{}) *gomock.Call
ListConfigMaps indicates an expected call of ListConfigMaps.
func (mr *MockClientInterfaceMockRecorder) ListDynamicResources(namespace, gvr, selector interface{}) *gomock.Call
ListDynamicResources indicates an expected call of ListDynamicResources.
func (mr *MockClientInterfaceMockRecorder) ListIngresses(namespace, selector interface{}) *gomock.Call
ListIngresses indicates an expected call of ListIngresses.
func (mr *MockClientInterfaceMockRecorder) ListJobs(selector interface{}) *gomock.Call
ListJobs indicates an expected call of ListJobs.
func (mr *MockClientInterfaceMockRecorder) ListPVCNames(selector interface{}) *gomock.Call
ListPVCNames indicates an expected call of ListPVCNames.
func (mr *MockClientInterfaceMockRecorder) ListPVCs(selector interface{}) *gomock.Call
ListPVCs indicates an expected call of ListPVCs.
func (mr *MockClientInterfaceMockRecorder) ListProjectNames() *gomock.Call
ListProjectNames indicates an expected call of ListProjectNames.
func (mr *MockClientInterfaceMockRecorder) ListSecrets(labelSelector interface{}) *gomock.Call
ListSecrets indicates an expected call of ListSecrets.
func (mr *MockClientInterfaceMockRecorder) ListServiceBindingsFromAllGroups() *gomock.Call
ListServiceBindingsFromAllGroups indicates an expected call of ListServiceBindingsFromAllGroups.
func (mr *MockClientInterfaceMockRecorder) ListServices(selector interface{}) *gomock.Call
ListServices indicates an expected call of ListServices.
func (mr *MockClientInterfaceMockRecorder) NewServiceBindingServiceObject(serviceNs, unstructuredService, bindingName interface{}) *gomock.Call
NewServiceBindingServiceObject indicates an expected call of NewServiceBindingServiceObject.
func (mr *MockClientInterfaceMockRecorder) PatchDynamicResource(exampleCustomResource interface{}) *gomock.Call
PatchDynamicResource indicates an expected call of PatchDynamicResource.
func (mr *MockClientInterfaceMockRecorder) PodWarningEventWatcher(ctx interface{}) *gomock.Call
PodWarningEventWatcher indicates an expected call of PodWarningEventWatcher.
func (mr *MockClientInterfaceMockRecorder) PodWatcher(ctx, selector interface{}) *gomock.Call
PodWatcher indicates an expected call of PodWatcher.
func (mr *MockClientInterfaceMockRecorder) Refresh() *gomock.Call
Refresh indicates an expected call of Refresh.
func (mr *MockClientInterfaceMockRecorder) RunLogout(stdout interface{}) *gomock.Call
RunLogout indicates an expected call of RunLogout.
func (mr *MockClientInterfaceMockRecorder) SetCurrentNamespace(namespace interface{}) *gomock.Call
SetCurrentNamespace indicates an expected call of SetCurrentNamespace.
func (mr *MockClientInterfaceMockRecorder) SetDiscoveryInterface(client interface{}) *gomock.Call
SetDiscoveryInterface indicates an expected call of SetDiscoveryInterface.
func (mr *MockClientInterfaceMockRecorder) SetNamespace(ns interface{}) *gomock.Call
SetNamespace indicates an expected call of SetNamespace.
func (mr *MockClientInterfaceMockRecorder) SetupPortForwarding(pod, portPairs, out, errOut, stopChan, address interface{}) *gomock.Call
SetupPortForwarding indicates an expected call of SetupPortForwarding.
func (mr *MockClientInterfaceMockRecorder) TryWithBlockOwnerDeletion(ownerReference, exec interface{}) *gomock.Call
TryWithBlockOwnerDeletion indicates an expected call of TryWithBlockOwnerDeletion.
func (mr *MockClientInterfaceMockRecorder) UpdateDeployment(deploy interface{}) *gomock.Call
UpdateDeployment indicates an expected call of UpdateDeployment.
func (mr *MockClientInterfaceMockRecorder) UpdateDynamicResource(gvr, name, u interface{}) *gomock.Call
UpdateDynamicResource indicates an expected call of UpdateDynamicResource.
func (mr *MockClientInterfaceMockRecorder) UpdatePVCLabels(pvc, labels interface{}) *gomock.Call
UpdatePVCLabels indicates an expected call of UpdatePVCLabels.
func (mr *MockClientInterfaceMockRecorder) UpdateSecret(secret, namespace interface{}) *gomock.Call
UpdateSecret indicates an expected call of UpdateSecret.
func (mr *MockClientInterfaceMockRecorder) UpdateService(svc interface{}) *gomock.Call
UpdateService indicates an expected call of UpdateService.
func (mr *MockClientInterfaceMockRecorder) UpdateStorageOwnerReference(pvc interface{}, ownerReference ...interface{}) *gomock.Call
UpdateStorageOwnerReference indicates an expected call of UpdateStorageOwnerReference.
func (mr *MockClientInterfaceMockRecorder) WaitAndGetSecret(name, namespace interface{}) *gomock.Call
WaitAndGetSecret indicates an expected call of WaitAndGetSecret.
func (mr *MockClientInterfaceMockRecorder) WaitForJobToComplete(job interface{}) *gomock.Call
WaitForJobToComplete indicates an expected call of WaitForJobToComplete.
func (mr *MockClientInterfaceMockRecorder) WaitForServiceAccountInNamespace(namespace, serviceAccountName interface{}) *gomock.Call
WaitForServiceAccountInNamespace indicates an expected call of WaitForServiceAccountInNamespace.
type NoConnectionError struct{}
func NewNoConnectionError() NoConnectionError
func (e NoConnectionError) Error() string
type NoOpWatch struct{}
func (o NoOpWatch) ResultChan() <-chan watch.Event
func (o NoOpWatch) Stop()
SelfSignedCertificate struct is the return type of function GenerateSelfSignedCertificate CertPem is the byte array for certificate pem encode KeyPem is the byte array for key pem encode
type SelfSignedCertificate struct { CertPem []byte KeyPem []byte }
func GenerateSelfSignedCertificate(host string) (SelfSignedCertificate, error)
GenerateSelfSignedCertificate creates a self-signed SSl certificate
ServerInfo contains the fields that contain the server's information like address, OpenShift and Kubernetes versions
type ServerInfo struct { Address string OpenShiftVersion string KubernetesVersion string }
ServiceNotFoundError returns an error if no service is found with the selector
type ServiceNotFoundError struct { Selector string }
func (e *ServiceNotFoundError) Error() string