application

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelPrefix      = "apps.cozystack.io-"
	AnnotationPrefix = "apps.cozystack.io-"
)

Define constants for label and annotation prefixes

Variables

This section is empty.

Functions

This section is empty.

Types

type REST

type REST struct {
	// contains filtered or unexported fields
}

REST implements the RESTStorage interface for Application resources

func NewREST

func NewREST(dynamicClient dynamic.Interface, config *config.Resource) *REST

NewREST creates a new REST storage for Application with specific configuration

func (*REST) ConvertApplicationToHelmRelease

func (r *REST) ConvertApplicationToHelmRelease(app *appsv1alpha1.Application) (*helmv2.HelmRelease, error)

ConvertApplicationToHelmRelease converts an Application to a HelmRelease

func (*REST) ConvertHelmReleaseToApplication

func (r *REST) ConvertHelmReleaseToApplication(hr *unstructured.Unstructured) (appsv1alpha1.Application, error)

ConvertHelmReleaseToApplication converts a HelmRelease to an Application

func (*REST) ConvertToTable

func (r *REST) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

ConvertToTable implements the TableConvertor interface for displaying resources in a table format

func (*REST) Create

func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

Create handles the creation of a new Application by converting it to a HelmRelease

func (*REST) Delete

func (r *REST) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error)

Delete removes an Application by deleting the corresponding HelmRelease

func (*REST) Destroy

func (r *REST) Destroy()

Destroy releases resources associated with REST

func (*REST) Get

func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get retrieves an Application by converting the corresponding HelmRelease

func (*REST) GetSingularName

func (r *REST) GetSingularName() string

GetSingularName returns the singular name of the resource

func (*REST) GroupVersionKind

func (r *REST) GroupVersionKind(schema.GroupVersion) schema.GroupVersionKind

GroupVersionKind returns the GroupVersionKind for REST

func (*REST) Kind

func (r *REST) Kind() string

Kind returns the resource kind used for API discovery

func (*REST) List

List retrieves a list of Applications by converting HelmReleases

func (*REST) NamespaceScoped

func (r *REST) NamespaceScoped() bool

NamespaceScoped indicates whether the resource is namespaced

func (*REST) New

func (r *REST) New() runtime.Object

New creates a new instance of Application

func (*REST) NewList

func (r *REST) NewList() runtime.Object

NewList returns an empty list of Application objects

func (*REST) Update

func (r *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

Update updates an existing Application by converting it to a HelmRelease

func (*REST) Watch

Watch sets up a watch on HelmReleases, filters them based on sourceRef and prefix, and converts events to Applications

Jump to

Keyboard shortcuts

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