Help us shape the future of Go! Take the 2026 Go Developer Survey

v1beta1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package v1beta1 contains the input type for this Function +kubebuilder:object:generate=true +groupName=tag-manager.fn.crossplane.io +versionName=v1beta1

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeys

func GetKeys(i []IgnoreTag) []string

Types

type AddTag

type AddTag struct {

	// Type determines where tags are sourced from. FromValue are inline
	// to the composition. FromCompositeFieldPath fetches tags from a field in
	// the composite resource
	// +kubebuilder:validation:Enum=FromCompositeFieldPath;FromValue
	// +optional
	Type TagManagerType `json:"type,omitempty"`

	// FromFieldPath if type is FromCompositeFieldPath, get additional tags
	// from the field in the Composite (like spec.parameters.tags)
	// +optional
	FromFieldPath *string `json:"fromFieldPath,omitempty"`

	// Tags are tags to add to the resource in the form of a map
	// + optional
	Tags Tags `json:"tags,omitempty"`

	// Policy determines what tag value to use in case there already is a matching tag key
	// in the desired resource. Replace will overwrite the value, while Retain will keep
	// the existing value in the desired resource.
	// +kubebuilder:validation:Enum=Replace;Retain
	// +optional
	Policy TagManagerPolicy `json:"policy,omitempty"`
}

func (*AddTag) DeepCopy

func (in *AddTag) DeepCopy() *AddTag

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddTag.

func (*AddTag) DeepCopyInto

func (in *AddTag) DeepCopyInto(out *AddTag)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AddTag) GetPolicy

func (a *AddTag) GetPolicy() TagManagerPolicy

func (*AddTag) GetType

func (a *AddTag) GetType() TagManagerType

type IgnoreTag

type IgnoreTag struct {
	// Type determines where tag keys are sourced from. FromValue are inline
	// to the composition. FromCompositeFieldPath fetches keys from a field in
	// the composite resource
	// +kubebuilder:validation:Enum=FromCompositeFieldPath;FromValue
	Type TagManagerType `json:"type"`

	// FromFieldPath if type is FromCompositeFieldPath, get keys to ignore
	// from the field in the Composite (like spec.parameters.ignoreTags)
	// +optional
	FromFieldPath *string `json:"fromFieldPath,omitempty"`

	// Keys are tag keys to ignore for the FromValue type
	// +optional
	Keys []string `json:"keys,omitempty"`

	// +kubebuilder:validation:Enum=Replace;Retain
	// +optional
	Policy TagManagerPolicy `json:"policy,omitempty"`
}

func (*IgnoreTag) DeepCopy

func (in *IgnoreTag) DeepCopy() *IgnoreTag

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnoreTag.

func (*IgnoreTag) DeepCopyInto

func (in *IgnoreTag) DeepCopyInto(out *IgnoreTag)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IgnoreTag) GetPolicy

func (a *IgnoreTag) GetPolicy() TagManagerPolicy

func (*IgnoreTag) GetType

func (i *IgnoreTag) GetType() TagManagerType

type IgnoreTags

type IgnoreTags []IgnoreTag

func (IgnoreTags) DeepCopy

func (in IgnoreTags) DeepCopy() IgnoreTags

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IgnoreTags.

func (IgnoreTags) DeepCopyInto

func (in IgnoreTags) DeepCopyInto(out *IgnoreTags)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ManagedTags

type ManagedTags struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// AddTags are fields that will be added to every composed resource
	// +optional
	AddTags []AddTag `json:"addTags,omitempty"`

	// IgnoreTags is a map of tag keys to ignore if set on the
	// resource outside of Crossplane
	// +optional
	IgnoreTags IgnoreTags `json:"ignoreTags,omitempty"`
}

Input can be used to provide input to this Function. +kubebuilder:object:root=true +kubebuilder:storageversion +kubebuilder:resource:categories=crossplane

func (*ManagedTags) DeepCopy

func (in *ManagedTags) DeepCopy() *ManagedTags

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedTags.

func (*ManagedTags) DeepCopyInto

func (in *ManagedTags) DeepCopyInto(out *ManagedTags)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ManagedTags) DeepCopyObject

func (in *ManagedTags) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TagManagerPolicy

type TagManagerPolicy string

TagManagerPolicy sets what happens when the tag exists in the resource

const (
	// ExistingTagPolicyReplace replaces the desired value of a tag if the observed tag differs
	ExistingTagPolicyReplace TagManagerPolicy = "Replace"
	// ExistingTagPolicyReplace retains the desired value of a tag if the observed tag differs
	ExistingTagPolicyRetain TagManagerPolicy = "Retain"
)

type TagManagerType

type TagManagerType string

TagManagerType configures where we get tags from

const (
	FromCompositeFieldPath TagManagerType = "FromCompositeFieldPath"
	FromValue              TagManagerType = "FromValue"
)

type Tags

type Tags map[string]string

func (Tags) DeepCopy

func (in Tags) DeepCopy() Tags

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tags.

func (Tags) DeepCopyInto

func (in Tags) DeepCopyInto(out *Tags)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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