Documentation ¶
Index ¶
- Constants
- func AnnotateServicesWithBasicAuth(client kubernetes.Interface, ns string, services ...string) error
- func AnnotateServicesWithCertManagerIssuer(c kubernetes.Interface, ns, issuer string, clusterIssuer bool, ...) ([]*v1.Service, error)
- func CleanServiceAnnotations(c kubernetes.Interface, ns string, services ...string) error
- func CreateServiceLink(client kubernetes.Interface, ...) error
- func DeleteService(client *kubernetes.Clientset, namespace string, serviceName string) error
- func ExtractServiceSchemePort(svc *v1.Service) (string, string, error)
- func FindIngressURL(client kubernetes.Interface, namespace string, name string) (string, error)
- func FindService(client kubernetes.Interface, name string) (*v1.Service, error)
- func FindServiceHostname(client kubernetes.Interface, namespace string, name string) (string, error)
- func FindServiceSchemePort(client kubernetes.Interface, namespace string, name string) (string, string, error)
- func FindServiceURL(client kubernetes.Interface, namespace string, name string) (string, error)
- func GetService(client kubernetes.Interface, ...) error
- func GetServiceAppName(c kubernetes.Interface, name, ns string) (string, error)
- func GetServiceNames(client kubernetes.Interface, ns string, filter string) ([]string, error)
- func GetServiceURL(svc *v1.Service) string
- func GetServiceURLFromMap(services map[string]*v1.Service, name string) string
- func GetServiceURLFromName(c kubernetes.Interface, name, ns string) (string, error)
- func GetServices(client kubernetes.Interface, ns string) (map[string]*v1.Service, error)
- func GetServicesByName(client kubernetes.Interface, ns string, services []string) ([]*v1.Service, error)
- func HasExternalAddress(svc *v1.Service) bool
- func IngressHost(ing *v1beta1.Ingress) string
- func IngressProtocol(ing *v1beta1.Ingress) string
- func IngressURL(ing *v1beta1.Ingress) string
- func IsServicePresent(c kubernetes.Interface, name, ns string) (bool, error)
- func ServiceAppName(service *v1.Service) string
- func WaitForExternalIP(client kubernetes.Interface, name, namespace string, timeout time.Duration) error
- func WaitForService(client kubernetes.Interface, name, namespace string, timeout time.Duration) error
- type ServiceURL
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" CertManagerClusterAnnotation = "certmanager.k8s.io/cluster-issuer" ServiceAppLabel = "app" )
Variables ¶
This section is empty.
Functions ¶
func AnnotateServicesWithBasicAuth ¶
func AnnotateServicesWithBasicAuth(client kubernetes.Interface, ns string, services ...string) error
AnnotateServicesWithBasicAuth annotates the services with nginx baisc auth annotations
func AnnotateServicesWithCertManagerIssuer ¶
func AnnotateServicesWithCertManagerIssuer(c kubernetes.Interface, ns, issuer string, clusterIssuer bool, 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 ¶
func CreateServiceLink(client kubernetes.Interface, currentNamespace, targetNamespace, serviceName, externalURL string) error
func DeleteService ¶
func DeleteService(client *kubernetes.Clientset, namespace string, serviceName string) error
func ExtractServiceSchemePort ¶
ExtractServiceSchemePort is a utility function to interpret http scheme and port information from k8s service definitions
func FindIngressURL ¶
func FindService ¶
FindService looks up a service by name across all namespaces
func FindServiceHostname ¶
func FindServiceSchemePort ¶
func FindServiceSchemePort(client kubernetes.Interface, namespace string, name string) (string, string, error)
FindServiceSchemePort parses the service definition and interprets http scheme in the absence of an external ingress
func FindServiceURL ¶
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 GetServiceURLFromMap ¶
func GetServiceURLFromName ¶
func GetServiceURLFromName(c kubernetes.Interface, name, ns string) (string, error)
func GetServices ¶
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 IngressHost ¶
IngressHost returns the host for the ingres
func IngressProtocol ¶
IngressProtocol returns the scheme (https / http) for the Ingress
func IngressURL ¶
IngressURL returns the URL for the ingres
func IsServicePresent ¶
func IsServicePresent(c kubernetes.Interface, name, ns string) (bool, error)
func ServiceAppName ¶
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
Types ¶
type ServiceURL ¶
func FindServiceURLs ¶
func FindServiceURLs(client kubernetes.Interface, namespace string) ([]ServiceURL, error)