Documentation ¶
Index ¶
- func BuildOutOfClusterConfig() (*rest.Config, error)
- func CreateAutoscale(client kubernetes.Interface, hpa v2beta1.HorizontalPodAutoscaler) error
- func CreateKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTrigger *kafkaApi.KafkaTrigger) error
- func DeleteAutoscale(client kubernetes.Interface, name, ns string) error
- func DeleteKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTriggerName, ns string) error
- func DeleteServiceMonitor(smclient monitoringv1alpha1.MonitoringV1alpha1Client, name, ns string) error
- func GetAPIExtensionsClientInCluster() clientsetAPIExtensions.Interface
- func GetAPIExtensionsClientOutOfCluster() clientsetAPIExtensions.Interface
- func GetAnnotationsFromCRD(clientset clientsetAPIExtensions.Interface, name string) (map[string]string, error)
- func GetClient() kubernetes.Interface
- func GetClientOutOfCluster() kubernetes.Interface
- func GetFunctionPort(clientset kubernetes.Interface, namespace, functionName string) (int, error)
- func GetHTTPReq(funcName string, funcPort int, ...) (*http.Request, error)
- func GetKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTriggerName, ns string) (*kafkaApi.KafkaTrigger, error)
- func GetKubelessClientOutCluster() (versioned.Interface, error)
- func GetRandString(n int) (string, error)
- func GetSecretsAsLocalObjectReference(secrets ...string) []v1.LocalObjectReference
- func GetTriggerClientInCluster() (versioned.Interface, error)
- func IsJSON(s string) bool
- func MergeDeployments(destinationDeployment *v1beta1.Deployment, ...) error
- func SendMessage(req *http.Request) error
- func UpdateKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTrigger *kafkaApi.KafkaTrigger) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOutOfClusterConfig ¶
BuildOutOfClusterConfig returns k8s config
func CreateAutoscale ¶
func CreateAutoscale(client kubernetes.Interface, hpa v2beta1.HorizontalPodAutoscaler) error
CreateAutoscale creates HPA object for function
func CreateKafkaTriggerCustomResource ¶
func CreateKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTrigger *kafkaApi.KafkaTrigger) error
CreateKafkaTriggerCustomResource will create a custom function object
func DeleteAutoscale ¶
func DeleteAutoscale(client kubernetes.Interface, name, ns string) error
DeleteAutoscale deletes an autoscale rule
func DeleteKafkaTriggerCustomResource ¶
func DeleteKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTriggerName, ns string) error
DeleteKafkaTriggerCustomResource will delete custom function object
func DeleteServiceMonitor ¶
func DeleteServiceMonitor(smclient monitoringv1alpha1.MonitoringV1alpha1Client, name, ns string) error
DeleteServiceMonitor cleans the sm if it exists
func GetAPIExtensionsClientInCluster ¶
func GetAPIExtensionsClientInCluster() clientsetAPIExtensions.Interface
GetAPIExtensionsClientInCluster returns a k8s clientset to access APIExtensions from inside of cluster
func GetAPIExtensionsClientOutOfCluster ¶
func GetAPIExtensionsClientOutOfCluster() clientsetAPIExtensions.Interface
GetAPIExtensionsClientOutOfCluster returns a k8s clientset to access APIExtensions from outside of cluster
func GetAnnotationsFromCRD ¶
func GetAnnotationsFromCRD(clientset clientsetAPIExtensions.Interface, name string) (map[string]string, error)
GetAnnotationsFromCRD gets annotations from a CustomResourceDefinition
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 GetFunctionPort ¶
func GetFunctionPort(clientset kubernetes.Interface, namespace, functionName string) (int, error)
GetFunctionPort returns the port for a function service
func GetHTTPReq ¶
func GetHTTPReq(funcName string, funcPort int, kafkaTopic, namespace, eventNamespace, method, body string) (*http.Request, error)
GetHTTPReq returns the http request object that can be used to send a event with payload to function service
func GetKafkaTriggerCustomResource ¶
func GetKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTriggerName, ns string) (*kafkaApi.KafkaTrigger, error)
GetKafkaTriggerCustomResource will get CronJobTrigger custom resource object
func GetKubelessClientOutCluster ¶
GetKubelessClientOutCluster returns kubeless clientset to make kubeless API request from outside of cluster
func GetRandString ¶
GetRandString returns a random string of lenght N
func GetSecretsAsLocalObjectReference ¶
func GetSecretsAsLocalObjectReference(secrets ...string) []v1.LocalObjectReference
GetSecretsAsLocalObjectReference returns a list of LocalObjectReference based on secret names
func GetTriggerClientInCluster ¶
GetTriggerClientInCluster returns function clientset to the request from inside of cluster
func MergeDeployments ¶
func MergeDeployments(destinationDeployment *v1beta1.Deployment, sourceDeployment *v1beta1.Deployment) error
MergeDeployments merges two deployment objects
func SendMessage ¶
SendMessage sends messge over function service
func UpdateKafkaTriggerCustomResource ¶
func UpdateKafkaTriggerCustomResource(kubelessClient versioned.Interface, kafkaTrigger *kafkaApi.KafkaTrigger) error
UpdateKafkaTriggerCustomResource applies changes to the function custom object
Types ¶
This section is empty.