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) CreateNewCluster(userID string, isAllUsers bool, title string, token string) (string, error)
- func (s OCIStore) CreatePendingSupportBundle(id string, appID string, clusterID 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 (c OCIStore) DeletePendingScheduledInstanceSnapshots(clusterID string) error
- func (c OCIStore) DeletePendingScheduledSnapshots(appID string) error
- func (s OCIStore) DeletePendingSupportBundle(id 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) GetAppSlugFromID(appID 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 (c OCIStore) GetClientset() (*kubernetes.Clientset, error)
- func (s OCIStore) GetClusterIDFromDeployToken(deployToken string) (string, error)
- func (s OCIStore) GetClusterIDFromSlug(slug string) (string, error)
- func (c OCIStore) GetDownstream(clusterID string) (*downstreamtypes.Downstream, error)
- func (s OCIStore) GetLatestLicenseForApp(appID string) (*kotsv1beta1.License, error)
- func (s OCIStore) GetLatestPreflightResultsForSequenceZero() (*preflighttypes.PreflightResult, error)
- func (s OCIStore) GetLicenseForAppVersion(appID string, sequence int64) (*kotsv1beta1.License, error)
- func (s OCIStore) GetPendingAirgapUploadApp() (*airgaptypes.PendingApp, error)
- func (s OCIStore) GetPendingInstallationStatus() (*installationtypes.InstallStatus, error)
- func (s OCIStore) GetPreflightResults(appID string, sequence int64) (*preflighttypes.PreflightResult, 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) GetReportingInfo(appID string) *upstreamtypes.ReportingInfo
- func (s OCIStore) GetSession(id string) (*sessiontypes.Session, 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 (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) ListPendingSupportBundlesForApp(appID string) ([]*supportbundletypes.PendingSupportBundle, 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) 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) 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) 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) UpdateTaskStatusTimestamp(id string) 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") )
Functions ¶
This section is empty.
Types ¶
type 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
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) CreateNewCluster ¶
func (OCIStore) CreatePendingSupportBundle ¶
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) DeletePendingScheduledInstanceSnapshots ¶
func (OCIStore) DeletePendingScheduledSnapshots ¶
func (OCIStore) DeletePendingSupportBundle ¶ added in v1.32.0
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) GetAppSlugFromID ¶ added in v1.32.0
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) GetClientset ¶
func (c OCIStore) GetClientset() (*kubernetes.Clientset, error)
func (OCIStore) GetClusterIDFromDeployToken ¶
func (OCIStore) GetClusterIDFromSlug ¶
func (OCIStore) GetDownstream ¶
func (c OCIStore) GetDownstream(clusterID string) (*downstreamtypes.Downstream, error)
func (OCIStore) GetLatestLicenseForApp ¶
func (s OCIStore) GetLatestLicenseForApp(appID string) (*kotsv1beta1.License, error)
func (OCIStore) GetLatestPreflightResultsForSequenceZero ¶
func (s OCIStore) GetLatestPreflightResultsForSequenceZero() (*preflighttypes.PreflightResult, error)
func (OCIStore) GetLicenseForAppVersion ¶
func (OCIStore) GetPendingAirgapUploadApp ¶
func (s OCIStore) GetPendingAirgapUploadApp() (*airgaptypes.PendingApp, error)
func (OCIStore) GetPendingInstallationStatus ¶
func (s OCIStore) GetPendingInstallationStatus() (*installationtypes.InstallStatus, error)
func (OCIStore) GetPreflightResults ¶
func (s OCIStore) GetPreflightResults(appID string, sequence int64) (*preflighttypes.PreflightResult, error)
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) GetReportingInfo ¶
func (s OCIStore) GetReportingInfo(appID string) *upstreamtypes.ReportingInfo
func (OCIStore) GetSession ¶
func (s OCIStore) GetSession(id string) (*sessiontypes.Session, error)
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) 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) ListPendingScheduledInstanceSnapshots ¶
func (c OCIStore) ListPendingScheduledInstanceSnapshots(clusterID string) ([]snapshottypes.ScheduledInstanceSnapshot, error)
func (OCIStore) ListPendingScheduledSnapshots ¶
func (c OCIStore) ListPendingScheduledSnapshots(appID string) ([]snapshottypes.ScheduledSnapshot, error)
func (OCIStore) ListPendingSupportBundlesForApp ¶
func (s OCIStore) ListPendingSupportBundlesForApp(appID string) ([]*supportbundletypes.PendingSupportBundle, 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) SetIgnorePreflightPermissionErrors ¶
func (OCIStore) SetInstanceSnapshotSchedule ¶
func (OCIStore) SetInstanceSnapshotTTL ¶
func (OCIStore) SetIsKotsadmIDGenerated ¶
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) UpdateRegistry ¶
func (OCIStore) UpdateScheduledInstanceSnapshot ¶
func (OCIStore) UpdateScheduledSnapshot ¶
func (OCIStore) UpdateTaskStatusTimestamp ¶
Source Files
¶
- airgap_store.go
- app_store.go
- appstatus_store.go
- cluster_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
- reporting_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.