Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChartVersionUpdater ¶ added in v0.0.74
type ChartVersionUpdater interface { // UpdateForNewChartVersion does three things in sequence, all directly with Sherlock's API. // // 1. Report new chart version to Sherlock (meaning there's a new latest chart version) // 2. Update given chart releases (via chartReleaseSelectors) to point at the latest chart version and refresh to get the new latest version // - 9 times out of 10 this means `dev/${chartSelector}` based on how .autorelease.yaml file gets defaulted // 3. Refresh **template** chart releases that either: // - already follow latest chart version (so step 1 means they'd have an update if we didn't catch them in step 2) // - follow a chart release we just updated in step 2 (so step 2 means they'd have an update) UpdateForNewChartVersion(chartSelector string, newVersion string, lastVersion string, description string, chartReleaseSelectors ...string) error }
type Client ¶
type Client interface { StateLoader StateWriter ChartVersionUpdater GetStatus() error }
Client is an interface representing the ability to both read and create/update thelma's internal state using a sherlock client. We have this interface largely so we can generate a mock for it.
type Cluster ¶
type Cluster struct {
*models.SherlockClusterV3
}
type Environment ¶
type Environment struct {
*models.V2controllersEnvironment
}
type Environments ¶
type Environments []Environment
type Options ¶ added in v1.0.103
type Options struct { Addr string ConfigSource config.Config GhaOidcTokenProvider credentials.TokenProvider }
type Release ¶
type Release struct {
*models.V2controllersChartRelease
}
type StateLoader ¶
type StateWriter ¶ added in v0.0.71
type StateWriter interface { terra.StateWriter // CreateEnvironmentFromTemplate has the same *effect* as WriteEnvironments for the narrow case of creating a // BEE from a template, but it relies entirely on Sherlock for the template-default logic. // All the desired fields can be left blank to let Sherlock's defaulting behavior take over. // The name of the new environment is returned. // Of note here is that calling this function doesn't touch Thelma's in-memory state, only Sherlock's state. // Thelma's in-memory state will need to be reloaded to work with the newly-created environment. CreateEnvironmentFromTemplate(templateName string, options terra.CreateOptions) (string, error) // PinEnvironmentVersions adapts Thelma's pin-override pattern to Sherlock's changeset pattern to apply specific // versions to chart releases in an environment. PinEnvironmentVersions(environmentName string, versions map[string]terra.VersionOverride) error // SetTerraHelmfileRefForEntireEnvironment sets it both for the environment itself and for every chart release it // contains. This generally matches the semantics of Thelma's old state bucket, where the environment's value // would be used for chart releases if they didn't have their own override. Sherlock enforces that every chart // release always contain its own version information, so the closest we can get is just set that value to what // we're given here. SetTerraHelmfileRefForEntireEnvironment(environment terra.Environment, terraHelmfileRef string) error // ResetEnvironmentAndPinToDev is a temporary-ish hack implementation of what Thelma could do with state bucket // overrides. Because overrides were stored separately, Thelma could drop them, leading to really nice pin-and- // unpin semantics. Sherlock doesn't have this notion, at least not right now. Versions just are, and while this // allows cool things like following a specific branch, Sherlock doesn't currently have a mechanism to go back to // some default set of versions. The closest we can get is effectively re-pinning the environment to dev. We can // think about adding this to Sherlock in the future, because it does have some default-version mechanisms, they're // just not exposed in the API like how unpinning would expect. ResetEnvironmentAndPinToDev(environment terra.Environment) error // SetEnvironmentOffline controls the "offline" flag on a given environment. // Of note here is that calling this function doesn't touch Thelma's in-memory state, only Sherlock's state. // Thelma's in-memory state will need to be reloaded to work with the mutated environment. SetEnvironmentOffline(environmentName string, offline bool) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.