kotsutil

package
v1.75.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 35 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeIdentityConfig

func EncodeIdentityConfig(spec kotsv1beta1.IdentityConfig) ([]byte, error)

func EncodeIngressConfig

func EncodeIngressConfig(ingressConfig kotsv1beta1.IngressConfig) ([]byte, error)

func FixUpYAML

func FixUpYAML(inputContent []byte) ([]byte, error)

FixUpYAML is a general purpose function that will ensure that YAML is compatible with KOTS This ensures that lines aren't wrapped at 80 chars which breaks template functions

func GetIncompatbileKotsVersionMessage

func GetIncompatbileKotsVersionMessage(kotsApplication kotsv1beta1.Application, isInstall bool) string

func GetKurlRegistryCreds

func GetKurlRegistryCreds() (hostname string, username string, password string, finalErr error)

func GetKurlS3Secret

func GetKurlS3Secret() (*corev1.Secret, error)

func IsKotsAutoUpgradeSupported

func IsKotsAutoUpgradeSupported(app *kotsv1beta1.Application) bool

func IsKotsVersionCompatibleWithApp

func IsKotsVersionCompatibleWithApp(kotsApplication kotsv1beta1.Application, isInstall bool) bool

func IsKurl added in v1.33.0

func IsKurl(clientset kubernetes.Interface) bool

func LoadApplicationFromContents

func LoadApplicationFromContents(content []byte) (*applicationv1beta1.Application, error)

func LoadBackupFromContents

func LoadBackupFromContents(content []byte) (*velerov1.Backup, error)

func LoadConfigFromBytes

func LoadConfigFromBytes(data []byte) (*kotsv1beta1.Config, error)

func LoadConfigValuesFromFile

func LoadConfigValuesFromFile(configValuesFilePath string) (*kotsv1beta1.ConfigValues, error)

func LoadHelmChartsFromPath

func LoadHelmChartsFromPath(fromDir string) ([]*kotsv1beta1.HelmChart, error)

func LoadIdentityConfigFromContents

func LoadIdentityConfigFromContents(content []byte) (*kotsv1beta1.IdentityConfig, error)

func LoadIdentityFromContents

func LoadIdentityFromContents(content []byte) (*kotsv1beta1.Identity, error)

func LoadIngressConfigFromContents

func LoadIngressConfigFromContents(content []byte) (*kotsv1beta1.IngressConfig, error)

func LoadInstallationFromContents

func LoadInstallationFromContents(installationData []byte) (*kotsv1beta1.Installation, error)

func LoadInstallationFromPath

func LoadInstallationFromPath(installationFilePath string) (*kotsv1beta1.Installation, error)

func LoadKotsAppFromContents

func LoadKotsAppFromContents(data []byte) (*kotsv1beta1.Application, error)

func LoadLicenseFromBytes

func LoadLicenseFromBytes(data []byte) (*kotsv1beta1.License, error)

func LoadLicenseFromPath

func LoadLicenseFromPath(licenseFilePath string) (*kotsv1beta1.License, error)

func LoadPreflightFromContents

func LoadPreflightFromContents(content []byte) (*troubleshootv1beta2.Preflight, error)

func LoadSupportBundleFromContents

func LoadSupportBundleFromContents(data []byte) (*troubleshootv1beta2.SupportBundle, error)

func RemoveAppVersionLabelFromInstallationParams

func RemoveAppVersionLabelFromInstallationParams(configMapName string) error

Types

type InstallationParams

type InstallationParams struct {
	KotsadmRegistry        string
	SkipImagePush          bool
	SkipPreflights         bool
	SkipCompatibilityCheck bool
	RegistryIsReadOnly     bool
	EnableImageDeletion    bool
	EnsureRBAC             bool
	SkipRBACCheck          bool
	UseMinimalRBAC         bool
	StrictSecurityContext  bool
	WaitDuration           time.Duration
	WithMinio              bool
	AppVersionLabel        string
}

func GetInstallationParams

func GetInstallationParams(configMapName string) (InstallationParams, error)

type KotsKinds

KotsKinds are all of the special "client-side" kinds that are packaged in an application. These should be pointers because they are all optional. But a few are still expected in the code later, so we make them not pointers, because other codepaths expect them to be present

func EmptyKotsKinds

func EmptyKotsKinds() KotsKinds

create a new kots kinds, ensuring that the require objets exist as empty defaults

func LoadKotsKindsFromPath

func LoadKotsKindsFromPath(fromDir string) (*KotsKinds, error)

func (*KotsKinds) DecryptConfigValues

func (k *KotsKinds) DecryptConfigValues() error

func (*KotsKinds) EncryptConfigValues

func (k *KotsKinds) EncryptConfigValues() error

func (KotsKinds) GetKustomizeBinaryPath

func (k KotsKinds) GetKustomizeBinaryPath() string

GetKustomizeBinaryPath will return the kustomize binary version to use for this application applying the default, if there is one, for the current version of kots

func (*KotsKinds) HasPreflights

func (k *KotsKinds) HasPreflights() bool

func (*KotsKinds) IsConfigurable

func (k *KotsKinds) IsConfigurable() bool

func (KotsKinds) Marshal

func (o KotsKinds) Marshal(g string, v string, k string) (string, error)

Jump to

Keyboard shortcuts

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