Documentation ¶
Index ¶
- Variables
- func EncodeIdentityConfig(spec kotsv1beta1.IdentityConfig) ([]byte, error)
- func EncodeIngressConfig(ingressConfig kotsv1beta1.IngressConfig) ([]byte, error)
- func FindAirgapMetaInBundle(airgapBundle string) (*kotsv1beta1.Airgap, error)
- func FindAirgapMetaInDir(root string) (*kotsv1beta1.Airgap, error)
- func FixUpYAML(inputContent []byte) ([]byte, error)
- func GenUniqueKotsKindFilename(renderedKotsKinds map[string][]byte, prefix string) string
- func GetImagesFromKotsKinds(kotsKinds *KotsKinds) []string
- func GetIncompatbileKotsVersionMessage(kotsApplication kotsv1beta1.Application, isInstall bool) string
- func GetKOTSBinPath() string
- func GetKurlRegistryCreds() (hostname string, username string, password string, finalErr error)
- func GetKurlS3Secret() (*corev1.Secret, error)
- func IsHelmChartKind(content []byte) bool
- func IsKotsAutoUpgradeSupported(app *kotsv1beta1.Application) bool
- func IsKotsVersionCompatibleWithApp(kotsApplication kotsv1beta1.Application, isInstall bool) bool
- func LoadAirgapFromBytes(data []byte) (*kotsv1beta1.Airgap, error)
- func LoadApplicationFromBytes(content []byte) (*kotsv1beta1.Application, error)
- func LoadApplicationFromContents(content []byte) (*applicationv1beta1.Application, error)
- func LoadBackupFromContents(content []byte) (*velerov1.Backup, error)
- func LoadBrandingArchiveFromPath(archivePath string) (*bytes.Buffer, error)
- func LoadConfigFromBytes(data []byte) (*kotsv1beta1.Config, error)
- func LoadConfigValuesFromBytes(data []byte) (*kotsv1beta1.ConfigValues, error)
- func LoadConfigValuesFromFile(configValuesFilePath string) (*kotsv1beta1.ConfigValues, error)
- func LoadHelmChartsFromContents(data []byte) (*kotsv1beta1.HelmChartList, error)
- func LoadHelmChartsFromPath(fromDir string) ([]*kotsv1beta1.HelmChart, error)
- func LoadIdentityConfigFromContents(content []byte) (*kotsv1beta1.IdentityConfig, error)
- func LoadIdentityFromContents(content []byte) (*kotsv1beta1.Identity, error)
- func LoadIngressConfigFromContents(content []byte) (*kotsv1beta1.IngressConfig, error)
- func LoadInstallationFromContents(installationData []byte) (*kotsv1beta1.Installation, error)
- func LoadInstallationFromPath(installationFilePath string) (*kotsv1beta1.Installation, error)
- func LoadKotsAppFromContents(data []byte) (*kotsv1beta1.Application, error)
- func LoadLicenseFromBytes(data []byte) (*kotsv1beta1.License, error)
- func LoadLicenseFromPath(licenseFilePath string) (*kotsv1beta1.License, error)
- func LoadPreflightFromContents(content []byte) (*troubleshootv1beta2.Preflight, error)
- func LoadSupportBundleFromContents(data []byte) (*troubleshootv1beta2.SupportBundle, error)
- func RemoveAppVersionLabelFromInstallationParams(configMapName string) error
- func RemoveEmptyMappingFields(input []byte) ([]byte, error)
- func SupportBundleToAnalyzer(sb *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.Analyzer
- func SupportBundleToCollector(sb *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.Collector
- func WriteKotsKinds(kotsKinds map[string][]byte, rootDir string) error
- type InstallationParams
- type KotsKinds
- func (k *KotsKinds) DecryptConfigValues() error
- func (k *KotsKinds) EncryptConfigValues() error
- func (k KotsKinds) GetKustomizeBinaryPath() string
- func (k *KotsKinds) HasPreflights() bool
- func (k *KotsKinds) IsConfigurable() bool
- func (o KotsKinds) Marshal(g string, v string, k string) (string, error)
- type OverlySimpleGVK
- type OverlySimpleMetadata
Constants ¶
This section is empty.
Variables ¶
var (
BrandingFontFileExtensions = map[string]string{
".woff": "woff",
".woff2": "woff2",
".ttf": "truetype",
".otf": "opentype",
".eot": "embedded-opentype",
".svg": "svg",
}
)
Functions ¶
func EncodeIdentityConfig ¶
func EncodeIdentityConfig(spec kotsv1beta1.IdentityConfig) ([]byte, error)
func EncodeIngressConfig ¶
func EncodeIngressConfig(ingressConfig kotsv1beta1.IngressConfig) ([]byte, error)
func FindAirgapMetaInBundle ¶ added in v1.82.0
func FindAirgapMetaInBundle(airgapBundle string) (*kotsv1beta1.Airgap, error)
func FindAirgapMetaInDir ¶ added in v1.82.0
func FindAirgapMetaInDir(root string) (*kotsv1beta1.Airgap, error)
func FixUpYAML ¶
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 GenUniqueKotsKindFilename ¶ added in v1.98.0
func GetImagesFromKotsKinds ¶
func GetIncompatbileKotsVersionMessage ¶
func GetIncompatbileKotsVersionMessage(kotsApplication kotsv1beta1.Application, isInstall bool) string
func GetKOTSBinPath ¶ added in v1.82.0
func GetKOTSBinPath() string
func GetKurlRegistryCreds ¶
func GetKurlS3Secret ¶
func IsHelmChartKind ¶ added in v1.94.1
func IsKotsAutoUpgradeSupported ¶
func IsKotsAutoUpgradeSupported(app *kotsv1beta1.Application) bool
func IsKotsVersionCompatibleWithApp ¶
func IsKotsVersionCompatibleWithApp(kotsApplication kotsv1beta1.Application, isInstall bool) bool
func LoadAirgapFromBytes ¶ added in v1.82.0
func LoadAirgapFromBytes(data []byte) (*kotsv1beta1.Airgap, error)
func LoadApplicationFromBytes ¶ added in v1.90.0
func LoadApplicationFromBytes(content []byte) (*kotsv1beta1.Application, error)
func LoadApplicationFromContents ¶
func LoadApplicationFromContents(content []byte) (*applicationv1beta1.Application, error)
func LoadBrandingArchiveFromPath ¶ added in v1.86.2
func LoadConfigFromBytes ¶
func LoadConfigFromBytes(data []byte) (*kotsv1beta1.Config, error)
func LoadConfigValuesFromBytes ¶
func LoadConfigValuesFromBytes(data []byte) (*kotsv1beta1.ConfigValues, error)
func LoadConfigValuesFromFile ¶
func LoadConfigValuesFromFile(configValuesFilePath string) (*kotsv1beta1.ConfigValues, error)
func LoadHelmChartsFromContents ¶ added in v1.98.0
func LoadHelmChartsFromContents(data []byte) (*kotsv1beta1.HelmChartList, 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 RemoveEmptyMappingFields ¶ added in v1.98.0
RemoveEmptyMappingFields removes empty mapping fields from a yaml document for the specific properties that kots applies kustomizations to. This is necessary because kustomize will fail to apply a kustomization if these fields contain null values: https://github.com/kubernetes-sigs/kustomize/issues/5050
The properties are:
- metadata.labels
- metadata.annotations
- spec.containers
- spec.initContainers
- spec.template.spec.containers
- spec.template.spec.initContainers
- spec.imagePullSecrets
- spec.template.spec.imagePullSecrets
func SupportBundleToAnalyzer ¶
func SupportBundleToAnalyzer(sb *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.Analyzer
func SupportBundleToCollector ¶
func SupportBundleToCollector(sb *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.Collector
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 ¶
type KotsKinds struct { KotsApplication kotsv1beta1.Application Application *applicationv1beta1.Application HelmCharts *kotsv1beta1.HelmChartList Collector *troubleshootv1beta2.Collector Preflight *troubleshootv1beta2.Preflight Analyzer *troubleshootv1beta2.Analyzer SupportBundle *troubleshootv1beta2.SupportBundle Redactor *troubleshootv1beta2.Redactor HostPreflight *troubleshootv1beta2.HostPreflight Config *kotsv1beta1.Config ConfigValues *kotsv1beta1.ConfigValues Installation kotsv1beta1.Installation License *kotsv1beta1.License Identity *kotsv1beta1.Identity IdentityConfig *kotsv1beta1.IdentityConfig Backup *velerov1.Backup Installer *kurlv1beta1.Installer LintConfig *kotsv1beta1.LintConfig }
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 KotsKindsFromMap ¶ added in v1.98.0
func LoadKotsKindsFromPath ¶
func (*KotsKinds) DecryptConfigValues ¶
func (*KotsKinds) EncryptConfigValues ¶
func (KotsKinds) GetKustomizeBinaryPath ¶
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 (*KotsKinds) IsConfigurable ¶
type OverlySimpleGVK ¶ added in v1.94.1
type OverlySimpleGVK struct { APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` Metadata OverlySimpleMetadata `yaml:"metadata"` }