util

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAsset

func ApplyAsset(h resource.Helper, assetPath string, hLog log.FieldLogger) error

ApplyAsset loads a path from our bindata assets and applies it to the cluster. This function does not apply a HiveConfig owner reference for garbage collection, and should only be used for resources we explicitly want to leave orphaned when Hive is uninstalled. See ApplyAssetWithGC for the more common use case.

func ApplyAssetWithGC added in v1.0.4

func ApplyAssetWithGC(h resource.Helper, assetPath string, hc *hivev1.HiveConfig, hLog log.FieldLogger) error

ApplyAssetWithGC loads a path from our bindata assets, adds an OwnerReference to the HiveConfig for garbage collection (used when uninstalling Hive), and applies it to the cluster.

func ApplyAssetWithNSOverrideAndGC added in v1.0.4

func ApplyAssetWithNSOverrideAndGC(h resource.Helper, assetPath, namespaceOverride string, hiveConfig *hivev1.HiveConfig) error

ApplyAssetWithNSOverrideAndGC loads the given asset, overrides the namespace, adds an owner reference to HiveConfig for uninstall, and applies it to the cluster.

func ApplyClusterRoleBindingAssetWithSubjectNSOverrideAndGC added in v1.0.4

func ApplyClusterRoleBindingAssetWithSubjectNSOverrideAndGC(h resource.Helper, roleBindingAssetPath, namespaceOverride string, hiveConfig *hivev1.HiveConfig) error

ApplyClusterRoleBindingAssetWithSubjectNSOverrideAndGC loads the given asset, overrides the namespace on the subject, adds an owner reference to HiveConfig for uninstall, and applies it to the cluster.

func ApplyRuntimeObjectWithGC added in v1.0.4

func ApplyRuntimeObjectWithGC(h resource.Helper, runtimeObj runtime.Object, hc *hivev1.HiveConfig) (resource.ApplyResult, error)

ApplyRuntimeObjectWithGC adds an OwnerReference to the HiveConfig on the runtime object, and applies it to the cluster.

func FindHiveConfigCondition added in v1.1.4

func FindHiveConfigCondition(conditions []hivev1.HiveConfigCondition, conditionType hivev1.HiveConfigConditionType) *hivev1.HiveConfigCondition

func InitializeHiveConfigConditions added in v1.1.4

func InitializeHiveConfigConditions(existingConditions []hivev1.HiveConfigCondition, conditionsToBeAdded []hivev1.HiveConfigConditionType) []hivev1.HiveConfigCondition

InitializeHiveConfigConditions initializes the given set of conditions for the first time, set with Status Unknown

func ReadAPIServiceV1Beta1OrDie

func ReadAPIServiceV1Beta1OrDie(objBytes []byte, scheme *runtime.Scheme) *apiregistrationv1.APIService

ReadAPIServiceV1Beta1OrDie reads an APIService, as this is not yet added to library-go.

func ReadValidatingWebhookConfigurationV1OrDie added in v1.1.15

func ReadValidatingWebhookConfigurationV1OrDie(objBytes []byte, scheme *runtime.Scheme) *admregv1.ValidatingWebhookConfiguration

ReadValidatingWebhookConfigurationV1OrDie reads a ValidatingWebhookConfiguration, as this is not yet added to library-go.

func SetHiveConfigCondition added in v1.1.4

func SetHiveConfigCondition(
	conditions []hivev1.HiveConfigCondition,
	conditionType hivev1.HiveConfigConditionType,
	status corev1.ConditionStatus,
	reason string,
	message string,
) []hivev1.HiveConfigCondition

Types

This section is empty.

Jump to

Keyboard shortcuts

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