# Functions
EnsureObjectMetaIsUpdated ensures that the existing object metadata has all the needed fields set.
EnvValueByName returns the value of the first env var with the given name.
EnvVarSourceByName returns the ValueFrom of the first env var with the given name.
GenerateOwnerReferenceForObject provides a metav1.OwnerReference for the provided object so that it can be applied to other objects to indicate ownership by the given object.
GetAPIVersionForObject provides the string of the full group and version for the provided object, e.g.
GetCondition returns the condition with the given type, if it exists.
GetContainerVolumeMountByPath gets the volume mounted to given path in container.
GetEnvValueFromContainer returns value of environment variable with given name in the given container.
GetManagedByLabelSet returns a map of labels with the provided object's metadata.
GetPodContainerByName takes a PodSpec reference and a string and returns a reference to the container in the PodSpec with that name, if any exists.
GetPodVolumeByName gets the pointer of volume with given name.
HasSameVolumeSource returns true if the two volume sources are the same and we do not need to update the volume in deployments.
InitProgrammed initializes the Programmed status to False.
InitReady initializes the Ready status to False if Ready condition is not yet set on the resource.
IsAccepted evaluates whether a resource is in Accepted state, meaning that all its listeners are accepted.
IsConditionTrue returns a true value whether the condition is ConditionTrue, false otherwise.
IsEnvVarPresent indicates whether or not a given EnvVar is present in a list.
IsOwnedBy is a helper function to check if the provided object is owned by the provided ref UID.
IsProgrammed evaluates whether a resource is in Programmed state.
IsReady evaluates whether a resource is in Ready state, meaning that all its conditions are in the True state.
ListClusterRoleBindings is a helper function which gets a list of ClusterRoleBindings using the provided list options.
ListClusterRoles is a helper function which gets a list of ClusterRoles using the provided list options.
ListDeploymentsForOwner which gets a list of Deployments using the provided list options and reduce by OwnerReference UID and namespace to efficiently list only the objects owned by the provided UID.
ListHPAsForOwner is a helper function which gets a list of HorizontalPodAutoscalers using the provided list options and reduce by OwnerReference UID and namespace to efficiently list only the objects owned by the provided UID.
ListSecretsForOwner is a helper function which gets a list of Secrets using the provided list options and reduce by OwnerReference UID to efficiently list only the objects owned by the provided UID.
ListServiceAccountsForOwner is a helper function which gets a list of ServiceAccounts using the provided list options and reduce by OwnerReference UID and namespace to efficiently list only the objects owned by the provided UID.
ListServicesForOwner is a helper function which gets a list of Services using the provided list options and reduce by OwnerReference UID and namespace to efficiently list only the objects owned by the provided UID.
ListValidatingWebhookConfigurations is a helper function that gets a list of ValidatingWebhookConfiguration using the provided list options.
NeedsUpdate retrieves the persisted state and compares all the conditions to decide whether the status must be updated or not.
NewCondition convenience method for creating conditions.
NewConditionWithGeneration convenience method for creating conditions with ObservedGeneration set.
RejectEnvByName returns a copy of the given env vars, but with the env vars with the given name removed.
SetAcceptedConditionOnGateway sets the gateway Accepted condition according to the Gateway API specification.
SetCondition sets a new condition to the provided resource.
SetOwnerForObject ensures that the provided first object is marked as owned by the provided second object in the object metadata.
SetOwnerForObjectThroughLabels sets the owner of the provided object through a label.
SetPodContainer appends a container to the list of containers if it does not exists, or it overwrites the existing container, in case it exists.
SetProgrammed evaluates all the existing conditions and sets the Programmed status accordingly.
SetReady evaluates all the existing conditions and sets the Ready status accordingly.
SetReadyWithGeneration sets the Ready status to True if all the other conditions are True.
TrimGenerateName cut the string to 63 chars, in case it is longer, to be compliant with the GenerateName length maximum size of 63 chars.
UpdateEnv set env var with name to have val and returns the updated env vars.
UpdateEnvSource updates env var with `name` to come from `envSource`.
# Variables
ErrExtractValueFromEnvSourceNotImplemented is the error when the Env references value from `ResourceRef` or `FieldRef` that we do not support to extract values yet.
# Structs
CRDChecker verifies whether the resource type defined by GVR is supported by the k8s apiserver.
# Interfaces
ConditionsAndGenerationAware represents a CRD type that has been enabled with metav1.Conditions, it can then benefit of a series of utility methods.
ConditionsAndListenerConditionsAndGenerationAware is a CRD type that has Conditions, Generation, and Listener Conditions.
ConditionsAware is a CRD that has Conditions.
GetOwnerReferencer retrieves owner references.
ListenersConditionsAware is a CRD that has Listener Conditions.
# Type aliases
SortableEnvVars is a wrapper around []corev1.EnvVars that enables sorting them lexographically by name.