Documentation
¶
Index ¶
- type Empty
- func (Empty) CurrentConfig() map[string]interface{}
- func (Empty) CurrentHelmValues() string
- func (Empty) CurrentHelmValuesDefaults() string
- func (Empty) CurrentKustomize() *Kustomize
- func (Empty) CurrentKustomizeOverlay(string) (string, bool)
- func (Empty) IsEmpty() bool
- func (Empty) Upstream() string
- func (Empty) Versioned() VersionedState
- type Kustomize
- type Lifeycle
- type MManager
- func (m *MManager) RemoveStateFile() error
- func (m *MManager) ResetLifecycle() error
- func (m *MManager) Save(v VersionedState) error
- func (m *MManager) SaveKustomize(kustomize *Kustomize) error
- func (m *MManager) SerializeAppMetadata(metadata api.ReleaseMetadata) error
- func (m *MManager) SerializeConfig(assets []api.Asset, meta api.ReleaseMetadata, ...) error
- func (m *MManager) SerializeContentSHA(contentSHA string) error
- func (m *MManager) SerializeHelmValues(values string, defaults string) error
- func (m *MManager) SerializeShipMetadata(metadata api.ShipAppMetadata, applicationType string) error
- func (m *MManager) SerializeUpstream(upstream string) error
- func (m *MManager) TryLoad() (State, error)
- type Manager
- type Overlay
- type State
- type StepsCompleted
- type V0
- func (v V0) CurrentConfig() map[string]interface{}
- func (v V0) CurrentHelmValues() string
- func (v V0) CurrentHelmValuesDefaults() string
- func (v V0) CurrentKustomize() *Kustomize
- func (v V0) CurrentKustomizeOverlay(string) (string, bool)
- func (v V0) IsEmpty() bool
- func (v V0) Upstream() string
- func (v V0) Versioned() VersionedState
- type V1
- type VersionedState
- func (v VersionedState) CurrentConfig() map[string]interface{}
- func (v VersionedState) CurrentHelmValues() string
- func (v VersionedState) CurrentHelmValuesDefaults() string
- func (v VersionedState) CurrentKustomize() *Kustomize
- func (v VersionedState) CurrentKustomizeOverlay(filename string) (contents string, isResource bool)
- func (v VersionedState) IsEmpty() bool
- func (v VersionedState) Upstream() string
- func (v VersionedState) Versioned() VersionedState
- func (v VersionedState) WithCompletedStep(step api.Step) VersionedState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Empty ¶
type Empty struct{}
func (Empty) CurrentConfig ¶
func (Empty) CurrentHelmValues ¶
func (Empty) CurrentHelmValuesDefaults ¶
func (Empty) CurrentKustomize ¶
func (Empty) Versioned ¶
func (Empty) Versioned() VersionedState
type Kustomize ¶
type Lifeycle ¶
type Lifeycle struct {
StepsCompleted StepsCompleted `json:"stepsCompleted,omitempty" yaml:"stepsCompleted,omitempty" hcl:"stepsCompleted,omitempty"`
}
type MManager ¶
MManager is the saved output of a plan run to load on future runs
func (*MManager) RemoveStateFile ¶
RemoveStateFile will attempt to remove the state file from disk
func (*MManager) ResetLifecycle ¶ added in v0.16.0
ResetLifecycle is used by `ship update --headed` to reset the saved stepsCompleted in the state.json
func (*MManager) Save ¶
func (m *MManager) Save(v VersionedState) error
func (*MManager) SaveKustomize ¶
func (*MManager) SerializeAppMetadata ¶ added in v0.16.0
func (m *MManager) SerializeAppMetadata(metadata api.ReleaseMetadata) error
SerializeAppMetadata is used by `ship app` to serialize replicated app metadata to state file
func (*MManager) SerializeConfig ¶
func (m *MManager) SerializeConfig(assets []api.Asset, meta api.ReleaseMetadata, templateContext map[string]interface{}) error
SerializeConfig takes the application data and input params and serializes a state file to disk
func (*MManager) SerializeContentSHA ¶
SerializeContentSHA writes the contentSHA to the state file
func (*MManager) SerializeHelmValues ¶
SerializeHelmValues takes user input helm values and serializes a state file to disk
func (*MManager) SerializeShipMetadata ¶ added in v0.16.0
func (m *MManager) SerializeShipMetadata(metadata api.ShipAppMetadata, applicationType string) error
SerializeShipMetadata is used by `ship init` to serialize metadata from ship applications to state file
func (*MManager) SerializeUpstream ¶
SerializeUpstream is used by `ship init` to serialize a state file with ChartURL to disk
type Manager ¶
type Manager interface {
SerializeHelmValues(values string, defaults string) error
SerializeConfig(
assets []api.Asset,
meta api.ReleaseMetadata,
templateContext map[string]interface{},
) error
TryLoad() (State, error)
RemoveStateFile() error
SaveKustomize(kustomize *Kustomize) error
SerializeUpstream(URL string) error
SerializeContentSHA(contentSHA string) error
SerializeShipMetadata(api.ShipAppMetadata, string) error
SerializeAppMetadata(api.ReleaseMetadata) error
Save(v VersionedState) error
ResetLifecycle() error
}
type Overlay ¶
type Overlay struct {
Patches map[string]string `json:"patches,omitempty" yaml:"patches,omitempty" hcl:"patches,omitempty"`
Resources map[string]string `json:"resources,omitempty" yaml:"resources,omitempty" hcl:"resources,omitempty"`
KustomizationYAML string `json:"kustomization_yaml,omitempty" yaml:"kustomization_yaml,omitempty" hcl:"kustomization_yaml,omitempty"`
}
func NewOverlay ¶ added in v0.17.0
func NewOverlay() Overlay
type State ¶
type State interface {
CurrentConfig() map[string]interface{}
CurrentKustomize() *Kustomize
CurrentKustomizeOverlay(filename string) (string, bool)
CurrentHelmValues() string
CurrentHelmValuesDefaults() string
Upstream() string
Versioned() VersionedState
IsEmpty() bool
}
now that we have Versioned(), we probably don't need nearly so broad an interface here
type StepsCompleted ¶
type StepsCompleted map[string]interface{}
func (StepsCompleted) String ¶
func (s StepsCompleted) String() string
type V0 ¶
type V0 map[string]interface{}
func (V0) CurrentConfig ¶
func (V0) CurrentHelmValues ¶
func (V0) CurrentHelmValuesDefaults ¶
func (V0) CurrentKustomize ¶
func (V0) Versioned ¶
func (v V0) Versioned() VersionedState
type V1 ¶
type V1 struct {
Config map[string]interface{} `json:"config" yaml:"config" hcl:"config"`
Terraform interface{} `json:"terraform,omitempty" yaml:"terraform,omitempty" hcl:"terraform,omitempty"`
HelmValues string `json:"helmValues,omitempty" yaml:"helmValues,omitempty" hcl:"helmValues,omitempty"`
HelmValuesDefaults string `json:"helmValuesDefaults,omitempty" yaml:"helmValuesDefaults,omitempty" hcl:"helmValuesDefaults,omitempty"`
Kustomize *Kustomize `json:"kustomize,omitempty" yaml:"kustomize,omitempty" hcl:"kustomize,omitempty"`
Upstream string `json:"upstream,omitempty" yaml:"upstream,omitempty" hcl:"upstream,omitempty"`
Metadata map[string]string `json:"metadata" yaml:"metadata" hcl:"metadata"`
//deprecated in favor of upstream
ChartURL string `json:"chartURL,omitempty" yaml:"chartURL,omitempty" hcl:"chartURL,omitempty"`
ChartRepoURL string `json:"ChartRepoURL,omitempty" yaml:"ChartRepoURL,omitempty" hcl:"ChartRepoURL,omitempty"`
ChartVersion string `json:"ChartVersion,omitempty" yaml:"ChartVersion,omitempty" hcl:"ChartVersion,omitempty"`
ContentSHA string `json:"contentSHA,omitempty" yaml:"contentSHA,omitempty" hcl:"contentSHA,omitempty"`
Lifecycle *Lifeycle `json:"lifecycle,omitempty" yaml:"lifecycle,omitempty" hcl:"lifecycle,omitempty"`
}
type VersionedState ¶
type VersionedState struct {
V1 *V1 `json:"v1,omitempty" yaml:"v1,omitempty" hcl:"v1,omitempty"`
}
func (VersionedState) CurrentConfig ¶
func (v VersionedState) CurrentConfig() map[string]interface{}
func (VersionedState) CurrentHelmValues ¶
func (v VersionedState) CurrentHelmValues() string
func (VersionedState) CurrentHelmValuesDefaults ¶
func (v VersionedState) CurrentHelmValuesDefaults() string
func (VersionedState) CurrentKustomize ¶
func (v VersionedState) CurrentKustomize() *Kustomize
func (VersionedState) CurrentKustomizeOverlay ¶
func (v VersionedState) CurrentKustomizeOverlay(filename string) (contents string, isResource bool)
func (VersionedState) IsEmpty ¶ added in v0.16.0
func (v VersionedState) IsEmpty() bool
func (VersionedState) Upstream ¶
func (v VersionedState) Upstream() string
func (VersionedState) Versioned ¶
func (v VersionedState) Versioned() VersionedState
func (VersionedState) WithCompletedStep ¶
func (v VersionedState) WithCompletedStep(step api.Step) VersionedState