Documentation ¶
Index ¶
- Constants
- Variables
- type OCIStore
- func (s *OCIStore) AddAppToAllDownstreams(appID string) error
- func (s *OCIStore) ClearTaskStatus(id string) error
- func (s *OCIStore) CreateApp(name string, upstreamURI string, licenseData string, isAirgapEnabled bool, ...) (*apptypes.App, error)
- func (s *OCIStore) CreateAppVersion(appID string, currentSequence *int64, filesInDir string, source string, ...) (int64, error)
- func (s *OCIStore) CreateAppVersionArchive(appID string, sequence int64, archivePath string) error
- func (s *OCIStore) CreateInProgressSupportBundle(supportBundle *supportbundletypes.SupportBundle) error
- func (s *OCIStore) CreateNewCluster(userID string, isAllUsers bool, title string, token string) (string, error)
- func (c OCIStore) CreateScheduledInstanceSnapshot(snapshotID string, clusterID string, timestamp time.Time) error
- func (c OCIStore) CreateScheduledSnapshot(snapshotID string, appID string, timestamp time.Time) error
- func (s *OCIStore) CreateSession(forUser *usertypes.User, issuedAt time.Time, expiresAt time.Time, ...) (*sessiontypes.Session, error)
- func (s *OCIStore) CreateSupportBundle(id string, appID string, archivePath string, marshalledTree []byte) (*supportbundletypes.SupportBundle, error)
- func (s *OCIStore) DeleteDownstreamDeployStatus(appID string, clusterID string, sequence int64) error
- func (c OCIStore) DeletePendingScheduledInstanceSnapshots(clusterID string) error
- func (c OCIStore) DeletePendingScheduledSnapshots(appID string) error
- func (s *OCIStore) DeleteSession(id string) error
- func (s *OCIStore) GetAirgapInstallStatus(appID string) (*airgaptypes.InstallStatus, error)
- func (s *OCIStore) GetAllAppLicenses() ([]*kotsv1beta1.License, error)
- func (s *OCIStore) GetApp(id string) (*apptypes.App, error)
- func (s *OCIStore) GetAppFromSlug(slug string) (*apptypes.App, error)
- func (s *OCIStore) GetAppIDFromSlug(slug string) (string, error)
- func (s *OCIStore) GetAppStatus(appID string) (*appstatustypes.AppStatus, error)
- func (s *OCIStore) GetAppVersion(appID string, sequence int64) (*versiontypes.AppVersion, error)
- func (s *OCIStore) GetAppVersionArchive(appID string, sequence int64, dstPath string) error
- func (s *OCIStore) GetAppVersionsAfter(appID string, sequence int64) ([]*versiontypes.AppVersion, error)
- func (s *OCIStore) GetClusterIDFromDeployToken(deployToken string) (string, error)
- func (s *OCIStore) GetClusterIDFromSlug(slug string) (string, error)
- func (s *OCIStore) GetCurrentParentSequence(appID string, clusterID string) (int64, error)
- func (s *OCIStore) GetCurrentSequence(appID string, clusterID string) (int64, error)
- func (s *OCIStore) GetCurrentVersion(appID string, clusterID string) (*downstreamtypes.DownstreamVersion, error)
- func (c OCIStore) GetDownstream(clusterID string) (*downstreamtypes.Downstream, error)
- func (s *OCIStore) GetDownstreamOutput(appID string, clusterID string, sequence int64) (*downstreamtypes.DownstreamOutput, error)
- func (s *OCIStore) GetDownstreamVersionStatus(appID string, sequence int64) (types.DownstreamVersionStatus, error)
- func (s *OCIStore) GetIgnoreRBACErrors(appID string, sequence int64) (bool, error)
- func (s *OCIStore) GetLatestLicenseForApp(appID string) (*kotsv1beta1.License, error)
- func (s *OCIStore) GetLicenseForAppVersion(appID string, sequence int64) (*kotsv1beta1.License, error)
- func (s *OCIStore) GetParentSequenceForSequence(appID string, clusterID string, sequence int64) (int64, error)
- func (s *OCIStore) GetPastVersions(appID string, clusterID string) ([]downstreamtypes.DownstreamVersion, error)
- func (s *OCIStore) GetPendingAirgapUploadApp() (*airgaptypes.PendingApp, error)
- func (s *OCIStore) GetPendingInstallationStatus() (*installationtypes.InstallStatus, error)
- func (s *OCIStore) GetPendingVersions(appID string, clusterID string) ([]downstreamtypes.DownstreamVersion, error)
- func (s *OCIStore) GetPreflightProgress(appID string, sequence int64) (string, error)
- func (s *OCIStore) GetPreflightResults(appID string, sequence int64) (*preflighttypes.PreflightResult, error)
- func (s *OCIStore) GetPreviouslyDeployedSequence(appID string, clusterID string) (int64, error)
- func (s *OCIStore) GetPrometheusAddress() (string, error)
- func (s *OCIStore) GetRedactions(bundleID string) (troubleshootredact.RedactionList, error)
- func (s *OCIStore) GetRegistryDetailsForApp(appID string) (registrytypes.RegistrySettings, error)
- func (s *OCIStore) GetSession(id string) (*sessiontypes.Session, error)
- func (s *OCIStore) GetStatusForVersion(appID string, clusterID string, sequence int64) (types.DownstreamVersionStatus, error)
- func (s *OCIStore) GetSupportBundle(id string) (*supportbundletypes.SupportBundle, error)
- func (s *OCIStore) GetSupportBundleAnalysis(id string) (*supportbundletypes.SupportBundleAnalysis, error)
- func (s *OCIStore) GetSupportBundleArchive(bundleID string) (string, error)
- func (s *OCIStore) GetSupportBundleSpecForApp(id string) (string, error)
- func (s *OCIStore) GetTaskStatus(id string) (string, string, error)
- func (s *OCIStore) Init() error
- func (s *OCIStore) IsDownstreamDeploySuccessful(appID string, clusterID string, sequence int64) (bool, error)
- func (c OCIStore) IsGitOpsEnabledForApp(appID string) (bool, error)
- func (s *OCIStore) IsIdentityServiceSupportedForVersion(appID string, sequence int64) (bool, error)
- func (s *OCIStore) IsKotsadmIDGenerated() (bool, error)
- func (s *OCIStore) IsNotFound(err error) bool
- func (s *OCIStore) IsRollbackSupportedForVersion(appID string, sequence int64) (bool, error)
- func (s *OCIStore) IsSnapshotsSupportedForVersion(a *apptypes.App, sequence int64, renderer rendertypes.Renderer) (bool, error)
- func (s *OCIStore) ListAppsForDownstream(clusterID string) ([]*apptypes.App, error)
- func (s *OCIStore) ListClusters() ([]*downstreamtypes.Downstream, error)
- func (s *OCIStore) ListDownstreamsForApp(appID string) ([]downstreamtypes.Downstream, error)
- func (s *OCIStore) ListInstalledAppSlugs() ([]string, error)
- func (s *OCIStore) ListInstalledApps() ([]*apptypes.App, error)
- func (c OCIStore) ListPendingScheduledInstanceSnapshots(clusterID string) ([]snapshottypes.ScheduledInstanceSnapshot, error)
- func (c OCIStore) ListPendingScheduledSnapshots(appID string) ([]snapshottypes.ScheduledSnapshot, error)
- func (s *OCIStore) ListSupportBundles(appID string) ([]*supportbundletypes.SupportBundle, error)
- func (s *OCIStore) RemoveApp(appID string) error
- func (s *OCIStore) ResetAirgapInstallInProgress(appID string) error
- func (s *OCIStore) ResetPreflightResults(appID string, sequence int64) error
- func (_ OCIStore) RunMigrations()
- func (s *OCIStore) SetAppInstallState(appID string, state string) error
- func (s *OCIStore) SetAppIsAirgap(appID string, isAirgap bool) error
- func (s *OCIStore) SetAppStatus(appID string, resourceStates []appstatustypes.ResourceState, ...) error
- func (s *OCIStore) SetDownstreamVersionPendingPreflight(appID string, sequence int64) error
- func (s *OCIStore) SetDownstreamVersionReady(appID string, sequence int64) error
- func (s *OCIStore) SetIgnorePreflightPermissionErrors(appID string, sequence int64) error
- func (s *OCIStore) SetInstanceSnapshotSchedule(clusterID string, snapshotSchedule string) error
- func (s *OCIStore) SetInstanceSnapshotTTL(clusterID string, snapshotTTL string) error
- func (s *OCIStore) SetIsKotsadmIDGenerated() error
- func (s *OCIStore) SetPreflightProgress(appID string, sequence int64, progress string) error
- func (s *OCIStore) SetPreflightResults(appID string, sequence int64, results []byte) error
- func (s *OCIStore) SetPrometheusAddress(address string) error
- func (s *OCIStore) SetRedactions(bundleID string, redacts troubleshootredact.RedactionList) error
- func (c OCIStore) SetSnapshotSchedule(appID string, snapshotSchedule string) error
- func (c OCIStore) SetSnapshotTTL(appID string, snapshotTTL string) error
- func (s *OCIStore) SetSupportBundleAnalysis(id string, insights []byte) error
- func (s *OCIStore) SetTaskStatus(id string, message string, status string) error
- func (c OCIStore) SetUpdateCheckerSpec(appID string, updateCheckerSpec string) error
- func (s *OCIStore) UpdateAppLicense(appID string, sequence int64, archiveDir string, ...) (int64, error)
- func (s *OCIStore) UpdateDownstreamDeployStatus(appID string, clusterID string, sequence int64, isError bool, ...) error
- func (s *OCIStore) UpdateDownstreamVersionStatus(appID string, sequence int64, status string, statusInfo string) error
- func (s *OCIStore) UpdateRegistry(appID string, hostname string, username string, password string, ...) error
- func (c OCIStore) UpdateScheduledInstanceSnapshot(snapshotID string, backupName string) error
- func (c OCIStore) UpdateScheduledSnapshot(snapshotID string, backupName string) error
- func (s *OCIStore) UpdateSupportBundle(bundle *supportbundletypes.SupportBundle) error
- func (s *OCIStore) UpdateTaskStatusTimestamp(id string) error
- func (s *OCIStore) UploadSupportBundle(bundleID string, archivePath string, marshalledTree []byte) error
- func (s *OCIStore) WaitForReady(ctx context.Context) error
Constants ¶
View Source
const ( AppListConfigmapName = "kotsadm-apps" AppDownstreamsConfigMapName = "kotsadm-appdownstreams" )
View Source
const ( ClusterListConfigmapName = "kotsadm-clusters" ClusterDeployTokenSecret = "kotsadm-clustertokens" )
View Source
const (
AppVersionConfigmapPrefix = "kotsadm-appversion-"
)
View Source
const (
PendingInstallationsConfigMapName = "kotsadm-pendinginstallation"
)
View Source
const (
SessionSecretName = "kotsadm-sessions"
)
View Source
const (
TaskStatusConfigMapName = `kotsadm-tasks`
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrNotImplemented = errors.New("not implemented in ocistore") )
OCIStore stores most data in an OCI compatible image repository,
but does not make guarantees that every thing is stored there. Some data is stored locally in Kuberntes ConfigMaps and Secrets to speed up retrieval A note about "transactions": in the pg store, there were a few places that relied on transactions to ensure integrity Here, this is stored in configmaps and secrets, and this inegrity is provided by the Kubernetes API's enforcement of puts. If a caller GETs a configmap, updates it and then tries to PUT that configmap, but another process has modified it, the PUT will be rejected. This level of consistency is all that's needed for KOTS
Functions ¶
This section is empty.
Types ¶
type OCIStore ¶
func StoreFromEnv ¶
func StoreFromEnv() *OCIStore
func (*OCIStore) AddAppToAllDownstreams ¶
func (*OCIStore) ClearTaskStatus ¶
func (*OCIStore) CreateAppVersion ¶
func (s *OCIStore) CreateAppVersion(appID string, currentSequence *int64, filesInDir string, source string, skipPreflights bool, gitops gitopstypes.DownstreamGitOps) (int64, error)
func (*OCIStore) CreateAppVersionArchive ¶
CreateAppVersion takes an unarchived app, makes an archive and then uploads it to s3 with the appID and sequence specified
func (*OCIStore) CreateInProgressSupportBundle ¶ added in v1.41.0
func (s *OCIStore) CreateInProgressSupportBundle(supportBundle *supportbundletypes.SupportBundle) error
func (*OCIStore) CreateNewCluster ¶
func (OCIStore) CreateScheduledInstanceSnapshot ¶
func (OCIStore) CreateScheduledSnapshot ¶
func (*OCIStore) CreateSession ¶
func (*OCIStore) CreateSupportBundle ¶
func (s *OCIStore) CreateSupportBundle(id string, appID string, archivePath string, marshalledTree []byte) (*supportbundletypes.SupportBundle, error)
func (*OCIStore) DeleteDownstreamDeployStatus ¶ added in v1.40.0
func (OCIStore) DeletePendingScheduledInstanceSnapshots ¶
func (OCIStore) DeletePendingScheduledSnapshots ¶
func (*OCIStore) DeleteSession ¶
func (*OCIStore) GetAirgapInstallStatus ¶
func (s *OCIStore) GetAirgapInstallStatus(appID string) (*airgaptypes.InstallStatus, error)
func (*OCIStore) GetAllAppLicenses ¶
func (s *OCIStore) GetAllAppLicenses() ([]*kotsv1beta1.License, error)
func (*OCIStore) GetAppFromSlug ¶
func (*OCIStore) GetAppIDFromSlug ¶
func (*OCIStore) GetAppStatus ¶
func (s *OCIStore) GetAppStatus(appID string) (*appstatustypes.AppStatus, error)
func (*OCIStore) GetAppVersion ¶
func (s *OCIStore) GetAppVersion(appID string, sequence int64) (*versiontypes.AppVersion, error)
func (*OCIStore) GetAppVersionArchive ¶
GetAppVersionArchive will fetch the archive and return a string that contains a directory name where it's extracted into
func (*OCIStore) GetAppVersionsAfter ¶
func (s *OCIStore) GetAppVersionsAfter(appID string, sequence int64) ([]*versiontypes.AppVersion, error)
func (*OCIStore) GetClusterIDFromDeployToken ¶
func (*OCIStore) GetClusterIDFromSlug ¶
func (*OCIStore) GetCurrentParentSequence ¶ added in v1.40.0
func (*OCIStore) GetCurrentSequence ¶ added in v1.40.0
func (*OCIStore) GetCurrentVersion ¶ added in v1.40.0
func (s *OCIStore) GetCurrentVersion(appID string, clusterID string) (*downstreamtypes.DownstreamVersion, error)
func (OCIStore) GetDownstream ¶
func (c OCIStore) GetDownstream(clusterID string) (*downstreamtypes.Downstream, error)
func (*OCIStore) GetDownstreamOutput ¶ added in v1.40.0
func (s *OCIStore) GetDownstreamOutput(appID string, clusterID string, sequence int64) (*downstreamtypes.DownstreamOutput, error)
func (*OCIStore) GetDownstreamVersionStatus ¶ added in v1.40.0
func (*OCIStore) GetIgnoreRBACErrors ¶ added in v1.40.0
func (*OCIStore) GetLatestLicenseForApp ¶
func (s *OCIStore) GetLatestLicenseForApp(appID string) (*kotsv1beta1.License, error)
func (*OCIStore) GetLicenseForAppVersion ¶
func (*OCIStore) GetParentSequenceForSequence ¶ added in v1.40.0
func (*OCIStore) GetPastVersions ¶ added in v1.40.0
func (s *OCIStore) GetPastVersions(appID string, clusterID string) ([]downstreamtypes.DownstreamVersion, error)
func (*OCIStore) GetPendingAirgapUploadApp ¶
func (s *OCIStore) GetPendingAirgapUploadApp() (*airgaptypes.PendingApp, error)
func (*OCIStore) GetPendingInstallationStatus ¶
func (s *OCIStore) GetPendingInstallationStatus() (*installationtypes.InstallStatus, error)
func (*OCIStore) GetPendingVersions ¶ added in v1.40.0
func (s *OCIStore) GetPendingVersions(appID string, clusterID string) ([]downstreamtypes.DownstreamVersion, error)
func (*OCIStore) GetPreflightProgress ¶ added in v1.35.0
func (*OCIStore) GetPreflightResults ¶
func (s *OCIStore) GetPreflightResults(appID string, sequence int64) (*preflighttypes.PreflightResult, error)
func (*OCIStore) GetPreviouslyDeployedSequence ¶ added in v1.40.0
func (*OCIStore) GetPrometheusAddress ¶
func (*OCIStore) GetRedactions ¶
func (s *OCIStore) GetRedactions(bundleID string) (troubleshootredact.RedactionList, error)
func (*OCIStore) GetRegistryDetailsForApp ¶
func (s *OCIStore) GetRegistryDetailsForApp(appID string) (registrytypes.RegistrySettings, error)
func (*OCIStore) GetSession ¶
func (s *OCIStore) GetSession(id string) (*sessiontypes.Session, error)
func (*OCIStore) GetStatusForVersion ¶ added in v1.40.0
func (*OCIStore) GetSupportBundle ¶
func (s *OCIStore) GetSupportBundle(id string) (*supportbundletypes.SupportBundle, error)
func (*OCIStore) GetSupportBundleAnalysis ¶
func (s *OCIStore) GetSupportBundleAnalysis(id string) (*supportbundletypes.SupportBundleAnalysis, error)
func (*OCIStore) GetSupportBundleArchive ¶
GetSupportBundle will fetch the bundle archive and return a path to where it is stored. The caller is responsible for deleting.
func (*OCIStore) GetSupportBundleSpecForApp ¶
func (*OCIStore) GetTaskStatus ¶
func (*OCIStore) IsDownstreamDeploySuccessful ¶ added in v1.40.0
func (OCIStore) IsGitOpsEnabledForApp ¶
func (*OCIStore) IsIdentityServiceSupportedForVersion ¶
func (*OCIStore) IsKotsadmIDGenerated ¶
func (*OCIStore) IsNotFound ¶
func (*OCIStore) IsRollbackSupportedForVersion ¶
func (*OCIStore) IsSnapshotsSupportedForVersion ¶
func (*OCIStore) ListAppsForDownstream ¶
func (*OCIStore) ListClusters ¶
func (s *OCIStore) ListClusters() ([]*downstreamtypes.Downstream, error)
func (*OCIStore) ListDownstreamsForApp ¶
func (s *OCIStore) ListDownstreamsForApp(appID string) ([]downstreamtypes.Downstream, error)
func (*OCIStore) ListInstalledAppSlugs ¶
func (*OCIStore) ListInstalledApps ¶
func (OCIStore) ListPendingScheduledInstanceSnapshots ¶
func (c OCIStore) ListPendingScheduledInstanceSnapshots(clusterID string) ([]snapshottypes.ScheduledInstanceSnapshot, error)
func (OCIStore) ListPendingScheduledSnapshots ¶
func (c OCIStore) ListPendingScheduledSnapshots(appID string) ([]snapshottypes.ScheduledSnapshot, error)
func (*OCIStore) ListSupportBundles ¶
func (s *OCIStore) ListSupportBundles(appID string) ([]*supportbundletypes.SupportBundle, error)
func (*OCIStore) ResetAirgapInstallInProgress ¶
func (*OCIStore) ResetPreflightResults ¶
func (OCIStore) RunMigrations ¶
func (_ OCIStore) RunMigrations()
func (*OCIStore) SetAppInstallState ¶
func (*OCIStore) SetAppIsAirgap ¶
func (*OCIStore) SetAppStatus ¶ added in v1.35.0
func (s *OCIStore) SetAppStatus(appID string, resourceStates []appstatustypes.ResourceState, updatedAt time.Time, sequence int64) error
func (*OCIStore) SetDownstreamVersionPendingPreflight ¶ added in v1.40.0
func (*OCIStore) SetDownstreamVersionReady ¶ added in v1.40.0
func (*OCIStore) SetIgnorePreflightPermissionErrors ¶
func (*OCIStore) SetInstanceSnapshotSchedule ¶
func (*OCIStore) SetInstanceSnapshotTTL ¶
func (*OCIStore) SetIsKotsadmIDGenerated ¶
func (*OCIStore) SetPreflightProgress ¶ added in v1.35.0
func (*OCIStore) SetPreflightResults ¶
func (*OCIStore) SetPrometheusAddress ¶
func (*OCIStore) SetRedactions ¶
func (s *OCIStore) SetRedactions(bundleID string, redacts troubleshootredact.RedactionList) error
func (OCIStore) SetSnapshotSchedule ¶
func (OCIStore) SetSnapshotTTL ¶
func (*OCIStore) SetSupportBundleAnalysis ¶
func (*OCIStore) SetTaskStatus ¶
func (OCIStore) SetUpdateCheckerSpec ¶
func (*OCIStore) UpdateAppLicense ¶
func (s *OCIStore) UpdateAppLicense(appID string, sequence int64, archiveDir string, newLicense *kotsv1beta1.License, originalLicenseData string, failOnVersionCreate bool, gitops gitopstypes.DownstreamGitOps, renderer rendertypes.Renderer) (int64, error)
func (*OCIStore) UpdateDownstreamDeployStatus ¶ added in v1.40.0
func (s *OCIStore) UpdateDownstreamDeployStatus(appID string, clusterID string, sequence int64, isError bool, output downstreamtypes.DownstreamOutput) error
func (*OCIStore) UpdateDownstreamVersionStatus ¶ added in v1.40.0
func (*OCIStore) UpdateRegistry ¶
func (OCIStore) UpdateScheduledInstanceSnapshot ¶
func (OCIStore) UpdateScheduledSnapshot ¶
func (*OCIStore) UpdateSupportBundle ¶ added in v1.41.0
func (s *OCIStore) UpdateSupportBundle(bundle *supportbundletypes.SupportBundle) error
func (*OCIStore) UpdateTaskStatusTimestamp ¶
func (*OCIStore) UploadSupportBundle ¶ added in v1.41.0
Source Files ¶
- airgap_store.go
- app_store.go
- appstatus_store.go
- cluster_store.go
- downstream_store.go
- installation_store.go
- kotsadm_params_store.go
- license_store.go
- migrations.go
- oci_store.go
- preflight_store.go
- prometheus_address.go
- registry_store.go
- session_store.go
- snapshot_store.go
- supportbundle_store.go
- task_store.go
- version_store.go
Click to show internal directories.
Click to hide internal directories.