Documentation
¶
Index ¶
- Constants
- Variables
- func CopyImages(options types.PushImagesOptions, kotsNamespace string) error
- func DeleteIngress(ctx context.Context, namespace string, clientset *kubernetes.Clientset) error
- func Deploy(deployOptions types.DeployOptions, log *logger.CLILogger) error
- func EnsureConfigMaps(deployOptions types.DeployOptions, clientset *kubernetes.Clientset) error
- func EnsureIngress(ctx context.Context, namespace string, clientset *kubernetes.Clientset, ...) error
- func ExtractAppAirgapArchive(archive string, destDir string, excludeImages bool, progressWriter io.Writer) error
- func GetImagesFromBundle(airgapBundle string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
- func GetMetadata(clientset kubernetes.Interface) types.Metadata
- func GetRegistryConfigFromCluster(namespace string, clientset kubernetes.Interface) (types.RegistryConfig, error)
- func IsAirgap() bool
- func IsMinioXlMigrationNeeded(clientset kubernetes.Interface, namespace string) (needsMigration bool, minioImage string, err error)
- func IsMinioXlMigrationRunning(ctx context.Context, clientset kubernetes.Interface, namespace string) (bool, error)
- func MarkMinioXlMigrationComplete(ctx context.Context, clientset kubernetes.Interface, namespace string) error
- func MigrateExistingMinioFilesystemDeployments(log *logger.CLILogger, deployOptions *types.DeployOptions) error
- func PushAppImagesFromDockerArchiveBundle(airgapBundle string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
- func PushAppImagesFromDockerArchivePath(airgapRootDir string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
- func PushAppImagesFromTempRegistry(airgapRootDir string, imageList []string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
- func PushImages(airgapArchive string, options types.PushImagesOptions) error
- func ReadDeployOptionsFromCluster(namespace string, clientset *kubernetes.Clientset) (*types.DeployOptions, error)
- func TagAndPushAppImagesFromBundle(airgapBundle string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
- func TagAndPushAppImagesFromPath(airgapRootDir string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
- func UpdateToVersion(newVersion string) error
- func Upgrade(clientset *kubernetes.Clientset, upgradeOptions types.UpgradeOptions) error
- func YAML(deployOptions types.DeployOptions) (map[string][]byte, error)
- type ProgressImage
- type ProgressReport
- type UpdateStatus
Constants ¶
const (
MinioXlMigrationStatusConfigmapName = "kotsadm-minio-xl-migration-status"
)
Variables ¶
var ( MinioImageTagDateRegexp = regexp.MustCompile(`RELEASE\.(\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}Z)`) // MigrateToMinioXlBeforeTime is the time that the minio version was released that removed the legacy backend // that we need to migrate from: https://github.com/minio/minio/releases/tag/RELEASE.2022-10-29T06-21-33Z MigrateToMinioXlBeforeTime = time.Date(2022, 10, 29, 6, 21, 33, 0, time.UTC) )
Functions ¶
func CopyImages ¶
func CopyImages(options types.PushImagesOptions, kotsNamespace string) error
Copies Admin Console images from public registry to private registry
func DeleteIngress ¶
func EnsureConfigMaps ¶
func EnsureConfigMaps(deployOptions types.DeployOptions, clientset *kubernetes.Clientset) error
func EnsureIngress ¶
func EnsureIngress(ctx context.Context, namespace string, clientset *kubernetes.Clientset, ingressSpec kotsv1beta1.IngressConfigSpec) error
func ExtractAppAirgapArchive ¶
func GetImagesFromBundle ¶
func GetImagesFromBundle(airgapBundle string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
func GetMetadata ¶
func GetMetadata(clientset kubernetes.Interface) types.Metadata
func GetRegistryConfigFromCluster ¶
func GetRegistryConfigFromCluster(namespace string, clientset kubernetes.Interface) (types.RegistryConfig, error)
func IsMinioXlMigrationNeeded ¶ added in v1.95.0
func IsMinioXlMigrationNeeded(clientset kubernetes.Interface, namespace string) (needsMigration bool, minioImage string, err error)
IsMinioXlMigrationNeeded checks if the minio statefulset needs to be migrated from FS to XL. If the minio statefulset exists, it returns a bool indicating whether a migration is needed and the image of the minio container. If the minio statefulset does not exist, it returns false and an empty string.
func IsMinioXlMigrationRunning ¶ added in v1.95.0
func MarkMinioXlMigrationComplete ¶ added in v1.95.0
func MigrateExistingMinioFilesystemDeployments ¶
func MigrateExistingMinioFilesystemDeployments(log *logger.CLILogger, deployOptions *types.DeployOptions) error
MigrateExistingMinioFilesystemDeployments excutes a migration of minio snapshots deployment to the local-volume-provider plugin and validates the backups are still accessible. The plugin must already be installed on the cluster with velero accessible. This function will configure the plugin and update the default backup storage location. If the backup storage location cannot be updated or the plugin fails, the
func PushAppImagesFromDockerArchiveBundle ¶ added in v1.82.0
func PushAppImagesFromDockerArchiveBundle(airgapBundle string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
func PushAppImagesFromDockerArchivePath ¶ added in v1.82.0
func PushAppImagesFromDockerArchivePath(airgapRootDir string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
func PushAppImagesFromTempRegistry ¶ added in v1.82.0
func PushAppImagesFromTempRegistry(airgapRootDir string, imageList []string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
func PushImages ¶
func PushImages(airgapArchive string, options types.PushImagesOptions) error
Pushes Admin Console images from airgap bundle to private registry
func ReadDeployOptionsFromCluster ¶
func ReadDeployOptionsFromCluster(namespace string, clientset *kubernetes.Clientset) (*types.DeployOptions, error)
func TagAndPushAppImagesFromBundle ¶
func TagAndPushAppImagesFromBundle(airgapBundle string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
func TagAndPushAppImagesFromPath ¶
func TagAndPushAppImagesFromPath(airgapRootDir string, options types.PushImagesOptions) ([]kustomizetypes.Image, error)
func UpdateToVersion ¶
func Upgrade ¶
func Upgrade(clientset *kubernetes.Clientset, upgradeOptions types.UpgradeOptions) error
Types ¶
type ProgressImage ¶
type ProgressImage struct { // image name and tag, "nginx:latest" DisplayName string `json:"displayName"` // image upload status: queued, uploading, uploaded, failed Status string `json:"status"` // error string set when status is failed Error string `json:"error"` // amount currently uploaded (currently number of layers) Current int64 `json:"current"` // total amount that needs to be uploaded (currently number of layers) Total int64 `json:"total"` // time when image started uploading StartTime time.Time `json:"startTime"` // time when image finished uploading EndTime time.Time `json:"endTime"` }
type ProgressReport ¶
type ProgressReport struct { // set to "progressReport" Type string `json:"type"` // the same progress text that used to be sent in unstructured message CompatibilityMessage string `json:"compatibilityMessage"` // all images found in archive Images []ProgressImage `json:"images"` }
type UpdateStatus ¶
type UpdateStatus string
const ( UpdateRunning UpdateStatus = "running" UpdateNotFound UpdateStatus = "not-found" UpdateFailed UpdateStatus = "failed" UpdateSuccessful UpdateStatus = "successful" UpdateUnknown UpdateStatus = "unknown" )
func GetKotsUpdateStatus ¶
func GetKotsUpdateStatus() (UpdateStatus, string, error)