Documentation ¶
Index ¶
- type Asset
- type AssetShared
- type Assets
- type Config
- type ConfigStep
- type DockerAsset
- type DockerLayerAsset
- type EKSAsset
- type GCPProvider
- type GKEAsset
- type GitHubAsset
- type GithubContent
- type GithubFile
- type HelmAsset
- type HelmFetch
- type HelmIntro
- type HelmValues
- type Image
- type InlineAsset
- type KubectlApply
- type Kustomize
- type KustomizeIntro
- type Lifecycle
- type LocalHelmOpts
- type Message
- type Release
- type ReleaseMetadata
- type Render
- type ShipAppMetadata
- type Spec
- type Step
- type StepDetails
- type StepShared
- type Terraform
- type TerraformAsset
- type ValuesFrom
- type ValuesFromLifecycle
- type WebAsset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { Inline *InlineAsset `json:"inline,omitempty" yaml:"inline,omitempty" hcl:"inline,omitempty"` Docker *DockerAsset `json:"docker,omitempty" yaml:"docker,omitempty" hcl:"docker,omitempty"` DockerLayer *DockerLayerAsset `json:"dockerlayer,omitempty" yaml:"dockerlayer,omitempty" hcl:"dockerlayer,omitempty"` GitHub *GitHubAsset `json:"github,omitempty" yaml:"github,omitempty" hcl:"github,omitempty"` Web *WebAsset `json:"web,omitempty" yaml:"web,omitempty" hcl:"web,omitempty"` Helm *HelmAsset `json:"helm,omitempty" yaml:"helm,omitempty" hcl:"helm,omitempty"` Terraform *TerraformAsset `json:"terraform,omitempty" yaml:"terraform,omitempty" hcl:"terraform,omitempty"` AmazonEKS *EKSAsset `json:"amazon_eks,omitempty" yaml:"amazon_eks,omitempty" hcl:"amazon_eks,omitempty"` GoogleGKE *GKEAsset `json:"google_gke,omitempty" yaml:"google_gke,omitempty" hcl:"google_gke,omitempty"` }
Asset is a spec to generate one or more deployment assets
type AssetShared ¶
type AssetShared struct { string `json:"dest,omitempty" yaml:"dest,omitempty" hcl:"dest,omitempty"` Mode os.FileMode `json:"mode,omitempty" yaml:"mode,omitempty" hcl:"mode,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty" hcl:"description,omitempty"` When string `json:"when,omitempty" yaml:"when,omitempty" hcl:"when,omitempty"` }Dest
AssetShared is attributes common to all assets
type Assets ¶
type Assets struct {
V1 []Asset `json:"v1,omitempty" yaml:"v1,omitempty" hcl:"v1,omitempty"`
}
Assets is the top level assets object
type Config ¶
type Config struct {
V1 []libyaml.ConfigGroup `json:"v1,omitempty" yaml:"v1,omitempty" hcl:"v1,omitempty"`
}
Config is the top level config object
type ConfigStep ¶
type ConfigStep struct {
}func (*ConfigStep) Shared ¶
func (c *ConfigStep) Shared() *StepShared
func (ConfigStep) ShortName ¶
func (c ConfigStep) ShortName() string
type DockerAsset ¶
type DockerAsset struct { Image string `json:"image" yaml:"image" hcl:"image"` Source string `json:"source" yaml:"source" hcl:"source"` }
DockerAsset is an asset that declares a docker image
type DockerLayerAsset ¶
type DockerLayerAsset struct { DockerAsset `json:",inline" yaml:",inline" hcl:",inline"` Layer string `json:"layer" yaml:"layer" hcl:"layer"` }
DockerLayerAsset is an asset that will unpack a docker layer at `dest`
type EKSAsset ¶
type EKSAsset struct { ClusterName string `json:"cluster_name,omitempty" yaml:"cluster_name,omitempty" hcl:"cluster_name,omitempty"` Region string `json:"region,omitempty" yaml:"region,omitempty" hcl:"region,omitempty"` CreatedVPC *amazoneks.EKSCreatedVPC `json:"created_vpc,omitempty" yaml:"created_vpc,omitempty" hcl:"created_vpc,omitempty"` ExistingVPC *amazoneks.EKSExistingVPC `json:"existing_vpc,omitempty" yaml:"existing_vpc,omitempty" hcl:"existing_vpc,omitempty"` AutoscalingGroups []amazoneks.EKSAutoscalingGroup `json:"autoscaling_groups,omitempty" yaml:"autoscaling_groups,omitempty" hcl:"autoscaling_groups,omitempty"` }
EKSAsset
type GCPProvider ¶
type GCPProvider struct { Credentials string `json:"credentials,omitempty" yaml:"credentials,omitempty" hcl:"credentials,omitempty"` Project string `json:"project,omitempty" yaml:"project,omitempty" hcl:"project,omitempty"` Region string `json:"region,omitempty" yaml:"region,omitempty" hcl:"region,omitempty"` }
type GKEAsset ¶
type GKEAsset struct { GCPProvider `json:",inline" yaml:",inline" hcl:",inline"` // ClusterName required ClusterName string `json:"cluster_name" yaml:"cluster_name" hcl:"cluster_name"` Zone string `json:"zone,omitempty" yaml:"zone,omitempty" hcl:"zone,omitempty"` InitialNodeCount string `json:"initial_node_count,omitempty" yaml:"initial_node_count,omitempty" hcl:"initial_node_count,omitempty"` MachineType string `json:"machine_type,omitempty" yaml:"machine_type,omitempty" hcl:"machine_type,omitempty"` AdditionalZones string `json:"additional_zones,omitempty" yaml:"additional_zones,omitempty" hcl:"additional_zones,omitempty"` MinMasterVersion string `json:"min_master_version,omitempty" yaml:"min_master_version,omitempty" hcl:"min_master_version,omitempty"` }
GKEAsset
type GitHubAsset ¶
type GitHubAsset struct { Repo string `json:"repo" yaml:"repo" hcl:"repo"` Ref string `json:"ref" yaml:"ref" hcl:"ref"` Path string `json:"path" yaml:"path" hcl:"path"` Source string `json:"source" yaml:"source" hcl:"source"` StripPath string `json:"strip_path" yaml:"strip_path" hcl:"strip_path"` }
GitHubAsset is an asset whose contents are specified directly in the Spec
type GithubContent ¶
type GithubContent struct { Repo string `json:"repo" yaml:"repo" hcl:"repo" meta:"repo"` Path string `json:"path" yaml:"path" hcl:"path" meta:"path"` Ref string `json:"ref" yaml:"ref" hcl:"ref" meta:"ref"` Files []GithubFile `json:"files" yaml:"files" hcl:"files" meta:"files"` }
type GithubFile ¶
type GithubFile struct { Name string `json:"name" yaml:"name" hcl:"name" meta:"name"` Path string `json:"path" yaml:"path" hcl:"path" meta:"path"` Sha string `json:"sha" yaml:"sha" hcl:"sha" meta:"sha"` Size int64 `json:"size" yaml:"size" hcl:"size" meta:"size"` Data string `json:"data" yaml:"data" hcl:"data" meta:"data"` }
GithubFile
type HelmAsset ¶
type HelmAsset struct { Values map[string]interface{} `json:"values" yaml:"values" hcl:"values"` HelmOpts []string `json:"helm_opts" yaml:"helm_opts" hcl:"helm_opts"` // GitHub references a github asset from which to pull the chart GitHub *GitHubAsset `json:"github,omitempty" yaml:"github,omitempty" hcl:"github,omitempty"` // HelmFetch pulls a chart as 'helm fetch' would HelmFetch *HelmFetch `json:"helm_fetch,omitempty" yaml:"helm_fetch,omitempty" hcl:"helm_fetch,omitempty"` // Local is an escape hatch, most impls will use github or some sort of ChartMuseum thing Local *LocalHelmOpts `json:"local,omitempty" yaml:"local,omitempty" hcl:"local,omitempty"` ValuesFrom *ValuesFrom `json:"values_from,omitempty" yaml:"values_from,omitempty" hcl:"values_from,omitempty"` }
HelmAsset is an asset that declares a helm chart on github
type HelmIntro ¶
type HelmIntro struct {
}HelmIntro is a lifecycle step to render persisted README.md in the .ship folder
func (*HelmIntro) Shared ¶
func (h *HelmIntro) Shared() *StepShared
type HelmValues ¶
type HelmValues struct {
}HelmValues is a lifecycle step to render persisted values.yaml in the .ship folder and save user input changes to values.yaml
func (*HelmValues) Shared ¶
func (h *HelmValues) Shared() *StepShared
func (*HelmValues) ShortName ¶
func (h *HelmValues) ShortName() string
type Image ¶
type Image struct { URL string `json:"url" yaml:"url" hcl:"url" meta:"url"` Source string `json:"source" yaml:"source" hcl:"source" meta:"source"` AppSlug string `json:"appSlug" yaml:"appSlug" hcl:"appSlug" meta:"appSlug"` ImageKey string `json:"imageKey" yaml:"imageKey" hcl:"imageKey" meta:"imageKey"` }
Image
type InlineAsset ¶
type InlineAsset struct { Contents string `json:"contents" yaml:"contents" hcl:"contents"` }
InlineAsset is an asset whose contents are specified directly in the Spec
type KubectlApply ¶
type KubectlApply struct { Path string `json:"path,omitempty" yaml:"path,omitempty" hcl:"path,omitempty"` Kubeconfig string `json:"kubeconfig,omitempty" yaml:"kubeconfig,omitempty" hcl:"kubeconfig,omitempty"` }
KubectlApply is a lifeycle step to execute `apply` for a kubeconfig asset
func (*KubectlApply) Shared ¶
func (k *KubectlApply) Shared() *StepShared
func (*KubectlApply) ShortName ¶
func (k *KubectlApply) ShortName() string
type Kustomize ¶
type Kustomize struct { BasePath string `json:"base_path,omitempty" yaml:"base_path,omitempty" hcl:"base_path,omitempty"` Dest string `json:"dest,omitempty" yaml:"dest,omitempty" hcl:"dest,omitempty"` }
Kustomize is a lifeycle step to generate overlays for generated assets. It does not take a kustomization.yml, rather it will generate one in the .ship/ folder
func (*Kustomize) Shared ¶
func (k *Kustomize) Shared() *StepShared
type KustomizeIntro ¶
type KustomizeIntro struct {
}KustomizeIntro is a lifeycle step to display an informative intro page for kustomize
func (*KustomizeIntro) Shared ¶
func (k *KustomizeIntro) Shared() *StepShared
func (*KustomizeIntro) ShortName ¶
func (k *KustomizeIntro) ShortName() string
type Lifecycle ¶
type Lifecycle struct {
V1 []Step `json:"v1,omitempty" yaml:"v1,omitempty" hcl:"v1,omitempty"`
}
A Lifecycle is the top-level lifecycle object
type LocalHelmOpts ¶
type LocalHelmOpts struct {
ChartRoot string `json:"chart_root" yaml:"chart_root" hcl:"chart_root"`
}
LocalHelmOpts specifies a helm chart that should be templated using other assets that are already present at `ChartRoot`
type Message ¶
type Message struct { Contents string `json:"contents" yaml:"contents" hcl:"contents"` Level string `json:"level,omitempty" yaml:"level,omitempty" hcl:"level,omitempty"` }
Message is a lifeycle step to print a message
func (*Message) Shared ¶
func (m *Message) Shared() *StepShared
type ReleaseMetadata ¶
type ReleaseMetadata struct { ReleaseID string `json:"releaseId" yaml:"releaseId" hcl:"releaseId" meta:"release-id"` CustomerID string `json:"customerId" yaml:"customerId" hcl:"customerId" meta:"customer-id"` ChannelID string `json:"channelId" yaml:"channelId" hcl:"channelId" meta:"channel-id"` ChannelName string `json:"channelName" yaml:"channelName" hcl:"channelName" meta:"channel-name"` ChannelIcon string `json:"channelIcon" yaml:"channelIcon" hcl:"channelIcon" meta:"channel-icon"` Semver string `json:"semver" yaml:"semver" hcl:"semver" meta:"release-version"` ReleaseNotes string `json:"releaseNotes" yaml:"releaseNotes" hcl:"releaseNotes" meta:"release-notes"` Created string `json:"created" yaml:"created" hcl:"created" meta:"release-date"` RegistrySecret string `json:"registrySecret" yaml:"registrySecret" hcl:"registrySecret" meta:"registry-secret"` Images []Image `json:"images" yaml:"images" hcl:"images" meta:"images"` GithubContents []GithubContent `json:"githubContents" yaml:"githubContents" hcl:"githubContents" meta:"githubContents"` ShipAppMetadata ShipAppMetadata `json:"shipAppMetadata" yaml:"shipAppMetadata" hcl:"shipAppMetadata" meta:"shipAppMetadata"` }
ReleaseMetadata
func (*ReleaseMetadata) ReleaseName ¶
func (r *ReleaseMetadata) ReleaseName() string
type Render ¶
type Render struct { Root string `json:"root,omitempty" yaml:"root,omitempty" hcl:"root,omitempty"` }
Render is a lifeycle step to collect config and render assets
func (*Render) Shared ¶
func (r *Render) Shared() *StepShared
type ShipAppMetadata ¶
type ShipAppMetadata struct { Description string `json:"description" yaml:"description" hcl:"description" meta:"description"` Version string `json:"version" yaml:"version" hcl:"version" meta:"version"` Icon string `json:"icon" yaml:"icon" hcl:"icon" meta:"icon"` Name string `json:"name" yaml:"name" hcl:"name" meta:"name"` Readme string `json:"readme" yaml:"readme" hcl:"readme" meta:"readme"` URL string `json:"url" yaml:"url" hcl:"url" meta:"url"` ContentSHA string `json:"contentSHA" yaml:"contentSHA" hcl:"contentSHA" meta:"contentSHA"` }
type Spec ¶
type Spec struct { Assets Assets `json:"assets" yaml:"assets" hcl:"asset"` Lifecycle Lifecycle `json:"lifecycle" yaml:"lifecycle" hcl:"lifecycle"` Config Config `json:"config" yaml:"config" hcl:"config"` }
Spec is the top level Ship document that defines an application
type Step ¶
type Step struct { Message *Message `json:"message,omitempty" yaml:"message,omitempty" hcl:"message,omitempty"` Config *ConfigStep `json:"config,omitempty" yaml:"config,omitempty" hcl:"config,omitempty"` Render *Render `json:"render,omitempty" yaml:"render,omitempty" hcl:"render,omitempty"` Terraform *Terraform `json:"terraform,omitempty" yaml:"terraform,omitempty" hcl:"terraform,omitempty"` Kustomize *Kustomize `json:"kustomize,omitempty" yaml:"kustomize,omitempty" hcl:"kustomize,omitempty"` KustomizeIntro *KustomizeIntro `json:"kustomizeIntro,omitempty" yaml:"kustomizeIntro,omitempty" hcl:"kustomizeIntro,omitempty"` HelmIntro *HelmIntro `json:"helmIntro,omitempty" yaml:"helmIntro,omitempty" hcl:"helmIntro,omitempty"` HelmValues *HelmValues `json:"helmValues,omitempty" yaml:"helmValues,omitempty" hcl:"helmValues,omitempty"` KubectlApply *KubectlApply `json:"kubectl_apply,omitempty" yaml:"kubectl_apply,omitempty" hcl:"kubectl_apply,omitempty"` }
Step represents vendor-customized configuration steps & messaging
func (Step) GetStep ¶
func (s Step) GetStep() StepDetails
func (Step) Shared ¶
func (s Step) Shared() *StepShared
type StepDetails ¶
type StepDetails interface { ShortName() string }
type StepShared ¶
type StepShared struct {}
type Terraform ¶
type Terraform struct { Path string `json:"path,omitempty" yaml:"path,omitempty" hcl:"path,omitempty"` }
Terraform is a lifeycle step to execute `apply` for a runbook's terraform asset
func (*Terraform) Shared ¶
func (t *Terraform) Shared() *StepShared
type TerraformAsset ¶
type TerraformAsset struct { // GitHub references a github asset from which to pull a terraform module GitHub *GitHubAsset `json:"github" yaml:"github" hcl:"github"` // Inline allows a vendor to specify a terraform module inline in ship Inline string `json:"inline,omitempty" yaml:"inline,omitempty" hcl:"inline,omitempty"` }
TerraformAsset
type ValuesFrom ¶
type ValuesFrom struct {
Lifecycle *ValuesFromLifecycle `json:"lifecycle,omitempty" yaml:"lifecycle,omitempty" hcl:"lifecycle,omitempty"`
}
type ValuesFromLifecycle ¶
type ValuesFromLifecycle struct{}
type WebAsset ¶
type WebAsset struct { Body string `json:"body" yaml:"body" hcl:"body"` BodyFormat string `json:"bodyFormat" yaml:"bodyFormat" hcl:"bodyFormat"` Headers map[string][]string `json:"headers" yaml:"headers" hcl:"headers"` Method string `json:"method" yaml:"method" hcl:"method"` URL string `json:"url" yaml:"url" hcl:"url"` }
WebAsset is an asset whose contents are specified by the HTML at the corresponding URL