resource

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAndWait

func ApplyAndWait(ctx context.Context, kubeClient client.Client, resource Resource, interval, timeout time.Duration, mutateFn func() error) (string, error)

ApplyAndWait takes an object implementing client.Object and a function to mutate the object. It creates or updates the object and returns the operation performed and an error if one occurred. It then waits for the object to reach the desired generation and ready condition.

Types

type ComponentSubscription

type ComponentSubscription struct {
	rep1alpha1.ComponentSubscription
}

ComponentSubscription is a wrapper around prj1alpha1.ComponentSubscription.

func (*ComponentSubscription) GetGeneration

func (c *ComponentSubscription) GetGeneration() int64

GetGeneration returns the generation of the component subscription.

func (*ComponentSubscription) GetObservedGeneration

func (c *ComponentSubscription) GetObservedGeneration() int64

GetObservedGeneration returns the observed generation of the component subscription.

func (*ComponentSubscription) ToClientObject

func (c *ComponentSubscription) ToClientObject() client.Object

ToClientObject returns the component subscription as a client.Object.

func (*ComponentSubscription) ToYamlExport

func (c *ComponentSubscription) ToYamlExport() (string, error)

ToYamlExport returns the component subscription as a YAML string. It can be used to export the component subscription to a file or to pass to kubectl apply.

type ProductDeploymentGenerator

type ProductDeploymentGenerator struct {
	prd1alpha1.ProductDeploymentGenerator
}

ProductDeploymentGenerator is a wrapper around prj1alpha1.ProductDeploymentGenerator.

func (*ProductDeploymentGenerator) GetGeneration

func (p *ProductDeploymentGenerator) GetGeneration() int64

GetGeneration returns the generation of the project.

func (*ProductDeploymentGenerator) GetObservedGeneration

func (p *ProductDeploymentGenerator) GetObservedGeneration() int64

GetObservedGeneration returns the observed generation of the project.

func (*ProductDeploymentGenerator) ToClientObject

func (p *ProductDeploymentGenerator) ToClientObject() client.Object

ToClientObject returns the project as a client.Object.

func (*ProductDeploymentGenerator) ToYamlExport

func (p *ProductDeploymentGenerator) ToYamlExport() (string, error)

ToYamlExport returns the project as a YAML string. It can be used to export the project to a file or to pass to kubectl apply.

type Project

type Project struct {
	prj1alpha1.Project
}

Project is a wrapper around prj1alpha1.Project.

func (*Project) GetGeneration

func (p *Project) GetGeneration() int64

GetGeneration returns the generation of the project.

func (*Project) GetObservedGeneration

func (p *Project) GetObservedGeneration() int64

GetObservedGeneration returns the observed generation of the project.

func (*Project) ToClientObject

func (p *Project) ToClientObject() client.Object

ToClientObject returns the project as a client.Object.

func (*Project) ToYamlExport

func (p *Project) ToYamlExport() (string, error)

ToYamlExport returns the project as a YAML string. It can be used to export the project to a file or to pass to kubectl apply.

type Resource

type Resource interface {
	ToClientObject() client.Object
	GetObservedGeneration() int64
	GetGeneration() int64
	GetConditions() []metav1.Condition
}

Resource is an interface for Kubernetes resources.

Jump to

Keyboard shortcuts

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