Documentation ¶
Index ¶
- type Empty
- func (Empty) CurrentCAs() map[string]util.CAType
- func (Empty) CurrentCerts() map[string]util.CertType
- 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) CurrentNamespace() string
- func (Empty) CurrentReleaseName() string
- func (Empty) IsEmpty() bool
- func (Empty) Upstream() string
- func (Empty) Versioned() VersionedState
- type Kustomize
- type Lifeycle
- type MManager
- func (m *MManager) AddCA(name string, newCA util.CAType) error
- func (m *MManager) AddCert(name string, newCert util.CertType) error
- 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) SerializeListsMetadata(list util.List) error
- func (m *MManager) SerializeNamespace(namespace string) error
- func (m *MManager) SerializeReleaseName(name 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 Metadata
- type Overlay
- type State
- type StepsCompleted
- type Terraform
- type V0
- func (v V0) CurrentCAs() map[string]util.CAType
- func (v V0) CurrentCerts() map[string]util.CertType
- 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) CurrentNamespace() string
- func (v V0) CurrentReleaseName() string
- func (v V0) IsEmpty() bool
- func (v V0) Upstream() string
- func (v V0) Versioned() VersionedState
- type V1
- type VersionedState
- func (v VersionedState) CurrentCAs() map[string]util.CAType
- func (v VersionedState) CurrentCerts() map[string]util.CertType
- 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) CurrentNamespace() string
- func (v VersionedState) CurrentReleaseName() string
- 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) CurrentNamespace ¶ added in v0.30.0
func (Empty) CurrentReleaseName ¶ added in v0.20.0
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 ¶
type MManager struct { Logger log.Logger FS afero.Afero V *viper.Viper // contains filtered or unexported fields }
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) SerializeListsMetadata ¶ added in v0.22.0
func (*MManager) SerializeNamespace ¶ added in v0.30.0
SerializeNamespace serializes to disk the namespace to use for helm template
func (*MManager) SerializeReleaseName ¶ added in v0.20.0
SerializeReleaseName serializes to disk the name to use for helm template
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 SerializeReleaseName(name string) error SerializeNamespace(namespace 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 SerializeListsMetadata(util.List) error Save(v VersionedState) error ResetLifecycle() error AddCert(name string, newCert util.CertType) error AddCA(name string, newCA util.CAType) error }
type Metadata ¶ added in v0.17.1
type Metadata struct { ApplicationType string `json:"applicationType" yaml:"applicationType" hcl:"applicationType"` Icon string `json:"icon,omitempty" yaml:"icon,omitempty" hcl:"icon,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty" hcl:"name,omitempty"` ReleaseNotes string `json:"releaseNotes" yaml:"releaseNotes" hcl:"releaseNotes"` Version string `json:"version" yaml:"version" hcl:"version"` CustomerID string `json:"customerID,omitempty" yaml:"customerID,omitempty" hcl:"customerID,omitempty"` InstallationID string `json:"installationID,omitempty" yaml:"installationID,omitempty" hcl:"installationID,omitempty"` Lists []util.List `json:"lists,omitempty" yaml:"lists,omitempty" hcl:"lists,omitempty"` }
type Overlay ¶
type Overlay struct { ExcludedBases []string `json:"excludedBases,omitempty" yaml:"excludedBases,omitempty" hcl:"excludedBases,omitempty"` 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 CurrentReleaseName() string CurrentNamespace() string Upstream() string Versioned() VersionedState IsEmpty() bool CurrentCAs() map[string]util.CAType CurrentCerts() map[string]util.CertType }
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) CurrentNamespace ¶ added in v0.30.0
func (V0) CurrentReleaseName ¶ added in v0.20.0
func (V0) Versioned ¶
func (v V0) Versioned() VersionedState
type V1 ¶
type V1 struct { Config map[string]interface{} `json:"config" yaml:"config" hcl:"config"` Terraform *Terraform `json:"terraform,omitempty" yaml:"terraform,omitempty" hcl:"terraform,omitempty"` HelmValues string `json:"helmValues,omitempty" yaml:"helmValues,omitempty" hcl:"helmValues,omitempty"` ReleaseName string `json:"releaseName,omitempty" yaml:"releaseName,omitempty" hcl:"releaseName,omitempty"` Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty" hcl:"namespace,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 *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" hcl:"metadata,omitempty"` //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"` CAs map[string]util.CAType `json:"cas,omitempty" yaml:"cas,omitempty" hcl:"cas,omitempty"` Certs map[string]util.CertType `json:"certs,omitempty" yaml:"certs,omitempty" hcl:"certs,omitempty"` }
type VersionedState ¶
type VersionedState struct {
V1 *V1 `json:"v1,omitempty" yaml:"v1,omitempty" hcl:"v1,omitempty"`
}
func (VersionedState) CurrentCAs ¶ added in v0.26.0
func (v VersionedState) CurrentCAs() map[string]util.CAType
func (VersionedState) CurrentCerts ¶ added in v0.26.0
func (v VersionedState) CurrentCerts() map[string]util.CertType
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) CurrentNamespace ¶ added in v0.30.0
func (v VersionedState) CurrentNamespace() string
func (VersionedState) CurrentReleaseName ¶ added in v0.20.0
func (v VersionedState) CurrentReleaseName() string
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