utils

package
Version: v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: Apache-2.0 Imports: 24 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildOutOfClusterConfig

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

BuildOutOfClusterConfig returns k8s config

func CreateCronJobCustomResource

func CreateCronJobCustomResource(kubelessClient versioned.Interface, cronJob *cronjobtriggerApi.CronJobTrigger) error

CreateCronJobCustomResource will create a custom function object

func DeleteCronJobCustomResource

func DeleteCronJobCustomResource(kubelessClient versioned.Interface, cronJobName, ns string) error

DeleteCronJobCustomResource will delete custom function object

func EnsureCronJob

func EnsureCronJob(client kubernetes.Interface, funcObj *kubelessApi.Function, cronjobTriggerObj *cronjobTriggerApi.CronJobTrigger, reqImage string, or []metav1.OwnerReference, reqImagePullSecret []v1.LocalObjectReference) error

EnsureCronJob creates/updates a function cron job

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 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 GetCronJobCustomResource

func GetCronJobCustomResource(kubelessClient versioned.Interface, cronJobName, ns string) (*cronjobtriggerApi.CronJobTrigger, error)

GetCronJobCustomResource will get CronJobTrigger custom resource object

func GetDefaultNamespace

func GetDefaultNamespace() string

GetDefaultNamespace returns the namespace set in current cluster context

func GetFunctionClientInCluster

func GetFunctionClientInCluster() (versioned.Interface, error)

GetFunctionClientInCluster returns function clientset to the request from inside of cluster

func GetKubelessClientOutCluster

func GetKubelessClientOutCluster() (versioned.Interface, error)

GetKubelessClientOutCluster returns kubeless clientset to make kubeless API request from outside of cluster

func GetRandString

func GetRandString(n int) (string, error)

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

func GetTriggerClientInCluster() (versioned.Interface, error)

GetTriggerClientInCluster returns function clientset to the request from inside of cluster

func UpdateCronJobCustomResource

func UpdateCronJobCustomResource(kubelessClient versioned.Interface, cronJob *cronjobtriggerApi.CronJobTrigger) error

UpdateCronJobCustomResource applies changes to the function custom object

Types

This section is empty.

Jump to

Keyboard shortcuts

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