services

package
v0.0.0-...-cce75fc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDev

func CreateDev(ctx context.Context, dev *model.Dev, c kubernetes.Interface) error

CreateDev deploys a default k8s service for a development container

func Deploy

Deploy creates/updates a k8s service

func Destroy

func Destroy(ctx context.Context, name, namespace string, c kubernetes.Interface) error

Destroy destroys a k8s service

func DestroyDev

func DestroyDev(ctx context.Context, dev *model.Dev, c kubernetes.Interface) error

DestroyDev destroys the default service for a development container

func Get

func Get(ctx context.Context, name, namespace string, c kubernetes.Interface) (*apiv1.Service, error)

Get returns a kubernetes service by the name, or an error if it doesn't exist

func GetPortsByPod

func GetPortsByPod(ctx context.Context, p *apiv1.Pod, c kubernetes.Interface) ([]int, error)

GetPortsByPod returns the ports exposed via endpoint of a given pod

func GetServiceNameByLabel

func GetServiceNameByLabel(ctx context.Context, namespace string, c kubernetes.Interface, labels string) (string, error)

GetServiceNameByLabel returns the name of the service with certain labels

func GetServicesNamesFromList

func GetServicesNamesFromList(serviceList *apiv1.ServiceList) string

func List

func List(ctx context.Context, namespace, labels string, c kubernetes.Interface) ([]apiv1.Service, error)

List returns the list of services

func Update

func Update(ctx context.Context, namespace string, svc *apiv1.Service, c kubernetes.Interface) (*apiv1.Service, error)

Update updates a k8s service

Types

This section is empty.

Jump to

Keyboard shortcuts

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