Back to godoc.org
github.com/jenkins-x/jx/pkg/kube/services

package services

v1.3.1119
Latest Go to latest
Published: Apr 15, 2019 | License: Apache-2.0 | Module: github.com/jenkins-x/jx

Index

Constants

const (
	ExposeAnnotation            = "fabric8.io/expose"
	ExposeURLAnnotation         = "fabric8.io/exposeUrl"
	ExposeGeneratedByAnnotation = "fabric8.io/generated-by"
	ExposeIngressName           = "fabric8.io/ingress.name"
	JenkinsXSkipTLSAnnotation   = "jenkins-x.io/skip.tls"
	ExposeIngressAnnotation     = "fabric8.io/ingress.annotations"
	CertManagerAnnotation       = "certmanager.k8s.io/issuer"
	ServiceAppLabel             = "app"
)

func AnnotateServicesWithCertManagerIssuer

func AnnotateServicesWithCertManagerIssuer(c kubernetes.Interface, ns, issuer string, services ...string) ([]*v1.Service, error)

AnnotateServicesWithCertManagerIssuer adds the cert-manager annotation to the services from the given namespace. If a list of services is provided, it will apply the annotation only to that specific services.

func CleanServiceAnnotations

func CleanServiceAnnotations(c kubernetes.Interface, ns string, services ...string) error
func CreateServiceLink(client kubernetes.Interface, currentNamespace, targetNamespace, serviceName, externalURL string) error

func DeleteService

func DeleteService(client *kubernetes.Clientset, namespace string, serviceName string) error

func FindService

func FindService(client kubernetes.Interface, name string) (*v1.Service, error)

FindService looks up a service by name across all namespaces

func FindServiceHostname

func FindServiceHostname(client kubernetes.Interface, namespace string, name string) (string, error)

func FindServiceURL

func FindServiceURL(client kubernetes.Interface, namespace string, name string) (string, error)

func GetService

func GetService(client kubernetes.Interface, currentNamespace, targetNamespace, serviceName string) error

func GetServiceAppName

func GetServiceAppName(c kubernetes.Interface, name, ns string) (string, error)

GetServiceAppName retrieves the application name from the service labels

func GetServiceNames

func GetServiceNames(client kubernetes.Interface, ns string, filter string) ([]string, error)

func GetServiceURL

func GetServiceURL(svc *v1.Service) string

GetServiceURL returns the

func GetServiceURLFromMap

func GetServiceURLFromMap(services map[string]*v1.Service, name string) string

func GetServiceURLFromName

func GetServiceURLFromName(c kubernetes.Interface, name, ns string) (string, error)

func GetServices

func GetServices(client kubernetes.Interface, ns string) (map[string]*v1.Service, error)

func GetServicesByName

func GetServicesByName(client kubernetes.Interface, ns string, services []string) ([]*v1.Service, error)

GetServicesByName returns a list of Service objects from a list of service names

func HasExternalAddress

func HasExternalAddress(svc *v1.Service) bool

func IsServicePresent

func IsServicePresent(c kubernetes.Interface, name, ns string) (bool, error)

func ServiceAppName

func ServiceAppName(service *v1.Service) string

ServiceAppName retrives the application name from service labels. If no app lable exists, it returns the service name

func WaitForExternalIP

func WaitForExternalIP(client kubernetes.Interface, name, namespace string, timeout time.Duration) error

WaitForExternalIP waits for the pods of a deployment to become ready

func WaitForService

func WaitForService(client kubernetes.Interface, name, namespace string, timeout time.Duration) error

WaitForService waits for a service to become ready

type ServiceURL

type ServiceURL struct {
	Name string
	URL  string
}

func FindServiceURLs

func FindServiceURLs(client kubernetes.Interface, namespace string) ([]ServiceURL, error)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier