managedresource

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomResourceGroup

type CustomResourceGroup struct {
	Resources []ResourceType `json:"resources,omitempty"`

	// +optional
	ForceDelete bool `json:"forceDelete,omitempty"`

	// +optional
	DeleteAllResources bool `json:"deleteAllResources,omitempty"`
}

func (*CustomResourceGroup) DeepCopy

func (in *CustomResourceGroup) DeepCopy() *CustomResourceGroup

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

func (*CustomResourceGroup) DeepCopyInto

func (in *CustomResourceGroup) DeepCopyInto(out *CustomResourceGroup)

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

type DeletionGroupDefinition

type DeletionGroupDefinition struct {
	// +optional
	PredefinedResourceGroup *PredefinedResourceGroup `json:"predefinedResourceGroup,omitempty"`

	// +optional
	CustomResourceGroup *CustomResourceGroup `json:"customResourceGroup,omitempty"`
}

func (*DeletionGroupDefinition) DeepCopy

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

func (*DeletionGroupDefinition) DeepCopyInto

func (in *DeletionGroupDefinition) DeepCopyInto(out *DeletionGroupDefinition)

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

func (*DeletionGroupDefinition) IsCustom

func (g *DeletionGroupDefinition) IsCustom() bool

func (*DeletionGroupDefinition) IsPredefined

func (g *DeletionGroupDefinition) IsPredefined() bool

type Export

type Export struct {
	// Key is the key that the value from JSONPath is exported to.
	Key string `json:"key"`

	// JSONPath is the jsonpath to look for a value.
	// The JSONPath root is the referenced resource
	JSONPath string `json:"jsonPath"`

	// FromResource specifies the name of the resource where the value should be read.
	FromResource *lsv1alpha1.TypedObjectReference `json:"fromResource,omitempty"`

	// FromObjectReference describes that the jsonpath points to a object reference where the actual value is read from.
	// This is helpful if for example a deployed resource referenced a secret and that exported value is in that secret.
	FromObjectReference *FromObjectReference `json:"fromObjectRef,omitempty"`
}

Export describes one export that is read from a resource.

func (*Export) DeepCopy

func (in *Export) DeepCopy() *Export

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

func (*Export) DeepCopyInto

func (in *Export) DeepCopyInto(out *Export)

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

type Exports

type Exports struct {
	Exports []Export `json:"exports,omitempty"`
}

Exports describes one export that is read from a resource.

func (*Exports) DeepCopy

func (in *Exports) DeepCopy() *Exports

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

func (*Exports) DeepCopyInto

func (in *Exports) DeepCopyInto(out *Exports)

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

type FromObjectReference

type FromObjectReference struct {
	// APIVersion is the group and version for the resource being referenced.
	// If APIVersion is not specified, the specified Kind must be in the core API group.
	// For any other third-party types, APIVersion is required.
	APIVersion string `json:"apiVersion"`
	// Kind is the type of resource being referenced
	Kind string `json:"kind"`
	// JSONPath is the jsonpath to look for a value.
	// The JSONPath root is the referenced resource
	JSONPath string `json:"jsonPath"`
}

FromObjectReference describes that the jsonpath points to a object reference where the actual value is read from. This is helpful if for example a deployed resource referenced a secret and that exported value is in that secret.

func (*FromObjectReference) DeepCopy

func (in *FromObjectReference) DeepCopy() *FromObjectReference

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

func (*FromObjectReference) DeepCopyInto

func (in *FromObjectReference) DeepCopyInto(out *FromObjectReference)

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

type ManagedResourceStatus

type ManagedResourceStatus struct {
	// AnnotateBeforeDelete defines annotations that are being set before the manifest is being deleted.
	// +optional
	AnnotateBeforeDelete map[string]string `json:"annotateBeforeDelete,omitempty"`
	// Policy defines the manage policy for that resource.
	Policy ManifestPolicy `json:"policy,omitempty"`
	// Resources describes the managed kubernetes resource.
	Resource corev1.ObjectReference `json:"resource"`
}

ManagedResourceStatus describes the managed resource and their metadata.

func (*ManagedResourceStatus) DeepCopy

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

func (*ManagedResourceStatus) DeepCopyInto

func (in *ManagedResourceStatus) DeepCopyInto(out *ManagedResourceStatus)

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

type ManagedResourceStatusList

type ManagedResourceStatusList []ManagedResourceStatus

ManagedResourceStatusList describes a list of managed resource statuses.

func (ManagedResourceStatusList) DeepCopy

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

func (ManagedResourceStatusList) DeepCopyInto

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

func (ManagedResourceStatusList) ObjectReferenceList

func (mr ManagedResourceStatusList) ObjectReferenceList() []corev1.ObjectReference

ObjectReferenceList converts a ManagedResourceStatusList to a list of typed objet references.

func (ManagedResourceStatusList) TypedObjectReferenceList

func (mr ManagedResourceStatusList) TypedObjectReferenceList() []lsv1alpha1.TypedObjectReference

TypedObjectReferenceList converts a ManagedResourceStatusList to a list of typed objet references.

type Manifest

type Manifest struct {
	// Policy defines the manage policy for that resource.
	Policy ManifestPolicy `json:"policy,omitempty"`
	// Manifest defines the raw k8s manifest.
	Manifest *runtime.RawExtension `json:"manifest,omitempty"`
	// AnnotateBeforeCreate defines annotations that are being set before the manifest is being created.
	// +optional
	AnnotateBeforeCreate map[string]string `json:"annotateBeforeCreate,omitempty"`
	// AnnotateBeforeDelete defines annotations that are being set before the manifest is being deleted.
	// +optional
	AnnotateBeforeDelete map[string]string `json:"annotateBeforeDelete,omitempty"`
}

Manifest defines a manifest that is managed by the deployer.

func (*Manifest) DeepCopy

func (in *Manifest) DeepCopy() *Manifest

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

func (*Manifest) DeepCopyInto

func (in *Manifest) DeepCopyInto(out *Manifest)

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

type ManifestPolicy

type ManifestPolicy string

ManifestPolicy defines the strategy how a mnifest should be managed by the deployer.

const (
	// ManagePolicy is the default policy where the resource is
	// created, updated and deleted and it occupies already managed resources
	ManagePolicy ManifestPolicy = "manage"
	// FallbackPolicy defines a policy where the resource is created, updated and deleted
	// but only if not already managed by someone else (check for annotation with landscaper identity, deployitem name + namespace)
	FallbackPolicy ManifestPolicy = "fallback"
	// KeepPolicy defines a policy where the resource is only created and updated but not deleted.
	// It is not deleted when the whole deploy item is nor when the resource is not defined anymore.
	KeepPolicy ManifestPolicy = "keep"
	// IgnorePolicy defines a policy where the resource is completely ignored by the deployer.
	IgnorePolicy ManifestPolicy = "ignore"
	// ImmutablePolicy defines a policy where the resource is created and deleted but never updated.
	ImmutablePolicy ManifestPolicy = "immutable"
)

type PredefinedResourceGroup

type PredefinedResourceGroup struct {
	Type PredefinedResourceGroupType `json:"type,omitempty"`

	// +optional
	ForceDelete bool `json:"forceDelete,omitempty"`
}

func (*PredefinedResourceGroup) DeepCopy

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

func (*PredefinedResourceGroup) DeepCopyInto

func (in *PredefinedResourceGroup) DeepCopyInto(out *PredefinedResourceGroup)

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

type PredefinedResourceGroupType

type PredefinedResourceGroupType string
const (
	PredefinedResourceGroupNamespacedResources    PredefinedResourceGroupType = "namespaced-resources"
	PredefinedResourceGroupClusterScopedResources PredefinedResourceGroupType = "cluster-scoped-resources"
	PredefinedResourceGroupCRDs                   PredefinedResourceGroupType = "crds"
	PredefinedResourceGroupEmpty                  PredefinedResourceGroupType = "empty"
)

type ResourceType

type ResourceType struct {
	APIVersion string `json:"apiVersion,omitempty"`
	Kind       string `json:"kind,omitempty"`
	// +optional
	Names []string `json:"names,omitempty"`
	// +optional
	Namespaces []string `json:"namespaces,omitempty"`
}

func (*ResourceType) DeepCopy

func (in *ResourceType) DeepCopy() *ResourceType

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

func (*ResourceType) DeepCopyInto

func (in *ResourceType) DeepCopyInto(out *ResourceType)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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