Documentation ¶
Index ¶
- Constants
- func GetInternalRoutes(ctx context.Context, servicesGetter v1.ServiceInterface, name string) ([]string, error)
- func NewServiceStatusFromHelmRelease(status helm.ReleaseStatus) models.ServiceStatus
- type ServiceClient
- func (s *ServiceClient) Create(ctx context.Context, namespace, name string, wait bool, ...) error
- func (s *ServiceClient) Delete(ctx context.Context, namespace, name string) error
- func (s *ServiceClient) DeleteAll(ctx context.Context, namespace string) error
- func (s *ServiceClient) DeleteAllForHelmController(ctx context.Context, targetNamespace string) error
- func (s *ServiceClient) DeleteForHelmController(ctx context.Context, namespace, service string) error
- func (s *ServiceClient) Get(ctx context.Context, namespace, name string) (*models.Service, error)
- func (s *ServiceClient) GetCatalogService(ctx context.Context, serviceName string) (*models.CatalogService, error)
- func (s *ServiceClient) GetForHelmController(ctx context.Context, namespace, name string) (*models.Service, error)
- func (s *ServiceClient) ListAll(ctx context.Context) (models.ServiceList, error)
- func (s *ServiceClient) ListCatalogServices(ctx context.Context) ([]*models.CatalogService, error)
- func (s *ServiceClient) ListInNamespace(ctx context.Context, namespace string) (models.ServiceList, error)
Constants ¶
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) 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) DeleteAllForHelmController ¶ added in v1.4.0
func (s *ServiceClient) DeleteAllForHelmController(ctx context.Context, targetNamespace string) error
DeleteAllForHelmController deletes all helmcharts installed on the specified namespace. It is 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) DeleteForHelmController ¶ added in v1.4.0
func (s *ServiceClient) DeleteForHelmController(ctx context.Context, namespace, service string) error
DeleteForHelmController deletes the helmcharts that matches the given service which is installed on the namespace (that's the targetNamespace).
func (*ServiceClient) Get ¶ added in v0.6.2
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) GetForHelmController ¶ added in v1.4.0
func (s *ServiceClient) GetForHelmController(ctx context.Context, namespace, name string) (*models.Service, error)
GetForHelmController returns a Service "instance" object if one is exist, or nil otherwise. Also returns an error if one occurs.
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