client

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Kubernetes    kubernetespkg.Interface
	APIExtensions apiextensionspkg.Interface
	Turandot      turandotpkg.Interface
	REST          restpkg.Interface
	CertManager   certmanagerpkg.Interface
	Config        *restpkg.Config
	Reposure      *reposureclient.Client

	ClusterMode       bool
	ClusterRole       string
	Namespace         string
	NamePrefix        string
	PartOf            string
	ManagedBy         string
	OperatorImageName string
	CachePath         string

	Context contextpkg.Context
	Log     logging.Logger
}

func NewClient

func NewClient(kubernetes kubernetespkg.Interface, apiExtensions apiextensionspkg.Interface, turandot turandotpkg.Interface, reposure reposurepkg.Interface, rest restpkg.Interface, config *restpkg.Config, context contextpkg.Context, clusterMode bool, clusterRole string, namespace string, namePrefix string, partOf string, managedBy string, operatorImageName string, cachePath string, logName string) *Client

func (*Client) CreateCertificate added in v0.4.0

func (self *Client) CreateCertificate(certificate *certmanager.Certificate) (*certmanager.Certificate, error)

func (*Client) CreateCertificateIssuer added in v0.4.0

func (self *Client) CreateCertificateIssuer(issuer *certmanager.Issuer) (*certmanager.Issuer, error)

func (*Client) CreateClusterRoleBinding added in v0.4.0

func (self *Client) CreateClusterRoleBinding(clusterRoleBinding *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error)

func (*Client) CreateCustomResourceDefinition added in v0.4.0

func (self *Client) CreateCustomResourceDefinition(customResourceDefinition *apiextensions.CustomResourceDefinition) (*apiextensions.CustomResourceDefinition, error)

func (*Client) CreateDeployment added in v0.4.0

func (self *Client) CreateDeployment(deployment *apps.Deployment) (*apps.Deployment, error)

func (*Client) CreateNamespace added in v0.4.0

func (self *Client) CreateNamespace(namespace *core.Namespace) (*core.Namespace, error)

func (*Client) CreatePod added in v0.4.0

func (self *Client) CreatePod(pod *core.Pod) (*core.Pod, error)

func (*Client) CreateRole added in v0.4.0

func (self *Client) CreateRole(role *rbac.Role) (*rbac.Role, error)

func (*Client) CreateRoleBinding added in v0.4.0

func (self *Client) CreateRoleBinding(roleBinding *rbac.RoleBinding) (*rbac.RoleBinding, error)

func (*Client) CreateService added in v0.3.0

func (self *Client) CreateService(service *core.Service) (*core.Service, error)

func (*Client) CreateServiceAccount added in v0.4.0

func (self *Client) CreateServiceAccount(serviceAccount *core.ServiceAccount) (*core.ServiceAccount, error)

func (*Client) CreateServiceDirect added in v0.4.0

func (self *Client) CreateServiceDirect(namespace string, serviceName string, url urlpkg.URL, tlsSecretName string, authSecretName string, inputs map[string]interface{}, mode string) (*resources.Service, error)

func (*Client) CreateServiceFromContent added in v0.3.0

func (self *Client) CreateServiceFromContent(namespace string, serviceName string, registry *reposure.Registry, url urlpkg.URL, inputs map[string]interface{}, mode string) (*resources.Service, error)

func (*Client) CreateServiceFromTemplate added in v0.3.0

func (self *Client) CreateServiceFromTemplate(namespace string, serviceName string, registry *reposure.Registry, serviceTemplateName string, inputs map[string]interface{}, mode string) (*resources.Service, error)

func (*Client) CreateServiceFromURL added in v0.3.0

func (self *Client) CreateServiceFromURL(namespace string, serviceName string, url string, inputs map[string]interface{}, mode string, urlContext *urlpkg.Context) (*resources.Service, error)

func (*Client) CreateServiceIndirect added in v0.4.0

func (self *Client) CreateServiceIndirect(namespace string, serviceName string, registryName string, imageName string, inputs map[string]interface{}, mode string) (*resources.Service, error)

func (*Client) DeleteDelegate added in v0.4.0

func (self *Client) DeleteDelegate(name string) error

func (*Client) DeleteService

func (self *Client) DeleteService(namespace string, serviceName string) error

func (*Client) Exec

func (self *Client) Exec(namespace string, podName string, containerName string, stdin io.Reader, stdout io.Writer, command ...string) error

func (*Client) GetCertManager added in v0.4.0

func (self *Client) GetCertManager() error

func (*Client) GetOperatorServiceAccount added in v0.4.0

func (self *Client) GetOperatorServiceAccount() (*core.ServiceAccount, error)

func (*Client) GetRegistryServiceTemplateURL added in v0.4.0

func (self *Client) GetRegistryServiceTemplateURL(registry *reposure.Registry, serviceTemplateName string) (string, error)

func (*Client) GetRegistryURLForCSAR added in v0.4.0

func (self *Client) GetRegistryURLForCSAR(registry *reposure.Registry, artifactName string) (string, error)

func (*Client) GetSecret added in v0.4.0

func (self *Client) GetSecret(namespace string, secretName string) (*core.Secret, error)

func (*Client) GetSecretTLSCertPool added in v0.4.0

func (self *Client) GetSecretTLSCertPool(namespace string, secretName string, secretDataKey string) (*x509.CertPool, error)

func (*Client) GetService

func (self *Client) GetService(namespace string, serviceName string) (*resources.Service, error)

func (*Client) GetServiceClout added in v0.4.0

func (self *Client) GetServiceClout(namespace string, serviceName string) (string, error)

func (*Client) GetServiceRegistry added in v0.4.0

func (self *Client) GetServiceRegistry(service *resources.Service) (*reposure.Registry, error)

func (*Client) GetServiceTemplateURL added in v0.4.0

func (self *Client) GetServiceTemplateURL(service *resources.Service) (string, error)

func (*Client) GetSourceRegistryHost added in v0.4.0

func (self *Client) GetSourceRegistryHost(registryHost string) (string, error)

func (*Client) InstallOperator added in v0.4.0

func (self *Client) InstallOperator(site string, sourceRegistryHost string, wait bool) error

func (*Client) Labels added in v0.4.0

func (self *Client) Labels(appName string, component string, namespace string) map[string]string

func (*Client) ListDelegates added in v0.4.0

func (self *Client) ListDelegates() ([]string, error)

func (*Client) ListServices

func (self *Client) ListServices() (*resources.ServiceList, error)

func (*Client) ListServicesForImageName added in v0.4.0

func (self *Client) ListServicesForImageName(registryName string, imageName string, urlContext *urlpkg.Context) ([]string, error)

func (*Client) RegistryImageNameForServiceTemplateName added in v0.4.0

func (self *Client) RegistryImageNameForServiceTemplateName(serviceTemplateName string) string

func (*Client) ServiceTemplateNameForRegistryImageName added in v0.4.0

func (self *Client) ServiceTemplateNameForRegistryImageName(artifactName string) (string, bool)

func (*Client) SetDelegate added in v0.4.0

func (self *Client) SetDelegate(name string, kubeconfigPath string, context string, namespace string) error

func (*Client) UninstallOperator added in v0.4.0

func (self *Client) UninstallOperator(wait bool)

func (*Client) UpdateServiceMode added in v0.3.0

func (self *Client) UpdateServiceMode(service *resources.Service, mode string) (*resources.Service, error)

func (*Client) UpdateServiceSpec added in v0.3.0

func (self *Client) UpdateServiceSpec(service *resources.Service) (*resources.Service, error)

func (*Client) UpdateServiceStatus added in v0.3.0

func (self *Client) UpdateServiceStatus(service *resources.Service) (*resources.Service, error)

func (*Client) UpdateServiceURLContext added in v0.4.0

func (self *Client) UpdateServiceURLContext(service *resources.Service, urlContext *urlpkg.Context) error

func (*Client) VolumeSource added in v0.4.0

func (self *Client) VolumeSource(size string) core.VolumeSource

func (*Client) WaitForDeletion added in v0.4.0

func (self *Client) WaitForDeletion(name string, condition func() bool)

func (*Client) WaitForDeployment added in v0.4.0

func (self *Client) WaitForDeployment(namespace string, appName string) (*apps.Deployment, error)

func (*Client) WaitForPod added in v0.4.0

func (self *Client) WaitForPod(namespace string, appName string) (*core.Pod, error)

func (*Client) WriteToContainer

func (self *Client) WriteToContainer(namespace string, podName string, containerName string, reader io.Reader, targetPath string, permissions *int64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL