cpln

package
v0.0.0-...-26e64e1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SPECIAL_SECRET_TYPES = []string{"azure-sdk", "docker", "gcp"}

Functions

func GetWorkloadDeploymentsFromCpln

func GetWorkloadDeploymentsFromCpln(ctx Context, connector Connector, cr *unstructured.Unstructured) ([]deployment.Deployment, error)

func Name

func ReadTagsFromAnnotations

func ReadTagsFromAnnotations(cr *unstructured.Unstructured, cpln map[string]any)

func StoreTagsAsAnnotations

func StoreTagsAsAnnotations(cr *unstructured.Unstructured, cpln map[string]any)

Types

type Connector

type Connector interface {
	InjectUrlProvider(urlProvider UrlProvider)
	InjectConverter(converter Converter)

	Context(ctx context.Context, cr *unstructured.Unstructured) (Context, error)

	//Put works for create and update operations
	Put(ctx Context, cr *unstructured.Unstructured, dryRun bool) (string, error)

	Get(ctx Context, cr *unstructured.Unstructured) ([]byte, error)

	Delete(ctx Context, cr *unstructured.Unstructured) error

	UrlProvider
	Converter
}

func NewGenericConnector

func NewGenericConnector(client client.Client, apiUrl string) Connector

func NewSecretConnector

func NewSecretConnector(client client.Client, apiUrl string) Connector

type Context

type Context interface {
	context.Context
	Org() string
	Gvc() string
	Token() string
}

func NewContext

func NewContext(ctx context.Context, org, gvc, token string) Context

type Converter

type Converter interface {
	K8sFormat(ctx Context, cr *unstructured.Unstructured, cplnObj map[string]any) (*unstructured.Unstructured, error)

	CplnFormat(cr *unstructured.Unstructured) (map[string]any, error)
}

func NewGenericConverter

func NewGenericConverter(apiVersion string) Converter

func NewSecretConverter

func NewSecretConverter() Converter

type UrlProvider

type UrlProvider interface {
	WriteUrl(ctx Context, cr *unstructured.Unstructured) string
	ReadUrl(ctx Context, cr *unstructured.Unstructured) string
}

func NewGenericUrlProvider

func NewGenericUrlProvider(apiUrl string) UrlProvider

Jump to

Keyboard shortcuts

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