Documentation ¶
Index ¶
- func BuildOutOfClusterConfig() (*rest.Config, error)
- func CreateIngress(client kubernetes.Interface, ingressName, funcName, hostname, ns string, ...) error
- func CreateK8sCustomResource(tprClient rest.Interface, f *spec.Function) error
- func DeleteIngress(client kubernetes.Interface, name, ns string) error
- func DeleteK8sCustomResource(tprClient *rest.RESTClient, funcName, ns string) error
- func DeleteK8sResources(ns, name string, client kubernetes.Interface) error
- func EnsureK8sResources(ns, name string, funcObj *spec.Function, client kubernetes.Interface) error
- func GetClient() kubernetes.Interface
- func GetClientOutOfCluster() kubernetes.Interface
- func GetFunction(funcName, ns string) (spec.Function, error)
- func GetFunctionData(runtime, ftype, modName string) (imageName, depName, fileName string, err error)
- func GetLocalHostname(config *rest.Config, funcName string) (string, error)
- func GetPodsByLabel(c kubernetes.Interface, ns, k, v string) (*v1.PodList, error)
- func GetReadyPod(pods *v1.PodList) (v1.Pod, error)
- func GetRestClient() (*rest.RESTClient, error)
- func GetTPRClient() (*rest.RESTClient, error)
- func GetTPRClientOutOfCluster() (*rest.RESTClient, error)
- func UpdateK8sCustomResource(f *spec.Function) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOutOfClusterConfig ¶
BuildOutOfClusterConfig returns k8s config
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 ¶
CreateK8sCustomResource will create a custom function object
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 EnsureK8sResources ¶
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 ¶
GetFunction returns specification of a function
func GetFunctionData ¶
func GetFunctionData(runtime, ftype, modName string) (imageName, depName, fileName string, err error)
GetFunctionData given a runtime returns an Image ID, the dependencies filename and the function filename
func GetLocalHostname ¶
GetLocalHostname returns hostname
func GetPodsByLabel ¶
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 ¶
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 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 ¶
UpdateK8sCustomResource applies changes to the function custom object
Types ¶
This section is empty.