Documentation ¶
Index ¶
- func BuildOutOfClusterConfig() (*rest.Config, error)
- func CreateAutoscale(client kubernetes.Interface, funcObj *spec.Function, ns, metric string, ...) error
- func CreateIngress(client kubernetes.Interface, funcObj *spec.Function, ...) error
- func CreateK8sCustomResource(crdClient rest.Interface, f *spec.Function) error
- func DeleteAutoscale(client kubernetes.Interface, name, ns string) error
- func DeleteIngress(client kubernetes.Interface, name, ns string) error
- func DeleteK8sCustomResource(crdClient *rest.RESTClient, funcName, ns string) error
- func DeleteServiceMonitor(name, ns string) error
- func EnsureFuncConfigMap(client kubernetes.Interface, funcObj *spec.Function, ...) error
- func EnsureFuncCronJob(client rest.Interface, funcObj *spec.Function, or []metav1.OwnerReference, ...) error
- func EnsureFuncDeployment(client kubernetes.Interface, funcObj *spec.Function, ...) error
- func EnsureFuncService(client kubernetes.Interface, funcObj *spec.Function, ...) error
- func Exec(client corev1.CoreV1Interface, pod, namespace string, opts v1.PodExecOptions) (*http.Request, error)
- func ExecRoundTripper(conf *rest.Config, f RoundTripCallback) (http.RoundTripper, error)
- func GetCRDClient() (*rest.RESTClient, error)
- func GetCRDClientOutOfCluster() (*rest.RESTClient, error)
- func GetClient() kubernetes.Interface
- func GetClientOutOfCluster() kubernetes.Interface
- func GetDefaultNamespace() string
- func GetFunction(funcName, ns string) (spec.Function, error)
- func GetLocalHostname(config *rest.Config, funcName string) (string, error)
- func GetOwnerReference(funcObj *spec.Function) ([]metav1.OwnerReference, 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 GetRestClientOutOfCluster(group, apiVersion, apiPath string) (*rest.RESTClient, error)
- func GetServiceMonitorClientOutOfCluster() (*monitoringv1alpha1.MonitoringV1alpha1Client, error)
- func UpdateK8sCustomResource(crdClient rest.Interface, f *spec.Function) error
- type Cmd
- type RoundTripCallback
- type WebsocketRoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOutOfClusterConfig ¶
BuildOutOfClusterConfig returns k8s config
func CreateAutoscale ¶ added in v0.2.3
func CreateAutoscale(client kubernetes.Interface, funcObj *spec.Function, ns, metric string, min, max int32, value string) error
CreateAutoscale creates HPA object for function
func CreateIngress ¶
func CreateIngress(client kubernetes.Interface, funcObj *spec.Function, ingressName, hostname, ns string, enableTLSAcme bool) error
CreateIngress creates ingress rule for a specific function
func CreateK8sCustomResource ¶
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(crdClient *rest.RESTClient, funcName, ns string) error
DeleteK8sCustomResource will delete custom function object
func DeleteServiceMonitor ¶ added in v0.2.3
DeleteServiceMonitor cleans the sm if it exists
func EnsureFuncConfigMap ¶ added in v0.2.4
func EnsureFuncConfigMap(client kubernetes.Interface, funcObj *spec.Function, or []metav1.OwnerReference) error
EnsureFuncConfigMap creates/updates a config map with a function specification
func EnsureFuncCronJob ¶ added in v0.2.4
func EnsureFuncCronJob(client rest.Interface, funcObj *spec.Function, or []metav1.OwnerReference, groupVersion string) error
EnsureFuncCronJob creates/updates a function cron job
func EnsureFuncDeployment ¶ added in v0.2.4
func EnsureFuncDeployment(client kubernetes.Interface, funcObj *spec.Function, or []metav1.OwnerReference) error
EnsureFuncDeployment creates/updates a function deployment
func EnsureFuncService ¶ added in v0.2.4
func EnsureFuncService(client kubernetes.Interface, funcObj *spec.Function, or []metav1.OwnerReference) error
EnsureFuncService creates/updates a function service
func Exec ¶ added in v0.2.4
func Exec(client corev1.CoreV1Interface, pod, namespace string, opts v1.PodExecOptions) (*http.Request, error)
Exec returns an "exec" Request suitable for ExecRoundTripper.
func ExecRoundTripper ¶ added in v0.2.4
func ExecRoundTripper(conf *rest.Config, f RoundTripCallback) (http.RoundTripper, error)
ExecRoundTripper creates a wrapped WebsocketRoundTripper
func GetCRDClient ¶ added in v0.2.4
func GetCRDClient() (*rest.RESTClient, error)
GetCRDClient returns crd client to the request from inside of cluster
func GetCRDClientOutOfCluster ¶ added in v0.2.4
func GetCRDClientOutOfCluster() (*rest.RESTClient, error)
GetCRDClientOutOfCluster returns crd client to the request from outside of cluster
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 GetDefaultNamespace ¶ added in v0.3.0
func GetDefaultNamespace() string
GetDefaultNamespace returns the namespace set in current cluster context
func GetFunction ¶
GetFunction returns specification of a function
func GetLocalHostname ¶
GetLocalHostname returns hostname
func GetOwnerReference ¶ added in v0.3.1
func GetOwnerReference(funcObj *spec.Function) ([]metav1.OwnerReference, error)
GetOwnerReference returns ownerRef for appending to objects's metadata created by kubeless-controller one a function is deployed.
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 GetRestClientOutOfCluster ¶ added in v0.2.4
func GetRestClientOutOfCluster(group, apiVersion, apiPath string) (*rest.RESTClient, error)
GetRestClientOutOfCluster returns a REST client based on a group, API version and path
func GetServiceMonitorClientOutOfCluster ¶ added in v0.2.3
func GetServiceMonitorClientOutOfCluster() (*monitoringv1alpha1.MonitoringV1alpha1Client, error)
GetServiceMonitorClientOutOfCluster returns sm client to the request from outside of cluster
Types ¶
type Cmd ¶ added in v0.2.4
Cmd stores information relevant to an individual remote command being run
type RoundTripCallback ¶ added in v0.2.4
A RoundTripCallback is used to process the websocket from an individual command execution.
type WebsocketRoundTripper ¶ added in v0.2.4
type WebsocketRoundTripper struct { TLSConfig *tls.Config Do RoundTripCallback }
WebsocketRoundTripper is an http.RoundTripper that invokes a callback on a websocket connection.