services

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 28 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"
	CatalogServiceSecretTypesAnnotation = "application.epinio.io/catalog-service-secret-types"
	CatalogServiceVersionLabelKey       = "application.epinio.io/catalog-service-version"
	// COMPATIBILITY SUPPORT for services from before https://github.com/epinio/epinio/issues/1704 fix
	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

func GetInternalRoutes added in v1.5.0

func GetInternalRoutes(ctx context.Context, servicesGetter v1.ServiceInterface, name string) ([]string, error)

GetInternalRoutes returns the internal routes of the service, finding them from the kubernetes services of the Helm release

func NewServiceStatusFromHelmRelease added in v1.9.0

func NewServiceStatusFromHelmRelease(status helm.ReleaseStatus) models.ServiceStatus

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,
	wait bool,
	settings models.ChartValueSettings,
	catalogService *models.CatalogService,
	hook helm.PostDeployFunction,
) error

func (*ServiceClient) Delete added in v0.7.0

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

Delete deletes the helmcharts that matches the given service which is installed on the namespace

func (*ServiceClient) DeleteAll added in v0.7.0

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

DeleteAll deletes all helmcharts installed on the specified namespace. It's used to cleanup before a namespace is deleted.

func (*ServiceClient) DeployOrUpdate added in v1.10.0

func (s *ServiceClient) DeployOrUpdate(
	ctx context.Context,
	namespace, name string,
	wait bool,
	settings models.ChartValueSettings,
	catalogService *models.CatalogService,
	hook helm.PostDeployFunction) error

Deploy deploys the helm chart of a service, or updates its release.

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 specified namespace

func (*ServiceClient) ReplaceService added in v1.10.0

func (s *ServiceClient) ReplaceService(ctx context.Context, cluster *kubernetes.Cluster, service *models.Service,
	data models.ServiceReplaceRequest, hook helm.PostDeployFunction) (bool, error)

ReplaceService replaces an existing service

func (*ServiceClient) UpdateService added in v1.10.0

func (s *ServiceClient) UpdateService(ctx context.Context, cluster *kubernetes.Cluster, service *models.Service,
	changes models.ServiceUpdateRequest, hook helm.PostDeployFunction) error

UpdateService modifies an existing service as per the instructions and writes the result back to the resource.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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