Documentation ¶
Index ¶
- func ClearTaskStatus(id string) error
- func CreateAppFromAirgap(pendingApp *PendingApp, airgapBundle multipart.File, registryHost string, ...) error
- func CreateAppVersionArchive(appID string, sequence int64, archivePath string) error
- func DownloadUpdate(a *App, archiveDir string, toCursor string) error
- func ExtractArchiveToTempDirectory(archiveFilename string) (string, error)
- func GetAppVersionArchive(appID string, sequence int) (string, error)
- func GetTaskStatus(id string) (string, error)
- func IsRequiredItem(item kotsv1beta1.ConfigItem) bool
- func IsUnsetItem(item kotsv1beta1.ConfigItem) bool
- func SetDownstreamVersionPendingPreflight(appID string, sequence int64) error
- func SetDownstreamVersionReady(appID string, sequence int64) error
- func SetTaskStatus(id string, message string, status string) error
- func UpdateConfigValuesInDB(filesInDir string, appID string, sequence int64) error
- func UpdateRegistry(appID string, hostname string, username string, password string, ...) error
- func UpdateTaskStatusTimestamp(id string) error
- type App
- func (a App) CreateFirstVersion(filesInDir string, source string) (int64, error)
- func (a App) CreateVersion(filesInDir string, source string) (int64, error)
- func (a App) GetVersions() ([]AppVersion, error)
- func (a *App) RenderDir(archiveDir string) error
- func (a *App) RenderFile(kotsKinds *kotsutil.KotsKinds, inputContent []byte) ([]byte, error)
- func (a App) RewriteImages(hostname string, username string, password string, namespace string, ...) error
- type AppVersion
- type Diff
- type Downstream
- type GitOpsConfig
- type PendingApp
- type RegistrySettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearTaskStatus ¶
func CreateAppFromAirgap ¶
func CreateAppFromAirgap(pendingApp *PendingApp, airgapBundle multipart.File, registryHost string, namespace string, username string, password string) error
CreateAppFromAirgap does a lot. Maybe too much. Definitely too much. This function assumes that there's an app in the database that doesn't have a version After execution, there will be a sequence 0 of the app, and all clusters in the database will also have a version
func CreateAppVersionArchive ¶
CreateAppVersion takes an unarchived app, makes an archive and then uploads it to s3 with the appID and sequence specified
func GetAppVersionArchive ¶
GetAppVersionArchive will fetch the archive and return a string that contains a directory name where it's extracted into
func GetTaskStatus ¶
func IsRequiredItem ¶ added in v1.13.3
func IsRequiredItem(item kotsv1beta1.ConfigItem) bool
func IsUnsetItem ¶ added in v1.13.3
func IsUnsetItem(item kotsv1beta1.ConfigItem) bool
func SetDownstreamVersionPendingPreflight ¶ added in v1.13.3
SetDownstreamVersionPendingPreflight sets the status for the downstream version with the given sequence and app id to "pending_preflight"
func SetDownstreamVersionReady ¶ added in v1.13.3
SetDownstreamVersionReady sets the status for the downstream version with the given sequence and app id to "pending"
func UpdateConfigValuesInDB ¶ added in v1.13.3
UpdateConfigValuesInDB it gets the config values from filesInDir and updates the app version config values in the db for the given sequence and app id
func UpdateRegistry ¶
Types ¶
type App ¶
type App struct { ID string Slug string Name string IsAirgap bool CurrentSequence int Downstreams []*Downstream RegistrySettings *RegistrySettings }
func GetFromSlug ¶
func (App) CreateFirstVersion ¶
CreateFirstVersion works much likst CreateVersion except that it assumes version 0 and never attempts to calculate a diff, or look at previous versions
func (App) CreateVersion ¶
CreateVersion creates a new version of the app in the database, but the caller is responsible for uploading the archive to s3
func (App) GetVersions ¶ added in v1.13.3
func (a App) GetVersions() ([]AppVersion, error)
return the list of versions available for an app
func (*App) RenderDir ¶
RenderDir renders an app archive dir this is useful for when the license/config have updated, and template functions need to be evaluated again
func (*App) RenderFile ¶ added in v1.13.7
RenderFile renders a single file this is useful for upstream/kotskinds files that are not rendered in the dir
func (App) RewriteImages ¶
func (a App) RewriteImages(hostname string, username string, password string, namespace string, configValues *kotsv1beta1.ConfigValues) error
RewriteImages will use the app (a) and send the images to the registry specified. It will create patches for these and create a new version of the application
type AppVersion ¶ added in v1.13.3
type Downstream ¶
type GitOpsConfig ¶
type GitOpsConfig struct { Provider string `json:"provider"` RepoURI string `json:"repoUri"` Hostname string `json:"hostname"` Path string `json:"path"` Branch string `json:"branch"` Format string `json:"format"` Action string `json:"action"` PublicKey string `json:"publicKey"` PrivateKey string `json:"-"` LastError string `json:"lastError"` }
func GetDownstreamGitOps ¶
func GetDownstreamGitOps(appID string, clusterID string) (*GitOpsConfig, error)
GetDownstreamGitOps will return the gitops config for a downstrea, This implementation copies how it works in typescript.
func (*GitOpsConfig) CloneURL ¶
func (g *GitOpsConfig) CloneURL() string
func (*GitOpsConfig) CommitURL ¶
func (g *GitOpsConfig) CommitURL(hash string) string
type PendingApp ¶
func GetPendingAirgapUploadApp ¶
func GetPendingAirgapUploadApp() (*PendingApp, error)