v0.2.3 Latest Latest

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

Go to latest
Published: Oct 11, 2017 License: Apache-2.0 Imports: 33 Imported by: 0




This section is empty.


This section is empty.


func BuildOutOfClusterConfig

func BuildOutOfClusterConfig() (*rest.Config, error)

BuildOutOfClusterConfig returns k8s config

func CreateAutoscale added in v0.2.3

func CreateAutoscale(client kubernetes.Interface, funcName, ns, metric string, min, max int32, value string) error

CreateAutoscale creates HPA object for function

func CreateIngress

func CreateIngress(client kubernetes.Interface, ingressName, funcName, hostname, ns string, enableTLSAcme bool) error

CreateIngress creates ingress rule for a specific function

func CreateK8sCustomResource

func CreateK8sCustomResource(tprClient rest.Interface, f *spec.Function) error

CreateK8sCustomResource will create a custom function object

func DeleteAutoscale added in v0.2.3

func DeleteAutoscale(client kubernetes.Interface, name, ns string) error

DeleteAutoscale deletes an autoscale rule

func DeleteIngress

func DeleteIngress(client kubernetes.Interface, name, ns string) error

DeleteIngress deletes an ingress rule

func DeleteK8sCustomResource

func DeleteK8sCustomResource(tprClient *rest.RESTClient, funcName, ns string) error

DeleteK8sCustomResource will delete custom function object

func DeleteK8sResources

func DeleteK8sResources(ns, name string, client kubernetes.Interface) error

DeleteK8sResources removes k8s objects of the function

func DeleteServiceMonitor added in v0.2.3

func DeleteServiceMonitor(name, ns string) error

DeleteServiceMonitor cleans the sm if it exists

func EnsureK8sResources

func EnsureK8sResources(funcObj *spec.Function, client kubernetes.Interface) error

EnsureK8sResources creates/updates k8s objects (deploy, svc, configmap) for the function

func GetClient

func GetClient() kubernetes.Interface

GetClient returns a k8s clientset to the request from inside of cluster

func GetClientOutOfCluster

func GetClientOutOfCluster() kubernetes.Interface

GetClientOutOfCluster returns a k8s clientset to the request from outside of cluster

func GetFunction

func GetFunction(funcName, ns string) (spec.Function, error)

GetFunction returns specification of a function

func GetFunctionFileNames added in v0.2.2

func GetFunctionFileNames(runtime, modName string) (fileName, depName string)

GetFunctionFileNames returns the function and dependencies filename

func GetFunctionImage added in v0.2.2

func GetFunctionImage(runtime, ftype string) (imageName string, err error)

GetFunctionImage returns the image ID depending on the runtime, its version and function type

func GetLocalHostname

func GetLocalHostname(config *rest.Config, funcName string) (string, error)

GetLocalHostname returns hostname

func GetPodsByLabel

func GetPodsByLabel(c kubernetes.Interface, ns, k, v string) (*v1.PodList, error)

GetPodsByLabel returns list of pods which match the label We use this to returns pods to which the function is deployed or pods running controllers

func GetReadyPod

func GetReadyPod(pods *v1.PodList) (v1.Pod, error)

GetReadyPod returns the first pod has passed the liveness probe check

func GetRestClient

func GetRestClient() (*rest.RESTClient, error)

GetRestClient returns a k8s restclient to the request from inside of cluster

func GetRuntimes added in v0.2.2

func GetRuntimes() []string

GetRuntimes returns the list of available runtimes as strings

func GetServiceMonitorClientOutOfCluster added in v0.2.3

func GetServiceMonitorClientOutOfCluster() (*monitoringv1alpha1.MonitoringV1alpha1Client, error)

GetServiceMonitorClientOutOfCluster returns sm client to the request from outside of cluster

func GetTPRClient

func GetTPRClient() (*rest.RESTClient, error)

GetTPRClient returns tpr client to the request from inside of cluster

func GetTPRClientOutOfCluster

func GetTPRClientOutOfCluster() (*rest.RESTClient, error)

GetTPRClientOutOfCluster returns tpr client to the request from outside of cluster

func UpdateK8sCustomResource

func UpdateK8sCustomResource(f *spec.Function) error

UpdateK8sCustomResource applies changes to the function custom object


This section is empty.

Jump to

Keyboard shortcuts

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