Documentation ¶
Index ¶
- func EnvVar(name, value string) corev1.EnvVar
- func RandomString(length int) (string, error)
- func SecretEnvVar(name, secretName, secretKey string) corev1.EnvVar
- func StringInSlice(item string, slice []string) bool
- func StringSliceEquals(a, b []string) bool
- func UpsertAllObjects[T client.Object](ctx context.Context, r client.Client, objects []T) []error
- func UpsertObject[T client.Object](ctx context.Context, r client.Client, obj T) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomString ¶
func SecretEnvVar ¶
secretEnvVar returns an environment variable with the given name and value
func StringInSlice ¶
func StringSliceEquals ¶
func UpsertAllObjects ¶
UpsertAllObjects upserts all objects in the given slice to the Kubernetes API server. If an object already exists, it is updated. If an object does not exist, it is created. The objects are identified by their keys, which are extracted from the objects themselves. The function returns a slice of errors, one for each object that failed to be upserted.
func UpsertObject ¶
UpsertObject upserts the given object in Kubernetes. If the object already exists, it is updated. If the object does not exist, it is created. The object is identified by its key, which is extracted from the object itself. The function returns an error if the upsert operation fails.
Types ¶
This section is empty.