packagedatamodel

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Overview

nolint

nolint

Index

Constants

View Source
const (
	ClusterRoleBindingName              = "%s-%s-cluster-rolebinding"
	ClusterRoleName                     = "%s-%s-cluster-role"
	DataPackagingAPIName                = "data.packaging.carvel.dev"
	DefaultAPIVersion                   = "install.package.carvel.dev/v1alpha1"
	DefaultNamespace                    = "default"
	DefaultPollInterval                 = 1 * time.Second
	DefaultPollTimeout                  = 15 * time.Minute
	DefaultRepositoryImageTag           = "latest"
	DefaultRepositoryImageTagConstraint = ">0.0.0"
	ErrPackageNotInstalled              = "package install does not exist in the namespace"
	ErrRepoNotExists                    = "package repository does not exist in the namespace"
	ErrPackageAlreadyExists             = "package install already exists in the namespace"
	ErrRepoAlreadyExists                = "package repository already exists in the namespace"
	KindClusterRole                     = "ClusterRole"
	KindClusterRoleBinding              = "ClusterRoleBinding"
	KindNamespace                       = "Namespace"
	KindPackageInstall                  = "PackageInstall"
	KindPackageRepository               = "PackageRepository"
	KindSecret                          = "Secret"
	KindSecretExport                    = "SecretExport"
	KindServiceAccount                  = "ServiceAccount"
	PackagingAPINotAvailable            = "package plugin can not be used as '%s/%s' API is not available in the cluster"
	PackagingAPIName                    = "packaging.carvel.dev"
	PackagingAPIVersion                 = "v1alpha1"
	SecretGenAPINotAvailable            = "secret plugin can not be used as '%s/%s' API is not available in the cluster"
	SecretGenAPIName                    = "secretgen.carvel.dev"
	SecretGenAPIVersion                 = "v1alpha1"
	SecretName                          = "%s-%s-values"
	ServiceAccountName                  = "%s-%s-sa"
	ShortDescriptionMaxLength           = 20
	TanzuPkgPluginAnnotation            = "tkg.tanzu.vmware.com/tanzu-package"
	TanzuPkgPluginPrefix                = "tanzu-package"
	TanzuPkgPluginResource              = "%s-%s"
	YamlSeparator                       = "---"
)
View Source
const (
	// DefaultQPS is the default maximum query per second for the rest config
	DefaultQPS = 200
	// DefaultBurst is the default maximum burst for throttle for the rest config
	DefaultBurst = 200
	// DefaultClusterPrefix is TKG cluster prefix
	DefaultClusterPrefix = "tkg-cli-"
	// DefaultLogLevel is the default log level
	DefaultLogLevel = 6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationType

type OperationType int
const (
	OperationTypeInstall OperationType = iota
	OperationTypeUpdate
)

type PackageAvailableOptions

type PackageAvailableOptions struct {
	Namespace                 string
	PackageName               string
	AllNamespaces             bool
	ValuesSchema              bool
	GenerateDefaultValuesFile bool
}

PackageAvailableOptions includes fields for package available

func NewPackageAvailableOptions

func NewPackageAvailableOptions() *PackageAvailableOptions

NewPackageAvailableOptions instantiates PackageAvailableOptions

type PackageOptions

type PackageOptions struct {
	Available              string
	ClusterRoleName        string
	ClusterRoleBindingName string
	Namespace              string
	PackageName            string
	PkgInstallName         string
	SecretName             string
	ServiceAccountName     string
	ValuesFile             string
	Version                string
	PollInterval           time.Duration
	PollTimeout            time.Duration
	AllNamespaces          bool
	CreateNamespace        bool
	Install                bool
	Wait                   bool
	SkipPrompt             bool
	Labels                 map[string]string
}

PackageOptions includes fields for package operations

func NewPackageOptions

func NewPackageOptions() *PackageOptions

NewPackageOptions instantiates PackageOptions

type PackagePluginNonCriticalError

type PackagePluginNonCriticalError struct {
	Reason string
}

PackagePluginNonCriticalError is used for non critical package plugin errors which should be treated more like warnings

func (*PackagePluginNonCriticalError) Error

type PackageProgress

type PackageProgress struct {
	// Use buffered chan so that sending goroutine doesn't block
	ProgressMsg chan string
	// Err chan for reporting errors
	Err chan error
	// Empty struct for signaling that goroutine is finished
	Done chan struct{}
}

PackageProgress includes channels for sending messages

type PkgPluginResourceCreationStatus

type PkgPluginResourceCreationStatus struct {
	IsServiceAccountCreated bool
	IsSecretCreated         bool
}

type RegistrySecretOptions

type RegistrySecretOptions struct {
	AllNamespaces         bool
	ExportToAllNamespaces bool
	PasswordStdin         bool
	SkipPrompt            bool
	Export                TypeBoolPtr
	Namespace             string
	Password              string
	PasswordEnvVar        string
	PasswordFile          string
	PasswordInput         string
	Server                string
	SecretName            string
	Username              string
}

RegistrySecretOptions includes fields for registry image pull secret operations

func NewRegistrySecretOptions

func NewRegistrySecretOptions() *RegistrySecretOptions

NewRegistrySecretOptions instantiates RegistrySecretOptions

type RepositoryOptions

type RepositoryOptions struct {
	Namespace        string
	RepositoryName   string
	RepositoryURL    string
	PollInterval     time.Duration
	PollTimeout      time.Duration
	AllNamespaces    bool
	CreateRepository bool
	CreateNamespace  bool
	IsForceDelete    bool
	SkipPrompt       bool
	Wait             bool
}

RepositoryOptions includes fields for repository operations

func NewRepositoryOptions

func NewRepositoryOptions() *RepositoryOptions

NewRepositoryOptions instantiates RepositoryOptions

type ResourceType

type ResourceType int
const (
	ResourceTypePackageInstall ResourceType = iota
	ResourceTypePackageRepository
)

func (ResourceType) String

func (r ResourceType) String() string

type TypeBoolPtr

type TypeBoolPtr struct {
	ExportToAllNamespaces *bool
}

TypeBoolPtr satisfies Value interface defined in "https://github.com/spf13/pflag/blob/master/flag.go"

func (*TypeBoolPtr) Set

func (v *TypeBoolPtr) Set(val string) error

Set sets the TypeBoolPtr variable based on the string argument

func (*TypeBoolPtr) String

func (v *TypeBoolPtr) String() string

String returns the string representation of a TypeBoolPtr variable

func (*TypeBoolPtr) Type

func (v *TypeBoolPtr) Type() string

Type returns the default type for a TypeBoolPtr variable

Jump to

Keyboard shortcuts

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