services

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Only Helmcharts with this label are considered Epinio "Services".
	// Used to filter out Helmcharts created by other means (manually, k3s etc).
	CatalogServiceLabelKey        = "application.epinio.io/catalog-service-name"
	CatalogServiceVersionLabelKey = "application.epinio.io/catalog-service-version"
	TargetNamespaceLabelKey       = "application.epinio.io/target-namespace"
	// ServiceNameLabelKey is used to keep the original name
	// since the name in the metadata is combined with the namespace
	ServiceNameLabelKey = "application.epinio.io/service-name"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceClient added in v0.6.2

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

func NewKubernetesServiceClient added in v0.6.2

func NewKubernetesServiceClient(kubeClient *kubernetes.Cluster) (*ServiceClient, error)

func (*ServiceClient) Create added in v0.6.3

func (s *ServiceClient) Create(ctx context.Context, namespace, name string, catalogService models.CatalogService) error

func (*ServiceClient) Delete added in v0.7.0

func (s *ServiceClient) Delete(ctx context.Context, namespace, service string) error

Delete deletes the helmcharts that matches the given service which is installed on the namespace (that's the targetNamespace).

func (*ServiceClient) DeleteAll added in v0.7.0

func (s *ServiceClient) DeleteAll(ctx context.Context, targetNamespace string) error

DeleteAll deletes all helmcharts installed on the specified namespace. It's used to cleanup before a namespace is deleted. The targetNamespace is not the namespace where the helmchart resource resides (that would be `epinio`) but the `targetNamespace` field of the helmchart.

func (*ServiceClient) Get added in v0.6.2

func (s *ServiceClient) Get(ctx context.Context, namespace, name string) (*models.Service, error)

Get returns a Service "instance" object if one is exist, or nil otherwise. Also returns an error if one occurs.

func (*ServiceClient) GetCatalogService added in v0.6.3

func (s *ServiceClient) GetCatalogService(ctx context.Context, serviceName string) (*models.CatalogService, error)

func (*ServiceClient) ListAll added in v0.9.0

func (s *ServiceClient) ListAll(ctx context.Context) (models.ServiceList, error)

ListAll will return all the Epinio Service instances

func (*ServiceClient) ListCatalogServices added in v0.6.3

func (s *ServiceClient) ListCatalogServices(ctx context.Context) ([]*models.CatalogService, error)

func (*ServiceClient) ListInNamespace added in v0.9.0

func (s *ServiceClient) ListInNamespace(ctx context.Context, namespace string) (models.ServiceList, error)

ListInNamespace will return all the Epinio Services available in the targeted namespace

Jump to

Keyboard shortcuts

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