# Functions
AddAdditionalKubeconfigCAs adds additional certificate authorities to a given kubeconfig.
AddControllerMetricsTransportWrapper adds a transport wrapper to the given rest config which exposes metrics based on the requests being made.
AddFinalizer adds a finalizer to the given object.
AddTypeMeta adds type metadata to objects in a list of RawExtension TypeMeta is needed for proper serialization/deserialization.
BuildControllerLogger returns a logger for controllers with consistent fields.
CalculateJobSpecHash returns a hash of the job.Spec.
CalculateStatefulSetSpecHash returns a hash of the statefulset.Spec.
No description provided by the author
CopySecret copies the secret defined by src to dest.
CredentialsSecretName returns the name of the credentials secret for platforms that have a CredentialsSecretRef.
DeleteFinalizer removes a finalizer from the given object.
DNSZoneName returns the predictable name for a DNSZone for the given ClusterDeployment.
Dotted adds a trailing dot to a domain if it doesn't exist.
No description provided by the author
EnsureRequeueAtLeastWithin ensures that the requeue of the object will occur within the given duration.
ErrorScrub scrubs cloud error messages destined for CRD status to remove things that change every attempt, such as request IDs, which subsequently cause an infinite update/reconcile loop.
FindClusterClaimCondition finds in the condition that has the specified condition type in the given list.
FindClusterDeploymentCondition finds in the condition that has the specified condition type in the given list.
FindClusterDeprovisionCondition finds in the condition that has the specified condition type in the given list.
FindClusterInstallCondition finds in the condition that has the specified condition type in the given list.
FindClusterPoolCondition finds in the condition that has the specified condition type in the given list.
FindClusterProvisionCondition finds in the condition that has the specified condition type in the given list.
FindDNSZoneCondition finds in the condition that has the specified condition type in the given list.
FindMachinePoolCondition finds in the condition that has the specified condition type in the given list.
FindSyncCondition finds in the condition that has the specified condition type in the given list.
GetChecksumOfObject returns the md5sum hash of the object passed in.
GetChecksumOfObjects returns the md5sum hash of the objects passed in.
No description provided by the author
GetDuckType uses the client to fetch a type defined by gck and key, and marshals it into the duck type defined in obj.
GetHiveNamespace determines the namespace where core hive components run (hive-controllers, hiveadmission), by checking for the required environment variable.
HasFinalizer returns true if the given object has the given finalizer.
InitializeClusterClaimConditions initializes the given set of conditions for the first time, set with Status Unknown.
InitializeClusterDeploymentConditions initializes the given set of conditions for the first time, set with Status Unknown.
InitializeClusterPoolConditions initializes the given set of conditions for the first time, set with Status Unknown.
InitializeMachinePoolConditions initializes the given set of conditions for the first time, set with Status Unknown.
InjectWatcher injects the reconciler that implements the watcherInjectable interface with the provided controller.
IsClaimedClusterMarkedForRemoval returns true when hive.openshift.io/remove-claimed-cluster-from-pool annotation is set to true value in the clusterdeployment.
IsClusterDeploymentErrorUpdateEvent returns true when the update event is from error state in clusterdeployment.
IsClusterPausedOrRelocating checks if the syncing to the cluster is paused or if the cluster is relocating.
IsConditionInDesiredState checks if the condition status is in its desired/expected state.
IsConditionWithPositivePolarity checks if cluster deployment condition has positive polarity.
IsDeadlineExceeded returns true if the job failed due to deadline being exceeded.
No description provided by the author
IsFailed returns true if the job failed.
No description provided by the author
IsFinished returns true if the job completed (succeeded or failed).
No description provided by the author
IsSuccessful returns true if the job was successful.
ListRuntimeObjects returns a slice of runtime objects returned from the kubernetes client based on the passed in list of types to return and list options.
LoadSecretData loads a given secret key and returns it's data as a string.
LogLevel returns the log level to use to log the specified error.
MergeJsons will merge the global and local pull secret and return it.
NewClientWithMetricsOrDie creates a new controller-runtime client with a wrapper which increments metrics for requests by controller name, HTTP method, URL path, and whether or not the request was to a remote cluster.
NewExpectations returns a store for Expectations.
NewRateLimitedUpdateEventHandler wraps the specified event handler inside a new event handler that will rate limit the incoming UPDATE events when the provided shouldRateLimit function returns true.
ReadStatefulsetOrDie converts a statefulset asset into an actual instance of a statefulset.
ReconcileDNSZoneForRelocation performs reconciliation on a DNSZone that is in the midst of a relocation to a new Hive instance.
ReconcileOwnerReferences ensures that given owner is in fact the actual owner for all types in typesToList given a specific labelSelector.
No description provided by the author
SetClusterClaimCondition sets a condition on a ClusterClaim resource's status.
SetClusterClaimConditionWithChangeCheck sets a condition on a ClusterClaim resource's status.
SetClusterDeploymentCondition sets a condition on a ClusterDeployment resource's status.
SetClusterDeploymentConditionWithChangeCheck sets a condition on a ClusterDeployment resource's status.
SetClusterDeprovisionCondition sets a condition on a ClusterDeprovision resource's status.
SetClusterDeprovisionConditionWithChangeCheck sets a condition on a ClusterDeprovision resource's status It returns the conditions as well a boolean indicating whether there was a change made to the conditions.
SetClusterInstallConditionWithChangeCheck sets a condition in the list of status conditions for a ClusterInstall implementation.
SetClusterPoolCondition sets a condition on a ClusterPool resource's status.
SetClusterPoolConditionWithChangeCheck sets a condition on a ClusterPool resource's status.
SetClusterProvisionCondition sets a condition on a ClusterProvision resource's status.
SetDNSZoneCondition sets a condition on a DNSZone resource's status.
SetDNSZoneConditionWithChangeCheck sets a condition on a DNSZone resource's status It returns the conditions as well a boolean indicating whether there was a change made to the conditions.
SetMachinePoolCondition sets a condition on a MachinePool resource's status.
SetMachinePoolConditionWithChangeCheck sets a condition on a MachinePool resource's status.
SetProxyEnvVars will add the standard proxy environment variables to all containers in the given pod spec.
SetRelocateAnnotation sets the relocate annotation on the specified object.
SetSyncCondition sets a condition on a SyncSet or resource's status.
SetupAdditionalCA reads a file referenced by the ADDITIONAL_CA environment variable that contains an additional CA.
SetupClusterInstallServiceAccount ensures a service account exists which can upload the required artifacts after running the installer in a pod.
SetupClusterUninstallServiceAccount ensures a service account exists which can read the required secrets, upload the required artifacts after running the installer deprovision in a pod.
SyncOwnerReference ensures that the object passed in has an owner reference of the owner passed in.
TrustBundleFromSecretToWriter creates a trust bundle from keys in the secret writing it to a writer.
Undotted removes the trailing dot from a domain if it exists.
UpdateConditionAlways returns true.
UpdateConditionIfReasonOrMessageChange returns true if there is a change in the reason or the message of the condition.
UpdateConditionNever return false.
ValidateCredentialsForClusterDeployment will attempt to verify that the platform/cloud credentials for the given ClusterDeployment are valid.
WrapEventHandlerWithLogging wraps the specified event handler inside a new event handler that will log when events are handled and items are added to the queue.
# Constants
ClientBurstEnvVariableFormat is the format of the environment variable that stores client burst for a controller.
ClientQPSEnvVariableFormat is the format of the environment variable that stores client QPS for a controller.
ConcurrentReconcilesEnvVariableFormat is the format of the environment variable that stores concurrent reconciles for a controller.
ExpectationsTimeout defines the length of time that a dormant controller will wait for an expectation to be satisfied.
InstallServiceAccountName will be a service account that can run the installer and then upload artifacts to the cluster's namespace.
QueueBurstEnvVariableFormat is the format of the environment variable that stores workqueue burst for a controller.
QueueQPSEnvVariableFormat is the format of the environment variable that stores workqueue QPS for a controller.
UninstallServiceAccountName will be a service account that can run the installer deprovision and then upload artifacts to the cluster's namespace.
# Variables
ExpKeyFunc to parse out the key from a ControlleeExpectation.
# Structs
ControlleeExpectations track controllee creates/deletes.
ControllerMetricsTripper is a RoundTripper implementation which tracks our metrics for client requests.
Expectations is a cache mapping controllers to what they expect to see before being woken up for a sync.
OwnershipUniqueKey contains the uniquly identifiable pattern for ensuring ownership labels are correct applied for a type.
# Interfaces
ExpectationsInterface is an interface that allows users to set and wait on expectations.
Watcher is a smaller interface of controller.Controller that only provides function to add watches.
# Type aliases
UpdateConditionCheck tests whether a condition should be updated from the old condition to the new condition.