action

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckInstall

type CheckInstall struct {
	StatikFS http.FileSystem
	// Use verbose mode
	Verbose bool
	// contains filtered or unexported fields
}

CheckInstall is the action for check SiteWhere installation

func NewCheckInstall

func NewCheckInstall(cfg *Configuration) *CheckInstall

NewCheckInstall constructs a new *Install

func (*CheckInstall) Run

Run executes the list command, returning a set of matches.

type Configuration

type Configuration struct {
	// RESTClientGetter is an interface that loads Kubernetes clients.
	RESTClientGetter RESTClientGetter

	// KubeClient is a Kubernetes API client.
	KubeClient kube.Interface

	Log func(string, ...interface{})
}

Configuration injects the dependencies that all actions share.

func (*Configuration) ControllerClient added in v0.2.3

func (c *Configuration) ControllerClient() (client.Client, error)

ControllerClient creates a new controller client

func (*Configuration) Init

func (c *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace string, log DebugLog) error

Init initializes the action configuration

func (*Configuration) KubernetesAPIExtensionClientSet

func (c *Configuration) KubernetesAPIExtensionClientSet() (clientset.Interface, error)

KubernetesAPIExtensionClientSet create a new kubernetes API Extension Clientset

func (*Configuration) KubernetesClientSet

func (c *Configuration) KubernetesClientSet() (kubernetes.Interface, error)

KubernetesClientSet creates a new kubernetes ClientSet based on the configuration

func (*Configuration) KubernetesDynamicClientSet

func (c *Configuration) KubernetesDynamicClientSet() (dynamic.Interface, error)

KubernetesDynamicClientSet create a new kubernetes API Extension Clientset

type CreateInstance

type CreateInstance struct {

	// Name of the instance
	InstanceName string
	// Name of the tenant
	TenantName string
	// Namespace to use
	Namespace string
	// IstioInject if true, label namespace for instio inject
	IstioInject bool
	// Minimal use minimal profile. Initialize only essential microservices.
	Minimal bool
	// Number of replicas
	Replicas int32
	// Docker image tag
	Tag string
	// Use debug mode
	Debug bool
	// Configuration Template
	ConfigurationTemplate string
	// Dataset template
	DatasetTemplate string
	// contains filtered or unexported fields
}

CreateInstance is the action for creating a SiteWhere instance

func NewCreateInstance

func NewCreateInstance(cfg *Configuration) *CreateInstance

NewCreateInstance constructs a new *Install

func (*CreateInstance) ExtractInstanceName

func (i *CreateInstance) ExtractInstanceName(args []string) (string, error)

ExtractInstanceName returns the name of the instance that should be used.

func (*CreateInstance) Run

Run executes the list command, returning a set of matches.

type CreateTenant added in v0.2.3

type CreateTenant struct {

	// Name of the instance
	InstanceName string
	// Name of the tenant
	TenantName string
	// AuthenticationToken is the token used for authenticating the tenant
	AuthenticationToken string
	// Authorized are the IDs of the users that are authorized to use the tenant
	AuthorizedUserIds []string
	// ConfigurationTemplate is the configuration template used for the tenant
	ConfigurationTemplate string
	// DatasetTemplate is the dataset template used for the tenant
	DatasetTemplate string
	// contains filtered or unexported fields
}

CreateTenant is the action for creating a SiteWhere tenant

func NewCreateTenant added in v0.2.3

func NewCreateTenant(cfg *Configuration) *CreateTenant

NewCreateTenant constructs a new *Install

func (*CreateTenant) ExtractTenantName added in v0.2.3

func (i *CreateTenant) ExtractTenantName(args []string) (string, error)

ExtractTenantName returns the name of the instance that should be used.

func (*CreateTenant) Run added in v0.2.3

Run executes the list command, returning a set of matches.

type DebugLog

type DebugLog func(format string, v ...interface{})

DebugLog sets the logger that writes debug strings

type DeleteInstance

type DeleteInstance struct {

	// Name of the instance
	InstanceName string
	// Purge Instance data
	Purge bool
	// contains filtered or unexported fields
}

DeleteInstance is the action for creating a SiteWhere instance

func NewDeleteInstance

func NewDeleteInstance(cfg *Configuration) *DeleteInstance

NewDeleteInstance constructs a new *Install

func (*DeleteInstance) ExtractInstanceName

func (i *DeleteInstance) ExtractInstanceName(args []string) (string, error)

ExtractInstanceName returns the name of the instance that should be used.

func (*DeleteInstance) Run

Run executes the list command, returning a set of matches.

type Install

type Install struct {
	StatikFS http.FileSystem
	// SkipCRD indicates if we need to install SiteWhere Custom Resource Definitions
	SkipCRD bool
	// SkipTemplate indicates if we need to install SiteWhere templates
	SkipTemplate bool
	// SkipOperator indicates if we need to install SiteWhere Operator
	SkipOperator bool
	// SkipInfrastructure indicates if we need to install SiteWhere Infrastructure
	SkipInfrastructure bool
	// Minimal installation only install escential SiteWhere components
	Minimal bool
	// Wait for components to be ready before return control.
	WaitReady bool
	// Use verbose mode
	Verbose bool
	// contains filtered or unexported fields
}

Install is the action for installing SiteWhere

func NewInstall

func NewInstall(cfg *Configuration) *Install

NewInstall constructs a new *Install

func (*Install) InstallCRDs added in v0.2.3

func (i *Install) InstallCRDs() ([]status.SiteWhereStatus, error)

InstallCRDs Install SiteWhere Custom Resource Definitions

func (*Install) InstallInfrastructure added in v0.2.3

func (i *Install) InstallInfrastructure() ([]status.SiteWhereStatus, error)

InstallInfrastructure Install SiteWhere infrastructure

func (*Install) InstallOperator added in v0.2.3

func (i *Install) InstallOperator() ([]status.SiteWhereStatus, error)

InstallOperator Install SiteWhere Operator resource file in the cluster

func (*Install) InstallTemplates added in v0.2.3

func (i *Install) InstallTemplates() ([]status.SiteWhereStatus, error)

InstallTemplates Install SiteWhere Templates CRD

func (*Install) Run

func (i *Install) Run() (*install.SiteWhereInstall, error)

Run executes the install command, returning the result of the installation

type Instances

type Instances struct {
	// contains filtered or unexported fields
}

Instances is the action for listing SiteWhere instances

func NewInstances

func NewInstances(cfg *Configuration) *Instances

NewInstances constructs a new *Instances

func (*Instances) Run

Run executes the install command, returning the result of the installation

type RESTClientGetter

type RESTClientGetter interface {
	ToRESTConfig() (*rest.Config, error)
	ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
	ToRESTMapper() (meta.RESTMapper, error)
}

RESTClientGetter gets the rest client

type Uninstall

type Uninstall struct {

	// CRD indicates if we need to uninstall SiteWhere Custom Resource Definitions
	CRD bool
	// Infrastructure indicates if we need to install SiteWhere Infrastructure
	Infrastructure bool
	// Operator indicates if we need to install SiteWhere Operator
	Operator bool
	// Template indicates if we need to install SiteWhere templates
	Template bool
	StatikFS http.FileSystem

	// Minimal installation only install escential SiteWhere components.
	Minimal bool
	// Use verbose mode
	Verbose bool
	// Purge data
	Purge bool
	// contains filtered or unexported fields
}

Uninstall is the action for installing SiteWhere

func NewUninstall

func NewUninstall(cfg *Configuration) *Uninstall

NewUninstall constructs a new *Uninstall

func (*Uninstall) Run

Run executes the uninstall command, returning the result of the uninstallation

func (*Uninstall) UninstallCRDs added in v0.2.3

func (i *Uninstall) UninstallCRDs() ([]status.SiteWhereStatus, error)

UninstallCRDs Uninstall SiteWhere Custom Resource Definitions

func (*Uninstall) UninstallInfrastructure added in v0.2.3

func (i *Uninstall) UninstallInfrastructure() ([]status.SiteWhereStatus, error)

UninstallInfrastructure Uninstall SiteWhere infrastructure

func (*Uninstall) UninstallOperator added in v0.2.3

func (i *Uninstall) UninstallOperator() ([]status.SiteWhereStatus, error)

UninstallOperator Uninstall SiteWhere Operator resource file in the cluster

func (*Uninstall) UninstallTemplates added in v0.2.3

func (i *Uninstall) UninstallTemplates() ([]status.SiteWhereStatus, error)

UninstallTemplates Uninstall SiteWhere Templates CRD

Jump to

Keyboard shortcuts

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