Documentation ¶
Index ¶
- Constants
- func AddManifestTransform(newTransform ManifestTransform)
- func StatusCheck(ctx context.Context, defaultLabeller *DefaultLabeller, ...) error
- type Artifact
- type DefaultLabeller
- type Deployer
- type DeployerMux
- func (m DeployerMux) Cleanup(ctx context.Context, w io.Writer) error
- func (m DeployerMux) Dependencies() ([]string, error)
- func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []build.Artifact, ls []Labeller) *Result
- func (m DeployerMux) Labels() map[string]string
- func (m DeployerMux) Render(ctx context.Context, w io.Writer, as []build.Artifact, ls []Labeller, ...) error
- type HelmDeployer
- func (h *HelmDeployer) Cleanup(ctx context.Context, out io.Writer) error
- func (h *HelmDeployer) Dependencies() ([]string, error)
- func (h *HelmDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact, ...) *Result
- func (h *HelmDeployer) Labels() map[string]string
- func (h *HelmDeployer) Render(context.Context, io.Writer, []build.Artifact, []Labeller, string) error
- type KubectlDeployer
- func (k *KubectlDeployer) Cleanup(ctx context.Context, out io.Writer) error
- func (k *KubectlDeployer) Dependencies() ([]string, error)
- func (k *KubectlDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact, ...) *Result
- func (k *KubectlDeployer) Labels() map[string]string
- func (k *KubectlDeployer) Render(ctx context.Context, out io.Writer, builds []build.Artifact, ...) error
- type KustomizeDeployer
- func (k *KustomizeDeployer) Cleanup(ctx context.Context, out io.Writer) error
- func (k *KustomizeDeployer) Dependencies() ([]string, error)
- func (k *KustomizeDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact, ...) *Result
- func (k *KustomizeDeployer) Labels() map[string]string
- func (k *KustomizeDeployer) Render(ctx context.Context, out io.Writer, builds []build.Artifact, ...) error
- type Labeller
- type ManifestTransform
- type Resource
- type Result
Constants ¶
const ( K8sManagedByLabelKey = "app.kubernetes.io/managed-by" RunIDLabel = "skaffold.dev/run-id" )
Variables ¶
This section is empty.
Functions ¶
func AddManifestTransform ¶ added in v0.26.0
func AddManifestTransform(newTransform ManifestTransform)
AddManifestTransform adds a transform to be applied when deploying.
func StatusCheck ¶ added in v0.34.0
func StatusCheck(ctx context.Context, defaultLabeller *DefaultLabeller, runCtx *runcontext.RunContext, out io.Writer) error
Types ¶
type DefaultLabeller ¶ added in v0.33.0
type DefaultLabeller struct {
// contains filtered or unexported fields
}
DefaultLabeller adds K8s style managed-by label and a run-specific UUID label
func NewLabeller ¶ added in v0.33.0
func NewLabeller(verStr string) *DefaultLabeller
func (*DefaultLabeller) K8sManagedByLabelKeyValueString ¶ added in v0.33.0
func (d *DefaultLabeller) K8sManagedByLabelKeyValueString() string
func (*DefaultLabeller) Labels ¶ added in v0.33.0
func (d *DefaultLabeller) Labels() map[string]string
func (*DefaultLabeller) RunIDKeyValueString ¶ added in v0.36.0
func (d *DefaultLabeller) RunIDKeyValueString() string
type Deployer ¶
type Deployer interface { Labels() map[string]string // Deploy should ensure that the build results are deployed to the Kubernetes // cluster. Deploy(context.Context, io.Writer, []build.Artifact, []Labeller) *Result // Dependencies returns a list of files that the deployer depends on. // In dev mode, a redeploy will be triggered Dependencies() ([]string, error) // Cleanup deletes what was deployed by calling Deploy. Cleanup(context.Context, io.Writer) error // Render generates the Kubernetes manifests replacing the build results and // writes them to the given file path Render(context.Context, io.Writer, []build.Artifact, []Labeller, string) error }
Deployer is the Deploy API of skaffold and responsible for deploying the build results to a Kubernetes cluster
type DeployerMux ¶ added in v1.2.0
type DeployerMux []Deployer
DeployerMux forwards all method calls to the deployers it contains. When encountering an error, it aborts and returns the error. Otherwise, it collects the results and returns it in bulk.
func (DeployerMux) Dependencies ¶ added in v1.2.0
func (m DeployerMux) Dependencies() ([]string, error)
func (DeployerMux) Labels ¶ added in v1.2.0
func (m DeployerMux) Labels() map[string]string
type HelmDeployer ¶
type HelmDeployer struct { *latest.HelmDeploy // contains filtered or unexported fields }
HelmDeployer deploys workflows using the helm CLI
func NewHelmDeployer ¶
func NewHelmDeployer(runCtx *runcontext.RunContext) *HelmDeployer
NewHelmDeployer returns a configured HelmDeployer
func (*HelmDeployer) Dependencies ¶ added in v0.5.0
func (h *HelmDeployer) Dependencies() ([]string, error)
Dependencies returns a list of files that the deployer depends on.
func (*HelmDeployer) Deploy ¶ added in v0.3.0
func (h *HelmDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact, labellers []Labeller) *Result
Deploy deploys the build results to the Kubernetes cluster
func (*HelmDeployer) Labels ¶ added in v0.8.0
func (h *HelmDeployer) Labels() map[string]string
Labels returns the Kubernetes labels used by this deployer
type KubectlDeployer ¶
type KubectlDeployer struct { *latest.KubectlDeploy // contains filtered or unexported fields }
KubectlDeployer deploys workflows using kubectl CLI.
func NewKubectlDeployer ¶
func NewKubectlDeployer(runCtx *runcontext.RunContext) *KubectlDeployer
NewKubectlDeployer returns a new KubectlDeployer for a DeployConfig filled with the needed configuration for `kubectl apply`
func (*KubectlDeployer) Cleanup ¶ added in v0.5.0
Cleanup deletes what was deployed by calling Deploy.
func (*KubectlDeployer) Dependencies ¶ added in v0.5.0
func (k *KubectlDeployer) Dependencies() ([]string, error)
func (*KubectlDeployer) Deploy ¶ added in v0.3.0
func (k *KubectlDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact, labellers []Labeller) *Result
Deploy templates the provided manifests with a simple `find and replace` and runs `kubectl apply` on those manifests
func (*KubectlDeployer) Labels ¶ added in v0.8.0
func (k *KubectlDeployer) Labels() map[string]string
type KustomizeDeployer ¶ added in v0.7.0
type KustomizeDeployer struct { *latest.KustomizeDeploy BuildArgs []string // contains filtered or unexported fields }
KustomizeDeployer deploys workflows using kustomize CLI.
func NewKustomizeDeployer ¶ added in v0.7.0
func NewKustomizeDeployer(runCtx *runcontext.RunContext) *KustomizeDeployer
func (*KustomizeDeployer) Cleanup ¶ added in v0.7.0
Cleanup deletes what was deployed by calling Deploy.
func (*KustomizeDeployer) Dependencies ¶ added in v0.7.0
func (k *KustomizeDeployer) Dependencies() ([]string, error)
Dependencies lists all the files that can change what needs to be deployed.
func (*KustomizeDeployer) Deploy ¶ added in v0.7.0
func (k *KustomizeDeployer) Deploy(ctx context.Context, out io.Writer, builds []build.Artifact, labellers []Labeller) *Result
Deploy runs `kubectl apply` on the manifest generated by kustomize.
func (*KustomizeDeployer) Labels ¶ added in v0.8.0
func (k *KustomizeDeployer) Labels() map[string]string
Labels returns the labels specific to kustomize.
type Labeller ¶ added in v0.9.0
type Labeller interface { // Labels keys must be prefixed with "skaffold.dev/" Labels() map[string]string }
Labeller can give key/value labels to set on deployed resources.
type ManifestTransform ¶ added in v0.27.0
type ManifestTransform func(l kubectl.ManifestList, builds []build.Artifact, insecureRegistries map[string]bool) (kubectl.ManifestList, error)
type Resource ¶ added in v0.39.0
type Resource interface { // Name returns resource Name Name() string // Status returns resource status Status() resource.Status // ReportSinceLastUpdated returns the resource status only if it was updated // since last time reported. ReportSinceLastUpdated() string // UpdateStatus updates the resource status UpdateStatus(string, error) // IsStatusCheckComplete returns if the resource status check is complete IsStatusCheckComplete() bool // Deadline returns the deadline for the resource Deadline() time.Duration // CheckStatus checks resource status CheckStatus(context.Context, *runcontext.RunContext) // String represents the string representation of resource String() string }
type Result ¶
type Result struct {
// contains filtered or unexported fields
}