From 8d2613d472da04d223eab240cc04387f969c8d20 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 22 Jun 2021 19:04:36 +0200 Subject: [PATCH 001/103] fix invalid config version links in DEVELOPMENT.md (#6058) --- DEVELOPMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index fdf39bf6280..c545349be00 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -69,7 +69,7 @@ Visual Studio Code with [Go plugin](https://github.com/Microsoft/vscode-go): Some changes to the skaffold code require a change to the skaffold config. These changes require a few extra steps: -* Open the latest Config at [pkg/skaffold/schema/latest/config.go](https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/schema/latest/config.go#L28) and inspect the comment at [L28](https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/schema/latest/config.go#L28) +* Open the latest Config at [pkg/skaffold/schema/latest/v1/config.go](https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/schema/latest/v1/config.go) and inspect the comment at [L28](https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/schema/latest/v1/config.go#L28) * If the line mentions the config version is not released, proceed making your changes. ``` // This config version is not yet released, it is SAFE TO MODIFY the structs in this file. From 9ebb3192e8347d16b46e0973347118042209f98b Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Wed, 23 Jun 2021 00:41:33 +0530 Subject: [PATCH 002/103] refactor: move status-checker under deployer (#6044) --- pkg/skaffold/deploy/deploy.go | 7 +- pkg/skaffold/deploy/deploy_mux.go | 9 ++ pkg/skaffold/deploy/deploy_mux_test.go | 5 + pkg/skaffold/deploy/helm/deploy.go | 13 ++- pkg/skaffold/deploy/kpt/kpt.go | 13 ++- pkg/skaffold/deploy/kubectl/kubectl.go | 13 ++- pkg/skaffold/deploy/kustomize/kustomize.go | 13 ++- pkg/skaffold/deploy/resource/deployment.go | 21 +++++ pkg/skaffold/deploy/util/logfile_test.go | 6 +- .../status/status_check.go | 77 +++++++++++----- .../status/status_check_test.go | 13 +-- pkg/skaffold/runner/runner.go | 6 -- pkg/skaffold/runner/v1/apply.go | 2 +- pkg/skaffold/runner/v1/deploy.go | 32 +------ pkg/skaffold/runner/v1/deploy_test.go | 91 ++----------------- pkg/skaffold/runner/v1/new.go | 6 +- pkg/skaffold/runner/v1/runner_test.go | 4 + pkg/skaffold/status/provider.go | 71 +++++++++++++++ pkg/skaffold/status/provider_test.go | 68 ++++++++++++++ pkg/skaffold/status/status.go | 36 ++++++++ pkg/skaffold/status/status_mux.go | 46 ++++++++++ pkg/skaffold/status/status_mux_test.go | 82 +++++++++++++++++ 22 files changed, 467 insertions(+), 167 deletions(-) rename pkg/skaffold/{deploy => kubernetes}/status/status_check.go (79%) rename pkg/skaffold/{deploy => kubernetes}/status/status_check_test.go (98%) create mode 100644 pkg/skaffold/status/provider.go create mode 100644 pkg/skaffold/status/provider_test.go create mode 100644 pkg/skaffold/status/status.go create mode 100644 pkg/skaffold/status/status_mux.go create mode 100644 pkg/skaffold/status/status_mux_test.go diff --git a/pkg/skaffold/deploy/deploy.go b/pkg/skaffold/deploy/deploy.go index 88733844ce1..6ae0513049f 100644 --- a/pkg/skaffold/deploy/deploy.go +++ b/pkg/skaffold/deploy/deploy.go @@ -24,10 +24,11 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" ) // NoopComponentProvider is for tests -var NoopComponentProvider = ComponentProvider{Accessor: &access.NoopProvider{}, Debugger: &debug.NoopProvider{}, Logger: &log.NoopProvider{}} +var NoopComponentProvider = ComponentProvider{Accessor: &access.NoopProvider{}, Logger: &log.NoopProvider{}, Debugger: &debug.NoopProvider{}, Monitor: &status.NoopProvider{}} // Deployer is the Deploy API of skaffold and responsible for deploying // the build results to a Kubernetes cluster @@ -58,6 +59,9 @@ type Deployer interface { // TrackBuildArtifacts registers build artifacts to be tracked by a Deployer TrackBuildArtifacts([]graph.Artifact) + + // GetStatusMonitor returns a Deployer's implementation of a StatusMonitor + GetStatusMonitor() status.Monitor } // ComponentProvider serves as a clean way to send three providers @@ -66,4 +70,5 @@ type ComponentProvider struct { Accessor access.Provider Debugger debug.Provider Logger log.Provider + Monitor status.Provider } diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go index e91275d56b7..06cb6da5e02 100644 --- a/pkg/skaffold/deploy/deploy_mux.go +++ b/pkg/skaffold/deploy/deploy_mux.go @@ -32,6 +32,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -64,6 +65,14 @@ func (m DeployerMux) GetLogger() log.Logger { return loggers } +func (m DeployerMux) GetStatusMonitor() status.Monitor { + var monitors status.MonitorMux + for _, deployer := range m { + monitors = append(monitors, deployer.GetStatusMonitor()) + } + return monitors +} + func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) ([]string, error) { seenNamespaces := util.NewStringSet() diff --git a/pkg/skaffold/deploy/deploy_mux_test.go b/pkg/skaffold/deploy/deploy_mux_test.go index 7dc4335113b..719e15fb6fa 100644 --- a/pkg/skaffold/deploy/deploy_mux_test.go +++ b/pkg/skaffold/deploy/deploy_mux_test.go @@ -30,6 +30,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/testutil" testEvent "github.com/GoogleContainerTools/skaffold/testutil/event" ) @@ -59,6 +60,10 @@ func (m *MockDeployer) GetLogger() log.Logger { return &log.NoopLogger{} } +func (m *MockDeployer) GetStatusMonitor() status.Monitor { + return &status.NoopMonitor{} +} + func (m *MockDeployer) TrackBuildArtifacts(_ []graph.Artifact) {} func (m *MockDeployer) Dependencies() ([]string, error) { diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index a92e6fc385f..4f40f8b40ef 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -52,6 +52,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/walk" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/warnings" @@ -80,9 +81,10 @@ var ( type Deployer struct { *latestV1.HelmDeploy - accessor access.Accessor - debugger debug.Debugger - logger log.Logger + accessor access.Accessor + debugger debug.Debugger + logger log.Logger + statusMonitor status.Monitor podSelector *kubernetes.ImageList originalImages []graph.Artifact @@ -137,6 +139,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), + statusMonitor: provider.Monitor.GetKubernetesMonitor(), originalImages: originalImages, kubeContext: cfg.GetKubeContext(), kubeConfig: cfg.GetKubeConfig(), @@ -162,6 +165,10 @@ func (h *Deployer) GetLogger() log.Logger { return h.logger } +func (h *Deployer) GetStatusMonitor() status.Monitor { + return h.statusMonitor +} + func (h *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, h.originalImages, h.podSelector) h.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 683827fc282..0e37a1152ad 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -47,6 +47,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -70,9 +71,10 @@ const ( type Deployer struct { *latestV1.KptDeploy - accessor access.Accessor - debugger debug.Debugger - logger log.Logger + accessor access.Accessor + logger log.Logger + debugger debug.Debugger + statusMonitor status.Monitor podSelector *kubernetes.ImageList originalImages []graph.Artifact @@ -99,6 +101,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), + statusMonitor: provider.Monitor.GetKubernetesMonitor(), insecureRegistries: cfg.GetInsecureRegistries(), labels: labels, globalConfig: cfg.GlobalConfig(), @@ -121,6 +124,10 @@ func (k *Deployer) GetLogger() log.Logger { return k.logger } +func (k *Deployer) GetStatusMonitor() status.Monitor { + return k.statusMonitor +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index 2382ac53e07..28acac734f8 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -42,6 +42,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -49,9 +50,10 @@ import ( type Deployer struct { *latestV1.KubectlDeploy - accessor access.Accessor - debugger debug.Debugger - logger log.Logger + accessor access.Accessor + logger log.Logger + debugger debug.Debugger + statusMonitor status.Monitor originalImages []graph.Artifact podSelector *kubernetes.ImageList @@ -86,6 +88,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), + statusMonitor: provider.Monitor.GetKubernetesMonitor(), workingDir: cfg.GetWorkingDir(), globalConfig: cfg.GlobalConfig(), defaultRepo: cfg.DefaultRepo(), @@ -109,6 +112,10 @@ func (k *Deployer) GetLogger() log.Logger { return k.logger } +func (k *Deployer) GetStatusMonitor() status.Monitor { + return k.statusMonitor +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index 2c89fdbf9d0..d185f8ea0e3 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -42,6 +42,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/warnings" ) @@ -100,9 +101,10 @@ type secretGenerator struct { type Deployer struct { *latestV1.KustomizeDeploy - accessor access.Accessor - debugger debug.Debugger - logger log.Logger + accessor access.Accessor + logger log.Logger + debugger debug.Debugger + statusMonitor status.Monitor podSelector *kubernetes.ImageList originalImages []graph.Artifact @@ -135,6 +137,7 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), + statusMonitor: provider.Monitor.GetKubernetesMonitor(), kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), globalConfig: cfg.GlobalConfig(), @@ -155,6 +158,10 @@ func (k *Deployer) GetLogger() log.Logger { return k.logger } +func (k *Deployer) GetStatusMonitor() status.Monitor { + return k.statusMonitor +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/deploy/resource/deployment.go b/pkg/skaffold/deploy/resource/deployment.go index 1eb7faa329f..d571df7e70e 100644 --- a/pkg/skaffold/deploy/resource/deployment.go +++ b/pkg/skaffold/deploy/resource/deployment.go @@ -56,6 +56,23 @@ var ( } ) +type Group map[string]*Deployment + +func (r Group) Add(d *Deployment) { + r[d.ID()] = d +} + +func (r Group) Contains(d *Deployment) bool { + _, found := r[d.ID()] + return found +} + +func (r Group) Reset() { + for k := range r { + delete(r, k) + } +} + type Deployment struct { name string namespace string @@ -68,6 +85,10 @@ type Deployment struct { podValidator diag.Diagnose } +func (d *Deployment) ID() string { + return fmt.Sprintf("%s:%s:%s", d.name, d.namespace, d.rType) +} + func (d *Deployment) Deadline() time.Duration { return d.deadline } diff --git a/pkg/skaffold/deploy/util/logfile_test.go b/pkg/skaffold/deploy/util/logfile_test.go index 146e2ac6957..d2e4693d5fe 100644 --- a/pkg/skaffold/deploy/util/logfile_test.go +++ b/pkg/skaffold/deploy/util/logfile_test.go @@ -151,7 +151,7 @@ func TestWithStatusCheckLogFile(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { var mockOut bytes.Buffer - var deployer = mockStatusChecker{ + var deployer = mockStatusMonitor{ muted: test.muted, shouldErr: test.shouldErr, } @@ -188,12 +188,12 @@ func (fd *mockDeployer) Deploy(ctx context.Context, out io.Writer, _ []graph.Art } // Used just to show how output gets routed to different writers with the log file -type mockStatusChecker struct { +type mockStatusMonitor struct { muted Muted shouldErr bool } -func (fd *mockStatusChecker) Deploy(ctx context.Context, out io.Writer, _ []graph.Artifact) ([]string, error) { +func (fd *mockStatusMonitor) Deploy(ctx context.Context, out io.Writer, _ []graph.Artifact) ([]string, error) { if fd.shouldErr { fmt.Fprintln(out, " - deployment/leeroy-app failed. could not pull image") return nil, errors.New("- deployment/leeroy-app failed. could not pull image") diff --git a/pkg/skaffold/deploy/status/status_check.go b/pkg/skaffold/kubernetes/status/status_check.go similarity index 79% rename from pkg/skaffold/deploy/status/status_check.go rename to pkg/skaffold/kubernetes/status/status_check.go index 21c95266b10..8236ac416d2 100644 --- a/pkg/skaffold/deploy/status/status_check.go +++ b/pkg/skaffold/kubernetes/status/status_check.go @@ -26,20 +26,24 @@ import ( "time" "github.com/sirupsen/logrus" + "golang.org/x/sync/singleflight" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/diag" "github.com/GoogleContainerTools/skaffold/pkg/diag/validator" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/resource" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" - pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/proto/v1" ) @@ -71,40 +75,65 @@ type Config interface { GetNamespaces() []string StatusCheckDeadlineSeconds() int Muted() config.Muted + StatusCheck() (*bool, error) } -// Checker waits for the application to be totally deployed. -type Checker interface { - Check(context.Context, io.Writer) error -} - -// statusChecker runs status checks for pods and deployments -type statusChecker struct { +// Monitor runs status checks for pods and deployments +type Monitor struct { cfg Config labeller *label.DefaultLabeller deadlineSeconds int muteLogs bool + seenResources resource.Group + singleRun singleflight.Group } -// NewStatusChecker returns a status checker which runs checks on deployments and pods. -func NewStatusChecker(cfg Config, labeller *label.DefaultLabeller) Checker { - return statusChecker{ +// NewStatusMonitor returns a status monitor which runs checks on deployments and pods. +func NewStatusMonitor(cfg Config, labeller *label.DefaultLabeller) *Monitor { + return &Monitor{ muteLogs: cfg.Muted().MuteStatusCheck(), cfg: cfg, labeller: labeller, deadlineSeconds: cfg.StatusCheckDeadlineSeconds(), + seenResources: make(resource.Group), + singleRun: singleflight.Group{}, } } -// Run runs the status checks on deployments and pods deployed in current skaffold dev iteration. -func (s statusChecker) Check(ctx context.Context, out io.Writer) error { +// Check runs the status checks on deployments and pods deployed in current skaffold dev iteration. +func (s *Monitor) Check(ctx context.Context, out io.Writer) error { + _, err, _ := s.singleRun.Do(s.labeller.GetRunID(), func() (interface{}, error) { + return struct{}{}, s.check(ctx, out) + }) + return err +} + +func (s *Monitor) check(ctx context.Context, out io.Writer) error { event.StatusCheckEventStarted() + eventV2.TaskInProgress(constants.StatusCheck, "Verifying service availability") + ctx, endTrace := instrumentation.StartTrace(ctx, "performStatusCheck_WaitForDeploymentToStabilize") + defer endTrace() + + start := time.Now() + output.Default.Fprintln(out, "Waiting for deployments to stabilize...") + errCode, err := s.statusCheck(ctx, out) event.StatusCheckEventEnded(errCode, err) - return err + if err != nil { + eventV2.TaskFailed(constants.StatusCheck, err) + return err + } + + output.Default.Fprintln(out, "Deployments stabilized in", util.ShowHumanizeTime(time.Since(start))) + eventV2.TaskSucceeded(constants.StatusCheck) + return nil } -func (s statusChecker) statusCheck(ctx context.Context, out io.Writer) (proto.StatusCode, error) { +func (s *Monitor) Reset() { + s.seenResources.Reset() +} + +func (s *Monitor) statusCheck(ctx context.Context, out io.Writer) (proto.StatusCode, error) { client, err := kubernetesclient.Client() if err != nil { return proto.StatusCode_STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR, fmt.Errorf("getting Kubernetes client: %w", err) @@ -117,7 +146,13 @@ func (s statusChecker) statusCheck(ctx context.Context, out io.Writer) (proto.St if err != nil { return proto.StatusCode_STATUSCHECK_DEPLOYMENT_FETCH_ERR, fmt.Errorf("could not fetch deployments: %w", err) } - deployments = append(deployments, newDeployments...) + for _, d := range newDeployments { + if s.seenResources.Contains(d) { + continue + } + deployments = append(deployments, d) + s.seenResources.Add(d) + } } var wg sync.WaitGroup @@ -182,7 +217,7 @@ func getDeployments(ctx context.Context, client kubernetes.Interface, ns string, return deployments, nil } -func pollDeploymentStatus(ctx context.Context, cfg pkgkubectl.Config, r *resource.Deployment) { +func pollDeploymentStatus(ctx context.Context, cfg kubectl.Config, r *resource.Deployment) { pollDuration := time.Duration(defaultPollPeriodInMilliseconds) * time.Millisecond ticker := time.NewTicker(pollDuration) defer ticker.Stop() @@ -245,7 +280,7 @@ func getDeadline(d int) time.Duration { return DefaultStatusCheckDeadline } -func (s statusChecker) printStatusCheckSummary(out io.Writer, r *resource.Deployment, c counter) { +func (s *Monitor) printStatusCheckSummary(out io.Writer, r *resource.Deployment, c counter) { ae := r.Status().ActionableError() if r.StatusCode() == proto.StatusCode_STATUSCHECK_USER_CANCELLED { // Don't print the status summary if the user ctrl-C or @@ -271,7 +306,7 @@ func (s statusChecker) printStatusCheckSummary(out io.Writer, r *resource.Deploy } // printDeploymentStatus prints resource statuses until all status check are completed or context is cancelled. -func (s statusChecker) printDeploymentStatus(ctx context.Context, out io.Writer, deployments []*resource.Deployment) { +func (s *Monitor) printDeploymentStatus(ctx context.Context, out io.Writer, deployments []*resource.Deployment) { ticker := time.NewTicker(reportStatusTime) defer ticker.Stop() for { @@ -288,7 +323,7 @@ func (s statusChecker) printDeploymentStatus(ctx context.Context, out io.Writer, } } -func (s statusChecker) printStatus(deployments []*resource.Deployment, out io.Writer) bool { +func (s *Monitor) printStatus(deployments []*resource.Deployment, out io.Writer) bool { allDone := true for _, r := range deployments { if r.IsStatusCheckCompleteOrCancelled() { diff --git a/pkg/skaffold/deploy/status/status_check_test.go b/pkg/skaffold/kubernetes/status/status_check_test.go similarity index 98% rename from pkg/skaffold/deploy/status/status_check_test.go rename to pkg/skaffold/kubernetes/status/status_check_test.go index d3611c9014e..b508cd5c12e 100644 --- a/pkg/skaffold/deploy/status/status_check_test.go +++ b/pkg/skaffold/kubernetes/status/status_check_test.go @@ -33,7 +33,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/diag" "github.com/GoogleContainerTools/skaffold/pkg/diag/validator" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/resource" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" @@ -44,6 +43,8 @@ import ( testEvent "github.com/GoogleContainerTools/skaffold/testutil/event" ) +var TestKubeContext = "kubecontext" + func TestGetDeployments(t *testing.T) { labeller := label.NewLabeller(true, nil, "run-id") tests := []struct { @@ -386,7 +387,7 @@ func TestPrintSummaryStatus(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - checker := statusChecker{labeller: labeller} + monitor := Monitor{labeller: labeller} out := new(bytes.Buffer) rc := newCounter(10) rc.pending = test.pending @@ -395,7 +396,7 @@ func TestPrintSummaryStatus(t *testing.T) { // report status once and set it changed to false. r.ReportSinceLastUpdated(false) r.UpdateStatus(test.ae) - checker.printStatusCheckSummary(out, r, *rc) + monitor.printStatusCheckSummary(out, r, *rc) t.CheckDeepEqual(test.expected, out.String()) }) } @@ -481,8 +482,8 @@ func TestPrintStatus(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { out := new(bytes.Buffer) testEvent.InitializeState([]latestV1.Pipeline{{}}) - checker := statusChecker{labeller: labeller} - actual := checker.printStatus(test.rs, out) + monitor := Monitor{labeller: labeller} + actual := monitor.printStatus(test.rs, out) t.CheckDeepEqual(test.expectedOut, out.String()) t.CheckDeepEqual(test.expected, actual) }) @@ -647,4 +648,4 @@ type statusConfig struct { runcontext.RunContext // Embedded to provide the default values. } -func (c *statusConfig) GetKubeContext() string { return kubectl.TestKubeContext } +func (c *statusConfig) GetKubeContext() string { return TestKubeContext } diff --git a/pkg/skaffold/runner/runner.go b/pkg/skaffold/runner/runner.go index 32b8e5eea40..7a17b6f7771 100644 --- a/pkg/skaffold/runner/runner.go +++ b/pkg/skaffold/runner/runner.go @@ -21,7 +21,6 @@ import ( "errors" "io" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" ) @@ -51,8 +50,3 @@ type Runner interface { Render(context.Context, io.Writer, []graph.Artifact, bool, string) error Test(context.Context, io.Writer, []graph.Artifact) error } - -// for testing -var ( - NewStatusCheck = status.NewStatusChecker -) diff --git a/pkg/skaffold/runner/v1/apply.go b/pkg/skaffold/runner/v1/apply.go index ddc2a871e33..3c4e426a1d7 100644 --- a/pkg/skaffold/runner/v1/apply.go +++ b/pkg/skaffold/runner/v1/apply.go @@ -39,7 +39,7 @@ func (r *SkaffoldRunner) Apply(ctx context.Context, out io.Writer) error { if err != nil { return err } - sErr := r.performStatusCheck(ctx, statusCheckOut) + sErr := r.deployer.GetStatusMonitor().Check(ctx, statusCheckOut) return sErr } diff --git a/pkg/skaffold/runner/v1/deploy.go b/pkg/skaffold/runner/v1/deploy.go index fcf2aca8643..61cb71c2374 100644 --- a/pkg/skaffold/runner/v1/deploy.go +++ b/pkg/skaffold/runner/v1/deploy.go @@ -35,8 +35,6 @@ import ( kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) // DeployAndLog deploys a list of already built artifacts and optionally show the logs. @@ -143,7 +141,7 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) event.DeployComplete() eventV2.TaskSucceeded(constants.Deploy) r.runCtx.UpdateNamespaces(namespaces) - sErr := r.performStatusCheck(ctx, statusCheckOut) + sErr := r.deployer.GetStatusMonitor().Check(ctx, statusCheckOut) return sErr } @@ -198,31 +196,3 @@ func failIfClusterIsNotReachable() error { _, err = client.Discovery().ServerVersion() return err } - -func (r *SkaffoldRunner) performStatusCheck(ctx context.Context, out io.Writer) error { - // Check if we need to perform deploy status - enabled, err := r.runCtx.StatusCheck() - if err != nil { - return err - } - if enabled != nil && !*enabled { - return nil - } - - eventV2.TaskInProgress(constants.StatusCheck, "Verifying service availability") - ctx, endTrace := instrumentation.StartTrace(ctx, "performStatusCheck_WaitForDeploymentToStabilize") - defer endTrace() - - start := time.Now() - output.Default.Fprintln(out, "Waiting for deployments to stabilize...") - - s := runner.NewStatusCheck(r.runCtx, r.labeller) - if err := s.Check(ctx, out); err != nil { - eventV2.TaskFailed(constants.StatusCheck, err) - return err - } - - output.Default.Fprintln(out, "Deployments stabilized in", util.ShowHumanizeTime(time.Since(start))) - eventV2.TaskSucceeded(constants.StatusCheck) - return nil -} diff --git a/pkg/skaffold/runner/v1/deploy_test.go b/pkg/skaffold/runner/v1/deploy_test.go index f0fb127addd..7c9806ffc4e 100644 --- a/pkg/skaffold/runner/v1/deploy_test.go +++ b/pkg/skaffold/runner/v1/deploy_test.go @@ -20,95 +20,35 @@ import ( "bytes" "context" "errors" - "io" "io/ioutil" - "strings" "testing" "k8s.io/client-go/tools/clientcmd/api" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" ) func TestDeploy(t *testing.T) { - expectedOutput := "Waiting for deployments to stabilize..." tests := []struct { - description string - testBench *TestBench - statusCheckFlag *bool // --status-check CLI flag - statusCheckConfig *bool // skaffold.yaml Deploy.StatusCheck field - shouldErr bool - shouldWait bool + description string + testBench *TestBench + shouldErr bool }{ { - description: "deploy shd perform status check when statusCheck flag is unspecified, in-config value is unspecified", + description: "deploy succeeds", testBench: &TestBench{}, - shouldWait: true, - }, - { - description: "deploy shd not perform status check when statusCheck flag is unspecified, in-config value is false", - testBench: &TestBench{}, - statusCheckConfig: util.BoolPtr(false), - }, - { - description: "deploy shd perform status check when statusCheck flag is unspecified, in-config value is true", - testBench: &TestBench{}, - statusCheckConfig: util.BoolPtr(true), - shouldWait: true, - }, - { - description: "deploy shd not perform status check when statusCheck flag is false, in-config value is unspecified", - testBench: &TestBench{}, - statusCheckFlag: util.BoolPtr(false), - }, - { - description: "deploy shd not perform status check when statusCheck flag is false, in-config value is false", - testBench: &TestBench{}, - statusCheckFlag: util.BoolPtr(false), - statusCheckConfig: util.BoolPtr(false), - }, - { - description: "deploy shd not perform status check when statusCheck flag is false, in-config value is true", - testBench: &TestBench{}, - statusCheckFlag: util.BoolPtr(false), - statusCheckConfig: util.BoolPtr(true), }, { - description: "deploy shd perform status check when statusCheck flag is true, in-config value is unspecified", - testBench: &TestBench{}, - statusCheckFlag: util.BoolPtr(true), - shouldWait: true, - }, - { - description: "deploy shd perform status check when statusCheck flag is true, in-config value is false", - testBench: &TestBench{}, - statusCheckFlag: util.BoolPtr(true), - statusCheckConfig: util.BoolPtr(false), - shouldWait: true, - }, - { - description: "deploy shd perform status check when statusCheck flag is true, in-config value is true", - testBench: &TestBench{}, - statusCheckFlag: util.BoolPtr(true), - statusCheckConfig: util.BoolPtr(true), - shouldWait: true, - }, - { - description: "deploy shd not perform status check when deployer is in error", - testBench: &TestBench{deployErrors: []error{errors.New("deploy error")}}, - shouldErr: true, - statusCheckFlag: util.BoolPtr(true), + description: "deploy fails", + testBench: &TestBench{deployErrors: []error{errors.New("deploy error")}}, + shouldErr: true, }, } @@ -116,13 +56,8 @@ func TestDeploy(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { t.SetupFakeKubernetesContext(api.Config{CurrentContext: "cluster1"}) t.Override(&client.Client, mockK8sClient) - t.Override(&runner.NewStatusCheck, func(status.Config, *label.DefaultLabeller) status.Checker { - return dummyStatusChecker{} - }) r := createRunner(t, test.testBench, nil, []*latestV1.Artifact{{ImageName: "img1"}, {ImageName: "img2"}}, nil) - r.runCtx.Opts.StatusCheck = config.NewBoolOrUndefined(test.statusCheckFlag) - r.runCtx.Pipelines.All()[0].Deploy.StatusCheck = test.statusCheckConfig out := new(bytes.Buffer) err := r.Deploy(context.Background(), out, []graph.Artifact{ @@ -130,9 +65,6 @@ func TestDeploy(t *testing.T) { {ImageName: "img2", Tag: "img2:tag2"}, }) t.CheckError(test.shouldErr, err) - if strings.Contains(out.String(), expectedOutput) != test.shouldWait { - t.Errorf("expected %s to contain %s %t. But found %t", out.String(), expectedOutput, test.shouldWait, !test.shouldWait) - } }) } } @@ -167,9 +99,6 @@ func TestDeployNamespace(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { t.SetupFakeKubernetesContext(api.Config{CurrentContext: "cluster1"}) t.Override(&client.Client, mockK8sClient) - t.Override(&runner.NewStatusCheck, func(status.Config, *label.DefaultLabeller) status.Checker { - return dummyStatusChecker{} - }) r := createRunner(t, test.testBench, nil, []*latestV1.Artifact{{ImageName: "img1"}, {ImageName: "img2"}}, nil) r.runCtx.Namespaces = test.Namespaces @@ -208,9 +137,3 @@ func TestSkaffoldDeployRenderOnly(t *testing.T) { t.CheckNoError(err) }) } - -type dummyStatusChecker struct{} - -func (d dummyStatusChecker) Check(_ context.Context, _ io.Writer) error { - return nil -} diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index 181114b04af..f1d8b695520 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -34,7 +34,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/filemon" @@ -42,11 +41,13 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/server" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/test" @@ -99,6 +100,7 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { Accessor: access.NewAccessorProvider(runCtx, labeller, kubectlCLI), Debugger: debug.NewDebugProvider(runCtx), Logger: log.NewLogProvider(runCtx, kubectlCLI), + Monitor: status.NewMonitorProvider(runCtx, labeller), } deployer, podSelectors, err = getDeployer(runCtx, provider, labeller.Labels()) @@ -266,7 +268,7 @@ func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.Component } kubeContext = d.KubeContext } - if d.StatusCheckDeadlineSeconds != 0 && d.StatusCheckDeadlineSeconds != int(status.DefaultStatusCheckDeadline.Seconds()) { + if d.StatusCheckDeadlineSeconds != 0 && d.StatusCheckDeadlineSeconds != int(kstatus.DefaultStatusCheckDeadline.Seconds()) { if statusCheckTimeout != -1 && statusCheckTimeout != d.StatusCheckDeadlineSeconds { return nil, nil, fmt.Errorf("found multiple status check timeouts in skaffold.yaml (not supported in `skaffold apply`): %d, %d", statusCheckTimeout, d.StatusCheckDeadlineSeconds) } diff --git a/pkg/skaffold/runner/v1/runner_test.go b/pkg/skaffold/runner/v1/runner_test.go index cf1d9394c49..4dc2637dddd 100644 --- a/pkg/skaffold/runner/v1/runner_test.go +++ b/pkg/skaffold/runner/v1/runner_test.go @@ -42,6 +42,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/defaults" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/test" @@ -116,6 +117,9 @@ func (t *TestBench) GetLogger() log.Logger { return &log.NoopLogger{} } +func (t *TestBench) GetStatusMonitor() status.Monitor { + return &status.NoopMonitor{} +} func (t *TestBench) TrackBuildArtifacts(_ []graph.Artifact) {} func (t *TestBench) TestDependencies(*latestV1.Artifact) ([]string, error) { return nil, nil } diff --git a/pkg/skaffold/status/provider.go b/pkg/skaffold/status/provider.go new file mode 100644 index 00000000000..7bffc2f05cc --- /dev/null +++ b/pkg/skaffold/status/provider.go @@ -0,0 +1,71 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package status + +import ( + "sync" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" +) + +type Provider interface { + GetKubernetesMonitor() Monitor + GetNoopMonitor() Monitor +} + +type fullProvider struct { + kubernetesMonitor Monitor +} + +var ( + provider *fullProvider + once sync.Once +) + +func NewMonitorProvider(config status.Config, l *label.DefaultLabeller) Provider { + once.Do(func() { + var m Monitor = &NoopMonitor{} + enabled, _ := config.StatusCheck() + if enabled == nil || *enabled { // assume enabled if value is nil + m = status.NewStatusMonitor(config, l) + } + provider = &fullProvider{ + kubernetesMonitor: m, + } + }) + return provider +} + +func (p *fullProvider) GetKubernetesMonitor() Monitor { + return p.kubernetesMonitor +} + +func (p *fullProvider) GetNoopMonitor() Monitor { + return &NoopMonitor{} +} + +// NoopProvider is used in tests +type NoopProvider struct{} + +func (p *NoopProvider) GetKubernetesMonitor() Monitor { + return &NoopMonitor{} +} + +func (p *NoopProvider) GetNoopMonitor() Monitor { + return &NoopMonitor{} +} diff --git a/pkg/skaffold/status/provider_test.go b/pkg/skaffold/status/provider_test.go new file mode 100644 index 00000000000..df2215b409f --- /dev/null +++ b/pkg/skaffold/status/provider_test.go @@ -0,0 +1,68 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package status + +import ( + "reflect" + "sync" + "testing" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestMonitorProvider(t *testing.T) { + tests := []struct { + description string + statusCheck *bool + isNoop bool + }{ + { + description: "unspecified statusCheck parameter", + }, + { + description: "statusCheck parameter set to true", + statusCheck: util.BoolPtr(true), + }, + { + description: "statusCheck parameter set to false", + statusCheck: util.BoolPtr(false), + isNoop: true, + }, + } + + for _, test := range tests { + once = sync.Once{} // reset once for tests + testutil.Run(t, test.description, func(t *testutil.T) { + m := NewMonitorProvider(mockConfig{statusCheck: test.statusCheck}, nil).GetKubernetesMonitor() + t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(m)).Type() == reflect.TypeOf(NoopMonitor{})) + }) + } +} + +type mockConfig struct { + status.Config + statusCheck *bool +} + +func (m mockConfig) StatusCheck() (*bool, error) { return m.statusCheck, nil } + +func (m mockConfig) StatusCheckDeadlineSeconds() int { return 0 } + +func (m mockConfig) Muted() config.Muted { return config.Muted{} } diff --git a/pkg/skaffold/status/status.go b/pkg/skaffold/status/status.go new file mode 100644 index 00000000000..80c3167afe2 --- /dev/null +++ b/pkg/skaffold/status/status.go @@ -0,0 +1,36 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package status + +import ( + "context" + "io" +) + +// Monitor is an interface for checking resource deployment status. +type Monitor interface { + // Check runs the status check monitor for a deployment + Check(context.Context, io.Writer) error + // Reset executes any reset behavior required by the status monitor between dev loops. + Reset() +} + +type NoopMonitor struct{} + +func (n *NoopMonitor) Check(context.Context, io.Writer) error { return nil } + +func (n *NoopMonitor) Reset() {} diff --git a/pkg/skaffold/status/status_mux.go b/pkg/skaffold/status/status_mux.go new file mode 100644 index 00000000000..8428ac551dd --- /dev/null +++ b/pkg/skaffold/status/status_mux.go @@ -0,0 +1,46 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package status + +import ( + "context" + "io" + + "golang.org/x/sync/errgroup" +) + +type MonitorMux []Monitor + +func (c MonitorMux) Check(ctx context.Context, out io.Writer) error { + g, gCtx := errgroup.WithContext(ctx) + + // run all status monitors in parallel. + // the kubernetes status monitor is a singleton for all deployers of that type, and runs only one concurrent check at a time across all deployed resources. + for _, monitor := range c { + monitor := monitor // https://golang.org/doc/faq#closures_and_goroutines + g.Go(func() error { + return monitor.Check(gCtx, out) + }) + } + return g.Wait() +} + +func (c MonitorMux) Reset() { + for _, monitor := range c { + monitor.Reset() + } +} diff --git a/pkg/skaffold/status/status_mux_test.go b/pkg/skaffold/status/status_mux_test.go new file mode 100644 index 00000000000..517fbebc2a4 --- /dev/null +++ b/pkg/skaffold/status/status_mux_test.go @@ -0,0 +1,82 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package status + +import ( + "context" + "errors" + "io" + "io/ioutil" + "testing" + + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestMonitorMux(t *testing.T) { + tests := []struct { + description string + monitor func(context.Context, io.Writer) error + shouldErr bool + }{ + { + description: "passing", + monitor: func(c context.Context, w io.Writer) error { + return nil + }, + }, + { + description: "failing", + monitor: func(c context.Context, w io.Writer) error { + return errors.New("error") + }, + shouldErr: true, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + var m MonitorMux + for i := 0; i < 3; i++ { + m = append(m, &MockMonitor{monitor: test.monitor}) + } + err := m.Check(context.Background(), ioutil.Discard) + if test.shouldErr { + t.CheckError(true, err) + } else { + t.CheckNoError(err) + for _, mi := range m { + t.CheckTrue(mi.(*MockMonitor).run) + } + m.Reset() + for _, mi := range m { + t.CheckFalse(mi.(*MockMonitor).run) + } + } + }) + } +} + +type MockMonitor struct { + run bool + monitor func(context.Context, io.Writer) error +} + +func (m *MockMonitor) Check(ctx context.Context, out io.Writer) error { + m.run = true + return m.monitor(ctx, out) +} + +func (m *MockMonitor) Reset() { m.run = false } From f94ff0cb6eded3a3ca1e411b0b9046caafd69ec4 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 22 Jun 2021 12:50:52 -0700 Subject: [PATCH 003/103] add error code for exec format error (#6059) * add error code for exec format error * address code review changes --- docs/content/en/api/skaffold.swagger.json | 42 ++- docs/content/en/docs/references/api/grpc.md | 1 + pkg/diag/validator/pod.go | 21 +- pkg/diag/validator/pod_test.go | 34 +- proto/enums/enums.pb.go | 387 ++++++++++---------- proto/enums/enums.proto | 2 + proto/v1/skaffold.pb.go | 1 + proto/v2/skaffold.pb.go | 1 + 8 files changed, 274 insertions(+), 215 deletions(-) diff --git a/docs/content/en/api/skaffold.swagger.json b/docs/content/en/api/skaffold.swagger.json index 2f088a653bc..229a0394494 100644 --- a/docs/content/en/api/skaffold.swagger.json +++ b/docs/content/en/api/skaffold.swagger.json @@ -174,7 +174,7 @@ }, { "name": "event.buildEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -219,6 +219,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -330,7 +331,7 @@ }, { "name": "event.buildEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -375,6 +376,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -504,7 +506,7 @@ }, { "name": "event.deployEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -549,6 +551,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -660,7 +663,7 @@ }, { "name": "event.deployEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -705,6 +708,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -916,7 +920,7 @@ }, { "name": "event.statusCheckEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -961,6 +965,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -1072,7 +1077,7 @@ }, { "name": "event.statusCheckEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1117,6 +1122,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -1258,7 +1264,7 @@ }, { "name": "event.resourceStatusCheckEvent.statusCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1303,6 +1309,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -1414,7 +1421,7 @@ }, { "name": "event.resourceStatusCheckEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1459,6 +1466,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -1601,7 +1609,7 @@ }, { "name": "event.fileSyncEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1646,6 +1654,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -1757,7 +1766,7 @@ }, { "name": "event.fileSyncEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1802,6 +1811,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -1974,7 +1984,7 @@ }, { "name": "event.devLoopEvent.err.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -2019,6 +2029,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -2142,7 +2153,7 @@ }, { "name": "event.terminationEvent.err.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -2187,6 +2198,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -2310,7 +2322,7 @@ }, { "name": "event.TestEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -2355,6 +2367,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -2765,6 +2778,7 @@ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", "STATUSCHECK_CONTAINER_RESTARTING", "STATUSCHECK_UNHEALTHY", + "STATUSCHECK_CONTAINER_EXEC_ERROR", "STATUSCHECK_NODE_MEMORY_PRESSURE", "STATUSCHECK_NODE_DISK_PRESSURE", "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -2873,7 +2887,7 @@ "INSPECT_PROFILE_NOT_FOUND_ERR" ], "default": "OK", - "description": "Enum for Status codes
\nThese error codes are prepended by Phase Name e.g.\nINIT, BUILD, TEST, DEPLOY, STATUSCHECK, DEVINIT
\nFor Success Error codes, use range 200 to 250.
\nFor Unknown error codes, use range 500 to 600.
\nFor Cancelled Error code, use range 800 to 850.
\n- OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist" + "description": "Enum for Status codes
\nThese error codes are prepended by Phase Name e.g.\nINIT, BUILD, TEST, DEPLOY, STATUSCHECK, DEVINIT
\nFor Success Error codes, use range 200 to 250.
\nFor Unknown error codes, use range 500 to 600.
\nFor Cancelled Error code, use range 800 to 850.
\n- OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist" }, "enumsSuggestionCode": { "type": "string", diff --git a/docs/content/en/docs/references/api/grpc.md b/docs/content/en/docs/references/api/grpc.md index e1ac0e370fc..c11572272cf 100644 --- a/docs/content/en/docs/references/api/grpc.md +++ b/docs/content/en/docs/references/api/grpc.md @@ -916,6 +916,7 @@ For Cancelled Error code, use range 800 to 850.
| STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING | 304 | Deployment waiting for rollout | | STATUSCHECK_CONTAINER_RESTARTING | 356 | Container restarting error | | STATUSCHECK_UNHEALTHY | 357 | Readiness probe failed | +| STATUSCHECK_CONTAINER_EXEC_ERROR | 358 | Executable binary format error | | STATUSCHECK_NODE_MEMORY_PRESSURE | 400 | Node memory pressure error | | STATUSCHECK_NODE_DISK_PRESSURE | 401 | Node disk pressure error | | STATUSCHECK_NODE_NETWORK_UNAVAILABLE | 402 | Node network unavailable error | diff --git a/pkg/diag/validator/pod.go b/pkg/diag/validator/pod.go index b8e00bb30bf..0f2644e38bb 100644 --- a/pkg/diag/validator/pod.go +++ b/pkg/diag/validator/pod.go @@ -51,6 +51,7 @@ const ( failedScheduling = "FailedScheduling" unhealthy = "Unhealthy" + execFmtError = "exec format error" ) var ( @@ -145,7 +146,8 @@ func getPodStatus(pod *v1.Pod) (proto.StatusCode, []string, error) { if c.State.Waiting != nil { return statusCode, []string{}, fmt.Errorf("waiting for init container %s to start", c.Name) } else if c.State.Running != nil { - return statusCode, getPodLogs(pod, c.Name), fmt.Errorf("waiting for init container %s to complete", c.Name) + sc, l := getPodLogs(pod, c.Name, statusCode) + return sc, l, fmt.Errorf("waiting for init container %s to complete", c.Name) } } } @@ -210,8 +212,8 @@ func getContainerStatus(po *v1.Pod, cs []v1.ContainerStatus) (proto.StatusCode, case c.State.Waiting != nil: return extractErrorMessageFromWaitingContainerStatus(po, c) case c.State.Terminated != nil && c.State.Terminated.ExitCode != 0: - l := getPodLogs(po, c.Name) - return proto.StatusCode_STATUSCHECK_CONTAINER_TERMINATED, l, fmt.Errorf("container %s terminated with exit code %d", c.Name, c.State.Terminated.ExitCode) + sc, l := getPodLogs(po, c.Name, proto.StatusCode_STATUSCHECK_CONTAINER_TERMINATED) + return sc, l, fmt.Errorf("container %s terminated with exit code %d", c.Name, c.State.Terminated.ExitCode) } } // No waiting or terminated containers, pod should be in good health. @@ -357,8 +359,8 @@ func extractErrorMessageFromWaitingContainerStatus(po *v1.Pod, c v1.ContainerSta return proto.StatusCode_STATUSCHECK_CONTAINER_CREATING, nil, fmt.Errorf("creating container %s", c.Name) case crashLoopBackOff: // TODO, in case of container restarting, return the original failure reason due to which container failed. - l := getPodLogs(po, c.Name) - return proto.StatusCode_STATUSCHECK_CONTAINER_RESTARTING, l, fmt.Errorf("container %s is backing off waiting to restart", c.Name) + sc, l := getPodLogs(po, c.Name, proto.StatusCode_STATUSCHECK_CONTAINER_RESTARTING) + return sc, l, fmt.Errorf("container %s is backing off waiting to restart", c.Name) case imagePullErr, imagePullBackOff, errImagePullBackOff: return proto.StatusCode_STATUSCHECK_IMAGE_PULL_ERR, nil, fmt.Errorf("container %s is waiting to start: %s can't be pulled", c.Name, c.Image) case runContainerError: @@ -386,12 +388,15 @@ func trimSpace(msg string) string { return strings.Trim(msg, " ") } -func getPodLogs(po *v1.Pod, c string) []string { +func getPodLogs(po *v1.Pod, c string, sc proto.StatusCode) (proto.StatusCode, []string) { logrus.Debugf("Fetching logs for container %s/%s", po.Name, c) logCommand := []string{"kubectl", "logs", po.Name, "-n", po.Namespace, "-c", c} logs, err := runCli(logCommand[0], logCommand[1:]) if err != nil { - return []string{fmt.Sprintf("Error retrieving logs for pod %s. Try `%s`", po.Name, strings.Join(logCommand, " "))} + return sc, []string{fmt.Sprintf("Error retrieving logs for pod %s: %s.\nTry `%s`", po.Name, err, strings.Join(logCommand, " "))} + } + if strings.Contains(string(logs), execFmtError) { + sc = proto.StatusCode_STATUSCHECK_CONTAINER_EXEC_ERROR } output := strings.Split(string(logs), "\n") // remove spurious empty lines (empty string or from trailing newline) @@ -402,7 +407,7 @@ func getPodLogs(po *v1.Pod, c string) []string { } lines = append(lines, fmt.Sprintf("[%s %s] %s", po.Name, c, s)) } - return lines + return sc, lines } func executeCLI(cmdName string, args []string) ([]byte, error) { diff --git a/pkg/diag/validator/pod_test.go b/pkg/diag/validator/pod_test.go index 6dd3bd77608..ba15af272e4 100644 --- a/pkg/diag/validator/pod_test.go +++ b/pkg/diag/validator/pod_test.go @@ -432,7 +432,7 @@ func TestRun(t *testing.T) { }, }}, logOutput: mockLogOutput{ - err: fmt.Errorf("error"), + err: fmt.Errorf("error retrieving"), }, expected: []Resource{NewResource("test", "pod", "foo", "Running", proto.ActionableErr{ @@ -443,7 +443,7 @@ func TestRun(t *testing.T) { Action: "Try checking container logs", }}, }, []string{ - "Error retrieving logs for pod foo. Try `kubectl logs foo -n test -c foo-container`"}, + "Error retrieving logs for pod foo: error retrieving.\nTry `kubectl logs foo -n test -c foo-container`"}, )}, }, // Events Test cases @@ -695,6 +695,36 @@ func TestRun(t *testing.T) { ErrCode: proto.StatusCode_STATUSCHECK_UNKNOWN_EVENT, }, nil)}, }, + { + description: "pod terminated with exec error", + pods: []*v1.Pod{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "foo", + Namespace: "test", + }, + TypeMeta: metav1.TypeMeta{Kind: "Pod"}, + Status: v1.PodStatus{ + Phase: v1.PodRunning, + Conditions: []v1.PodCondition{{Type: v1.PodReady, Status: v1.ConditionFalse}}, + ContainerStatuses: []v1.ContainerStatus{ + { + Name: "foo-container", + Image: "foo-image", + State: v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{ExitCode: 1, Message: "panic caused"}, + }, + }, + }}, + }}, + logOutput: mockLogOutput{ + output: []byte("standard_init_linux.go:219: exec user process caused: exec format error"), + }, + expected: []Resource{NewResource("test", "Pod", "foo", "Running", + proto.ActionableErr{ + Message: "container foo-container terminated with exit code 1", + ErrCode: proto.StatusCode_STATUSCHECK_CONTAINER_EXEC_ERROR, + }, []string{"[foo foo-container] standard_init_linux.go:219: exec user process caused: exec format error"})}, + }, } for _, test := range tests { diff --git a/proto/enums/enums.pb.go b/proto/enums/enums.pb.go index 705fc8b5d8b..50e002e1bf0 100644 --- a/proto/enums/enums.pb.go +++ b/proto/enums/enums.pb.go @@ -346,6 +346,8 @@ const ( StatusCode_STATUSCHECK_CONTAINER_RESTARTING StatusCode = 356 // Readiness probe failed StatusCode_STATUSCHECK_UNHEALTHY StatusCode = 357 + // Executable binary format error + StatusCode_STATUSCHECK_CONTAINER_EXEC_ERROR StatusCode = 358 // Node memory pressure error StatusCode_STATUSCHECK_NODE_MEMORY_PRESSURE StatusCode = 400 // Node disk pressure error @@ -601,6 +603,7 @@ var StatusCode_name = map[int32]string{ 304: "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING", 356: "STATUSCHECK_CONTAINER_RESTARTING", 357: "STATUSCHECK_UNHEALTHY", + 358: "STATUSCHECK_CONTAINER_EXEC_ERROR", 400: "STATUSCHECK_NODE_MEMORY_PRESSURE", 401: "STATUSCHECK_NODE_DISK_PRESSURE", 402: "STATUSCHECK_NODE_NETWORK_UNAVAILABLE", @@ -750,6 +753,7 @@ var StatusCode_value = map[string]int32{ "STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING": 304, "STATUSCHECK_CONTAINER_RESTARTING": 356, "STATUSCHECK_UNHEALTHY": 357, + "STATUSCHECK_CONTAINER_EXEC_ERROR": 358, "STATUSCHECK_NODE_MEMORY_PRESSURE": 400, "STATUSCHECK_NODE_DISK_PRESSURE": 401, "STATUSCHECK_NODE_NETWORK_UNAVAILABLE": 402, @@ -1149,195 +1153,196 @@ func init() { func init() { proto.RegisterFile("enums.proto", fileDescriptor_888b6bd9597961ff) } var fileDescriptor_888b6bd9597961ff = []byte{ - // 3032 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x59, 0x57, 0x90, 0x5c, 0xc5, - 0xd5, 0x66, 0x77, 0x76, 0x76, 0x66, 0x5a, 0x84, 0xa6, 0x51, 0xce, 0x12, 0x48, 0xc0, 0xc2, 0x2f, - 0xf1, 0x1b, 0x17, 0x0f, 0x7e, 0xeb, 0xb9, 0xb7, 0x67, 0xa6, 0x35, 0x7d, 0xfb, 0xde, 0xea, 0xee, - 0xbb, 0xab, 0xd5, 0xcb, 0x2d, 0x61, 0xad, 0x84, 0x60, 0xa5, 0x11, 0xbb, 0x2b, 0x6c, 0x1c, 0x79, - 0x70, 0x0e, 0x55, 0x4e, 0x04, 0x87, 0x07, 0xc0, 0x76, 0xf9, 0xc5, 0x80, 0x73, 0x24, 0x1a, 0xbb, - 0xca, 0x98, 0xe4, 0x6c, 0xa0, 0xec, 0x37, 0xbb, 0xca, 0x01, 0x87, 0xb2, 0xc9, 0xd1, 0x75, 0xba, - 0x6f, 0x9c, 0x99, 0xc5, 0x0f, 0x14, 0xa3, 0x3e, 0xdf, 0x3d, 0x7d, 0xce, 0xe9, 0xd3, 0xe7, 0x7c, - 0xa7, 0x17, 0xad, 0x59, 0x38, 0x79, 0xfa, 0xc4, 0xf2, 0xbe, 0x53, 0x4b, 0x83, 0x95, 0x01, 0x59, - 0x63, 0xff, 0xb7, 0xcf, 0x2e, 0xcd, 0x0c, 0xd0, 0x9a, 0xf6, 0xe9, 0xe3, 0x8b, 0x47, 0x16, 0x96, - 0xcc, 0xf5, 0xa7, 0x16, 0xc8, 0x46, 0xb4, 0x36, 0x96, 0x7d, 0x19, 0xce, 0xc9, 0xa4, 0x1d, 0x73, - 0xe1, 0x33, 0x95, 0x98, 0xf9, 0x88, 0xe1, 0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, 0xfa, 0xf8, 0xcf, 0x76, 0x4c, 0xb4, - 0x1d, 0xa1, 0x22, 0xb0, 0x4c, 0x3b, 0x8c, 0x0d, 0x0c, 0xc8, 0x33, 0x68, 0xcf, 0xb8, 0x6f, 0x47, - 0xa8, 0x2d, 0x4c, 0xc9, 0x40, 0xc5, 0xfe, 0x27, 0xd6, 0x52, 0x1f, 0x18, 0x9d, 0xf7, 0xa2, 0x5d, - 0x0e, 0xed, 0xc8, 0x6d, 0x8a, 0x85, 0xff, 0xdc, 0x68, 0x66, 0x4b, 0xf7, 0xd3, 0x8d, 0xf6, 0x15, - 0x87, 0xde, 0x7c, 0xec, 0xf8, 0xca, 0x55, 0xa7, 0xaf, 0xdc, 0xf7, 0xd6, 0xc1, 0x89, 0xfd, 0xdd, - 0xc1, 0xe0, 0xd8, 0xe2, 0x82, 0x37, 0x38, 0xb9, 0x72, 0xf8, 0xf8, 0xc9, 0x85, 0x25, 0x33, 0x18, - 0x2c, 0x2e, 0xef, 0x5f, 0xbe, 0xe6, 0xf0, 0xd1, 0xa3, 0x83, 0xc5, 0x23, 0xfb, 0xed, 0x5f, 0x38, - 0xf7, 0xdb, 0xbf, 0x70, 0x5e, 0x39, 0x6d, 0xff, 0x71, 0xf9, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0x03, 0xfd, 0x32, 0xb0, 0x04, 0x1d, 0x00, 0x00, + // 3043 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x59, 0x59, 0x90, 0x1c, 0xc5, + 0xd1, 0x66, 0x77, 0x76, 0x76, 0x66, 0x4a, 0x1c, 0x45, 0xa1, 0xfb, 0x96, 0x40, 0x02, 0x16, 0x7e, + 0x89, 0xff, 0xe7, 0x0f, 0x1e, 0xfe, 0xb7, 0x9a, 0xee, 0x9a, 0x99, 0xd2, 0x54, 0x57, 0x77, 0x54, + 0x55, 0xef, 0x6a, 0xf5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0x23, 0x0d, 0x28, 0x2c, 0x65, 0x14, 0x74, 0x81, 0x0e, 0xf5, + 0xca, 0x3b, 0x7c, 0xb4, 0x01, 0x67, 0x96, 0x45, 0x3e, 0xe5, 0xe6, 0x43, 0x15, 0xea, 0x4f, 0x0d, + 0xa8, 0x28, 0x79, 0x4a, 0xb5, 0xe3, 0x6e, 0xd2, 0x63, 0x22, 0xb2, 0xad, 0xc5, 0x28, 0xce, 0x66, + 0x5d, 0x03, 0xfd, 0x73, 0x83, 0x6c, 0x40, 0x24, 0x57, 0xe5, 0x6e, 0x10, 0x08, 0xfe, 0xd2, 0x80, + 0xd3, 0x48, 0x05, 0x30, 0x45, 0x24, 0x34, 0x8a, 0xc4, 0x7c, 0x22, 0x68, 0x9b, 0x09, 0x8d, 0x9f, + 0x69, 0xc0, 0x4d, 0x2a, 0x8b, 0x33, 0xee, 0x8a, 0xff, 0x5a, 0xfe, 0x52, 0x86, 0x49, 0x00, 0x6e, + 0xc2, 0x01, 0xd8, 0x40, 0xe3, 0xbf, 0x35, 0xc8, 0x56, 0xb4, 0xa1, 0xfc, 0xe5, 0x2c, 0x53, 0x3a, + 0x33, 0xfb, 0xef, 0x0d, 0x97, 0xf7, 0x85, 0x34, 0xe0, 0xb2, 0x82, 0xf8, 0x47, 0xc3, 0xdd, 0x2e, + 0x8b, 0xc8, 0x0a, 0x6a, 0x19, 0xf0, 0xcb, 0xa6, 0xbb, 0x18, 0x15, 0x40, 0xd8, 0xe9, 0xd8, 0x9c, + 0x06, 0x62, 0x61, 0x51, 0xff, 0x6c, 0x94, 0x50, 0x4c, 0x15, 0x65, 0xac, 0x13, 0x42, 0x4e, 0x0a, + 0x06, 0x91, 0xc4, 0xff, 0x2a, 0xfb, 0x02, 0x7d, 0x24, 0xbf, 0x59, 0x56, 0xc9, 0xb3, 0x65, 0x25, + 0x56, 0xac, 0x58, 0x10, 0x1a, 0x56, 0x45, 0x3d, 0x57, 0x56, 0x02, 0x7c, 0xab, 0x2a, 0x7e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, 0xa5, 0x25, 0x2b, 0x73, 0x3d, 0x06, 0x75, 0xda, + 0x28, 0xea, 0x55, 0x1f, 0x6a, 0xdc, 0x3e, 0x4b, 0x70, 0xda, 0x50, 0xa5, 0xd3, 0x6f, 0x23, 0x15, + 0x4b, 0x86, 0x97, 0x61, 0x15, 0x5a, 0x79, 0x46, 0xe9, 0x3a, 0x82, 0x76, 0xf1, 0x8a, 0xbd, 0x09, + 0x6e, 0x7c, 0x1b, 0x61, 0x8d, 0xf8, 0xe1, 0x09, 0x5b, 0x25, 0xac, 0x38, 0x27, 0xd0, 0x6e, 0x30, + 0x48, 0xdf, 0x45, 0xb9, 0xd4, 0x06, 0x6a, 0xb7, 0x7d, 0x54, 0x7e, 0xc4, 0x2e, 0xc5, 0x51, 0x57, + 0x51, 0x9f, 0xb9, 0xa5, 0x47, 0x27, 0xc8, 0x65, 0xe8, 0x92, 0x71, 0x11, 0x76, 0x04, 0x32, 0x3b, + 0x8f, 0x70, 0x96, 0x29, 0xc5, 0x7d, 0xa6, 0xf1, 0x63, 0xf6, 0x11, 0xb6, 0xac, 0xe4, 0xf2, 0xff, + 0xc1, 0x8f, 0x4f, 0x90, 0x7d, 0xe8, 0xe2, 0x55, 0xd5, 0x64, 0xd4, 0x01, 0xea, 0x60, 0x44, 0x3d, + 0x86, 0x9f, 0x98, 0x80, 0xf1, 0x24, 0x33, 0x2e, 0x7b, 0xd8, 0xfe, 0xcd, 0x04, 0x50, 0x80, 0xe1, + 0x61, 0x55, 0x84, 0x5d, 0x8d, 0xef, 0x9c, 0x2c, 0x3c, 0x85, 0xab, 0xca, 0x25, 0xd3, 0x1a, 0x92, + 0xb2, 0xcd, 0xf0, 0x5d, 0x25, 0x59, 0xf1, 0x99, 0xe5, 0x32, 0xf8, 0xee, 0x49, 0xe8, 0x57, 0xd4, + 0xf7, 0x15, 0xe0, 0x57, 0x7b, 0x42, 0xd9, 0x81, 0x36, 0x57, 0x20, 0x23, 0xcf, 0x27, 0x7b, 0xd0,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, 0xbe, + 0x72, 0xd5, 0xe9, 0x2b, 0xf7, 0xfd, 0xff, 0xe0, 0xc4, 0xfe, 0xee, 0x60, 0x70, 0x6c, 0x71, 0xc1, + 0x1b, 0x9c, 0x5c, 0x39, 0x7c, 0xfc, 0xe4, 0xc2, 0x92, 0x19, 0x0c, 0x16, 0x97, 0xf7, 0x2f, 0x5f, + 0x73, 0xf8, 0xe8, 0xd1, 0xc1, 0xe2, 0x91, 0xfd, 0xf6, 0x0f, 0xa1, 0xfb, 0xed, 0x1f, 0x42, 0xaf, + 0x9c, 0xb6, 0xff, 0xb8, 0xfc, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0x54, 0xc0, 0x12, 0x2b, + 0x1d, 0x00, 0x00, } diff --git a/proto/enums/enums.proto b/proto/enums/enums.proto index f95a9311d62..f52f61e75e4 100644 --- a/proto/enums/enums.proto +++ b/proto/enums/enums.proto @@ -184,6 +184,8 @@ enum StatusCode { STATUSCHECK_CONTAINER_RESTARTING = 356; // Readiness probe failed STATUSCHECK_UNHEALTHY = 357; + // Executable binary format error + STATUSCHECK_CONTAINER_EXEC_ERROR = 358; // K8 infra errors diff --git a/proto/v1/skaffold.pb.go b/proto/v1/skaffold.pb.go index da5fafa285e..380309ad035 100644 --- a/proto/v1/skaffold.pb.go +++ b/proto/v1/skaffold.pb.go @@ -145,6 +145,7 @@ const StatusCode_STATUSCHECK_CONTAINER_TERMINATED = StatusCode(enums.StatusCode_ const StatusCode_STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING = StatusCode(enums.StatusCode_STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING) const StatusCode_STATUSCHECK_CONTAINER_RESTARTING = StatusCode(enums.StatusCode_STATUSCHECK_CONTAINER_RESTARTING) const StatusCode_STATUSCHECK_UNHEALTHY = StatusCode(enums.StatusCode_STATUSCHECK_UNHEALTHY) +const StatusCode_STATUSCHECK_CONTAINER_EXEC_ERROR = StatusCode(enums.StatusCode_STATUSCHECK_CONTAINER_EXEC_ERROR) const StatusCode_STATUSCHECK_NODE_MEMORY_PRESSURE = StatusCode(enums.StatusCode_STATUSCHECK_NODE_MEMORY_PRESSURE) const StatusCode_STATUSCHECK_NODE_DISK_PRESSURE = StatusCode(enums.StatusCode_STATUSCHECK_NODE_DISK_PRESSURE) const StatusCode_STATUSCHECK_NODE_NETWORK_UNAVAILABLE = StatusCode(enums.StatusCode_STATUSCHECK_NODE_NETWORK_UNAVAILABLE) diff --git a/proto/v2/skaffold.pb.go b/proto/v2/skaffold.pb.go index 73abced85f0..d8494bfc3e6 100644 --- a/proto/v2/skaffold.pb.go +++ b/proto/v2/skaffold.pb.go @@ -145,6 +145,7 @@ const StatusCode_STATUSCHECK_CONTAINER_TERMINATED = StatusCode(enums.StatusCode_ const StatusCode_STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING = StatusCode(enums.StatusCode_STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING) const StatusCode_STATUSCHECK_CONTAINER_RESTARTING = StatusCode(enums.StatusCode_STATUSCHECK_CONTAINER_RESTARTING) const StatusCode_STATUSCHECK_UNHEALTHY = StatusCode(enums.StatusCode_STATUSCHECK_UNHEALTHY) +const StatusCode_STATUSCHECK_CONTAINER_EXEC_ERROR = StatusCode(enums.StatusCode_STATUSCHECK_CONTAINER_EXEC_ERROR) const StatusCode_STATUSCHECK_NODE_MEMORY_PRESSURE = StatusCode(enums.StatusCode_STATUSCHECK_NODE_MEMORY_PRESSURE) const StatusCode_STATUSCHECK_NODE_DISK_PRESSURE = StatusCode(enums.StatusCode_STATUSCHECK_NODE_DISK_PRESSURE) const StatusCode_STATUSCHECK_NODE_NETWORK_UNAVAILABLE = StatusCode(enums.StatusCode_STATUSCHECK_NODE_NETWORK_UNAVAILABLE) From c556ce445e433a0179b78ff42290af218f14bab4 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Tue, 22 Jun 2021 13:20:48 -0700 Subject: [PATCH 004/103] rename build_deploy.go to build.go (#6049) --- pkg/skaffold/runner/{build_deploy.go => build.go} | 0 pkg/skaffold/runner/v1/{build_deploy_test.go => build_test.go} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename pkg/skaffold/runner/{build_deploy.go => build.go} (100%) rename pkg/skaffold/runner/v1/{build_deploy_test.go => build_test.go} (100%) diff --git a/pkg/skaffold/runner/build_deploy.go b/pkg/skaffold/runner/build.go similarity index 100% rename from pkg/skaffold/runner/build_deploy.go rename to pkg/skaffold/runner/build.go diff --git a/pkg/skaffold/runner/v1/build_deploy_test.go b/pkg/skaffold/runner/v1/build_test.go similarity index 100% rename from pkg/skaffold/runner/v1/build_deploy_test.go rename to pkg/skaffold/runner/v1/build_test.go From e88d988c44482d60b46310a7c2464cb20f8d873c Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Tue, 22 Jun 2021 14:05:45 -0700 Subject: [PATCH 005/103] Move Syncer into Deployer (#6053) --- pkg/skaffold/deploy/deploy.go | 15 ++++- pkg/skaffold/deploy/deploy_mux.go | 9 +++ pkg/skaffold/deploy/deploy_mux_test.go | 5 ++ pkg/skaffold/deploy/helm/deploy.go | 7 ++ pkg/skaffold/deploy/kpt/kpt.go | 7 ++ pkg/skaffold/deploy/kubectl/kubectl.go | 7 ++ pkg/skaffold/deploy/kustomize/kustomize.go | 7 ++ pkg/skaffold/runner/v1/dev.go | 2 +- pkg/skaffold/runner/v1/new.go | 7 +- pkg/skaffold/runner/v1/runner.go | 2 - pkg/skaffold/runner/v1/runner_test.go | 6 +- pkg/skaffold/sync/provider.go | 74 ++++++++++++++++++++++ pkg/skaffold/sync/syncer_mux.go | 30 +++++++++ pkg/skaffold/sync/types.go | 12 ++-- 14 files changed, 170 insertions(+), 20 deletions(-) create mode 100644 pkg/skaffold/sync/provider.go create mode 100644 pkg/skaffold/sync/syncer_mux.go diff --git a/pkg/skaffold/deploy/deploy.go b/pkg/skaffold/deploy/deploy.go index 6ae0513049f..351eb918ebd 100644 --- a/pkg/skaffold/deploy/deploy.go +++ b/pkg/skaffold/deploy/deploy.go @@ -25,10 +25,17 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" ) // NoopComponentProvider is for tests -var NoopComponentProvider = ComponentProvider{Accessor: &access.NoopProvider{}, Logger: &log.NoopProvider{}, Debugger: &debug.NoopProvider{}, Monitor: &status.NoopProvider{}} +var NoopComponentProvider = ComponentProvider{ + Accessor: &access.NoopProvider{}, + Debugger: &debug.NoopProvider{}, + Logger: &log.NoopProvider{}, + Monitor: &status.NoopProvider{}, + Syncer: &sync.NoopProvider{}, +} // Deployer is the Deploy API of skaffold and responsible for deploying // the build results to a Kubernetes cluster @@ -48,7 +55,7 @@ type Deployer interface { // writes them to the given file path Render(context.Context, io.Writer, []graph.Artifact, bool, string) error - // GetDebugger returns a Deployer's implementation of a Logger + // GetDebugger returns a Deployer's implementation of a Debugger GetDebugger() debug.Debugger // GetLogger returns a Deployer's implementation of a Logger @@ -57,6 +64,9 @@ type Deployer interface { // GetAccessor returns a Deployer's implementation of an Accessor GetAccessor() access.Accessor + // GetSyncer returns a Deployer's implementation of a Syncer + GetSyncer() sync.Syncer + // TrackBuildArtifacts registers build artifacts to be tracked by a Deployer TrackBuildArtifacts([]graph.Artifact) @@ -71,4 +81,5 @@ type ComponentProvider struct { Debugger debug.Provider Logger log.Provider Monitor status.Provider + Syncer sync.Provider } diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go index 06cb6da5e02..814a102ab27 100644 --- a/pkg/skaffold/deploy/deploy_mux.go +++ b/pkg/skaffold/deploy/deploy_mux.go @@ -33,6 +33,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -73,6 +74,14 @@ func (m DeployerMux) GetStatusMonitor() status.Monitor { return monitors } +func (m DeployerMux) GetSyncer() sync.Syncer { + var syncers sync.SyncerMux + for _, deployer := range m { + syncers = append(syncers, deployer.GetSyncer()) + } + return syncers +} + func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) ([]string, error) { seenNamespaces := util.NewStringSet() diff --git a/pkg/skaffold/deploy/deploy_mux_test.go b/pkg/skaffold/deploy/deploy_mux_test.go index 719e15fb6fa..f13a295bf5d 100644 --- a/pkg/skaffold/deploy/deploy_mux_test.go +++ b/pkg/skaffold/deploy/deploy_mux_test.go @@ -31,6 +31,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/testutil" testEvent "github.com/GoogleContainerTools/skaffold/testutil/event" ) @@ -64,6 +65,10 @@ func (m *MockDeployer) GetStatusMonitor() status.Monitor { return &status.NoopMonitor{} } +func (m *MockDeployer) GetSyncer() sync.Syncer { + return &sync.NoopSyncer{} +} + func (m *MockDeployer) TrackBuildArtifacts(_ []graph.Artifact) {} func (m *MockDeployer) Dependencies() ([]string, error) { diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index 4f40f8b40ef..6fb6cc72a9f 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -53,6 +53,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/walk" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/warnings" @@ -85,6 +86,7 @@ type Deployer struct { debugger debug.Debugger logger log.Logger statusMonitor status.Monitor + syncer sync.Syncer podSelector *kubernetes.ImageList originalImages []graph.Artifact @@ -140,6 +142,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector), originalImages: originalImages, kubeContext: cfg.GetKubeContext(), kubeConfig: cfg.GetKubeConfig(), @@ -169,6 +172,10 @@ func (h *Deployer) GetStatusMonitor() status.Monitor { return h.statusMonitor } +func (h *Deployer) GetSyncer() sync.Syncer { + return h.syncer +} + func (h *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, h.originalImages, h.podSelector) h.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 0e37a1152ad..660f775778c 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -48,6 +48,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -75,6 +76,7 @@ type Deployer struct { logger log.Logger debugger debug.Debugger statusMonitor status.Monitor + syncer sync.Syncer podSelector *kubernetes.ImageList originalImages []graph.Artifact @@ -102,6 +104,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector), insecureRegistries: cfg.GetInsecureRegistries(), labels: labels, globalConfig: cfg.GlobalConfig(), @@ -128,6 +131,10 @@ func (k *Deployer) GetStatusMonitor() status.Monitor { return k.statusMonitor } +func (k *Deployer) GetSyncer() sync.Syncer { + return k.syncer +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index 28acac734f8..ba5283ecd69 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -43,6 +43,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -54,6 +55,7 @@ type Deployer struct { logger log.Logger debugger debug.Debugger statusMonitor status.Monitor + syncer sync.Syncer originalImages []graph.Artifact podSelector *kubernetes.ImageList @@ -89,6 +91,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector), workingDir: cfg.GetWorkingDir(), globalConfig: cfg.GlobalConfig(), defaultRepo: cfg.DefaultRepo(), @@ -116,6 +119,10 @@ func (k *Deployer) GetStatusMonitor() status.Monitor { return k.statusMonitor } +func (k *Deployer) GetSyncer() sync.Syncer { + return k.syncer +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index d185f8ea0e3..083d8d92f78 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -43,6 +43,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/warnings" ) @@ -105,6 +106,7 @@ type Deployer struct { logger log.Logger debugger debug.Debugger statusMonitor status.Monitor + syncer sync.Syncer podSelector *kubernetes.ImageList originalImages []graph.Artifact @@ -138,6 +140,7 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector), kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), globalConfig: cfg.GlobalConfig(), @@ -162,6 +165,10 @@ func (k *Deployer) GetStatusMonitor() status.Monitor { return k.statusMonitor } +func (k *Deployer) GetSyncer() sync.Syncer { + return k.syncer +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) diff --git a/pkg/skaffold/runner/v1/dev.go b/pkg/skaffold/runner/v1/dev.go index 0d7f7ecf132..586733250e2 100644 --- a/pkg/skaffold/runner/v1/dev.go +++ b/pkg/skaffold/runner/v1/dev.go @@ -92,7 +92,7 @@ func (r *SkaffoldRunner) doDev(ctx context.Context, out io.Writer) error { output.Default.Fprintf(out, "Syncing %d files for %s\n", fileCount, s.Image) fileSyncInProgress(fileCount, s.Image) - if err := r.syncer.Sync(childCtx, s); err != nil { + if err := r.deployer.GetSyncer().Sync(childCtx, s); err != nil { logrus.Warnln("Skipping deploy due to sync error:", err) fileSyncFailed(fileCount, s.Image, err) event.DevLoopFailedInPhase(r.devIteration, constants.Sync, err) diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index f1d8b695520..427ea51ff2f 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -92,7 +92,6 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { endTrace(instrumentation.TraceEndError(err)) return nil, fmt.Errorf("creating tester: %w", err) } - syncer := getSyncer(runCtx) var podSelectors kubernetes.ImageListMux var deployer deploy.Deployer @@ -101,6 +100,7 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { Debugger: debug.NewDebugProvider(runCtx), Logger: log.NewLogProvider(runCtx, kubectlCLI), Monitor: status.NewMonitorProvider(runCtx, labeller), + Syncer: sync.NewSyncProvider(runCtx, kubectlCLI), } deployer, podSelectors, err = getDeployer(runCtx, provider, labeller.Labels()) @@ -152,7 +152,6 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { Pruner: runner.Pruner{Builder: builder}, Tester: tester, deployer: deployer, - syncer: syncer, monitor: monitor, listener: runner.NewSkaffoldListener(monitor, rtrigger, sourceDependencies, intentChan), artifactStore: store, @@ -235,10 +234,6 @@ func getTester(cfg test.Config, isLocalImage func(imageName string) (bool, error return tester, nil } -func getSyncer(cfg sync.Config) sync.Syncer { - return sync.NewSyncer(cfg) -} - /* The "default deployer" is used in `skaffold apply`, which uses a `kubectl` deployer to actuate resources on a cluster regardless of provided deployer configuration in the skaffold.yaml. diff --git a/pkg/skaffold/runner/v1/runner.go b/pkg/skaffold/runner/v1/runner.go index af7ed27e59b..0d1f6faa40a 100644 --- a/pkg/skaffold/runner/v1/runner.go +++ b/pkg/skaffold/runner/v1/runner.go @@ -26,7 +26,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/test" ) @@ -37,7 +36,6 @@ type SkaffoldRunner struct { test.Tester deployer deploy.Deployer - syncer sync.Syncer monitor filemon.Monitor listener runner.Listener diff --git a/pkg/skaffold/runner/v1/runner_test.go b/pkg/skaffold/runner/v1/runner_test.go index 4dc2637dddd..50d3dd67922 100644 --- a/pkg/skaffold/runner/v1/runner_test.go +++ b/pkg/skaffold/runner/v1/runner_test.go @@ -120,6 +120,11 @@ func (t *TestBench) GetLogger() log.Logger { func (t *TestBench) GetStatusMonitor() status.Monitor { return &status.NoopMonitor{} } + +func (t *TestBench) GetSyncer() sync.Syncer { + return t +} + func (t *TestBench) TrackBuildArtifacts(_ []graph.Artifact) {} func (t *TestBench) TestDependencies(*latestV1.Artifact) ([]string, error) { return nil, nil } @@ -281,7 +286,6 @@ func createRunner(t *testutil.T, testBench *TestBench, monitor filemon.Monitor, // TODO(yuwenma):builder.builder looks weird. Avoid the nested struct. runner.Builder.Builder = testBench - runner.syncer = testBench runner.Tester = testBench runner.deployer = testBench runner.listener = testBench diff --git a/pkg/skaffold/sync/provider.go b/pkg/skaffold/sync/provider.go new file mode 100644 index 00000000000..99ed98f11ab --- /dev/null +++ b/pkg/skaffold/sync/provider.go @@ -0,0 +1,74 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sync + +import ( + gosync "sync" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" +) + +type Provider interface { + GetKubernetesSyncer(*kubernetes.ImageList) Syncer + GetNoopSyncer() Syncer +} + +type fullProvider struct { + kubernetesSyncer func(*kubernetes.ImageList) Syncer + noopSyncer func() Syncer +} + +var ( + provider *fullProvider + once gosync.Once +) + +func NewSyncProvider(config Config, cli *kubectl.CLI) Provider { + once.Do(func() { + provider = &fullProvider{ + kubernetesSyncer: func(podSelector *kubernetes.ImageList) Syncer { + return &podSyncer{ + kubectl: cli, + namespaces: config.GetNamespaces(), + } + }, + noopSyncer: func() Syncer { + return nil + }, + } + }) + return provider +} + +func (p *fullProvider) GetKubernetesSyncer(s *kubernetes.ImageList) Syncer { + return p.kubernetesSyncer(s) +} + +func (p *fullProvider) GetNoopSyncer() Syncer { + return p.noopSyncer() +} + +type NoopProvider struct{} + +func (p *NoopProvider) GetKubernetesSyncer(_ *kubernetes.ImageList) Syncer { + return &NoopSyncer{} +} + +func (p *NoopProvider) GetNoopSyncer() Syncer { + return &NoopSyncer{} +} diff --git a/pkg/skaffold/sync/syncer_mux.go b/pkg/skaffold/sync/syncer_mux.go new file mode 100644 index 00000000000..af4cf12123b --- /dev/null +++ b/pkg/skaffold/sync/syncer_mux.go @@ -0,0 +1,30 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sync + +import "context" + +type SyncerMux []Syncer + +func (s SyncerMux) Sync(ctx context.Context, item *Item) error { + for _, syncer := range s { + if err := syncer.Sync(ctx, item); err != nil { + return err + } + } + return nil +} diff --git a/pkg/skaffold/sync/types.go b/pkg/skaffold/sync/types.go index d6904e55f11..6453f4d1246 100644 --- a/pkg/skaffold/sync/types.go +++ b/pkg/skaffold/sync/types.go @@ -19,7 +19,6 @@ package sync import ( "context" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" ) @@ -41,14 +40,11 @@ type podSyncer struct { } type Config interface { - kubectl.Config - GetNamespaces() []string } -func NewSyncer(cfg Config) Syncer { - return &podSyncer{ - kubectl: pkgkubectl.NewCLI(cfg, ""), - namespaces: cfg.GetNamespaces(), - } +type NoopSyncer struct{} + +func (s *NoopSyncer) Sync(context.Context, *Item) error { + return nil } From dacf7d12d9a8d902873b2c6d3a8c61f0e60ef88c Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Tue, 22 Jun 2021 17:16:51 -0400 Subject: [PATCH 006/103] Ensure events are serialized (#6064) --- pkg/skaffold/event/event.go | 20 +++++++++----------- pkg/skaffold/event/v2/event.go | 17 +++++++---------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/pkg/skaffold/event/event.go b/pkg/skaffold/event/event.go index 048d6e7d128..e7bf7c941e3 100644 --- a/pkg/skaffold/event/event.go +++ b/pkg/skaffold/event/event.go @@ -567,17 +567,15 @@ func LogMetaEvent() { } func (ev *eventHandler) handle(event *proto.Event) { - go func(t *timestamp.Timestamp) { - ev.eventChan <- firedEvent{ - event: event, - ts: t, - } - if _, ok := event.GetEventType().(*proto.Event_TerminationEvent); ok { - // close the event channel indicating there are no more events to all the - // receivers - close(ev.eventChan) - } - }(ptypes.TimestampNow()) + ev.eventChan <- firedEvent{ + event: event, + ts: ptypes.TimestampNow(), + } + if _, ok := event.GetEventType().(*proto.Event_TerminationEvent); ok { + // close the event channel indicating there are no more events to all the + // receivers + close(ev.eventChan) + } } func (ev *eventHandler) handleExec(f firedEvent) { diff --git a/pkg/skaffold/event/v2/event.go b/pkg/skaffold/event/v2/event.go index 54b3cde49c3..371ed9b1683 100644 --- a/pkg/skaffold/event/v2/event.go +++ b/pkg/skaffold/event/v2/event.go @@ -26,7 +26,6 @@ import ( //nolint:golint,staticcheck "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/timestamp" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" @@ -377,15 +376,13 @@ func (ev *eventHandler) setState(state proto.State) { } func (ev *eventHandler) handle(event *proto.Event) { - go func(t *timestamp.Timestamp) { - event.Timestamp = t - ev.eventChan <- event - if _, ok := event.GetEventType().(*proto.Event_TerminationEvent); ok { - // close the event channel indicating there are no more events to all the - // receivers - close(ev.eventChan) - } - }(ptypes.TimestampNow()) + event.Timestamp = ptypes.TimestampNow() + ev.eventChan <- event + if _, ok := event.GetEventType().(*proto.Event_TerminationEvent); ok { + // close the event channel indicating there are no more events to all the + // receivers + close(ev.eventChan) + } } func (ev *eventHandler) handleTaskEvent(e *proto.TaskEvent) { From 35400ad10d34089ea3fd528563acca38db1a6f96 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Tue, 22 Jun 2021 14:39:08 -0700 Subject: [PATCH 007/103] enable init flags by default (#6063) --- cmd/skaffold/app/cmd/init.go | 4 ++-- cmd/skaffold/app/cmd/init_test.go | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/skaffold/app/cmd/init.go b/cmd/skaffold/app/cmd/init.go index 543e18719b0..b4d3160798d 100644 --- a/cmd/skaffold/app/cmd/init.go +++ b/cmd/skaffold/app/cmd/init.go @@ -63,9 +63,9 @@ func NewCmdInit() *cobra.Command { {Value: &cliKubernetesManifests, Name: "kubernetes-manifest", FlagAddMethod: "StringArrayVar", Shorthand: "k", DefValue: []string{}, Usage: "A path or a glob pattern to kubernetes manifests (can be non-existent) to be added to the kubectl deployer (overrides detection of kubernetes manifests). Repeat the flag for multiple entries. E.g.: skaffold init -k pod.yaml -k k8s/*.yml"}, {Value: &analyze, Name: "analyze", DefValue: false, Usage: "Print all discoverable Dockerfiles and images in JSON format to stdout", IsEnum: true}, {Value: &enableNewInitFormat, Name: "XXenableNewInitFormat", DefValue: false, Usage: "", Hidden: true, IsEnum: true}, - {Value: &enableJibInit, Name: "XXenableJibInit", DefValue: false, Usage: "", Hidden: true, IsEnum: true}, + {Value: &enableJibInit, Name: "XXenableJibInit", DefValue: true, Usage: "", Hidden: true, IsEnum: true}, {Value: &enableJibGradleInit, Name: "XXenableJibGradleInit", DefValue: false, Usage: "", Hidden: true, IsEnum: true}, - {Value: &enableBuildpacksInit, Name: "XXenableBuildpacksInit", DefValue: false, Usage: "", Hidden: true, IsEnum: true}, + {Value: &enableBuildpacksInit, Name: "XXenableBuildpacksInit", DefValue: true, Usage: "", Hidden: true, IsEnum: true}, {Value: &buildpacksBuilder, Name: "XXdefaultBuildpacksBuilder", DefValue: "gcr.io/buildpacks/builder:v1", Usage: "", Hidden: true}, {Value: &enableManifestGeneration, Name: "generate-manifests", DefValue: false, Usage: "Allows skaffold to try and generate basic kubernetes resources to get your project started", IsEnum: true}, }). diff --git a/cmd/skaffold/app/cmd/init_test.go b/cmd/skaffold/app/cmd/init_test.go index a6708445119..c8cc0766300 100644 --- a/cmd/skaffold/app/cmd/init_test.go +++ b/cmd/skaffold/app/cmd/init_test.go @@ -52,10 +52,10 @@ func TestFlagsToConfigVersion(t *testing.T) { SkipDeploy: false, Force: false, Analyze: false, - EnableJibInit: false, + EnableJibInit: true, EnableJibGradleInit: false, - EnableBuildpacksInit: false, - EnableNewInitFormat: false, + EnableBuildpacksInit: true, + EnableNewInitFormat: true, BuildpacksBuilder: "gcr.io/buildpacks/builder:v1", Opts: opts, MaxFileSize: maxFileSize, @@ -114,7 +114,7 @@ func TestFlagsToConfigVersion(t *testing.T) { Force: false, Analyze: false, EnableJibInit: true, - EnableBuildpacksInit: false, + EnableBuildpacksInit: true, EnableNewInitFormat: true, BuildpacksBuilder: "gcr.io/buildpacks/builder:v1", Opts: opts, @@ -135,7 +135,7 @@ func TestFlagsToConfigVersion(t *testing.T) { SkipDeploy: false, Force: false, Analyze: false, - EnableJibInit: false, + EnableJibInit: true, EnableBuildpacksInit: true, EnableNewInitFormat: true, BuildpacksBuilder: "gcr.io/buildpacks/builder:v1", From d65804969716753f8ba1d0e317bcc2d3b6d74b9c Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Tue, 22 Jun 2021 15:16:50 -0700 Subject: [PATCH 008/103] Ensure output stream is set before port forwarding (#6061) * Ensure output stream is set before port forwarding * fix test --- integration/dev_test.go | 4 +-- .../kubernetes/portforward/entry_manager.go | 5 ++++ .../portforward/forwarder_manager.go | 7 +++-- .../portforward/kubectl_forwarder.go | 12 ++++++++ .../portforward/kubectl_forwarder_test.go | 30 +++++++++++++++++++ .../portforward/resource_forwarder_test.go | 3 ++ pkg/skaffold/runner/v1/dev.go | 5 +--- 7 files changed, 58 insertions(+), 8 deletions(-) diff --git a/integration/dev_test.go b/integration/dev_test.go index 2cb1815cb02..b26f6981faa 100644 --- a/integration/dev_test.go +++ b/integration/dev_test.go @@ -306,7 +306,7 @@ func getLocalPortFromPortForwardEvent(t *testing.T, entries chan *proto.LogEntry case e := <-entries: switch e.Event.GetEventType().(type) { case *proto.Event_PortEvent: - t.Logf("event received %v", e) + t.Logf("port event received: %v", e) if e.Event.GetPortEvent().ResourceName == resourceName && e.Event.GetPortEvent().ResourceType == resourceType && e.Event.GetPortEvent().Namespace == namespace { @@ -316,7 +316,7 @@ func getLocalPortFromPortForwardEvent(t *testing.T, entries chan *proto.LogEntry return address, int(port) } default: - t.Logf("event received %v", e) + t.Logf("event received: %v", e) } } } diff --git a/pkg/skaffold/kubernetes/portforward/entry_manager.go b/pkg/skaffold/kubernetes/portforward/entry_manager.go index 740d0d57c9d..bc90c680b15 100644 --- a/pkg/skaffold/kubernetes/portforward/entry_manager.go +++ b/pkg/skaffold/kubernetes/portforward/entry_manager.go @@ -137,6 +137,11 @@ func (b *EntryManager) forwardPortForwardEntry(ctx context.Context, out io.Write portForwardEventV2(entry) } +// Start ensures the underlying entryForwarder is ready to forward. +func (b *EntryManager) Start(out io.Writer) { + b.entryForwarder.Start(out) +} + // Stop terminates all kubectl port-forward commands. func (b *EntryManager) Stop() { for _, pfe := range b.forwardedResources.resources { diff --git a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go index f96baa93b57..571f0271500 100644 --- a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go +++ b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go @@ -48,7 +48,8 @@ type Forwarder interface { // ForwarderManager manages all forwarders type ForwarderManager struct { - forwarders []Forwarder + forwarders []Forwarder + entryManager *EntryManager } // NewForwarderManager returns a new port manager which handles starting and stopping port forwarding @@ -73,7 +74,8 @@ func NewForwarderManager(cli *kubectl.CLI, podSelector kubernetes.PodSelector, l } return &ForwarderManager{ - forwarders: forwarders, + forwarders: forwarders, + entryManager: entryManager, } } @@ -120,6 +122,7 @@ func (p *ForwarderManager) Start(ctx context.Context, out io.Writer, namespaces ctx, endTrace := instrumentation.StartTrace(ctx, "Start") defer endTrace() + p.entryManager.Start(out) for _, f := range p.forwarders { if err := f.Start(ctx, out, namespaces); err != nil { eventV2.TaskFailed(constants.PortForward, err) diff --git a/pkg/skaffold/kubernetes/portforward/kubectl_forwarder.go b/pkg/skaffold/kubernetes/portforward/kubectl_forwarder.go index 449235cd0c4..8defb187bd6 100644 --- a/pkg/skaffold/kubernetes/portforward/kubectl_forwarder.go +++ b/pkg/skaffold/kubernetes/portforward/kubectl_forwarder.go @@ -25,6 +25,7 @@ import ( "os" "sort" "strings" + "sync/atomic" "time" "github.com/sirupsen/logrus" @@ -41,11 +42,13 @@ import ( ) type EntryForwarder interface { + Start(io.Writer) Forward(parentCtx context.Context, pfe *portForwardEntry) error Terminate(p *portForwardEntry) } type KubectlForwarder struct { + started int32 out io.Writer kubectl *kubectl.CLI } @@ -66,6 +69,11 @@ var ( waitErrorLogs = 1 * time.Second ) +func (k *KubectlForwarder) Start(out io.Writer) { + atomic.StoreInt32(&k.started, 1) + k.out = out +} + // Forward port-forwards a pod using kubectl port-forward in the background // It kills the command on errors in the kubectl port-forward log // It restarts the command if it was not cancelled by skaffold @@ -77,6 +85,10 @@ func (k *KubectlForwarder) Forward(parentCtx context.Context, pfe *portForwardEn } func (k *KubectlForwarder) forward(parentCtx context.Context, pfe *portForwardEntry, errChan chan error) { + if atomic.LoadInt32(&k.started) == 0 { + errChan <- fmt.Errorf("Forward() called before kubectl forwarder was started") + return + } var notifiedUser bool defer deferFunc() diff --git a/pkg/skaffold/kubernetes/portforward/kubectl_forwarder_test.go b/pkg/skaffold/kubernetes/portforward/kubectl_forwarder_test.go index 6d965f54d42..566b08b180b 100644 --- a/pkg/skaffold/kubernetes/portforward/kubectl_forwarder_test.go +++ b/pkg/skaffold/kubernetes/portforward/kubectl_forwarder_test.go @@ -20,6 +20,7 @@ import ( "bytes" "context" "errors" + "io/ioutil" "runtime" "sort" "strings" @@ -69,6 +70,7 @@ func TestUnavailablePort(t *testing.T) { } pfe := newPortForwardEntry(0, latestV1.PortForwardResource{}, "", "", "", "", 8080, false) + k.Start(&buf) go k.Forward(context.Background(), pfe) // wait for isPortFree to be called @@ -451,3 +453,31 @@ func mockPod(name string, ports []corev1.ContainerPort, creationTime time.Time) }, } } + +func TestStartAndForward(t *testing.T) { + tests := []struct { + description string + startFirst bool + }{ + { + description: "Forward() before Start() errors", + startFirst: false, + }, { + description: "Start() before Forward()", + startFirst: true, + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(_ *testutil.T) { + k := &KubectlForwarder{} + if test.startFirst { + k.Start(ioutil.Discard) + testutil.CheckDeepEqual(t, k.started, int32(1)) + } else { + err := k.Forward(context.Background(), nil) + testutil.CheckError(t, true, err) + } + }) + } +} diff --git a/pkg/skaffold/kubernetes/portforward/resource_forwarder_test.go b/pkg/skaffold/kubernetes/portforward/resource_forwarder_test.go index aa85b9648bb..3923f1dc936 100644 --- a/pkg/skaffold/kubernetes/portforward/resource_forwarder_test.go +++ b/pkg/skaffold/kubernetes/portforward/resource_forwarder_test.go @@ -19,6 +19,7 @@ package portforward import ( "context" "fmt" + "io" "io/ioutil" "sync" "testing" @@ -60,6 +61,8 @@ func (f *testForwarder) Terminate(pfe *portForwardEntry) { f.forwardedPorts.Delete(pfe.localPort) } +func (f *testForwarder) Start(io.Writer) {} + func newTestForwarder() *testForwarder { return &testForwarder{} } diff --git a/pkg/skaffold/runner/v1/dev.go b/pkg/skaffold/runner/v1/dev.go index 586733250e2..7c1ae4024e1 100644 --- a/pkg/skaffold/runner/v1/dev.go +++ b/pkg/skaffold/runner/v1/dev.go @@ -336,11 +336,8 @@ func (r *SkaffoldRunner) Dev(ctx context.Context, out io.Writer, artifacts []*la defer r.deployer.GetAccessor().Stop() - // forwarderManager := r.createForwarder(out) - // defer forwarderManager.Stop() - if err := r.deployer.GetAccessor().Start(ctx, out, r.runCtx.GetNamespaces()); err != nil { - logrus.Warnln("Error starting port forwarding:", err) + logrus.Warnln("Error starting resource accessor:", err) } if err := r.deployer.GetDebugger().Start(ctx, r.runCtx.GetNamespaces()); err != nil { logrus.Warnln("Error starting debug container notification:", err) From 3a531d620be0fed97d9689ae8c073c0e3ac4e354 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Wed, 23 Jun 2021 08:46:34 -0700 Subject: [PATCH 009/103] [v2] Add transformer in renderer step. (#6051) --- hack/versions/pkg/schema/check.go | 7 ++ pkg/skaffold/render/renderer/renderer.go | 20 +++- pkg/skaffold/render/transform/transform.go | 110 ++++++++++++++++++ .../render/transform/transform_test.go | 56 +++++++++ pkg/skaffold/render/validate/validate.go | 4 +- pkg/skaffold/schema/latest/v2/config.go | 7 +- pkg/skaffold/schema/v3alpha1/config.go | 6 +- 7 files changed, 204 insertions(+), 6 deletions(-) create mode 100644 pkg/skaffold/render/transform/transform.go create mode 100644 pkg/skaffold/render/transform/transform_test.go diff --git a/hack/versions/pkg/schema/check.go b/hack/versions/pkg/schema/check.go index fda6ee1d43d..1b5a7894e0a 100644 --- a/hack/versions/pkg/schema/check.go +++ b/hack/versions/pkg/schema/check.go @@ -41,6 +41,13 @@ func RunSchemaCheckOnChangedFiles() error { } var changedConfigFiles []string for _, file := range changedFiles { + if strings.Contains(file, "v3alpha") { + continue + } + if strings.Contains(file, "latest/v2") { + continue + } + if strings.Contains(file, "config.go") { changedConfigFiles = append(changedConfigFiles, file) } diff --git a/pkg/skaffold/render/renderer/renderer.go b/pkg/skaffold/render/renderer/renderer.go index 4619a8e3415..36b6ee98f45 100644 --- a/pkg/skaffold/render/renderer/renderer.go +++ b/pkg/skaffold/render/renderer/renderer.go @@ -32,6 +32,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/generate" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/kptfile" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/transform" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/validate" latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" @@ -74,12 +75,24 @@ func NewSkaffoldRenderer(config *latestV2.RenderConfig, workingDir string) (Rend validator, _ = validate.NewValidator([]latestV2.Validator{}) } - return &SkaffoldRenderer{Generator: *generator, Validator: *validator, workingDir: workingDir, hydrationDir: hydrationDir}, nil + var transformer *transform.Transformer + if config.Transform != nil { + var err error + transformer, err = transform.NewTransformer(*config.Transform) + if err != nil { + return nil, err + } + } else { + transformer, _ = transform.NewTransformer([]latestV2.Transformer{}) + } + return &SkaffoldRenderer{Generator: *generator, Validator: *validator, Transformer: *transformer, + workingDir: workingDir, hydrationDir: hydrationDir}, nil } type SkaffoldRenderer struct { generate.Generator validate.Validator + transform.Transformer workingDir string hydrationDir string labels map[string]string @@ -164,7 +177,10 @@ func (r *SkaffoldRenderer) Render(ctx context.Context, out io.Writer, builds []g } kfConfig.Pipeline.Validators = r.GetDeclarativeValidators() - // TODO: Update the Kptfile with the new mutators. + kfConfig.Pipeline.Mutators, err = r.GetDeclarativeTransformers() + if err != nil { + return err + } configByte, err := yaml.Marshal(kfConfig) if err != nil { diff --git a/pkg/skaffold/render/transform/transform.go b/pkg/skaffold/render/transform/transform.go new file mode 100644 index 00000000000..4848a202feb --- /dev/null +++ b/pkg/skaffold/render/transform/transform.go @@ -0,0 +1,110 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package transform + +import ( + "fmt" + "strings" + + sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/kptfile" + latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" + "github.com/GoogleContainerTools/skaffold/proto/v1" +) + +var ( + allowListedTransformer = []string{"set-label"} + transformerAllowlist = map[string]kptfile.Function{ + "set-label": { + Image: "gcr.io/kpt-functions/set-namespace", + ConfigMap: map[string]string{}, + }, + } +) + +// NewTransformer instantiates a Transformer object. +func NewTransformer(config []latestV2.Transformer) (*Transformer, error) { + newFuncs, err := validateTransformers(config) + if err != nil { + return nil, err + } + return &Transformer{kptFn: newFuncs, needRefresh: true, config: config}, nil +} + +type Transformer struct { + needRefresh bool + kptFn []kptfile.Function + config []latestV2.Transformer +} + +// GetDeclarativeValidators transforms and returns the skaffold validators defined in skaffold.yaml +func (v *Transformer) GetDeclarativeTransformers() ([]kptfile.Function, error) { + // TODO: guarantee the v.kptFn is updated once users changed skaffold.yaml file. + if v.needRefresh { + newFuncs, err := validateTransformers(v.config) + if err != nil { + return nil, err + } + v.kptFn = newFuncs + v.needRefresh = false + } + return v.kptFn, nil +} + +func validateTransformers(config []latestV2.Transformer) ([]kptfile.Function, error) { + var newFuncs []kptfile.Function + for _, c := range config { + newFunc, ok := transformerAllowlist[c.Name] + if !ok { + // TODO: Add links to explain "skaffold-managed mode" and "kpt-managed mode". + return nil, sErrors.NewErrorWithStatusCode( + proto.ActionableErr{ + Message: fmt.Sprintf("unsupported transformer %q", c.Name), + ErrCode: proto.StatusCode_CONFIG_UNKNOWN_TRANSFORMER, + Suggestions: []*proto.Suggestion{ + { + SuggestionCode: proto.SuggestionCode_CONFIG_ALLOWLIST_transformers, + Action: fmt.Sprintf( + "please only use the following transformers in skaffold-managed mode: %v. "+ + "to use custom transformers, please use kpt-managed mode.", allowListedTransformer), + }, + }, + }) + } + if c.ConfigMapData != nil { + for _, stringifiedData := range c.ConfigMapData { + items := strings.Split(stringifiedData, "=") + if len(items) != 2 { + return nil, sErrors.NewErrorWithStatusCode( + proto.ActionableErr{ + Message: fmt.Sprintf("unknown arguments for transformer %v", c.Name), + ErrCode: proto.StatusCode_CONFIG_UNKNOWN_TRANSFORMER, + Suggestions: []*proto.Suggestion{ + { + SuggestionCode: proto.SuggestionCode_CONFIG_ALLOWLIST_transformers, + Action: fmt.Sprintf("please check if the .transformer field and " + + "make sure `configMapData` is a list of data in the form of `${KEY}=${VALUE}`"), + }, + }, + }) + } + newFunc.ConfigMap[items[0]] = items[1] + } + } + newFuncs = append(newFuncs, newFunc) + } + return newFuncs, nil +} diff --git a/pkg/skaffold/render/transform/transform_test.go b/pkg/skaffold/render/transform/transform_test.go new file mode 100644 index 00000000000..b6158728056 --- /dev/null +++ b/pkg/skaffold/render/transform/transform_test.go @@ -0,0 +1,56 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package transform + +import ( + "testing" + + latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestNewTransformer(t *testing.T) { + tests := []struct { + description string + config []latestV2.Transformer + }{ + { + description: "no transform", + config: []latestV2.Transformer{}, + }, + { + description: "set-label", + config: []latestV2.Transformer{ + {Name: "set-label"}, + }, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + _, err := NewTransformer(test.config) + t.CheckNoError(err) + }) + } +} + +func TestNewValidator_Error(t *testing.T) { + testutil.Run(t, "", func(t *testutil.T) { + _, err := NewTransformer([]latestV2.Transformer{ + {Name: "bad-transformer"}, + }) + t.CheckContains(`unsupported transformer "bad-transformer". please only use the`, err.Error()) + }) +} diff --git a/pkg/skaffold/render/validate/validate.go b/pkg/skaffold/render/validate/validate.go index e054e586bef..1467c81aa76 100644 --- a/pkg/skaffold/render/validate/validate.go +++ b/pkg/skaffold/render/validate/validate.go @@ -25,7 +25,7 @@ import ( ) var ( - AllowlistedValidators = []string{"kubeval"} + allowListedValidators = []string{"kubeval"} validatorAllowlist = map[string]kptfile.Function{ "kubeval": {Image: "gcr.io/kpt-fn/kubeval:v0.1"}, // TODO: Add conftest validator in kpt catalog. @@ -48,7 +48,7 @@ func NewValidator(config []latestV2.Validator) (*Validator, error) { SuggestionCode: proto.SuggestionCode_CONFIG_ALLOWLIST_VALIDATORS, Action: fmt.Sprintf( "please only use the following validators in skaffold-managed mode: %v. "+ - "to use custom validators, please use kpt-managed mode.", AllowlistedValidators), + "to use custom validators, please use kpt-managed mode.", allowListedValidators), }, }, }) diff --git a/pkg/skaffold/schema/latest/v2/config.go b/pkg/skaffold/schema/latest/v2/config.go index b5a06bc938d..132f5393f6e 100644 --- a/pkg/skaffold/schema/latest/v2/config.go +++ b/pkg/skaffold/schema/latest/v2/config.go @@ -21,6 +21,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) +// This config version is not yet released, it is SAFE TO MODIFY the structs in this file. const Version string = "skaffold/v3alpha2" // NewSkaffoldConfig creates a SkaffoldConfig @@ -106,12 +107,16 @@ type Generate struct { type Transformer struct { // Name is the transformer name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` + // ConfigMapData allows users to provide additional config data to the kpt function. + ConfigMapData []string `yaml:"configMapData,omitempty"` } -// Transformer describes the supported kpt transformers. +// Validator describes the supported kpt validators. type Validator struct { // Name is the Validator name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` + // ConfigMapData allows users to provide additional config data to the kpt function. + ConfigMapData []string `yaml:"configMapData,omitempty"` } // DeployConfig contains all the configuration needed by the deploy steps. diff --git a/pkg/skaffold/schema/v3alpha1/config.go b/pkg/skaffold/schema/v3alpha1/config.go index 20a418cd28d..190ff702d58 100644 --- a/pkg/skaffold/schema/v3alpha1/config.go +++ b/pkg/skaffold/schema/v3alpha1/config.go @@ -106,12 +106,16 @@ type Generate struct { type Transformer struct { // Name is the transformer name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` + // ConfigMapData allows users to provide additional config data to the kpt function. + ConfigMapData []string `yaml:"configMapData,omitempty"` } -// Transformer describes the supported kpt transformers. +// Validator describes the supported kpt validators. type Validator struct { // Name is the Validator name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` + // ConfigMapData allows users to provide additional config data to the kpt function. + ConfigMapData []string `yaml:"configMapData,omitempty"` } // DeployConfig contains all the configuration needed by the deploy steps. From 9293ed8f51c806e285ba9a38738b7b4c0a4f8ebd Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Wed, 23 Jun 2021 13:58:08 -0700 Subject: [PATCH 010/103] Use StdEncoding for git hash directory name (#6071) --- pkg/skaffold/git/gitutil.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/skaffold/git/gitutil.go b/pkg/skaffold/git/gitutil.go index 30f59db1d64..2d47c43c3e4 100644 --- a/pkg/skaffold/git/gitutil.go +++ b/pkg/skaffold/git/gitutil.go @@ -87,7 +87,9 @@ func getRepoDir(g latestV1.GitInfo) (string, error) { if err := enc.Encode(inputs); err != nil { return "", err } - return base64.URLEncoding.EncodeToString(hasher.Sum(nil))[:32], nil + + // UrlEncoding supports '-' as a 63rd character, which can cause dir name issues + return base64.StdEncoding.EncodeToString(hasher.Sum(nil))[:32], nil } // GetRepoCacheDir returns the directory for the remote git repo cache From 6ac28cce10bd00206a8a0c7a9798d2d7ba52b59e Mon Sep 17 00:00:00 2001 From: Halvard Skogsrud Date: Thu, 24 Jun 2021 07:11:13 +1000 Subject: [PATCH 011/103] Updates to ko builder design proposal to add implementation approach (#6046) * Updates to ko builder design proposal Update resolved questions and add section for implementation approach. * Elaborate on ko builder implementation approach Add rough steps to Approach section. * Update docs/design_proposals/ko-builder.md Co-authored-by: Marlon Gamez --- docs/design_proposals/ko-builder.md | 189 ++++++++++++++++++++-------- 1 file changed, 140 insertions(+), 49 deletions(-) diff --git a/docs/design_proposals/ko-builder.md b/docs/design_proposals/ko-builder.md index aaa89ffa0fd..ecde4d4fd30 100644 --- a/docs/design_proposals/ko-builder.md +++ b/docs/design_proposals/ko-builder.md @@ -137,6 +137,9 @@ Adding the ko builder requires making config changes to the Skaffold schema. } ``` + Some of these fields depend on functionality being added to ko in + [google/ko#340](https://github.com/google/ko/pull/340). + 2. Add a `KoArtifact` field to the `ArtifactType` struct: ```go @@ -243,9 +246,11 @@ environment variable to specify where container images are pushed. The Skaffold [default repo](https://skaffold.dev/docs/environment/image-registries/) maps directly to this value. -### Open questions +### Resolved questions + +1. Should Skaffold embed ko as a Go module, or shell out? -1. Should Skaffold embed ko (as a Go module), or shell out? + __Resolved:__ Embed as a Go module Benefits of embedding: @@ -285,35 +290,43 @@ maps directly to this value. Shelling out to ko would require some stability guarantees for the `ko publish` subcommand. - Suggest embedding as a Go module. __Not Yet Resolved__ - -2. Should the ko builder be the default for `skaffold init`, instead of - buildpacks, for Go apps, when there's no Dockerfile and no Bazel workspace - file? - - Suggest yes, to make Skaffold a compelling choice for Go developers. - __Not Yet Resolved__ + Suggest embedding as a Go module. -3. Should Skaffold use base image settings from +2. Should Skaffold use base image settings from [`.ko.yaml`](https://github.com/google/ko#configuration) if the ko builder definition in `skaffold.yaml` doesn't specify a base image? - Suggest yes to simplify adoption of Skaffold for existing ko users. - __Not Yet Resolved__ + __Resolved:__ Yes, to simplify adoption of Skaffold for existing ko users. + +3. If a config value is set both as an environment variable, and as a config + value, which takes precedence? E.g., `ko.sourceDateEpoch` vs + `SOURCE_DATE_EPOCH`. + + __Resolved:__ Follow existing Skaffold patterns. 4. Should the ko builder have a config option for [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/specs/source-date-epoch/), or should users specify the value via an environment variable? - __Not Yet Resolved__ + __Resolved__: Specify via the reproducible builds spec environment variable + `SOURCE_DATE_EPOCH`, see + and + . -5. If a config value is set both as an environment variable, and as a config - value, which takes precedence? E.g., `ko.sourceDateEpoch` vs - `SOURCE_DATE_EPOCH`. - Follow existing Skaffold pattern - is there one? __Not Yet Resolved__ -6. Add a Google Cloud Build (`gcb`) support for the ko builder? +### Open questions + +1. Should we default dependency paths to `{"go.mod", "**.go"}` instead of + `{"."}`.? + + The former is a useful default for many (most?) Go apps, and it's used + in the `custom` example. The latter is the default for some other builders. + + __Not Yet Resolved__ + +2. Add a Google Cloud Build (`gcb`) support for the ko builder? + Other builders that support `gcb` have default public builder images. The image `gcr.io/tekton-releases/ko-ci` is public, but do we want to rely on it? Once ko is embedded in Skaffold, we could use @@ -321,7 +334,7 @@ maps directly to this value. __Not Yet Resolved__ -7. File sync support: Should we limit this to +3. File sync support: Should we limit this to [ko static assets](https://github.com/google/ko#static-assets) only? This is the only way to include additional files in a container image @@ -329,43 +342,124 @@ maps directly to this value. __Not Yet Resolved__ -8. Should we default dependency paths to `{"go.mod", "**.go"}` instead of - `{"."}`.? - - The former is a useful default for many (most?) Go apps, and it's used - in the `custom` example. The latter is the default for some other builders. +4. Should the ko builder be the default for `skaffold init`, instead of + buildpacks, for Go apps, when there's no Dockerfile and no Bazel workspace + file? + Suggest yes, to make Skaffold a compelling choice for Go developers. __Not Yet Resolved__ +## Approach + +Implement the ko builder as a series of small PRs that can be merged one by one. +The PRs should not surface any new user-visible behavior until the feature is +ready. + +This approach has a lower risk than implementing the entire feature on a +separate branch before merging all at once. + +The steps roughly outlined: + +1. Add dependency on the `github.com/google/ko` module. + +2. Implement the core ko build and publish logic, including unit tests in the + package `github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/ko`. + + Support this implementation with "dummy" schema definitions for types such + as `KoArtifact` in a separate "temporary" package. This package only exists + until the definitions are merged into the latest `v1` schema, and it allows + for evolution of the types until they are committed to the schema. + +3. Add integration test for the ko builder to the `integration` package, and + an example app + config to a new `integration/examples/ko` directory. + + To avoid failures in schema unit tests from the new example in the + integration directory, add an `if` statement to `TestParseExamples` in the + package `github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema` that + skips directories called `ko`. + +4. Add the ko builder schema types (`KoArtifact` and `KoDependency`) to the + latest unreleased schema (`v2beta18`?). + + For the `ArtifactType` struct, add a `KoArtifact` field, but set its + YAML flag key to `"-"` + (full syntax `` `yaml:"-,omitempty" yamltags:"oneOf=artifact"` ``). + + Do _not_ yet add the `KO = 7;` entry to the `BuilderType` enum in + `proto/enums/enums.proto`. + +5. Plumb the code in the package `pkg/skaffold/build/ko` into the other parts + of the Skaffold codebase that interacts with the config schema. + + E.g., a `case` statement for `a.KoArtifact` in the `newPerArtifactBuilder` + function in `pkg/skaffold/build/local` (file `types.go`). + +6. When we are ready to add the ko builder as an alpha feature to an upcoming + Skaffold release, set the `KoArtifact` YAML flag key to `ko` and add `KO` + to the `BuilderType` enum. + ## Implementation plan -1. Define integration points in the ko codebase that allows ko to be used from - Skaffold without duplicating existing ko CLI code. +1. [Done] Define integration points in the ko codebase that allows ko to be + used from Skaffold without duplicating existing ko CLI code. In the package `github.com/google/ko/pkg/commands`: + [`resolver.go`](https://github.com/google/ko/blob/ee23538378722e060a2f7c7800f226e0b82e09e7/pkg/commands/resolver.go#L110) ```go - // SetDefaultBaseImage enables programmatically overriding the base image, - // as an alternative to specifying it in a `.ko.yaml` file. - func SetDefaultBaseImage(baseImage string) error // maps to the fromImage option - - var UserAgent func () string // allow overriding with the Skaffold user agent + // NewBuilder creates a ko builder + func NewBuilder(ctx context.Context, bo *options.BuildOptions) (build.Interface, error) + ``` - // MakeBuilder creates a build.Interface, delegates to the existing makeBuilder() - func MakeBuilder(ctx context.Context, bo *options.BuildOptions) (build.Interface, error) + [`resolver.go`](https://github.com/google/ko/blob/ee23538378722e060a2f7c7800f226e0b82e09e7/pkg/commands/resolver.go#L146) + ```go + // NewPublisher creates a ko publisher + func NewPublisher(po *options.PublishOptions) (publish.Interface, error) + ``` - // MakePublisher creates a publish.Interface, delegates to the existing makePublisher() - func MakePublisher(po *options.PublishOptions) (publish.Interface, error) + [`publisher.go`](https://github.com/google/ko/blob/ee23538378722e060a2f7c7800f226e0b82e09e7/pkg/commands/publisher.go#L28) + ```go + // PublishImages publishes images + func PublishImages(ctx context.Context, importpaths []string, pub publish.Interface, b build.Interface) (map[string]name.Reference, error) ``` - In the package `github.com/google/ko/pkg/commands/options`, allow - specifying the default repo as a flag: + Add build and publish options to support Skaffold config propagating to + ko. In the package `github.com/google/ko/pkg/commands/options`: + + [`build.go`](https://github.com/google/ko/blob/ee23538378722e060a2f7c7800f226e0b82e09e7/pkg/commands/options/build.go#L25) + ```go + type BuildOptions struct { + // BaseImage enables setting the default base image programmatically. + // If non-empty, this takes precedence over the value in `.ko.yaml`. + BaseImage string + + // WorkingDirectory allows for setting the working directory for invocations of the `go` tool. + // Empty string means the current working directory. + WorkingDirectory string + + // UserAgent enables overriding the default value of the `User-Agent` HTTP + // request header used when retrieving the base image. + UserAgent string + [...] + } + ``` + + [`publish.go`](https://github.com/google/ko/blob/ee23538378722e060a2f7c7800f226e0b82e09e7/pkg/commands/options/publish.go#L29) ```go type PublishOptions struct { - // DockerRepo overrides the KO_DOCKER_REPO environment variable, if present - DockerRepo string - [...] + // DockerRepo configures the destination image repository. + // In normal ko usage, this is populated with the value of $KO_DOCKER_REPO. + DockerRepo string + + // LocalDomain overrides the default domain for images loaded into the local Docker daemon. Use with Local=true. + LocalDomain string + + // UserAgent enables overriding the default value of the `User-Agent` HTTP + // request header used when pushing the built image to an image registry. + UserAgent string + + [...] } ``` @@ -385,18 +479,17 @@ maps directly to this value. Example `skaffold.yaml` supported at this stage: ```yaml - apiVersion: skaffold/v2beta15 + apiVersion: skaffold/v2beta18 kind: Config build: artifacts: - - image: ko://github.com/GoogleContainerTools/skaffold/examples/ko + - image: skaffold-ko ko: fromImage: gcr.io/distroless/static-debian10:nonroot dependencies: paths: - go.mod - "**.go" - env: [] labels: foo: bar baz: frob @@ -405,22 +498,20 @@ maps directly to this value. - linux/arm64 ``` -3. Implement support for additional config options in ko: +3. After [google/ko#340](https://github.com/google/ko/pull/340) is merged, + implement Skaffold config support for additional ko config options: - `args`, e.g., `-v`, `-trimpath` - `asmflags` - `gcflags` + - `env` - `ldflags` See related discussion in [google/ko#316](https://github.com/google/ko/issues/316). -4. Add support for the additional ko config options from step 2 in Skaffold. Provide this as a feature in an upcoming Skaffold release. - This will enable support for all the config options shown in the - comprehensive example above. - ## Integration test plan Please describe what new test cases you are going to consider. From c326595dd83ec9cb36f99476615793fab96b39eb Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 24 Jun 2021 00:09:43 +0200 Subject: [PATCH 012/103] Add custom parameters to structured tests (#6055) Custom parameters can now be added to structured tests in form of yaml config list. --- .../docs/pipeline-stages/testers/structure.md | 4 ++ .../testers/structure/structureTestArgs.yaml | 9 ++++ docs/content/en/schemas/v2beta18.json | 15 +++++- pkg/skaffold/schema/latest/v1/config.go | 4 ++ pkg/skaffold/test/structure/structure.go | 24 +++++---- pkg/skaffold/test/structure/structure_test.go | 52 +++++++++++++++++++ 6 files changed, 96 insertions(+), 12 deletions(-) create mode 100644 docs/content/en/samples/testers/structure/structureTestArgs.yaml diff --git a/docs/content/en/docs/pipeline-stages/testers/structure.md b/docs/content/en/docs/pipeline-stages/testers/structure.md index db996184db5..8d367f4ef92 100644 --- a/docs/content/en/docs/pipeline-stages/testers/structure.md +++ b/docs/content/en/docs/pipeline-stages/testers/structure.md @@ -34,4 +34,8 @@ In order to restrict the executed structure tests, a `profile` section can overr {{% readfile file="samples/testers/structure/testProfile.yaml" %}} +User can customize `container-structure-test` behavior by passing a list of configuration flags as a value of `structureTestsArgs` yaml property in `skaffold.yaml`, e.g.: + +{{% readfile file="samples/testers/structure/structureTestArgs.yaml" %}} + To execute the tests once, run `skaffold test --profile quickcheck`. diff --git a/docs/content/en/samples/testers/structure/structureTestArgs.yaml b/docs/content/en/samples/testers/structure/structureTestArgs.yaml new file mode 100644 index 00000000000..d30d395bbe5 --- /dev/null +++ b/docs/content/en/samples/testers/structure/structureTestArgs.yaml @@ -0,0 +1,9 @@ +test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - './structure-test/*' + structureTestsArgs: + - --driver=tar + - -q + - --no-color + - --test-report=TEST_REPORT_NAME \ No newline at end of file diff --git a/docs/content/en/schemas/v2beta18.json b/docs/content/en/schemas/v2beta18.json index d46dc1554e1..0c2d938a302 100755 --- a/docs/content/en/schemas/v2beta18.json +++ b/docs/content/en/schemas/v2beta18.json @@ -3146,13 +3146,26 @@ "examples": [ "[\"./test/*\"]" ] + }, + "structureTestsArgs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional configuration arguments passed to `container-structure-test` binary.", + "x-intellij-html-description": "additional configuration arguments passed to container-structure-test binary.", + "default": "[]", + "examples": [ + "[\"--driver=tar\", \"--no-color\", \"-q\"]" + ] } }, "preferredOrder": [ "image", "context", "custom", - "structureTests" + "structureTests", + "structureTestsArgs" ], "additionalProperties": false, "type": "object", diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index 2fe2fd71b51..a49443f6ede 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -491,6 +491,10 @@ type TestCase struct { // to run on that artifact. // For example: `["./test/*"]`. StructureTests []string `yaml:"structureTests,omitempty" skaffold:"filepath"` + + // StructureTestArgs lists additional configuration arguments passed to `container-structure-test` binary. + // For example: `["--driver=tar", "--no-color", "-q"]`. + StructureTestArgs []string `yaml:"structureTestsArgs,omitempty"` } // DeployConfig contains all the configuration needed by the deploy steps. diff --git a/pkg/skaffold/test/structure/structure.go b/pkg/skaffold/test/structure/structure.go index 192120a627a..cf879226ca0 100644 --- a/pkg/skaffold/test/structure/structure.go +++ b/pkg/skaffold/test/structure/structure.go @@ -32,11 +32,12 @@ import ( ) type Runner struct { - structureTests []string - imageName string - imageIsLocal bool - workspace string - localDaemon docker.LocalDaemon + structureTests []string + structureTestArgs []string + imageName string + imageIsLocal bool + workspace string + localDaemon docker.LocalDaemon } // New creates a new structure.Runner. @@ -46,11 +47,12 @@ func New(cfg docker.Config, tc *latestV1.TestCase, imageIsLocal bool) (*Runner, return nil, err } return &Runner{ - structureTests: tc.StructureTests, - imageName: tc.ImageName, - workspace: tc.Workspace, - localDaemon: localDaemon, - imageIsLocal: imageIsLocal, + structureTests: tc.StructureTests, + structureTestArgs: tc.StructureTestArgs, + imageName: tc.ImageName, + workspace: tc.Workspace, + localDaemon: localDaemon, + imageIsLocal: imageIsLocal, }, nil } @@ -86,7 +88,7 @@ func (cst *Runner) runStructureTests(ctx context.Context, out io.Writer, imageTa for _, f := range files { args = append(args, "--config", f) } - + args = append(args, cst.structureTestArgs...) cmd := exec.CommandContext(ctx, "container-structure-test", args...) cmd.Stdout = out cmd.Stderr = out diff --git a/pkg/skaffold/test/structure/structure_test.go b/pkg/skaffold/test/structure/structure_test.go index 74c7ad24812..7afebfea518 100644 --- a/pkg/skaffold/test/structure/structure_test.go +++ b/pkg/skaffold/test/structure/structure_test.go @@ -94,6 +94,58 @@ func TestIgnoreDockerNotFound(t *testing.T) { }) } +func TestCustomParams(t *testing.T) { + testCases := []struct { + structureTestArgs []string + expectedCmd string + }{ + { + structureTestArgs: []string{"--driver=tar", "--force", "-q", "--save"}, + expectedCmd: " --driver=tar --force -q --save", + }, + { + structureTestArgs: []string{}, + expectedCmd: "", + }, + { + structureTestArgs: nil, + expectedCmd: "", + }, + } + + for _, tc := range testCases { + testutil.Run(t, "", func(t *testutil.T) { + tmpDir := t.NewTempDir().Touch("test.yaml") + t.Override(&cluster.FindMinikubeBinary, func() (string, semver.Version, error) { return "", semver.Version{}, errors.New("not found") }) + + baseCmd := "container-structure-test test -v warn --image image:tag --config " + tmpDir.Path("test.yaml") + t.Override(&util.DefaultExecCommand, testutil.CmdRun(baseCmd+tc.expectedCmd)) + + cfg := &mockConfig{ + tests: []*latestV1.TestCase{{ + ImageName: "image", + Workspace: tmpDir.Root(), + StructureTests: []string{"test.yaml"}, + StructureTestArgs: tc.structureTestArgs, + }}, + } + + testCase := &latestV1.TestCase{ + ImageName: "image", + Workspace: tmpDir.Root(), + StructureTests: []string{"test.yaml"}, + StructureTestArgs: tc.structureTestArgs, + } + testEvent.InitializeState([]latestV1.Pipeline{{}}) + + testRunner, err := New(cfg, testCase, true) + t.CheckNoError(err) + err = testRunner.Test(context.Background(), ioutil.Discard, "image:tag") + t.CheckNoError(err) + }) + } +} + type mockConfig struct { runcontext.RunContext // Embedded to provide the default values. tests []*latestV1.TestCase From f08c6d68c405d77c6b7f54e56d2951af1bf4f6ca Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Thu, 24 Jun 2021 21:23:23 +0530 Subject: [PATCH 013/103] Fix setting `kubeContext` in skaffold (#6024) * rebase * fix: support for multiple kubeContexts --- cmd/skaffold/app/cmd/cmd.go | 4 + cmd/skaffold/app/cmd/runner.go | 4 - pkg/skaffold/deploy/helm/deploy.go | 4 +- pkg/skaffold/deploy/kpt/kpt.go | 4 +- pkg/skaffold/deploy/kubectl/cli.go | 2 + pkg/skaffold/deploy/kubectl/kubectl.go | 2 +- pkg/skaffold/deploy/kustomize/kustomize.go | 2 +- pkg/skaffold/kubernetes/context/context.go | 11 +- .../kubernetes/context/context_test.go | 54 +--- .../kubernetes/status/status_check.go | 2 +- pkg/skaffold/runner/deployer.go | 206 +++++++++++++ pkg/skaffold/runner/deployer_test.go | 274 ++++++++++++++++++ pkg/skaffold/runner/runcontext/context.go | 47 +-- .../runner/runcontext/context_test.go | 59 ---- pkg/skaffold/runner/v1/deploy_test.go | 3 +- pkg/skaffold/runner/v1/new.go | 160 +--------- pkg/skaffold/runner/v1/new_test.go | 247 ---------------- pkg/skaffold/status/provider.go | 40 +-- pkg/skaffold/status/provider_test.go | 8 +- 19 files changed, 528 insertions(+), 605 deletions(-) create mode 100644 pkg/skaffold/runner/deployer.go create mode 100644 pkg/skaffold/runner/deployer_test.go diff --git a/cmd/skaffold/app/cmd/cmd.go b/cmd/skaffold/app/cmd/cmd.go index dfda8dbd9f6..c06297f998a 100644 --- a/cmd/skaffold/app/cmd/cmd.go +++ b/cmd/skaffold/app/cmd/cmd.go @@ -33,6 +33,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation/prompt" + kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/server" @@ -95,6 +96,9 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { return err } + // Setup kubeContext and kubeConfig + kubectx.ConfigureKubeConfig(opts.KubeConfig, opts.KubeContext) + // Start API Server shutdown, err := server.Initialize(opts) if err != nil { diff --git a/cmd/skaffold/app/cmd/runner.go b/cmd/skaffold/app/cmd/runner.go index f442d16e829..ed14d87f102 100644 --- a/cmd/skaffold/app/cmd/runner.go +++ b/cmd/skaffold/app/cmd/runner.go @@ -30,7 +30,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/initializer" initConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/initializer/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" - kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" @@ -80,9 +79,6 @@ func runContext(out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunCont } setDefaultDeployer(configs) - // TODO: Should support per-config kubecontext. Right now we constrain all configs to define the same kubecontext. - kubectx.ConfigureKubeConfig(opts.KubeConfig, opts.KubeContext, configs[0].Deploy.KubeContext) - if err := validation.Process(configs); err != nil { return nil, nil, fmt.Errorf("invalid skaffold config: %w", err) } diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index 6fb6cc72a9f..8719cb65d9c 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -49,6 +49,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -110,6 +111,7 @@ type Deployer struct { type Config interface { kubectl.Config + kstatus.Config IsMultiConfig() bool } @@ -141,7 +143,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), - statusMonitor: provider.Monitor.GetKubernetesMonitor(), + statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), originalImages: originalImages, kubeContext: cfg.GetKubeContext(), diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 660f775778c..92954879831 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -44,6 +44,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -92,6 +93,7 @@ type Deployer struct { type Config interface { kubectl.Config + kstatus.Config } // NewDeployer generates a new Deployer object contains the kptDeploy schema. @@ -103,7 +105,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), - statusMonitor: provider.Monitor.GetKubernetesMonitor(), + statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), insecureRegistries: cfg.GetInsecureRegistries(), labels: labels, diff --git a/pkg/skaffold/deploy/kubectl/cli.go b/pkg/skaffold/deploy/kubectl/cli.go index c676cbc4eb1..2adccc37436 100644 --- a/pkg/skaffold/deploy/kubectl/cli.go +++ b/pkg/skaffold/deploy/kubectl/cli.go @@ -32,6 +32,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" ) @@ -47,6 +48,7 @@ type CLI struct { type Config interface { kubectl.Config + kstatus.Config deploy.Config ForceDeploy() bool WaitForDeletions() config.WaitForDeletions diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index ba5283ecd69..5d8fed2108d 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -90,7 +90,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), - statusMonitor: provider.Monitor.GetKubernetesMonitor(), + statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), workingDir: cfg.GetWorkingDir(), globalConfig: cfg.GlobalConfig(), diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index 083d8d92f78..1e7a44571af 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -139,7 +139,7 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C accessor: provider.Accessor.GetKubernetesAccessor(podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), - statusMonitor: provider.Monitor.GetKubernetesMonitor(), + statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), diff --git a/pkg/skaffold/kubernetes/context/context.go b/pkg/skaffold/kubernetes/context/context.go index 56c75e433a0..b35f922e4c5 100644 --- a/pkg/skaffold/kubernetes/context/context.go +++ b/pkg/skaffold/kubernetes/context/context.go @@ -44,21 +44,14 @@ var ( // When given, the firstCliValue always takes precedence over the yamlValue. // Changing the kube-context of a running Skaffold process is not supported, so // after the first call, the kube-context will be locked. -func ConfigureKubeConfig(cliKubeConfig, cliKubeContext, yamlKubeContext string) { - newKubeContext := yamlKubeContext - if cliKubeContext != "" { - newKubeContext = cliKubeContext - } +func ConfigureKubeConfig(cliKubeConfig, cliKubeContext string) { configureOnce.Do(func() { - kubeContext = newKubeContext + kubeContext = cliKubeContext kubeConfigFile = cliKubeConfig if kubeContext != "" { logrus.Infof("Activated kube-context %q", kubeContext) } }) - if kubeContext != newKubeContext { - logrus.Warn("Changing the kube-context is not supported after startup. Please restart Skaffold to take effect.") - } } // GetRestClientConfig returns a REST client config for API calls against the Kubernetes API. diff --git a/pkg/skaffold/kubernetes/context/context_test.go b/pkg/skaffold/kubernetes/context/context_test.go index 553d19886af..eb2c23122da 100644 --- a/pkg/skaffold/kubernetes/context/context_test.go +++ b/pkg/skaffold/kubernetes/context/context_test.go @@ -196,7 +196,7 @@ func TestGetRestClientConfig(t *testing.T) { func TestUseKubeContext(t *testing.T) { type invocation struct { - cliValue, yamlValue string + cliValue string } tests := []struct { name string @@ -208,24 +208,6 @@ func TestUseKubeContext(t *testing.T) { invocations: nil, expected: "", }, - { - name: "yaml value when no CLI value is given", - invocations: []invocation{{yamlValue: "context2"}}, - expected: "context2", - }, - { - name: "yaml value when no CLI value is given, first invocation persists", - invocations: []invocation{ - {yamlValue: "context-first"}, - {yamlValue: "context-second"}, - }, - expected: "context-first", - }, - { - name: "CLI value takes precedence", - invocations: []invocation{{cliValue: "context1", yamlValue: "context2"}}, - expected: "context1", - }, { name: "first CLI value takes precedence", invocations: []invocation{ @@ -234,45 +216,13 @@ func TestUseKubeContext(t *testing.T) { }, expected: "context-first", }, - { - name: "mixed CLI value and yaml value - I", - invocations: []invocation{ - {cliValue: "context-first"}, - {yamlValue: "context-second"}, - }, - expected: "context-first", - }, - { - name: "mixed CLI value and yaml value - II", - invocations: []invocation{ - {yamlValue: "context-first"}, - {cliValue: "context-second"}, - }, - expected: "context-first", - }, - { - name: "mixed CLI value and yaml value - III", - invocations: []invocation{ - {yamlValue: "context-first"}, - {cliValue: "context-second", yamlValue: "context-third"}, - }, - expected: "context-first", - }, - { - name: "mixed CLI value and yaml value - IV", - invocations: []invocation{ - {cliValue: "context-first", yamlValue: "context-second"}, - {cliValue: "context-third", yamlValue: "context-fourth"}, - }, - expected: "context-first", - }, } for _, test := range tests { testutil.Run(t, test.name, func(t *testutil.T) { kubeContext = "" for _, inv := range test.invocations { - ConfigureKubeConfig("", inv.cliValue, inv.yamlValue) + ConfigureKubeConfig("", inv.cliValue) } t.CheckDeepEqual(test.expected, kubeContext) diff --git a/pkg/skaffold/kubernetes/status/status_check.go b/pkg/skaffold/kubernetes/status/status_check.go index 8236ac416d2..b6b75937789 100644 --- a/pkg/skaffold/kubernetes/status/status_check.go +++ b/pkg/skaffold/kubernetes/status/status_check.go @@ -75,7 +75,7 @@ type Config interface { GetNamespaces() []string StatusCheckDeadlineSeconds() int Muted() config.Muted - StatusCheck() (*bool, error) + StatusCheck() *bool } // Monitor runs status checks for pods and deployments diff --git a/pkg/skaffold/runner/deployer.go b/pkg/skaffold/runner/deployer.go new file mode 100644 index 00000000000..7a6e4b5f040 --- /dev/null +++ b/pkg/skaffold/runner/deployer.go @@ -0,0 +1,206 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runner + +import ( + "errors" + "fmt" + "strconv" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/helm" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +// deployerCtx encapsulates a given skaffold run context along with additional deployer constructs. +type deployerCtx struct { + *runcontext.RunContext + deploy v1.DeployConfig +} + +func (d *deployerCtx) GetKubeContext() string { + if d.deploy.KubeContext != "" { + return d.deploy.KubeContext + } + return d.RunContext.GetKubeContext() +} + +func (d *deployerCtx) StatusCheck() *bool { + // runcontext StatusCheck method returns the value set by the cli flag `--status-check` + // which overrides the value set in the individual configs. + if cliValue := d.RunContext.StatusCheck(); cliValue != nil { + return cliValue + } + return d.deploy.StatusCheck +} + +// GetDeployer creates a deployer from a given RunContext and deploy pipeline definitions. +func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, kubernetes.ImageListMux, error) { + var podSelectors kubernetes.ImageListMux + if runCtx.Opts.Apply { + return getDefaultDeployer(runCtx, provider, labels) + } + + deployerCfg := runCtx.Deployers() + + var deployers deploy.DeployerMux + for _, d := range deployerCfg { + dCtx := &deployerCtx{runCtx, d} + if d.HelmDeploy != nil { + h, podSelector, err := helm.NewDeployer(dCtx, labels, provider, d.HelmDeploy) + if err != nil { + return nil, nil, err + } + podSelectors = append(podSelectors, podSelector) + deployers = append(deployers, h) + } + + if d.KptDeploy != nil { + deployer, podSelector := kpt.NewDeployer(dCtx, labels, provider, d.KptDeploy) + podSelectors = append(podSelectors, podSelector) + deployers = append(deployers, deployer) + } + + if d.KubectlDeploy != nil { + deployer, podSelector, err := kubectl.NewDeployer(dCtx, labels, provider, d.KubectlDeploy) + if err != nil { + return nil, nil, err + } + podSelectors = append(podSelectors, podSelector) + deployers = append(deployers, deployer) + } + + if d.KustomizeDeploy != nil { + deployer, podSelector, err := kustomize.NewDeployer(dCtx, labels, provider, d.KustomizeDeploy) + if err != nil { + return nil, nil, err + } + podSelectors = append(podSelectors, podSelector) + deployers = append(deployers, deployer) + } + } + + return deployers, podSelectors, nil +} + +/* +The "default deployer" is used in `skaffold apply`, which uses a `kubectl` deployer to actuate resources +on a cluster regardless of provided deployer configuration in the skaffold.yaml. +The default deployer will honor a select set of deploy configuration from an existing skaffold.yaml: + - deploy.StatusCheckDeadlineSeconds + - deploy.Logs.Prefix + - deploy.Kubectl.Flags + - deploy.Kubectl.DefaultNamespace + - deploy.Kustomize.Flags + - deploy.Kustomize.DefaultNamespace +For a multi-config project, we do not currently support resolving conflicts between differing sets of this deploy configuration. +Therefore, in this function we do implicit validation of the provided configuration, and fail if any conflict cannot be resolved. +*/ +func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, kubernetes.ImageListMux, error) { + deployCfgs := runCtx.DeployConfigs() + + var kFlags *v1.KubectlFlags + var logPrefix string + var defaultNamespace *string + var kubeContext string + statusCheckTimeout := -1 + + for _, d := range deployCfgs { + if d.KubeContext != "" { + if kubeContext != "" && kubeContext != d.KubeContext { + return nil, nil, errors.New("cannot resolve active Kubernetes context - multiple contexts configured in skaffold.yaml") + } + kubeContext = d.KubeContext + } + if d.StatusCheckDeadlineSeconds != 0 && d.StatusCheckDeadlineSeconds != int(status.DefaultStatusCheckDeadline.Seconds()) { + if statusCheckTimeout != -1 && statusCheckTimeout != d.StatusCheckDeadlineSeconds { + return nil, nil, fmt.Errorf("found multiple status check timeouts in skaffold.yaml (not supported in `skaffold apply`): %d, %d", statusCheckTimeout, d.StatusCheckDeadlineSeconds) + } + statusCheckTimeout = d.StatusCheckDeadlineSeconds + } + if d.Logs.Prefix != "" { + if logPrefix != "" && logPrefix != d.Logs.Prefix { + return nil, nil, fmt.Errorf("found multiple log prefixes in skaffold.yaml (not supported in `skaffold apply`): %s, %s", logPrefix, d.Logs.Prefix) + } + logPrefix = d.Logs.Prefix + } + var currentDefaultNamespace *string + var currentKubectlFlags v1.KubectlFlags + if d.KubectlDeploy != nil { + currentDefaultNamespace = d.KubectlDeploy.DefaultNamespace + currentKubectlFlags = d.KubectlDeploy.Flags + } + if d.KustomizeDeploy != nil { + currentDefaultNamespace = d.KustomizeDeploy.DefaultNamespace + currentKubectlFlags = d.KustomizeDeploy.Flags + } + if kFlags == nil { + kFlags = ¤tKubectlFlags + } + if err := validateKubectlFlags(kFlags, currentKubectlFlags); err != nil { + return nil, nil, err + } + if currentDefaultNamespace != nil { + if defaultNamespace != nil && *defaultNamespace != *currentDefaultNamespace { + return nil, nil, fmt.Errorf("found multiple namespaces in skaffold.yaml (not supported in `skaffold apply`): %s, %s", *defaultNamespace, *currentDefaultNamespace) + } + defaultNamespace = currentDefaultNamespace + } + } + if kFlags == nil { + kFlags = &v1.KubectlFlags{} + } + k := &v1.KubectlDeploy{ + Flags: *kFlags, + DefaultNamespace: defaultNamespace, + } + defaultDeployer, podSelector, err := kubectl.NewDeployer(runCtx, labels, provider, k) + if err != nil { + return nil, nil, fmt.Errorf("instantiating default kubectl deployer: %w", err) + } + return defaultDeployer, kubernetes.ImageListMux{podSelector}, nil +} + +func validateKubectlFlags(flags *v1.KubectlFlags, additional v1.KubectlFlags) error { + errStr := "conflicting sets of kubectl deploy flags not supported in `skaffold apply` (flag: %s)" + if additional.DisableValidation != flags.DisableValidation { + return fmt.Errorf(errStr, strconv.FormatBool(additional.DisableValidation)) + } + for _, flag := range additional.Apply { + if !util.StrSliceContains(flags.Apply, flag) { + return fmt.Errorf(errStr, flag) + } + } + for _, flag := range additional.Delete { + if !util.StrSliceContains(flags.Delete, flag) { + return fmt.Errorf(errStr, flag) + } + } + for _, flag := range additional.Global { + if !util.StrSliceContains(flags.Global, flag) { + return fmt.Errorf(errStr, flag) + } + } + return nil +} diff --git a/pkg/skaffold/runner/deployer_test.go b/pkg/skaffold/runner/deployer_test.go new file mode 100644 index 00000000000..803ae15cc10 --- /dev/null +++ b/pkg/skaffold/runner/deployer_test.go @@ -0,0 +1,274 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runner + +import ( + "reflect" + "testing" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/helm" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" + latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestGetDeployer(tOuter *testing.T) { + testutil.Run(tOuter, "TestGetDeployer", func(t *testutil.T) { + tests := []struct { + description string + cfg latestV1.DeployType + helmVersion string + expected deploy.Deployer + apply bool + shouldErr bool + }{ + { + description: "no deployer", + expected: deploy.DeployerMux{}, + }, + { + description: "helm deployer with 3.0.0 version", + cfg: latestV1.DeployType{HelmDeploy: &latestV1.HelmDeploy{}}, + helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, + expected: deploy.DeployerMux{ + &helm.Deployer{}, + }, + }, + { + description: "helm deployer with less than 3.0.0 version", + cfg: latestV1.DeployType{HelmDeploy: &latestV1.HelmDeploy{}}, + helmVersion: "2.0.0", + shouldErr: true, + }, + { + description: "kubectl deployer", + cfg: latestV1.DeployType{KubectlDeploy: &latestV1.KubectlDeploy{}}, + expected: deploy.DeployerMux{ + t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{}, + })).(deploy.Deployer), + }, + }, + { + description: "kustomize deployer", + cfg: latestV1.DeployType{KustomizeDeploy: &latestV1.KustomizeDeploy{}}, + expected: deploy.DeployerMux{ + t.RequireNonNilResult(kustomize.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{ + Flags: latestV1.KubectlFlags{}, + })).(deploy.Deployer), + }, + }, + { + description: "kpt deployer", + cfg: latestV1.DeployType{KptDeploy: &latestV1.KptDeploy{}}, + expected: deploy.DeployerMux{ + &kpt.Deployer{}, + }, + }, + { + description: "apply forces creation of kubectl deployer with kpt config", + cfg: latestV1.DeployType{KptDeploy: &latestV1.KptDeploy{}}, + apply: true, + expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{}, + })).(deploy.Deployer), + }, + { + description: "apply forces creation of kubectl deployer with helm config", + cfg: latestV1.DeployType{HelmDeploy: &latestV1.HelmDeploy{}}, + helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, + apply: true, + expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{}, + })).(deploy.Deployer), + }, + { + description: "multiple deployers", + cfg: latestV1.DeployType{ + HelmDeploy: &latestV1.HelmDeploy{}, + KptDeploy: &latestV1.KptDeploy{}, + }, + helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, + expected: deploy.DeployerMux{ + &helm.Deployer{}, + &kpt.Deployer{}, + }, + }, + } + for _, test := range tests { + testutil.Run(tOuter, test.description, func(t *testutil.T) { + if test.helmVersion != "" { + t.Override(&util.DefaultExecCommand, testutil.CmdRunWithOutput( + "helm version --client", + test.helmVersion, + )) + } + + deployer, _, err := GetDeployer(&runcontext.RunContext{ + Opts: config.SkaffoldOptions{ + Apply: test.apply, + }, + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{ + Deploy: latestV1.DeployConfig{ + DeployType: test.cfg, + }, + }}), + }, deploy.NoopComponentProvider, nil) + + t.CheckError(test.shouldErr, err) + t.CheckTypeEquality(test.expected, deployer) + + if reflect.TypeOf(test.expected) == reflect.TypeOf(deploy.DeployerMux{}) { + expected := test.expected.(deploy.DeployerMux) + deployers := deployer.(deploy.DeployerMux) + t.CheckDeepEqual(len(expected), len(deployers)) + for i, v := range expected { + t.CheckTypeEquality(v, deployers[i]) + } + } + }) + } + }) +} + +func TestGetDefaultDeployer(tOuter *testing.T) { + testutil.Run(tOuter, "TestGetDeployer", func(t *testutil.T) { + tests := []struct { + name string + cfgs []latestV1.DeployType + expected *kubectl.Deployer + shouldErr bool + }{ + { + name: "one config with kubectl deploy", + cfgs: []latestV1.DeployType{{ + KubectlDeploy: &latestV1.KubectlDeploy{}, + }}, + expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{}, + })).(*kubectl.Deployer), + }, + { + name: "one config with kubectl deploy, with flags", + cfgs: []latestV1.DeployType{{ + KubectlDeploy: &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{ + Apply: []string{"--foo"}, + Global: []string{"--bar"}, + }, + }, + }}, + expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{ + Apply: []string{"--foo"}, + Global: []string{"--bar"}, + }, + })).(*kubectl.Deployer), + }, + { + name: "two kubectl configs with mismatched flags should fail", + cfgs: []latestV1.DeployType{ + { + KubectlDeploy: &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{ + Apply: []string{"--foo"}, + }, + }, + }, + { + KubectlDeploy: &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{ + Apply: []string{"--bar"}, + }, + }, + }, + }, + shouldErr: true, + }, + { + name: "one config with helm deploy", + cfgs: []latestV1.DeployType{{ + HelmDeploy: &latestV1.HelmDeploy{}, + }}, + expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{}, + })).(*kubectl.Deployer), + }, + { + name: "one config with kustomize deploy", + cfgs: []latestV1.DeployType{{ + KustomizeDeploy: &latestV1.KustomizeDeploy{}, + }}, + expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), + }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + Flags: latestV1.KubectlFlags{}, + })).(*kubectl.Deployer), + }, + } + + for _, test := range tests { + testutil.Run(tOuter, test.name, func(t *testutil.T) { + pipelines := []latestV1.Pipeline{} + for _, cfg := range test.cfgs { + pipelines = append(pipelines, latestV1.Pipeline{ + Deploy: latestV1.DeployConfig{ + DeployType: cfg, + }, + }) + } + deployer, _, err := getDefaultDeployer(&runcontext.RunContext{ + Pipelines: runcontext.NewPipelines(pipelines), + }, deploy.NoopComponentProvider, nil) + + t.CheckErrorAndFailNow(test.shouldErr, err) + + // if we were expecting an error, this implies that the returned deployer is nil + // this error was checked in the previous call, so if we didn't fail there (i.e. the encountered error was correct), + // then the test is finished and we can continue. + if !test.shouldErr { + t.CheckTypeEquality(&kubectl.Deployer{}, deployer) + + kDeployer := deployer.(*kubectl.Deployer) + if !reflect.DeepEqual(kDeployer, test.expected) { + t.Fail() + } + } + }) + } + }) +} diff --git a/pkg/skaffold/runner/runcontext/context.go b/pkg/skaffold/runner/runcontext/context.go index 7dd827e7787..135479d3670 100644 --- a/pkg/skaffold/runner/runcontext/context.go +++ b/pkg/skaffold/runner/runcontext/context.go @@ -96,10 +96,10 @@ func (ps Pipelines) DeployConfigs() []latestV1.DeployConfig { return cfgs } -func (ps Pipelines) Deployers() []latestV1.DeployType { - var deployers []latestV1.DeployType +func (ps Pipelines) Deployers() []latestV1.DeployConfig { + var deployers []latestV1.DeployConfig for _, p := range ps.pipelines { - deployers = append(deployers, p.Deploy.DeployType) + deployers = append(deployers, p.Deploy) } return deployers } @@ -112,28 +112,6 @@ func (ps Pipelines) TestCases() []*latestV1.TestCase { return tests } -func (ps Pipelines) StatusCheck() (*bool, error) { - var enabled, disabled bool - for _, p := range ps.pipelines { - if p.Deploy.StatusCheck != nil { - if *p.Deploy.StatusCheck { - enabled = true - } else { - disabled = true - } - if enabled && disabled { - return nil, fmt.Errorf("cannot explicitly enable StatusCheck in one pipeline and explicitly disable it in another pipeline, see https://skaffold.dev/docs/workflows/ci-cd/#waiting-for-skaffold-deployments-using-healthcheck") - } - } - } - // set the group status check to disabled if any pipeline has StatusCheck - // set to false. - if disabled { - return util.BoolPtr(false), nil - } - return util.BoolPtr(true), nil -} - func (ps Pipelines) StatusCheckDeadlineSeconds() int { c := 0 // set the group status check deadline to maximum of any individually specified value @@ -166,26 +144,10 @@ func (rc *RunContext) Artifacts() []*latestV1.Artifact { return rc.Pipelines.Art func (rc *RunContext) DeployConfigs() []latestV1.DeployConfig { return rc.Pipelines.DeployConfigs() } -func (rc *RunContext) Deployers() []latestV1.DeployType { return rc.Pipelines.Deployers() } +func (rc *RunContext) Deployers() []latestV1.DeployConfig { return rc.Pipelines.Deployers() } func (rc *RunContext) TestCases() []*latestV1.TestCase { return rc.Pipelines.TestCases() } -func (rc *RunContext) StatusCheck() (*bool, error) { - scOpts := rc.Opts.StatusCheck.Value() - scConfig, err := rc.Pipelines.StatusCheck() - if err != nil { - return nil, err - } - switch { - case scOpts != nil: - return util.BoolPtr(*scOpts), nil - case scConfig != nil: - return util.BoolPtr(*scConfig), nil - default: - return util.BoolPtr(true), nil - } -} - func (rc *RunContext) StatusCheckDeadlineSeconds() int { return rc.Pipelines.StatusCheckDeadlineSeconds() } @@ -226,6 +188,7 @@ func (rc *RunContext) RenderOnly() bool { return rc func (rc *RunContext) RenderOutput() string { return rc.Opts.RenderOutput } func (rc *RunContext) SkipRender() bool { return rc.Opts.SkipRender } func (rc *RunContext) SkipTests() bool { return rc.Opts.SkipTests } +func (rc *RunContext) StatusCheck() *bool { return rc.Opts.StatusCheck.Value() } func (rc *RunContext) Tail() bool { return rc.Opts.Tail } func (rc *RunContext) Trigger() string { return rc.Opts.Trigger } func (rc *RunContext) WaitForDeletions() config.WaitForDeletions { return rc.Opts.WaitForDeletions } diff --git a/pkg/skaffold/runner/runcontext/context_test.go b/pkg/skaffold/runner/runcontext/context_test.go index 3e773a1dc96..201c02c04fe 100644 --- a/pkg/skaffold/runner/runcontext/context_test.go +++ b/pkg/skaffold/runner/runcontext/context_test.go @@ -19,8 +19,6 @@ package runcontext import ( "testing" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -91,60 +89,3 @@ func TestRunContext_UpdateNamespaces(t *testing.T) { }) } } - -func TestPipelines_StatusCheck(t *testing.T) { - tests := []struct { - description string - statusCheckP1 *bool - statusCheckP2 *bool - wantEnabled *bool - wantErr bool - }{ - { - description: "both pipelines' statusCheck values are unspecified", - wantEnabled: util.BoolPtr(true), - }, - { - description: "one pipeline's statusCheck value is true", - statusCheckP1: util.BoolPtr(true), - wantEnabled: util.BoolPtr(true), - }, - { - description: "one pipeline's statusCheck value is false", - statusCheckP1: util.BoolPtr(false), - wantEnabled: util.BoolPtr(false), - }, - { - description: "one pipeline's statusCheck value is true, one pipeline's statusCheck value is false", - statusCheckP1: util.BoolPtr(true), - statusCheckP2: util.BoolPtr(false), - wantErr: true, - }, - } - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - p := &Pipelines{ - pipelines: []latestV1.Pipeline{ - { - Deploy: latestV1.DeployConfig{ - StatusCheck: test.statusCheckP1, - }, - }, - { - Deploy: latestV1.DeployConfig{ - StatusCheck: test.statusCheckP2, - }, - }, - }, - } - gotEnabled, err := p.StatusCheck() - if err != nil && !test.wantErr { - t.Errorf("p.StatusCheck() got error %v, want no error", err) - } - if err == nil && test.wantErr { - t.Errorf("p.StatusCheck() got no error, want error") - } - t.CheckDeepEqual(test.wantEnabled, gotEnabled) - }) - } -} diff --git a/pkg/skaffold/runner/v1/deploy_test.go b/pkg/skaffold/runner/v1/deploy_test.go index 7c9806ffc4e..d7340f8624b 100644 --- a/pkg/skaffold/runner/v1/deploy_test.go +++ b/pkg/skaffold/runner/v1/deploy_test.go @@ -30,6 +30,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/testutil" @@ -123,7 +124,7 @@ func TestSkaffoldDeployRenderOnly(t *testing.T) { KubeContext: "does-not-exist", } - deployer, _, err := getDeployer(runCtx, deploy.NoopComponentProvider, nil) + deployer, _, err := runner.GetDeployer(runCtx, deploy.NoopComponentProvider, nil) t.RequireNoError(err) r := SkaffoldRunner{ runCtx: runCtx, diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index 427ea51ff2f..8f04b6907b6 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -18,9 +18,7 @@ package v1 import ( "context" - "errors" "fmt" - "strconv" "github.com/sirupsen/logrus" @@ -29,10 +27,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/cache" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/helm" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" @@ -41,7 +35,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" - kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" @@ -52,7 +45,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/test" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/trigger" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) // NewForConfig returns a new SkaffoldRunner for a SkaffoldConfig @@ -99,11 +91,11 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { Accessor: access.NewAccessorProvider(runCtx, labeller, kubectlCLI), Debugger: debug.NewDebugProvider(runCtx), Logger: log.NewLogProvider(runCtx, kubectlCLI), - Monitor: status.NewMonitorProvider(runCtx, labeller), + Monitor: status.NewMonitorProvider(labeller), Syncer: sync.NewSyncProvider(runCtx, kubectlCLI), } - deployer, podSelectors, err = getDeployer(runCtx, provider, labeller.Labels()) + deployer, podSelectors, err = runner.GetDeployer(runCtx, provider, labeller.Labels()) if err != nil { endTrace(instrumentation.TraceEndError(err)) return nil, fmt.Errorf("creating deployer: %w", err) @@ -233,151 +225,3 @@ func getTester(cfg test.Config, isLocalImage func(imageName string) (bool, error return tester, nil } - -/* -The "default deployer" is used in `skaffold apply`, which uses a `kubectl` deployer to actuate resources -on a cluster regardless of provided deployer configuration in the skaffold.yaml. -The default deployer will honor a select set of deploy configuration from an existing skaffold.yaml: - - deploy.StatusCheckDeadlineSeconds - - deploy.Logs.Prefix - - deploy.Kubectl.Flags - - deploy.Kubectl.DefaultNamespace - - deploy.Kustomize.Flags - - deploy.Kustomize.DefaultNamespace -For a multi-config project, we do not currently support resolving conflicts between differing sets of this deploy configuration. -Therefore, in this function we do implicit validation of the provided configuration, and fail if any conflict cannot be resolved. -*/ -func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, kubernetes.ImageListMux, error) { - deployCfgs := runCtx.DeployConfigs() - - var kFlags *latestV1.KubectlFlags - var logPrefix string - var defaultNamespace *string - var kubeContext string - statusCheckTimeout := -1 - - for _, d := range deployCfgs { - if d.KubeContext != "" { - if kubeContext != "" && kubeContext != d.KubeContext { - return nil, nil, errors.New("cannot resolve active Kubernetes context - multiple contexts configured in skaffold.yaml") - } - kubeContext = d.KubeContext - } - if d.StatusCheckDeadlineSeconds != 0 && d.StatusCheckDeadlineSeconds != int(kstatus.DefaultStatusCheckDeadline.Seconds()) { - if statusCheckTimeout != -1 && statusCheckTimeout != d.StatusCheckDeadlineSeconds { - return nil, nil, fmt.Errorf("found multiple status check timeouts in skaffold.yaml (not supported in `skaffold apply`): %d, %d", statusCheckTimeout, d.StatusCheckDeadlineSeconds) - } - statusCheckTimeout = d.StatusCheckDeadlineSeconds - } - if d.Logs.Prefix != "" { - if logPrefix != "" && logPrefix != d.Logs.Prefix { - return nil, nil, fmt.Errorf("found multiple log prefixes in skaffold.yaml (not supported in `skaffold apply`): %s, %s", logPrefix, d.Logs.Prefix) - } - logPrefix = d.Logs.Prefix - } - var currentDefaultNamespace *string - var currentKubectlFlags latestV1.KubectlFlags - if d.KubectlDeploy != nil { - currentDefaultNamespace = d.KubectlDeploy.DefaultNamespace - currentKubectlFlags = d.KubectlDeploy.Flags - } - if d.KustomizeDeploy != nil { - currentDefaultNamespace = d.KustomizeDeploy.DefaultNamespace - currentKubectlFlags = d.KustomizeDeploy.Flags - } - if kFlags == nil { - kFlags = ¤tKubectlFlags - } - if err := validateKubectlFlags(kFlags, currentKubectlFlags); err != nil { - return nil, nil, err - } - if currentDefaultNamespace != nil { - if defaultNamespace != nil && *defaultNamespace != *currentDefaultNamespace { - return nil, nil, fmt.Errorf("found multiple namespaces in skaffold.yaml (not supported in `skaffold apply`): %s, %s", *defaultNamespace, *currentDefaultNamespace) - } - defaultNamespace = currentDefaultNamespace - } - } - if kFlags == nil { - kFlags = &latestV1.KubectlFlags{} - } - k := &latestV1.KubectlDeploy{ - Flags: *kFlags, - DefaultNamespace: defaultNamespace, - } - defaultDeployer, podSelector, err := kubectl.NewDeployer(runCtx, labels, provider, k) - if err != nil { - return nil, nil, fmt.Errorf("instantiating default kubectl deployer: %w", err) - } - return defaultDeployer, kubernetes.ImageListMux{podSelector}, nil -} - -func validateKubectlFlags(flags *latestV1.KubectlFlags, additional latestV1.KubectlFlags) error { - errStr := "conflicting sets of kubectl deploy flags not supported in `skaffold apply` (flag: %s)" - if additional.DisableValidation != flags.DisableValidation { - return fmt.Errorf(errStr, strconv.FormatBool(additional.DisableValidation)) - } - for _, flag := range additional.Apply { - if !util.StrSliceContains(flags.Apply, flag) { - return fmt.Errorf(errStr, flag) - } - } - for _, flag := range additional.Delete { - if !util.StrSliceContains(flags.Delete, flag) { - return fmt.Errorf(errStr, flag) - } - } - for _, flag := range additional.Global { - if !util.StrSliceContains(flags.Global, flag) { - return fmt.Errorf(errStr, flag) - } - } - return nil -} - -func getDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, kubernetes.ImageListMux, error) { - var podSelectors kubernetes.ImageListMux - if runCtx.Opts.Apply { - return getDefaultDeployer(runCtx, provider, labels) - } - - deployerCfg := runCtx.Deployers() - - var deployers deploy.DeployerMux - for _, d := range deployerCfg { - if d.HelmDeploy != nil { - h, podSelector, err := helm.NewDeployer(runCtx, labels, provider, d.HelmDeploy) - if err != nil { - return nil, nil, err - } - podSelectors = append(podSelectors, podSelector) - deployers = append(deployers, h) - } - - if d.KptDeploy != nil { - deployer, podSelector := kpt.NewDeployer(runCtx, labels, provider, d.KptDeploy) - podSelectors = append(podSelectors, podSelector) - deployers = append(deployers, deployer) - } - - if d.KubectlDeploy != nil { - deployer, podSelector, err := kubectl.NewDeployer(runCtx, labels, provider, d.KubectlDeploy) - if err != nil { - return nil, nil, err - } - podSelectors = append(podSelectors, podSelector) - deployers = append(deployers, deployer) - } - - if d.KustomizeDeploy != nil { - deployer, podSelector, err := kustomize.NewDeployer(runCtx, labels, provider, d.KustomizeDeploy) - if err != nil { - return nil, nil, err - } - podSelectors = append(podSelectors, podSelector) - deployers = append(deployers, deployer) - } - } - - return deployers, podSelectors, nil -} diff --git a/pkg/skaffold/runner/v1/new_test.go b/pkg/skaffold/runner/v1/new_test.go index 7df2942f2a1..5f260694191 100644 --- a/pkg/skaffold/runner/v1/new_test.go +++ b/pkg/skaffold/runner/v1/new_test.go @@ -17,262 +17,15 @@ limitations under the License. package v1 import ( - "reflect" "testing" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/helm" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" ) -func TestGetDeployer(tOuter *testing.T) { - testutil.Run(tOuter, "TestGetDeployer", func(t *testutil.T) { - tests := []struct { - description string - cfg latestV1.DeployType - helmVersion string - expected deploy.Deployer - apply bool - shouldErr bool - }{ - { - description: "no deployer", - expected: deploy.DeployerMux{}, - }, - { - description: "helm deployer with 3.0.0 version", - cfg: latestV1.DeployType{HelmDeploy: &latestV1.HelmDeploy{}}, - helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, - expected: deploy.DeployerMux{ - &helm.Deployer{}, - }, - }, - { - description: "helm deployer with less than 3.0.0 version", - cfg: latestV1.DeployType{HelmDeploy: &latestV1.HelmDeploy{}}, - helmVersion: "2.0.0", - shouldErr: true, - }, - { - description: "kubectl deployer", - cfg: latestV1.DeployType{KubectlDeploy: &latestV1.KubectlDeploy{}}, - expected: deploy.DeployerMux{ - t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{}, - })).(deploy.Deployer), - }, - }, - { - description: "kustomize deployer", - cfg: latestV1.DeployType{KustomizeDeploy: &latestV1.KustomizeDeploy{}}, - expected: deploy.DeployerMux{ - t.RequireNonNilResult(kustomize.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{ - Flags: latestV1.KubectlFlags{}, - })).(deploy.Deployer), - }, - }, - { - description: "kpt deployer", - cfg: latestV1.DeployType{KptDeploy: &latestV1.KptDeploy{}}, - expected: deploy.DeployerMux{ - &kpt.Deployer{}, - }, - }, - { - description: "apply forces creation of kubectl deployer with kpt config", - cfg: latestV1.DeployType{KptDeploy: &latestV1.KptDeploy{}}, - apply: true, - expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{}, - })).(deploy.Deployer), - }, - { - description: "apply forces creation of kubectl deployer with helm config", - cfg: latestV1.DeployType{HelmDeploy: &latestV1.HelmDeploy{}}, - helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, - apply: true, - expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{}, - })).(deploy.Deployer), - }, - { - description: "multiple deployers", - cfg: latestV1.DeployType{ - HelmDeploy: &latestV1.HelmDeploy{}, - KptDeploy: &latestV1.KptDeploy{}, - }, - helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, - expected: deploy.DeployerMux{ - &helm.Deployer{}, - &kpt.Deployer{}, - }, - }, - } - for _, test := range tests { - testutil.Run(tOuter, test.description, func(t *testutil.T) { - if test.helmVersion != "" { - t.Override(&util.DefaultExecCommand, testutil.CmdRunWithOutput( - "helm version --client", - test.helmVersion, - )) - } - - deployer, _, err := getDeployer(&runcontext.RunContext{ - Opts: config.SkaffoldOptions{ - Apply: test.apply, - }, - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{ - Deploy: latestV1.DeployConfig{ - DeployType: test.cfg, - }, - }}), - }, deploy.NoopComponentProvider, nil) - - t.CheckError(test.shouldErr, err) - t.CheckTypeEquality(test.expected, deployer) - - if reflect.TypeOf(test.expected) == reflect.TypeOf(deploy.DeployerMux{}) { - expected := test.expected.(deploy.DeployerMux) - deployers := deployer.(deploy.DeployerMux) - t.CheckDeepEqual(len(expected), len(deployers)) - for i, v := range expected { - t.CheckTypeEquality(v, deployers[i]) - } - } - }) - } - }) -} - -func TestGetDefaultDeployer(tOuter *testing.T) { - testutil.Run(tOuter, "TestGetDeployer", func(t *testutil.T) { - tests := []struct { - name string - cfgs []latestV1.DeployType - expected *kubectl.Deployer - shouldErr bool - }{ - { - name: "one config with kubectl deploy", - cfgs: []latestV1.DeployType{{ - KubectlDeploy: &latestV1.KubectlDeploy{}, - }}, - expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{}, - })).(*kubectl.Deployer), - }, - { - name: "one config with kubectl deploy, with flags", - cfgs: []latestV1.DeployType{{ - KubectlDeploy: &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{ - Apply: []string{"--foo"}, - Global: []string{"--bar"}, - }, - }, - }}, - expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{ - Apply: []string{"--foo"}, - Global: []string{"--bar"}, - }, - })).(*kubectl.Deployer), - }, - { - name: "two kubectl configs with mismatched flags should fail", - cfgs: []latestV1.DeployType{ - { - KubectlDeploy: &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{ - Apply: []string{"--foo"}, - }, - }, - }, - { - KubectlDeploy: &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{ - Apply: []string{"--bar"}, - }, - }, - }, - }, - shouldErr: true, - }, - { - name: "one config with helm deploy", - cfgs: []latestV1.DeployType{{ - HelmDeploy: &latestV1.HelmDeploy{}, - }}, - expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{}, - })).(*kubectl.Deployer), - }, - { - name: "one config with kustomize deploy", - cfgs: []latestV1.DeployType{{ - KustomizeDeploy: &latestV1.KustomizeDeploy{}, - }}, - expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ - Flags: latestV1.KubectlFlags{}, - })).(*kubectl.Deployer), - }, - } - - for _, test := range tests { - testutil.Run(tOuter, test.name, func(t *testutil.T) { - pipelines := []latestV1.Pipeline{} - for _, cfg := range test.cfgs { - pipelines = append(pipelines, latestV1.Pipeline{ - Deploy: latestV1.DeployConfig{ - DeployType: cfg, - }, - }) - } - deployer, _, err := getDefaultDeployer(&runcontext.RunContext{ - Pipelines: runcontext.NewPipelines(pipelines), - }, deploy.NoopComponentProvider, nil) - - t.CheckErrorAndFailNow(test.shouldErr, err) - - // if we were expecting an error, this implies that the returned deployer is nil - // this error was checked in the previous call, so if we didn't fail there (i.e. the encountered error was correct), - // then the test is finished and we can continue. - if !test.shouldErr { - t.CheckTypeEquality(&kubectl.Deployer{}, deployer) - - kDeployer := deployer.(*kubectl.Deployer) - if !reflect.DeepEqual(kDeployer, test.expected) { - t.Fail() - } - } - }) - } - }) -} - func TestIsImageLocal(t *testing.T) { tests := []struct { description string diff --git a/pkg/skaffold/status/provider.go b/pkg/skaffold/status/provider.go index 7bffc2f05cc..9265893155f 100644 --- a/pkg/skaffold/status/provider.go +++ b/pkg/skaffold/status/provider.go @@ -17,42 +17,34 @@ limitations under the License. package status import ( - "sync" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" ) type Provider interface { - GetKubernetesMonitor() Monitor + GetKubernetesMonitor(config status.Config) Monitor GetNoopMonitor() Monitor } type fullProvider struct { - kubernetesMonitor Monitor + k8sMonitor map[string]Monitor // keyed on KubeContext. TODO: make KubeContext a struct type. + labeller *label.DefaultLabeller } -var ( - provider *fullProvider - once sync.Once -) - -func NewMonitorProvider(config status.Config, l *label.DefaultLabeller) Provider { - once.Do(func() { - var m Monitor = &NoopMonitor{} - enabled, _ := config.StatusCheck() - if enabled == nil || *enabled { // assume enabled if value is nil - m = status.NewStatusMonitor(config, l) - } - provider = &fullProvider{ - kubernetesMonitor: m, - } - }) - return provider +func NewMonitorProvider(l *label.DefaultLabeller) Provider { + return &fullProvider{k8sMonitor: make(map[string]Monitor), labeller: l} } -func (p *fullProvider) GetKubernetesMonitor() Monitor { - return p.kubernetesMonitor +func (p *fullProvider) GetKubernetesMonitor(config status.Config) Monitor { + enabled := config.StatusCheck() + if enabled != nil && !*enabled { // assume disabled only if explicitly set to false + return &NoopMonitor{} + } + context := config.GetKubeContext() + if p.k8sMonitor[context] == nil { + p.k8sMonitor[context] = status.NewStatusMonitor(config, p.labeller) + } + return p.k8sMonitor[context] } func (p *fullProvider) GetNoopMonitor() Monitor { @@ -62,7 +54,7 @@ func (p *fullProvider) GetNoopMonitor() Monitor { // NoopProvider is used in tests type NoopProvider struct{} -func (p *NoopProvider) GetKubernetesMonitor() Monitor { +func (p *NoopProvider) GetKubernetesMonitor(config status.Config) Monitor { return &NoopMonitor{} } diff --git a/pkg/skaffold/status/provider_test.go b/pkg/skaffold/status/provider_test.go index df2215b409f..c8a2dd8099e 100644 --- a/pkg/skaffold/status/provider_test.go +++ b/pkg/skaffold/status/provider_test.go @@ -18,7 +18,6 @@ package status import ( "reflect" - "sync" "testing" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" @@ -48,9 +47,8 @@ func TestMonitorProvider(t *testing.T) { } for _, test := range tests { - once = sync.Once{} // reset once for tests testutil.Run(t, test.description, func(t *testutil.T) { - m := NewMonitorProvider(mockConfig{statusCheck: test.statusCheck}, nil).GetKubernetesMonitor() + m := NewMonitorProvider(nil).GetKubernetesMonitor(mockConfig{statusCheck: test.statusCheck}) t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(m)).Type() == reflect.TypeOf(NoopMonitor{})) }) } @@ -61,7 +59,9 @@ type mockConfig struct { statusCheck *bool } -func (m mockConfig) StatusCheck() (*bool, error) { return m.statusCheck, nil } +func (m mockConfig) StatusCheck() *bool { return m.statusCheck } + +func (m mockConfig) GetKubeContext() string { return "" } func (m mockConfig) StatusCheckDeadlineSeconds() int { return 0 } From 36803b457b78f208e4e679d755bea270aa8a7688 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Thu, 24 Jun 2021 13:54:12 -0400 Subject: [PATCH 014/103] Minor cleanup to structure tests (#6075) --- pkg/skaffold/test/structure/structure_test.go | 49 ++++++------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/pkg/skaffold/test/structure/structure_test.go b/pkg/skaffold/test/structure/structure_test.go index 7afebfea518..c384cad00e0 100644 --- a/pkg/skaffold/test/structure/structure_test.go +++ b/pkg/skaffold/test/structure/structure_test.go @@ -35,29 +35,19 @@ import ( ) func TestNewRunner(t *testing.T) { - const ( - imageName = "image:tag" - ) - testutil.Run(t, "", func(t *testutil.T) { tmpDir := t.NewTempDir().Touch("test.yaml") t.Override(&cluster.FindMinikubeBinary, func() (string, semver.Version, error) { return "", semver.Version{}, errors.New("not found") }) - t.Override(&util.DefaultExecCommand, testutil.CmdRun("container-structure-test test -v warn --image "+imageName+" --config "+tmpDir.Path("test.yaml"))) - - cfg := &mockConfig{ - tests: []*latestV1.TestCase{{ - ImageName: "image", - Workspace: tmpDir.Root(), - StructureTests: []string{"test.yaml"}, - }}, - } + t.Override(&util.DefaultExecCommand, testutil.CmdRun("container-structure-test test -v warn --image image:tag --config "+tmpDir.Path("test.yaml"))) testCase := &latestV1.TestCase{ ImageName: "image", Workspace: tmpDir.Root(), StructureTests: []string{"test.yaml"}, } + cfg := &mockConfig{tests: []*latestV1.TestCase{testCase}} + testEvent.InitializeState([]latestV1.Pipeline{{}}) testRunner, err := New(cfg, testCase, true) @@ -74,19 +64,12 @@ func TestIgnoreDockerNotFound(t *testing.T) { return nil, errors.New("not found") }) - cfg := &mockConfig{ - tests: []*latestV1.TestCase{{ - ImageName: "image", - Workspace: tmpDir.Root(), - StructureTests: []string{"test.yaml"}, - }}, - } - testCase := &latestV1.TestCase{ ImageName: "image", Workspace: tmpDir.Root(), StructureTests: []string{"test.yaml"}, } + cfg := &mockConfig{tests: []*latestV1.TestCase{testCase}} testRunner, err := New(cfg, testCase, true) t.CheckError(true, err) @@ -97,19 +80,19 @@ func TestIgnoreDockerNotFound(t *testing.T) { func TestCustomParams(t *testing.T) { testCases := []struct { structureTestArgs []string - expectedCmd string + expectedExtras string }{ { structureTestArgs: []string{"--driver=tar", "--force", "-q", "--save"}, - expectedCmd: " --driver=tar --force -q --save", + expectedExtras: "--driver=tar --force -q --save", }, { structureTestArgs: []string{}, - expectedCmd: "", + expectedExtras: "", }, { structureTestArgs: nil, - expectedCmd: "", + expectedExtras: "", }, } @@ -118,17 +101,11 @@ func TestCustomParams(t *testing.T) { tmpDir := t.NewTempDir().Touch("test.yaml") t.Override(&cluster.FindMinikubeBinary, func() (string, semver.Version, error) { return "", semver.Version{}, errors.New("not found") }) - baseCmd := "container-structure-test test -v warn --image image:tag --config " + tmpDir.Path("test.yaml") - t.Override(&util.DefaultExecCommand, testutil.CmdRun(baseCmd+tc.expectedCmd)) - - cfg := &mockConfig{ - tests: []*latestV1.TestCase{{ - ImageName: "image", - Workspace: tmpDir.Root(), - StructureTests: []string{"test.yaml"}, - StructureTestArgs: tc.structureTestArgs, - }}, + expected := "container-structure-test test -v warn --image image:tag --config " + tmpDir.Path("test.yaml") + if len(tc.expectedExtras) > 0 { + expected += " " + tc.expectedExtras } + t.Override(&util.DefaultExecCommand, testutil.CmdRun(expected)) testCase := &latestV1.TestCase{ ImageName: "image", @@ -136,6 +113,8 @@ func TestCustomParams(t *testing.T) { StructureTests: []string{"test.yaml"}, StructureTestArgs: tc.structureTestArgs, } + cfg := &mockConfig{tests: []*latestV1.TestCase{testCase}} + testEvent.InitializeState([]latestV1.Pipeline{{}}) testRunner, err := New(cfg, testCase, true) From 88dc952ac9100ad9b8042e7f5dd7d7baa219f769 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Fri, 25 Jun 2021 08:59:10 -0700 Subject: [PATCH 015/103] Add skaffold triage party config to skaffold repo (#6031) * add skaffold triage party config to skaffold repo * Fix the filename * Deleting deploy.sh We will continue to run the deploy script from google/triage-party but point to config in skaffold repo --- deploy/triage-party/skaffold.yaml | 829 ++++++++++++++++++++++++++++++ 1 file changed, 829 insertions(+) create mode 100644 deploy/triage-party/skaffold.yaml diff --git a/deploy/triage-party/skaffold.yaml b/deploy/triage-party/skaffold.yaml new file mode 100644 index 00000000000..a32be9b102e --- /dev/null +++ b/deploy/triage-party/skaffold.yaml @@ -0,0 +1,829 @@ +# Copyright 2020 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +settings: + name: skaffold + min_similarity: 0.8 + repos: + - https://github.com/GoogleContainerTools/skaffold + +collections: + - id: daily + name: Daily Triage + dedup: false + description: > + Triage-oncall zeroes out this queue once a day. The priorities are: + + * Keeping an open dialog with our users + * Initial prioritization (does not have to be perfect) + * SLO compliance + rules: + # SLO violations + - issue-needs-priority-slo + - issue-needs-comment-slo + - issue-p0-fix-slo + - issue-p0-followup-slo + - issue-p1-fix-slo + - issue-p2-fix-slo + # Don't leave code reviews hanging + - pr-reviewable + # missing initial feedback + - issue-needs-kind + - issue-needs-priority + - issue-needs-comment + # reprioritize + - issue-new-with-reactions + - issue-new-with-many-commenters + # Don't forget our users + - issue-updated-needs-info + - issue-updated-has-question + + - id: weekly + name: Weekly Triage + dedup: true + description: > + Once a week, we meet up to address loose ends. The priorities are: + + * Keeping an open dialog with our users + * Finding misprioritized issues + * SLO compliance + rules: + - discuss + # Issues needing reprioritization + - many-reactions + - many-commenters-awaiting-evidence + - many-commenters + # SLO + - issue-near-p0-fix-slo + - issue-near-p0-followup-slo + - issue-near-p1-fix-slo + - issue-near-p2-fix-slo + # Issues needing reprioritization + - issue-zombies + # Issues needing closure + - issue-stale-needs-info + - issue-stale-support + # PR's needing closure + - pr-approved-stale + - pr-unapproved-stale + # People with questions + - issue-has-question + - issue-updated-kind-question + + - id: quarterly + name: Quarterly Scrub + dedup: true + description: > + Once every quarter, we look for stale issues and de-duplicate + + The priorities for this page are: + + * De-duplication + * Keeping the bug queue relevant + * Making tough decisions about long-standing requests + + rules: + - birthday + - lifecycle-rotten + - features-recv + - features-old + - bugs-recv + - bugs-old + - other-recv + - other-old + + - id: p0 + name: P0 + description: All hands on deck! + rules: + - p0-prs + - p0-features + - p0-bugs + - p0-other + + - id: p1 + name: P1 + description: To be resolved within 6 weeks + rules: + - p1-prs + - p1-features + - p1-bugs + - p1-other + + - id: milestone + name: In Milestone + description: > + A Kanban visualization of milestones, showing the flow of issues through each stage. + + * Unassigned issues represent available work + * >3 issues assigned to the same person within a stage signifies a bottleneck 🌊 + display: kanban + overflow: 3 + dedup: true + rules: + - milestone-not-started + - milestone-assignee-updated + - milestone-pr-needs-review + - milestone-pr-needs-work + - milestone-pr-needs-merge + - milestone-recently-closed + + - id: planning + name: Planning + description: > + Skafold Team Planning Board. + + This board is used by Skaffold team to plan upcoming releases. + The timeline and priority of issues listed here are subject to change. + + Please add label planning/Q3-21 for an issue to appear on this board. + + display: planning + rules: + - onboarding + - extensibility + - partner-requests + - skaffold-v2 + - docs + - all-other-requests + + - id: similar + name: Similar + description: Items which appear similar to one other. Review for duplicates or vague titles. + rules: + - similar-prs + - similar-issues + + - id: __open__ + name: All open PR's and Issues that should be considered for repository stats (hidden) + used_for_statistics: true + hidden: true + rules: + - open-prs + - open-issues + + - id: __velocity__ + name: issues to include in velocity metrics + used_for_statistics: true + hidden: true + rules: + - closed-prioritized-issues + - closed-milestone-issues + +rules: + ### Daily Triage #### + # SLO violations + issue-needs-priority-slo: + name: "Unprioritized bugs/features older than 7 days -- exceeds limit" + resolution: "Add a priority/ label" + type: issue + filters: + - label: "!priority/.*" + # Open question: should this include all bugs? + - label: "kind/(bug|feature-request)" + - created: +7d + - responded: +1d + + issue-needs-comment-slo: + name: "Unresponded, older than 7 days -- exceeds limit" + resolution: "Respond to the issue" + type: issue + filters: + - tag: "!commented" + - tag: "recv" + - label: "!source/partnerships" + - created: +7d + + issue-p0-followup-slo: + name: "p0 bug, no comments in 3 days -- exceeds limit" + resolution: "Downgrade to p1" + type: issue + filters: + - label: "priority/p0" + - tag: recv + - responded: +3d + - label: "kind/bug" + + issue-p0-fix-slo: + name: "p0 bug, prioritized for more than a week -- exceeds limit" + resolution: "Downgrade to p1" + type: issue + filters: + - label: "priority/p0" + - prioritized: +1w + - responded: +1d + - label: "kind/bug" + + issue-p1-fix-slo: + name: "p1 bug, prioritized more than 6 weeks -- exceeds limit" + resolution: "Downgrade to p2" + type: issue + filters: + - label: "priority/p1" + - responded: +1d + - prioritized: +6w + - label: "kind/bug" + + issue-p2-fix-slo: + name: "p2 bug, prioritized more than 1 quarter -- exceeds limit" + resolution: "Downgrade to p3" + type: issue + filters: + - label: "priority/p2" + - prioritized: +12w + - responded: +1d + - label: "kind/bug" + + # Don't leave code reviews hanging + pr-reviewable: + name: "Needs Review, older than 1 day" + resolution: "Review requests or mark them as do-not-merge/work-in-progress" + type: pull_request + filters: + - label: "!do-not-merge.*" + - label: "!.*wip" + - label: "!cncf-cla: no" + - title: "!.*WIP.*" + - tag: "!draft" + - tag: "(new-commits|unreviewed)" + - tag: "recv" + - updated: +1d + + # Issues missing initial feedback + issue-needs-kind: + name: "Unkinded Issues" + resolution: "Add a kind/ or meta/ label" + type: issue + filters: + - label: "!kind/.*" + - label: "!meta/.*" + + issue-needs-area: + name: "Uncategorized Issues" + resolution: "Add an area/ label" + type: issue + filters: + - label: "!area/.*" + - label: "!meta/.*" + # Open question: should this exclude questions? + # - label: "!kind/question" + + issue-needs-priority: + name: "Unprioritized bugs or features" + resolution: "Add a priority/ or triage/ label" + type: issue + filters: + - label: "!priority/.*" + # Open question: should this include all bugs? + - label: "kind/(bug|feature-request)" + - created: -7d + + issue-needs-comment: + name: "Uncommented Issues within SLO" + resolution: "Add a comment" + type: issue + filters: + - tag: "!commented" + - tag: "recv" + - label: "!source/partnerships" + - created: -5d + + # Issues that may need reprioritized + issue-new-with-reactions: + name: "New, has multiple reactions, but not high priority" + resolution: "Prioritize as p0 or p1, or add discuss label" + type: issue + filters: + - reactions: ">3" + - created: -8d + - updated: -4d + - label: "!priority/p0" + - label: "!priority/p1" + - label: "!triage/discuss" + + issue-new-with-many-commenters: + name: "New, has multiple commenters, but not high priority" + resolution: "Prioritize as p0 or p1, or add discuss label" + type: issue + filters: + - commenters: ">3" + - created: -8d + - updated: -4d + - label: "!priority/p0" + - label: "!priority/p1" + - label: "!triage/discuss" + + # Don't forget our users + issue-updated-needs-info: + name: "needs-reproduction, has update" + resolution: "Comment and remove needs-reproduction tag" + type: issue + filters: + - label: needs-reproduction + - tag: recv + + issue-updated-has-question: + name: "Recently updated issue has open question" + resolution: "Add an answer" + type: issue + filters: + - tag: recv-q + - tag: "!member-last" + - tag: "!contributor-last" + - responded: +3d + - updated: -7d + + ####### Weekly Triage ######### + discuss: + name: "Items for discussion" + resolution: "Discuss and remove label" + filters: + - label: triage/discuss + - state: "all" + + # SLO nearing + issue-near-p0-followup-slo: + name: "p0 bug, no comments in 3 days -- exceeds limit" + resolution: "Downgrade to p1" + type: issue + filters: + - label: "priority/p0" + - tag: recv + - responded: +3d + - label: "kind/bug" + + issue-near-p0-fix-slo: + name: "p0 bug, prioritized for longer than 5d (near SLO boundary)" + resolution: "Downgrade to p1" + type: issue + filters: + - label: "priority/p0" + - prioritized: +5d + - prioritized: -7d + - responded: +1d + - label: "kind/bug" + + issue-near-p1-fix-slo: + name: "p1 bug, prioritized for longer than 5 weeks (near SLO boundary)" + resolution: "Downgrade to p2" + type: issue + filters: + - label: "priority/p1" + - prioritized: +5w + - prioritized: -6w + - label: "kind/bug" + - responded: +1w + + issue-near-p2-fix-slo: + name: "p2 bug, prioritized for longer than 10 weeks (near SLO boundary)" + resolution: "Downgrade to p3" + type: issue + filters: + - label: "priority/p2" + - prioritized: +10w + - prioritized: -12w + - label: "kind/bug" + - responded: +1w + + # issues needing reprioritization + many-reactions: + name: "many reactions, low priority, no recent comment" + resolution: "Bump the priority, add a comment" + filters: + - reactions: ">3" + - reactions-per-month: ">1" + - label: "!priority/p0" + - label: "!priority/p1" + - responded: +60d + + many-commenters: + name: "many commenters, low priority, no recent comment" + resolution: "Consider increasing priority" + type: issue + filters: + - commenters: ">3" + - commenters-per-month: ">1.9" + - created: "+30d" + - label: "!priority/p0" + - label: "!priority/p1" + - tag: "!member-last" + - responded: "+60d" + + many-commenters-awaiting-evidence: + name: "many commenters, awaiting evidence" + resolution: "Consider increasing priority" + type: issue + filters: + - commenters: ">3" + - commenters-per-month: ">0.25" + - created: "+14d" + - label: "priority/awaiting-evidence" + - tag: "!member-last" + - responded: "+7d" + + issue-zombies: + name: "Screaming into the void" + resolution: "Reopen, or ask folks to open a new issue" + type: issue + filters: + - state: closed + - comments-while-closed: ">1" + - updated: "-14d" + - tag: "!member-last" + + # Issues needing closure + issue-stale-needs-info: + name: "Needs reproduction for over 3 weeks" + resolution: "Close or remove needs-reproduction label" + type: issue + filters: + - label: needs-reproduction + - responded: +1w + - updated: +21d + + issue-stale-support: + name: "kind/question over 30 days old" + resolution: "Close, or add to kind/documentation" + type: issue + filters: + - label: kind/question + - updated: +30d + - responded: +7d + + lifecycle-rotten: + name: "P2+ over 180 days old without a recent response" + resolution: "Close, decrease priority, or add discuss label" + filters: + - created: +180d + - responded: +90d + - label: "!priority/p3" + - label: "!priority/awaiting-more-evidence" + - label: "!triage/discuss" + + birthday: + name: "Forgotten Birthdays - over a year old, no response in 6 months" + resolution: "Close, comment, or add discuss label" + filters: + - created: +365d + - responded: +180d + - label: "!triage/discuss" + + # PR's needing closure + pr-approved-stale: + name: "Pull requests: Approved and getting old" + resolution: "Close, comment, or add discuss label" + type: pull_request + filters: + - label: "!do-not-merge.*" + - label: "!needs-rebase" + - label: "approved" + - updated: +5d + - responded: +2d + - label: "!triage/discuss" + + pr-unapproved-stale: + name: "Pull Requests: Stale" + resolution: "Close, comment, or add discuss label" + type: pull_request + filters: + - created: +20d + - updated: +5d + - responded: +2d + - label: "!triage/discuss" + + # People with questions + issue-has-question: + name: "Reporter asked a question over a week ago" + resolution: "Add an answer or discuss label" + type: issue + filters: + - tag: recv-q + - tag: "!member-last" + - tag: "!contributor-last" + - responded: +7d + - label: "!triage/discuss" + + issue-updated-kind-question: + name: "kind/question issue not responded to for over a week" + resolution: "Move out of kind/question, add comment or discuss label" + type: issue + filters: + - tag: recv + - label: "kind/question" + - tag: "!member-last" + - tag: "!contributor-last" + - label: "!triage/discuss" + - responded: +8d + + ## Bug Scrub ## + bugs-recv: + name: "Bugs that deserve a follow-up comment" + resolution: "Comment, close, or add discuss label" + type: issue + filters: + - tag: recv + - responded: +45d + - created: +45d + - label: "kind/bug" + - label: "!triage/discuss" + + features-recv: + name: "Features that deserve a follow-up comment" + resolution: "Comment, close, or add discuss label" + type: issue + filters: + - tag: recv + - responded: +60d + - created: +30d + - label: "!triage/discuss" + - label: "kind/feature-request" + + other-recv: + name: "Items that deserve a follow-up comment" + resolution: "Comment, close, or add discuss label" + type: issue + filters: + - tag: recv + - responded: +30d + - label: "!kind/feature" + - label: "!kind/bug" + - label: "!kind/question" + - label: "!triage/discuss" + + features-old: + name: "Features that have not been commented on within 90 days" + resolution: "Comment, close, or add discuss label" + type: issue + filters: + - responded: +90d + - created: +90d + - label: "kind/feature-request" + - label: "!triage/discuss" + + bugs-old: + name: "Bugs that have not been commented on within 60 days" + resolution: "Comment, close, or add discuss label" + type: issue + filters: + - label: "kind/bug" + - responded: +60d + - created: +60d + - label: "!priority/awaiting-evidence" + - label: "!triage/discuss" + + other-old: + name: "Items that have not been commented on within 60 days" + resolution: "Comment, close, or add discuss label" + type: issue + filters: + - responded: +60d + - created: +60d + - label: "!kind/feature" + - label: "!kind/bug" + - label: "!kind/question" + - label: "!priority/awaiting-evidence" + - label: "!triage/discuss" + + # P0 + p0-features: + name: "p0 Bugs" + type: issue + resolution: Close or deprioritize + filters: + - label: "priority/p0" + - label: "kind/bug" + + p0-bugs: + name: "p0 Features" + type: issue + resolution: Close or deprioritize + filters: + - label: "priority/p0" + - label: "kind/feature-request" + + p0-other: + name: "p0 Other" + type: issue + resolution: Close or deprioritize + filters: + - label: "priority/p0" + - label: "!kind/feature-request" + - label: "!kind/bug" + + p0-prs: + name: "p0 Pull Requests" + type: pull_request + resolution: Merge em + filters: + - label: "priority/p0" + + # P1 + p1-bugs: + name: "p1 Bugs" + type: issue + resolution: Close or deprioritize + filters: + - label: "priority/p1" + - label: "kind/bug" + + p1-features: + name: "p1 Features" + type: issue + resolution: Close or deprioritize + filters: + - label: "priority/p1" + - label: "kind/feature-request" + + p1-other: + name: "p1 Other" + type: issue + resolution: Close or deprioritize + filters: + - label: "priority/p1" + - label: "!kind/feature-request" + - label: "!kind/bug" + + p1-prs: + name: "p1 Pull Requests" + type: pull_request + resolution: Merge em + filters: + - label: "priority/p1" + + ### Milestone Kanban ### + milestone-not-started: + name: "Not started" + type: issue + filters: + - tag: open-milestone + - tag: "!assignee-updated" + - tag: "!(assignee-open-pr|assignee-closed-pr)" + milestone-assignee-updated: + name: "In Progress" + type: issue + filters: + - tag: open-milestone + - tag: "assignee-updated" + - tag: "!(pr-changes-requested|pr-reviewer-comment|pr-unreviewed|pr-new-commits|pr-approved|pr-changes-requested)" + milestone-pr-needs-work: + name: "PR needs work" + type: issue + filters: + - tag: open-milestone + - tag: "(pr-changes-requested|pr-reviewer-comment)" + milestone-pr-needs-review: + name: "PR needs Review" + type: issue + filters: + - tag: open-milestone + - tag: "(pr-unreviewed|pr-new-commits)" + milestone-pr-needs-merge: + name: "PR needs Merge" + type: issue + filters: + - tag: open-milestone + - tag: "(pr-approved|pr-approved-but-pushed)" + milestone-recently-closed: + name: "Finish Line" + type: issue + filters: + - tag: open-milestone + - state: closed + - updated: -21d + ## Planing + onboarding: + name: > + Simple Onboarding, Faster dev. + Use Label - area/onboarding + type: issue + filters: + - label: "planning/Q3-21" + - label: "area/onboarding" + + extensibility: + name: > + Extensibility - Deploy and Lifecyle. + Use Label area/extensibility + type: issue + filters: + - label: "planning/Q3-21" + - label: "area/extensibility" + + skaffold-v2: + name: > + Skaffold V2 pipeline. + Use Label area/V2 + type: issue + filters: + - label: "planning/Q3-21" + - label: "area/extensibility" + + partner-requests: + name: > + Other partner requests. + Use Label source/partnerships + type: issue + filters: + - label: "planning/Q3-21" + - label: "source/partnerships" + + docs: + name: > + Skaffold Docs. + Use label area/docs + type: issue + filters: + - label: "planning/Q3-21" + - label: "area/docs" + + all-other-requests: + name: "Others" + type: issue + filters: + - label: "planning/Q3-21" + + # Fix-It + fixit-prs: + name: "Fix-it PR's" + resolution: Review and merge! + type: pull_request + filters: + - label: "fixit" + + fixit-bugs: + name: "Fix-it bugs" + type: issue + resolution: Close or remove fixit label + filters: + - label: "fixit" + - label: "kind/bug" + + fixit-features: + name: "Fix-it features" + type: issue + resolution: Close or remove fix-it label + filters: + - label: "fixit" + - label: "kind/feature-request" + + fixit-other: + name: "fixit other" + type: issue + resolution: Close or remove fixit label + filters: + - label: "fixit" + - label: "!kind/feature-request" + - label: "!kind/bug" + + ## Similar + similar-prs: + name: "Similar Pull Requests" + type: pull_request + resolution: Close as duplicate or give a better title + filters: + - tag: similar + + similar-issues: + name: "Similar Issues" + type: issue + resolution: Close as duplicate or give a better title + filters: + - tag: similar + + # for statistics generation + open-issues: + name: "Open Issues" + type: issue + + open-prs: + name: "Open PRs" + type: pull_request + + closed-prioritized-issues: + name: "Recently closed issues above >P2" + type: issue + filters: + - state: closed + - closed: -90d + - label: "priority/p[012]" + # Once Skaffold adopts milestones + # - milestone: ".*" + + closed-milestone-issues: + name: "Recently closed issues within a milestone" + type: issue + filters: + - state: closed + - closed: -90d + - milestone: ".*" From 4426d3447887e99c87dd1e66ed5c2a3f22935ad7 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Fri, 25 Jun 2021 14:25:22 -0700 Subject: [PATCH 016/103] Fill id field for `StatusCheckSubtaskEvent`s (#6065) * add ids for status check events * use resource name for id, fix wording on status check task description * move id assignment into proto creation --- pkg/skaffold/event/v2/status_check.go | 3 +++ pkg/skaffold/kubernetes/status/status_check.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/skaffold/event/v2/status_check.go b/pkg/skaffold/event/v2/status_check.go index d8b81e6cb11..eef7b08d430 100644 --- a/pkg/skaffold/event/v2/status_check.go +++ b/pkg/skaffold/event/v2/status_check.go @@ -33,6 +33,7 @@ func ResourceStatusCheckEventCompleted(r string, ae proto.ActionableErr) { func resourceStatusCheckEventSucceeded(r string) { handler.handleStatusCheckSubtaskEvent(&proto.StatusCheckSubtaskEvent{ + Id: r, TaskId: fmt.Sprintf("%s-%d", constants.StatusCheck, handler.iteration), Resource: r, Status: Succeeded, @@ -43,6 +44,7 @@ func resourceStatusCheckEventSucceeded(r string) { func resourceStatusCheckEventFailed(r string, ae proto.ActionableErr) { handler.handleStatusCheckSubtaskEvent(&proto.StatusCheckSubtaskEvent{ + Id: r, TaskId: fmt.Sprintf("%s-%d", constants.StatusCheck, handler.iteration), Resource: r, Status: Failed, @@ -53,6 +55,7 @@ func resourceStatusCheckEventFailed(r string, ae proto.ActionableErr) { func ResourceStatusCheckEventUpdated(r string, ae proto.ActionableErr) { handler.handleStatusCheckSubtaskEvent(&proto.StatusCheckSubtaskEvent{ + Id: r, TaskId: fmt.Sprintf("%s-%d", constants.StatusCheck, handler.iteration), Resource: r, Status: InProgress, diff --git a/pkg/skaffold/kubernetes/status/status_check.go b/pkg/skaffold/kubernetes/status/status_check.go index b6b75937789..81acb612716 100644 --- a/pkg/skaffold/kubernetes/status/status_check.go +++ b/pkg/skaffold/kubernetes/status/status_check.go @@ -110,7 +110,7 @@ func (s *Monitor) Check(ctx context.Context, out io.Writer) error { func (s *Monitor) check(ctx context.Context, out io.Writer) error { event.StatusCheckEventStarted() - eventV2.TaskInProgress(constants.StatusCheck, "Verifying service availability") + eventV2.TaskInProgress(constants.StatusCheck, "Verify service availability") ctx, endTrace := instrumentation.StartTrace(ctx, "performStatusCheck_WaitForDeploymentToStabilize") defer endTrace() From 00b14d170f0b6fc6805b88f0c4d6c71b3cbbca96 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Fri, 25 Jun 2021 14:59:04 -0700 Subject: [PATCH 017/103] use non alpine image and protoc 3.17.3 in proto generation (#6073) --- hack/proto/Dockerfile | 12 +++-- proto/v1/skaffold.pb.go | 90 ++++++++++++++++----------------- proto/v1/skaffold.pb.gw.go | 8 +-- proto/v2/skaffold.pb.go | 100 ++++++++++++++++++------------------- proto/v2/skaffold.pb.gw.go | 12 ++--- 5 files changed, 112 insertions(+), 110 deletions(-) diff --git a/hack/proto/Dockerfile b/hack/proto/Dockerfile index 398036565a8..257f6d6a35b 100644 --- a/hack/proto/Dockerfile +++ b/hack/proto/Dockerfile @@ -12,13 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.15-alpine AS generate-files -RUN apk add --no-cache protobuf=3.13.0-r2 unzip jq moreutils +FROM golang:1.15 AS generate-files +RUN apt-get update && apt-get install -y unzip moreutils WORKDIR /protoc -ENV PROTOC_VERSION=3.13.0 +ENV PROTOC_VERSION=3.17.3 RUN wget -O protoc.zip https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip RUN unzip protoc.zip +ENV PATH="/protoc/bin:${PATH}" WORKDIR /grpc-gateway RUN wget -q -O- https://github.com/grpc-ecosystem/grpc-gateway/tarball/v1.16.0 | tar --strip-components 1 -zx @@ -75,8 +76,9 @@ RUN protoc \ v2/*.proto # this is a hack - seemingly grpc-gateway-swagger-gen is sometimes generating titles when they should be descriptions -RUN jq 'walk(if type == "object" and has("title") then .description = ([.title, .description] | map(values) | join ("\n")) | del(.title) else . end)' v1/skaffold.swagger.json | sponge v1/skaffold.swagger.json -RUN jq 'walk(if type == "object" and has("title") then .description = ([.title, .description] | map(values) | join ("\n")) | del(.title) else . end)' v2/skaffold.swagger.json | sponge v2/skaffold.swagger.json +RUN wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x ./jq +RUN ./jq 'walk(if type == "object" and has("title") then .description = ([.title, .description] | map(values) | join ("\n")) | del(.title) else . end)' v1/skaffold.swagger.json | sponge v1/skaffold.swagger.json +RUN ./jq 'walk(if type == "object" and has("title") then .description = ([.title, .description] | map(values) | join ("\n")) | del(.title) else . end)' v2/skaffold.swagger.json | sponge v2/skaffold.swagger.json # Append enum docs content to main docs content RUN cat enums/enums.md >> v1/index.md diff --git a/proto/v1/skaffold.pb.go b/proto/v1/skaffold.pb.go index 380309ad035..0ffef490f8f 100644 --- a/proto/v1/skaffold.pb.go +++ b/proto/v1/skaffold.pb.go @@ -8,12 +8,12 @@ import ( fmt "fmt" enums "github.com/GoogleContainerTools/skaffold/proto/enums" proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - timestamp "github.com/golang/protobuf/ptypes/timestamp" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" math "math" ) @@ -2232,12 +2232,12 @@ func (m *DebuggingContainerEvent) GetDebugPorts() map[string]uint32 { // LogEntry describes an event and a string description of the event. type LogEntry struct { - Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` - Entry string `protobuf:"bytes,3,opt,name=entry,proto3" json:"entry,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Event *Event `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"` + Entry string `protobuf:"bytes,3,opt,name=entry,proto3" json:"entry,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *LogEntry) Reset() { *m = LogEntry{} } @@ -2265,7 +2265,7 @@ func (m *LogEntry) XXX_DiscardUnknown() { var xxx_messageInfo_LogEntry proto.InternalMessageInfo -func (m *LogEntry) GetTimestamp() *timestamp.Timestamp { +func (m *LogEntry) GetTimestamp() *timestamppb.Timestamp { if m != nil { return m.Timestamp } @@ -2784,22 +2784,22 @@ const _ = grpc.SupportPackageIsVersion6 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type SkaffoldServiceClient interface { // Returns the state of the current Skaffold execution - GetState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*State, error) + GetState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*State, error) // DEPRECATED. Events should be used instead. // TODO remove (https://github.com/GoogleContainerTools/skaffold/issues/3168) EventLog(ctx context.Context, opts ...grpc.CallOption) (SkaffoldService_EventLogClient, error) // Returns all the events of the current Skaffold execution from the start - Events(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldService_EventsClient, error) + Events(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldService_EventsClient, error) // Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. - Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*empty.Empty, error) + Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Allows for enabling or disabling automatic build trigger - AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Allows for enabling or disabling automatic sync trigger - AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Allows for enabling or disabling automatic deploy trigger - AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. - Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*empty.Empty, error) + Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) } type skaffoldServiceClient struct { @@ -2810,7 +2810,7 @@ func NewSkaffoldServiceClient(cc grpc.ClientConnInterface) SkaffoldServiceClient return &skaffoldServiceClient{cc} } -func (c *skaffoldServiceClient) GetState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*State, error) { +func (c *skaffoldServiceClient) GetState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*State, error) { out := new(State) err := c.cc.Invoke(ctx, "/proto.SkaffoldService/GetState", in, out, opts...) if err != nil { @@ -2850,7 +2850,7 @@ func (x *skaffoldServiceEventLogClient) Recv() (*LogEntry, error) { return m, nil } -func (c *skaffoldServiceClient) Events(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldService_EventsClient, error) { +func (c *skaffoldServiceClient) Events(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldService_EventsClient, error) { stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[1], "/proto.SkaffoldService/Events", opts...) if err != nil { return nil, err @@ -2882,8 +2882,8 @@ func (x *skaffoldServiceEventsClient) Recv() (*LogEntry, error) { return m, nil } -func (c *skaffoldServiceClient) Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldServiceClient) Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.SkaffoldService/Execute", in, out, opts...) if err != nil { return nil, err @@ -2891,8 +2891,8 @@ func (c *skaffoldServiceClient) Execute(ctx context.Context, in *UserIntentReque return out, nil } -func (c *skaffoldServiceClient) AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldServiceClient) AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoBuild", in, out, opts...) if err != nil { return nil, err @@ -2900,8 +2900,8 @@ func (c *skaffoldServiceClient) AutoBuild(ctx context.Context, in *TriggerReques return out, nil } -func (c *skaffoldServiceClient) AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldServiceClient) AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoSync", in, out, opts...) if err != nil { return nil, err @@ -2909,8 +2909,8 @@ func (c *skaffoldServiceClient) AutoSync(ctx context.Context, in *TriggerRequest return out, nil } -func (c *skaffoldServiceClient) AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldServiceClient) AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoDeploy", in, out, opts...) if err != nil { return nil, err @@ -2918,8 +2918,8 @@ func (c *skaffoldServiceClient) AutoDeploy(ctx context.Context, in *TriggerReque return out, nil } -func (c *skaffoldServiceClient) Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldServiceClient) Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.SkaffoldService/Handle", in, out, opts...) if err != nil { return nil, err @@ -2930,50 +2930,50 @@ func (c *skaffoldServiceClient) Handle(ctx context.Context, in *Event, opts ...g // SkaffoldServiceServer is the server API for SkaffoldService service. type SkaffoldServiceServer interface { // Returns the state of the current Skaffold execution - GetState(context.Context, *empty.Empty) (*State, error) + GetState(context.Context, *emptypb.Empty) (*State, error) // DEPRECATED. Events should be used instead. // TODO remove (https://github.com/GoogleContainerTools/skaffold/issues/3168) EventLog(SkaffoldService_EventLogServer) error // Returns all the events of the current Skaffold execution from the start - Events(*empty.Empty, SkaffoldService_EventsServer) error + Events(*emptypb.Empty, SkaffoldService_EventsServer) error // Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. - Execute(context.Context, *UserIntentRequest) (*empty.Empty, error) + Execute(context.Context, *UserIntentRequest) (*emptypb.Empty, error) // Allows for enabling or disabling automatic build trigger - AutoBuild(context.Context, *TriggerRequest) (*empty.Empty, error) + AutoBuild(context.Context, *TriggerRequest) (*emptypb.Empty, error) // Allows for enabling or disabling automatic sync trigger - AutoSync(context.Context, *TriggerRequest) (*empty.Empty, error) + AutoSync(context.Context, *TriggerRequest) (*emptypb.Empty, error) // Allows for enabling or disabling automatic deploy trigger - AutoDeploy(context.Context, *TriggerRequest) (*empty.Empty, error) + AutoDeploy(context.Context, *TriggerRequest) (*emptypb.Empty, error) // EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. - Handle(context.Context, *Event) (*empty.Empty, error) + Handle(context.Context, *Event) (*emptypb.Empty, error) } // UnimplementedSkaffoldServiceServer can be embedded to have forward compatible implementations. type UnimplementedSkaffoldServiceServer struct { } -func (*UnimplementedSkaffoldServiceServer) GetState(ctx context.Context, req *empty.Empty) (*State, error) { +func (*UnimplementedSkaffoldServiceServer) GetState(ctx context.Context, req *emptypb.Empty) (*State, error) { return nil, status.Errorf(codes.Unimplemented, "method GetState not implemented") } func (*UnimplementedSkaffoldServiceServer) EventLog(srv SkaffoldService_EventLogServer) error { return status.Errorf(codes.Unimplemented, "method EventLog not implemented") } -func (*UnimplementedSkaffoldServiceServer) Events(req *empty.Empty, srv SkaffoldService_EventsServer) error { +func (*UnimplementedSkaffoldServiceServer) Events(req *emptypb.Empty, srv SkaffoldService_EventsServer) error { return status.Errorf(codes.Unimplemented, "method Events not implemented") } -func (*UnimplementedSkaffoldServiceServer) Execute(ctx context.Context, req *UserIntentRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldServiceServer) Execute(ctx context.Context, req *UserIntentRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented") } -func (*UnimplementedSkaffoldServiceServer) AutoBuild(ctx context.Context, req *TriggerRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldServiceServer) AutoBuild(ctx context.Context, req *TriggerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AutoBuild not implemented") } -func (*UnimplementedSkaffoldServiceServer) AutoSync(ctx context.Context, req *TriggerRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldServiceServer) AutoSync(ctx context.Context, req *TriggerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AutoSync not implemented") } -func (*UnimplementedSkaffoldServiceServer) AutoDeploy(ctx context.Context, req *TriggerRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldServiceServer) AutoDeploy(ctx context.Context, req *TriggerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AutoDeploy not implemented") } -func (*UnimplementedSkaffoldServiceServer) Handle(ctx context.Context, req *Event) (*empty.Empty, error) { +func (*UnimplementedSkaffoldServiceServer) Handle(ctx context.Context, req *Event) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Handle not implemented") } @@ -2982,7 +2982,7 @@ func RegisterSkaffoldServiceServer(s *grpc.Server, srv SkaffoldServiceServer) { } func _SkaffoldService_GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } @@ -2994,7 +2994,7 @@ func _SkaffoldService_GetState_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/proto.SkaffoldService/GetState", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkaffoldServiceServer).GetState(ctx, req.(*empty.Empty)) + return srv.(SkaffoldServiceServer).GetState(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } @@ -3026,7 +3026,7 @@ func (x *skaffoldServiceEventLogServer) Recv() (*LogEntry, error) { } func _SkaffoldService_Events_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(empty.Empty) + m := new(emptypb.Empty) if err := stream.RecvMsg(m); err != nil { return err } diff --git a/proto/v1/skaffold.pb.gw.go b/proto/v1/skaffold.pb.gw.go index 5319ffa0389..3f4d86c5f93 100644 --- a/proto/v1/skaffold.pb.gw.go +++ b/proto/v1/skaffold.pb.gw.go @@ -15,7 +15,6 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/empty" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" "google.golang.org/grpc" @@ -23,6 +22,7 @@ import ( "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/emptypb" ) // Suppress "imported and not used" errors @@ -35,7 +35,7 @@ var _ = descriptor.ForMessage var _ = metadata.Join func request_SkaffoldService_GetState_0(ctx context.Context, marshaler runtime.Marshaler, client SkaffoldServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata msg, err := client.GetState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -44,7 +44,7 @@ func request_SkaffoldService_GetState_0(ctx context.Context, marshaler runtime.M } func local_request_SkaffoldService_GetState_0(ctx context.Context, marshaler runtime.Marshaler, server SkaffoldServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata msg, err := server.GetState(ctx, &protoReq) @@ -105,7 +105,7 @@ func request_SkaffoldService_EventLog_0(ctx context.Context, marshaler runtime.M } func request_SkaffoldService_Events_0(ctx context.Context, marshaler runtime.Marshaler, client SkaffoldServiceClient, req *http.Request, pathParams map[string]string) (SkaffoldService_EventsClient, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata stream, err := client.Events(ctx, &protoReq) diff --git a/proto/v2/skaffold.pb.go b/proto/v2/skaffold.pb.go index d8494bfc3e6..1e3d9e18d18 100644 --- a/proto/v2/skaffold.pb.go +++ b/proto/v2/skaffold.pb.go @@ -8,12 +8,12 @@ import ( fmt "fmt" enums "github.com/GoogleContainerTools/skaffold/proto/enums" proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - timestamp "github.com/golang/protobuf/ptypes/timestamp" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" math "math" ) @@ -1175,7 +1175,7 @@ func (m *FileSyncState) GetAutoTrigger() bool { // `Event` describes an event in the Skaffold process. // It is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusCheckEvent, ResourceStatusCheckEvent, FileSyncEvent, or DebuggingContainerEvent. type Event struct { - Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Types that are valid to be assigned to EventType: // *Event_MetaEvent // *Event_SkaffoldLogEvent @@ -1220,7 +1220,7 @@ func (m *Event) XXX_DiscardUnknown() { var xxx_messageInfo_Event proto.InternalMessageInfo -func (m *Event) GetTimestamp() *timestamp.Timestamp { +func (m *Event) GetTimestamp() *timestamppb.Timestamp { if m != nil { return m.Timestamp } @@ -2904,23 +2904,23 @@ const _ = grpc.SupportPackageIsVersion6 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type SkaffoldV2ServiceClient interface { // Returns the state of the current Skaffold execution - GetState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*State, error) + GetState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*State, error) // Returns all the events of the current Skaffold execution from the start - Events(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_EventsClient, error) + Events(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_EventsClient, error) // Returns all the user application logs of the current Skaffold execution - ApplicationLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_ApplicationLogsClient, error) + ApplicationLogs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_ApplicationLogsClient, error) // Returns all the skaffold output of the current Skaffold execution - SkaffoldLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_SkaffoldLogsClient, error) + SkaffoldLogs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_SkaffoldLogsClient, error) // Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. - Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*empty.Empty, error) + Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Allows for enabling or disabling automatic build trigger - AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Allows for enabling or disabling automatic sync trigger - AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Allows for enabling or disabling automatic deploy trigger - AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) + AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. - Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*empty.Empty, error) + Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) } type skaffoldV2ServiceClient struct { @@ -2931,7 +2931,7 @@ func NewSkaffoldV2ServiceClient(cc grpc.ClientConnInterface) SkaffoldV2ServiceCl return &skaffoldV2ServiceClient{cc} } -func (c *skaffoldV2ServiceClient) GetState(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*State, error) { +func (c *skaffoldV2ServiceClient) GetState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*State, error) { out := new(State) err := c.cc.Invoke(ctx, "/proto.v2.SkaffoldV2Service/GetState", in, out, opts...) if err != nil { @@ -2940,7 +2940,7 @@ func (c *skaffoldV2ServiceClient) GetState(ctx context.Context, in *empty.Empty, return out, nil } -func (c *skaffoldV2ServiceClient) Events(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_EventsClient, error) { +func (c *skaffoldV2ServiceClient) Events(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_EventsClient, error) { stream, err := c.cc.NewStream(ctx, &_SkaffoldV2Service_serviceDesc.Streams[0], "/proto.v2.SkaffoldV2Service/Events", opts...) if err != nil { return nil, err @@ -2972,7 +2972,7 @@ func (x *skaffoldV2ServiceEventsClient) Recv() (*Event, error) { return m, nil } -func (c *skaffoldV2ServiceClient) ApplicationLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_ApplicationLogsClient, error) { +func (c *skaffoldV2ServiceClient) ApplicationLogs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_ApplicationLogsClient, error) { stream, err := c.cc.NewStream(ctx, &_SkaffoldV2Service_serviceDesc.Streams[1], "/proto.v2.SkaffoldV2Service/ApplicationLogs", opts...) if err != nil { return nil, err @@ -3004,7 +3004,7 @@ func (x *skaffoldV2ServiceApplicationLogsClient) Recv() (*Event, error) { return m, nil } -func (c *skaffoldV2ServiceClient) SkaffoldLogs(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_SkaffoldLogsClient, error) { +func (c *skaffoldV2ServiceClient) SkaffoldLogs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldV2Service_SkaffoldLogsClient, error) { stream, err := c.cc.NewStream(ctx, &_SkaffoldV2Service_serviceDesc.Streams[2], "/proto.v2.SkaffoldV2Service/SkaffoldLogs", opts...) if err != nil { return nil, err @@ -3036,8 +3036,8 @@ func (x *skaffoldV2ServiceSkaffoldLogsClient) Recv() (*Event, error) { return m, nil } -func (c *skaffoldV2ServiceClient) Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldV2ServiceClient) Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.v2.SkaffoldV2Service/Execute", in, out, opts...) if err != nil { return nil, err @@ -3045,8 +3045,8 @@ func (c *skaffoldV2ServiceClient) Execute(ctx context.Context, in *UserIntentReq return out, nil } -func (c *skaffoldV2ServiceClient) AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldV2ServiceClient) AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.v2.SkaffoldV2Service/AutoBuild", in, out, opts...) if err != nil { return nil, err @@ -3054,8 +3054,8 @@ func (c *skaffoldV2ServiceClient) AutoBuild(ctx context.Context, in *TriggerRequ return out, nil } -func (c *skaffoldV2ServiceClient) AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldV2ServiceClient) AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.v2.SkaffoldV2Service/AutoSync", in, out, opts...) if err != nil { return nil, err @@ -3063,8 +3063,8 @@ func (c *skaffoldV2ServiceClient) AutoSync(ctx context.Context, in *TriggerReque return out, nil } -func (c *skaffoldV2ServiceClient) AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldV2ServiceClient) AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.v2.SkaffoldV2Service/AutoDeploy", in, out, opts...) if err != nil { return nil, err @@ -3072,8 +3072,8 @@ func (c *skaffoldV2ServiceClient) AutoDeploy(ctx context.Context, in *TriggerReq return out, nil } -func (c *skaffoldV2ServiceClient) Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *skaffoldV2ServiceClient) Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/proto.v2.SkaffoldV2Service/Handle", in, out, opts...) if err != nil { return nil, err @@ -3084,54 +3084,54 @@ func (c *skaffoldV2ServiceClient) Handle(ctx context.Context, in *Event, opts .. // SkaffoldV2ServiceServer is the server API for SkaffoldV2Service service. type SkaffoldV2ServiceServer interface { // Returns the state of the current Skaffold execution - GetState(context.Context, *empty.Empty) (*State, error) + GetState(context.Context, *emptypb.Empty) (*State, error) // Returns all the events of the current Skaffold execution from the start - Events(*empty.Empty, SkaffoldV2Service_EventsServer) error + Events(*emptypb.Empty, SkaffoldV2Service_EventsServer) error // Returns all the user application logs of the current Skaffold execution - ApplicationLogs(*empty.Empty, SkaffoldV2Service_ApplicationLogsServer) error + ApplicationLogs(*emptypb.Empty, SkaffoldV2Service_ApplicationLogsServer) error // Returns all the skaffold output of the current Skaffold execution - SkaffoldLogs(*empty.Empty, SkaffoldV2Service_SkaffoldLogsServer) error + SkaffoldLogs(*emptypb.Empty, SkaffoldV2Service_SkaffoldLogsServer) error // Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. - Execute(context.Context, *UserIntentRequest) (*empty.Empty, error) + Execute(context.Context, *UserIntentRequest) (*emptypb.Empty, error) // Allows for enabling or disabling automatic build trigger - AutoBuild(context.Context, *TriggerRequest) (*empty.Empty, error) + AutoBuild(context.Context, *TriggerRequest) (*emptypb.Empty, error) // Allows for enabling or disabling automatic sync trigger - AutoSync(context.Context, *TriggerRequest) (*empty.Empty, error) + AutoSync(context.Context, *TriggerRequest) (*emptypb.Empty, error) // Allows for enabling or disabling automatic deploy trigger - AutoDeploy(context.Context, *TriggerRequest) (*empty.Empty, error) + AutoDeploy(context.Context, *TriggerRequest) (*emptypb.Empty, error) // EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. - Handle(context.Context, *Event) (*empty.Empty, error) + Handle(context.Context, *Event) (*emptypb.Empty, error) } // UnimplementedSkaffoldV2ServiceServer can be embedded to have forward compatible implementations. type UnimplementedSkaffoldV2ServiceServer struct { } -func (*UnimplementedSkaffoldV2ServiceServer) GetState(ctx context.Context, req *empty.Empty) (*State, error) { +func (*UnimplementedSkaffoldV2ServiceServer) GetState(ctx context.Context, req *emptypb.Empty) (*State, error) { return nil, status.Errorf(codes.Unimplemented, "method GetState not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) Events(req *empty.Empty, srv SkaffoldV2Service_EventsServer) error { +func (*UnimplementedSkaffoldV2ServiceServer) Events(req *emptypb.Empty, srv SkaffoldV2Service_EventsServer) error { return status.Errorf(codes.Unimplemented, "method Events not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) ApplicationLogs(req *empty.Empty, srv SkaffoldV2Service_ApplicationLogsServer) error { +func (*UnimplementedSkaffoldV2ServiceServer) ApplicationLogs(req *emptypb.Empty, srv SkaffoldV2Service_ApplicationLogsServer) error { return status.Errorf(codes.Unimplemented, "method ApplicationLogs not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) SkaffoldLogs(req *empty.Empty, srv SkaffoldV2Service_SkaffoldLogsServer) error { +func (*UnimplementedSkaffoldV2ServiceServer) SkaffoldLogs(req *emptypb.Empty, srv SkaffoldV2Service_SkaffoldLogsServer) error { return status.Errorf(codes.Unimplemented, "method SkaffoldLogs not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) Execute(ctx context.Context, req *UserIntentRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldV2ServiceServer) Execute(ctx context.Context, req *UserIntentRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) AutoBuild(ctx context.Context, req *TriggerRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldV2ServiceServer) AutoBuild(ctx context.Context, req *TriggerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AutoBuild not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) AutoSync(ctx context.Context, req *TriggerRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldV2ServiceServer) AutoSync(ctx context.Context, req *TriggerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AutoSync not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) AutoDeploy(ctx context.Context, req *TriggerRequest) (*empty.Empty, error) { +func (*UnimplementedSkaffoldV2ServiceServer) AutoDeploy(ctx context.Context, req *TriggerRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AutoDeploy not implemented") } -func (*UnimplementedSkaffoldV2ServiceServer) Handle(ctx context.Context, req *Event) (*empty.Empty, error) { +func (*UnimplementedSkaffoldV2ServiceServer) Handle(ctx context.Context, req *Event) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Handle not implemented") } @@ -3140,7 +3140,7 @@ func RegisterSkaffoldV2ServiceServer(s *grpc.Server, srv SkaffoldV2ServiceServer } func _SkaffoldV2Service_GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } @@ -3152,13 +3152,13 @@ func _SkaffoldV2Service_GetState_Handler(srv interface{}, ctx context.Context, d FullMethod: "/proto.v2.SkaffoldV2Service/GetState", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SkaffoldV2ServiceServer).GetState(ctx, req.(*empty.Empty)) + return srv.(SkaffoldV2ServiceServer).GetState(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } func _SkaffoldV2Service_Events_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(empty.Empty) + m := new(emptypb.Empty) if err := stream.RecvMsg(m); err != nil { return err } @@ -3179,7 +3179,7 @@ func (x *skaffoldV2ServiceEventsServer) Send(m *Event) error { } func _SkaffoldV2Service_ApplicationLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(empty.Empty) + m := new(emptypb.Empty) if err := stream.RecvMsg(m); err != nil { return err } @@ -3200,7 +3200,7 @@ func (x *skaffoldV2ServiceApplicationLogsServer) Send(m *Event) error { } func _SkaffoldV2Service_SkaffoldLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(empty.Empty) + m := new(emptypb.Empty) if err := stream.RecvMsg(m); err != nil { return err } diff --git a/proto/v2/skaffold.pb.gw.go b/proto/v2/skaffold.pb.gw.go index a47cef915ac..6f836023c58 100644 --- a/proto/v2/skaffold.pb.gw.go +++ b/proto/v2/skaffold.pb.gw.go @@ -15,7 +15,6 @@ import ( "github.com/golang/protobuf/descriptor" "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/empty" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/utilities" "google.golang.org/grpc" @@ -23,6 +22,7 @@ import ( "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/emptypb" ) // Suppress "imported and not used" errors @@ -35,7 +35,7 @@ var _ = descriptor.ForMessage var _ = metadata.Join func request_SkaffoldV2Service_GetState_0(ctx context.Context, marshaler runtime.Marshaler, client SkaffoldV2ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata msg, err := client.GetState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -44,7 +44,7 @@ func request_SkaffoldV2Service_GetState_0(ctx context.Context, marshaler runtime } func local_request_SkaffoldV2Service_GetState_0(ctx context.Context, marshaler runtime.Marshaler, server SkaffoldV2ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata msg, err := server.GetState(ctx, &protoReq) @@ -53,7 +53,7 @@ func local_request_SkaffoldV2Service_GetState_0(ctx context.Context, marshaler r } func request_SkaffoldV2Service_Events_0(ctx context.Context, marshaler runtime.Marshaler, client SkaffoldV2ServiceClient, req *http.Request, pathParams map[string]string) (SkaffoldV2Service_EventsClient, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata stream, err := client.Events(ctx, &protoReq) @@ -70,7 +70,7 @@ func request_SkaffoldV2Service_Events_0(ctx context.Context, marshaler runtime.M } func request_SkaffoldV2Service_ApplicationLogs_0(ctx context.Context, marshaler runtime.Marshaler, client SkaffoldV2ServiceClient, req *http.Request, pathParams map[string]string) (SkaffoldV2Service_ApplicationLogsClient, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata stream, err := client.ApplicationLogs(ctx, &protoReq) @@ -87,7 +87,7 @@ func request_SkaffoldV2Service_ApplicationLogs_0(ctx context.Context, marshaler } func request_SkaffoldV2Service_SkaffoldLogs_0(ctx context.Context, marshaler runtime.Marshaler, client SkaffoldV2ServiceClient, req *http.Request, pathParams map[string]string) (SkaffoldV2Service_SkaffoldLogsClient, runtime.ServerMetadata, error) { - var protoReq empty.Empty + var protoReq emptypb.Empty var metadata runtime.ServerMetadata stream, err := client.SkaffoldLogs(ctx, &protoReq) From b8124d0d227c4f33ecad4f679fe3aa1cae0b74b6 Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Mon, 28 Jun 2021 05:44:15 -0700 Subject: [PATCH 018/103] Remove podSelector from Runner (#6076) * Remove podSelector from Runner * fix: linters Co-authored-by: gsquared94 --- integration/render_test.go | 6 +-- pkg/skaffold/deploy/helm/deploy.go | 8 ++-- pkg/skaffold/deploy/helm/helm_test.go | 12 +++--- pkg/skaffold/deploy/kpt/kpt.go | 4 +- pkg/skaffold/deploy/kpt/kpt_test.go | 14 +++---- pkg/skaffold/deploy/kubectl/kubectl.go | 6 +-- pkg/skaffold/deploy/kubectl/kubectl_test.go | 18 ++++---- pkg/skaffold/deploy/kustomize/kustomize.go | 6 +-- .../deploy/kustomize/kustomize_test.go | 8 ++-- pkg/skaffold/runner/deployer.go | 42 ++++++++----------- pkg/skaffold/runner/deployer_test.go | 4 +- pkg/skaffold/runner/v1/deploy_test.go | 2 +- pkg/skaffold/runner/v1/new.go | 5 +-- pkg/skaffold/runner/v1/runner.go | 3 -- testutil/checks.go | 6 +-- 15 files changed, 64 insertions(+), 80 deletions(-) diff --git a/integration/render_test.go b/integration/render_test.go index 7d4a631252b..4e868be176d 100644 --- a/integration/render_test.go +++ b/integration/render_test.go @@ -78,7 +78,7 @@ spec: t.NewTempDir(). Write("deployment.yaml", test.input). Chdir() - deployer, _, err := kubectl.NewDeployer(&runcontext.RunContext{ + deployer, err := kubectl.NewDeployer(&runcontext.RunContext{ WorkingDir: ".", Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{ Deploy: latestV1.DeployConfig{ @@ -235,7 +235,7 @@ spec: Write("deployment.yaml", test.input). Chdir() - deployer, _, err := kubectl.NewDeployer(&runcontext.RunContext{ + deployer, err := kubectl.NewDeployer(&runcontext.RunContext{ WorkingDir: ".", Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{ Deploy: latestV1.DeployConfig{ @@ -425,7 +425,7 @@ spec: } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - deployer, _, err := helm.NewDeployer(&runcontext.RunContext{ + deployer, err := helm.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{ Deploy: latestV1.DeployConfig{ DeployType: latestV1.DeployType{ diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index 8719cb65d9c..87656ddaf4b 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -116,14 +116,14 @@ type Config interface { } // NewDeployer returns a configured Deployer. Returns an error if current version of helm is less than 3.0.0. -func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, h *latestV1.HelmDeploy) (*Deployer, *kubernetes.ImageList, error) { +func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, h *latestV1.HelmDeploy) (*Deployer, error) { hv, err := binVer() if err != nil { - return nil, nil, versionGetErr(err) + return nil, versionGetErr(err) } if hv.LT(helm3Version) { - return nil, nil, minVersionErr() + return nil, minVersionErr() } originalImages := []graph.Artifact{} @@ -155,7 +155,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component bV: hv, enableDebug: cfg.Mode() == config.RunModes.Debug, isMultiConfig: cfg.IsMultiConfig(), - }, podSelector, nil + }, nil } func (h *Deployer) GetAccessor() access.Accessor { diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index 155a765570b..ad37eb4e3a8 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -472,7 +472,7 @@ func TestNewDeployer(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { t.Override(&util.DefaultExecCommand, testutil.CmdRunWithOutput("helm version --client", test.helmVersion)) - _, _, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &testDeployConfig) + _, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &testDeployConfig) t.CheckError(test.shouldErr, err) }) } @@ -1006,7 +1006,7 @@ func TestHelmDeploy(t *testing.T) { t.Override(&util.DefaultExecCommand, test.commands) t.Override(&osExecutable, func() (string, error) { return "SKAFFOLD-BINARY", nil }) - deployer, _, err := NewDeployer(&helmConfig{ + deployer, err := NewDeployer(&helmConfig{ namespace: test.namespace, force: test.force, configFile: "test.yaml", @@ -1085,7 +1085,7 @@ func TestHelmCleanup(t *testing.T) { t.Override(&util.OSEnviron, func() []string { return []string{"FOO=FOOBAR"} }) t.Override(&util.DefaultExecCommand, test.commands) - deployer, _, err := NewDeployer(&helmConfig{ + deployer, err := NewDeployer(&helmConfig{ namespace: test.namespace, }, nil, deploy.NoopComponentProvider, &test.helm) t.RequireNoError(err) @@ -1190,7 +1190,7 @@ func TestHelmDependencies(t *testing.T) { local = tmpDir.Root() } - deployer, _, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &latestV1.HelmDeploy{ + deployer, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &latestV1.HelmDeploy{ Releases: []latestV1.HelmRelease{{ Name: "skaffold-helm", ChartPath: local, @@ -1453,7 +1453,7 @@ func TestHelmRender(t *testing.T) { t.Override(&util.OSEnviron, func() []string { return append([]string{"FOO=FOOBAR"}, test.env...) }) t.Override(&util.DefaultExecCommand, test.commands) - deployer, _, err := NewDeployer(&helmConfig{ + deployer, err := NewDeployer(&helmConfig{ namespace: test.namespace, }, nil, deploy.NoopComponentProvider, &test.helm) t.RequireNoError(err) @@ -1524,7 +1524,7 @@ func TestGenerateSkaffoldDebugFilter(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { t.Override(&util.DefaultExecCommand, testutil.CmdRunWithOutput("helm version --client", version31)) - h, _, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &testDeployConfig) + h, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &testDeployConfig) t.RequireNoError(err) result := h.generateSkaffoldDebugFilter(test.buildFile) t.CheckDeepEqual(test.result, result) diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 92954879831..a8d4fb3ba94 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -97,7 +97,7 @@ type Config interface { } // NewDeployer generates a new Deployer object contains the kptDeploy schema. -func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KptDeploy) (*Deployer, *kubernetes.ImageList) { +func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KptDeploy) *Deployer { podSelector := kubernetes.NewImageList() return &Deployer{ KptDeploy: d, @@ -114,7 +114,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component kubeContext: cfg.GetKubeContext(), kubeConfig: cfg.GetKubeConfig(), namespace: cfg.GetKubeNamespace(), - }, podSelector + } } func (k *Deployer) GetAccessor() access.Accessor { diff --git a/pkg/skaffold/deploy/kpt/kpt_test.go b/pkg/skaffold/deploy/kpt/kpt_test.go index 89c721e9ca5..f2ae3a8e165 100644 --- a/pkg/skaffold/deploy/kpt/kpt_test.go +++ b/pkg/skaffold/deploy/kpt/kpt_test.go @@ -231,7 +231,7 @@ func TestKpt_Deploy(t *testing.T) { t.Override(&util.DefaultExecCommand, test.commands) t.NewTempDir().Chdir() - k, _ := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, &test.kpt) + k := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, &test.kpt) if test.hasKustomization != nil { k.hasKustomization = test.hasKustomization } @@ -374,7 +374,7 @@ func TestKpt_Dependencies(t *testing.T) { tmpDir.WriteFiles(test.createFiles) tmpDir.WriteFiles(test.kustomizations) - k, _ := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, &test.kpt) + k := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, &test.kpt) res, err := k.Dependencies() @@ -425,7 +425,7 @@ func TestKpt_Cleanup(t *testing.T) { t.CheckNoError(os.Mkdir(test.applyDir, 0755)) } - k, _ := NewDeployer(&kptConfig{ + k := NewDeployer(&kptConfig{ workingDir: ".", }, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ Live: latestV1.KptLive{ @@ -787,7 +787,7 @@ spec: t.Override(&util.DefaultExecCommand, test.commands) t.NewTempDir().Chdir() - k, _ := NewDeployer(&kptConfig{workingDir: "."}, test.labels, deploy.NoopComponentProvider, &test.kpt) + k := NewDeployer(&kptConfig{workingDir: "."}, test.labels, deploy.NoopComponentProvider, &test.kpt) if test.hasKustomization != nil { k.hasKustomization = test.hasKustomization } @@ -862,7 +862,7 @@ func TestKpt_GetApplyDir(t *testing.T) { tmpDir.Touch(".kpt-hydrated/inventory-template.yaml") } - k, _ := NewDeployer(&kptConfig{ + k := NewDeployer(&kptConfig{ workingDir: ".", }, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ Live: test.live, @@ -1023,7 +1023,7 @@ spec: } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - k, _ := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, nil) + k := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, nil) actualManifest, err := k.excludeKptFn(test.manifests) t.CheckErrorAndDeepEqual(false, err, test.expected.String(), actualManifest.String()) }) @@ -1169,7 +1169,7 @@ func TestNonEmptyKubeconfig(t *testing.T) { testutil.Run(t, "", func(t *testutil.T) { t.Override(&util.DefaultExecCommand, commands) - k, _ := NewDeployer(&kptConfig{config: "testConfigPath"}, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ + k := NewDeployer(&kptConfig{config: "testConfigPath"}, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ Dir: ".", Live: latestV1.KptLive{ Apply: latestV1.KptApplyInventory{ diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index 5d8fed2108d..d0668a8c0b4 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -72,13 +72,13 @@ type Deployer struct { // NewDeployer returns a new Deployer for a DeployConfig filled // with the needed configuration for `kubectl apply` -func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KubectlDeploy) (*Deployer, *kubernetes.ImageList, error) { +func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KubectlDeploy) (*Deployer, error) { defaultNamespace := "" if d.DefaultNamespace != nil { var err error defaultNamespace, err = util.ExpandEnvTemplate(*d.DefaultNamespace, nil) if err != nil { - return nil, nil, err + return nil, err } } @@ -100,7 +100,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component skipRender: cfg.SkipRender(), labels: labels, hydratedManifests: cfg.HydratedManifests(), - }, podSelector, nil + }, nil } func (k *Deployer) GetAccessor() access.Accessor { diff --git a/pkg/skaffold/deploy/kubectl/kubectl_test.go b/pkg/skaffold/deploy/kubectl/kubectl_test.go index 9debb43e26c..30d73b6af24 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl_test.go +++ b/pkg/skaffold/deploy/kubectl/kubectl_test.go @@ -232,7 +232,7 @@ func TestKubectlDeploy(t *testing.T) { skaffoldNamespaceOption = TestNamespace } - k, _, err := NewDeployer(&kubectlConfig{ + k, err := NewDeployer(&kubectlConfig{ workingDir: ".", force: test.forceDeploy, waitForDeletions: config.WaitForDeletions{ @@ -313,7 +313,7 @@ func TestKubectlCleanup(t *testing.T) { Write("deployment.yaml", DeploymentWebYAML). Chdir() - k, _, err := NewDeployer(&kubectlConfig{ + k, err := NewDeployer(&kubectlConfig{ workingDir: ".", RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}}, }, nil, deploy.NoopComponentProvider, &test.kubectl) @@ -360,7 +360,7 @@ func TestKubectlDeployerRemoteCleanup(t *testing.T) { Write("deployment.yaml", DeploymentWebYAML). Chdir() - k, _, err := NewDeployer(&kubectlConfig{ + k, err := NewDeployer(&kubectlConfig{ workingDir: ".", RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}}, }, nil, deploy.NoopComponentProvider, &test.kubectl) @@ -391,7 +391,7 @@ func TestKubectlRedeploy(t *testing.T) { AndRunInputOut("kubectl --context kubecontext get -f - --ignore-not-found -ojson", DeploymentAppYAMLv2+"\n---\n"+DeploymentWebYAMLv1, ""), ) - deployer, _, err := NewDeployer(&kubectlConfig{ + deployer, err := NewDeployer(&kubectlConfig{ workingDir: ".", waitForDeletions: config.WaitForDeletions{ Enabled: true, @@ -454,7 +454,7 @@ func TestKubectlWaitForDeletions(t *testing.T) { AndRunInput("kubectl --context kubecontext apply -f -", DeploymentWebYAMLv1), ) - deployer, _, err := NewDeployer(&kubectlConfig{ + deployer, err := NewDeployer(&kubectlConfig{ workingDir: tmpDir.Root(), waitForDeletions: config.WaitForDeletions{ Enabled: true, @@ -491,7 +491,7 @@ func TestKubectlWaitForDeletionsFails(t *testing.T) { }`), ) - deployer, _, err := NewDeployer(&kubectlConfig{ + deployer, err := NewDeployer(&kubectlConfig{ workingDir: tmpDir.Root(), waitForDeletions: config.WaitForDeletions{ Enabled: true, @@ -559,7 +559,7 @@ func TestDependencies(t *testing.T) { Touch("00/b.yaml", "00/a.yaml"). Chdir() - k, _, err := NewDeployer(&kubectlConfig{}, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{Manifests: test.manifests}) + k, err := NewDeployer(&kubectlConfig{}, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{Manifests: test.manifests}) t.RequireNoError(err) dependencies, err := k.Dependencies() @@ -672,7 +672,7 @@ spec: t.Override(&util.DefaultExecCommand, testutil. CmdRunOut("kubectl version --client -ojson", KubectlVersion112). AndRunOut("kubectl --context kubecontext create --dry-run -oyaml -f "+tmpDir.Path("deployment.yaml"), test.input)) - deployer, _, err := NewDeployer(&kubectlConfig{ + deployer, err := NewDeployer(&kubectlConfig{ workingDir: ".", defaultRepo: "gcr.io/project", }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ @@ -716,7 +716,7 @@ func TestGCSManifests(t *testing.T) { if err := ioutil.WriteFile(manifest.ManifestTmpDir+"/deployment.yaml", []byte(DeploymentWebYAML), os.ModePerm); err != nil { t.Fatal(err) } - k, _, err := NewDeployer(&kubectlConfig{ + k, err := NewDeployer(&kubectlConfig{ workingDir: ".", skipRender: test.skipRender, RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}}, diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index 1e7a44571af..847690128b3 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -118,13 +118,13 @@ type Deployer struct { useKubectlKustomize bool } -func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KustomizeDeploy) (*Deployer, *kubernetes.ImageList, error) { +func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KustomizeDeploy) (*Deployer, error) { defaultNamespace := "" if d.DefaultNamespace != nil { var err error defaultNamespace, err = util.ExpandEnvTemplate(*d.DefaultNamespace, nil) if err != nil { - return nil, nil, err + return nil, err } } @@ -146,7 +146,7 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C globalConfig: cfg.GlobalConfig(), labels: labels, useKubectlKustomize: useKubectlKustomize, - }, podSelector, nil + }, nil } func (k *Deployer) GetAccessor() access.Accessor { diff --git a/pkg/skaffold/deploy/kustomize/kustomize_test.go b/pkg/skaffold/deploy/kustomize/kustomize_test.go index 1db3bd74df7..91280ed2e2e 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize_test.go +++ b/pkg/skaffold/deploy/kustomize/kustomize_test.go @@ -177,7 +177,7 @@ func TestKustomizeDeploy(t *testing.T) { skaffoldNamespaceOption = kubectl.TestNamespace } - k, _, err := NewDeployer(&kustomizeConfig{ + k, err := NewDeployer(&kustomizeConfig{ workingDir: ".", force: test.forceDeploy, waitForDeletions: config.WaitForDeletions{ @@ -249,7 +249,7 @@ func TestKustomizeCleanup(t *testing.T) { t.Override(&util.DefaultExecCommand, test.commands) t.Override(&KustomizeBinaryCheck, func() bool { return true }) - k, _, err := NewDeployer(&kustomizeConfig{ + k, err := NewDeployer(&kustomizeConfig{ workingDir: tmpDir.Root(), RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{ Namespace: kubectl.TestNamespace}}, @@ -455,7 +455,7 @@ func TestDependenciesForKustomization(t *testing.T) { tmpDir.Write(path, contents) } - k, _, err := NewDeployer(&kustomizeConfig{}, nil, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{KustomizePaths: kustomizePaths}) + k, err := NewDeployer(&kustomizeConfig{}, nil, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{KustomizePaths: kustomizePaths}) t.RequireNoError(err) deps, err := k.Dependencies() @@ -696,7 +696,7 @@ spec: t.Override(&util.DefaultExecCommand, fakeCmd) t.NewTempDir().Chdir() - k, _, err := NewDeployer(&kustomizeConfig{ + k, err := NewDeployer(&kustomizeConfig{ workingDir: ".", RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: kubectl.TestNamespace}}, }, test.labels, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{ diff --git a/pkg/skaffold/runner/deployer.go b/pkg/skaffold/runner/deployer.go index 7a6e4b5f040..256d3cce38d 100644 --- a/pkg/skaffold/runner/deployer.go +++ b/pkg/skaffold/runner/deployer.go @@ -26,7 +26,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -56,8 +55,7 @@ func (d *deployerCtx) StatusCheck() *bool { } // GetDeployer creates a deployer from a given RunContext and deploy pipeline definitions. -func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, kubernetes.ImageListMux, error) { - var podSelectors kubernetes.ImageListMux +func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, error) { if runCtx.Opts.Apply { return getDefaultDeployer(runCtx, provider, labels) } @@ -68,40 +66,36 @@ func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvide for _, d := range deployerCfg { dCtx := &deployerCtx{runCtx, d} if d.HelmDeploy != nil { - h, podSelector, err := helm.NewDeployer(dCtx, labels, provider, d.HelmDeploy) + h, err := helm.NewDeployer(dCtx, labels, provider, d.HelmDeploy) if err != nil { - return nil, nil, err + return nil, err } - podSelectors = append(podSelectors, podSelector) deployers = append(deployers, h) } if d.KptDeploy != nil { - deployer, podSelector := kpt.NewDeployer(dCtx, labels, provider, d.KptDeploy) - podSelectors = append(podSelectors, podSelector) + deployer := kpt.NewDeployer(dCtx, labels, provider, d.KptDeploy) deployers = append(deployers, deployer) } if d.KubectlDeploy != nil { - deployer, podSelector, err := kubectl.NewDeployer(dCtx, labels, provider, d.KubectlDeploy) + deployer, err := kubectl.NewDeployer(dCtx, labels, provider, d.KubectlDeploy) if err != nil { - return nil, nil, err + return nil, err } - podSelectors = append(podSelectors, podSelector) deployers = append(deployers, deployer) } if d.KustomizeDeploy != nil { - deployer, podSelector, err := kustomize.NewDeployer(dCtx, labels, provider, d.KustomizeDeploy) + deployer, err := kustomize.NewDeployer(dCtx, labels, provider, d.KustomizeDeploy) if err != nil { - return nil, nil, err + return nil, err } - podSelectors = append(podSelectors, podSelector) deployers = append(deployers, deployer) } } - return deployers, podSelectors, nil + return deployers, nil } /* @@ -117,7 +111,7 @@ The default deployer will honor a select set of deploy configuration from an exi For a multi-config project, we do not currently support resolving conflicts between differing sets of this deploy configuration. Therefore, in this function we do implicit validation of the provided configuration, and fail if any conflict cannot be resolved. */ -func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, kubernetes.ImageListMux, error) { +func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, error) { deployCfgs := runCtx.DeployConfigs() var kFlags *v1.KubectlFlags @@ -129,19 +123,19 @@ func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.Component for _, d := range deployCfgs { if d.KubeContext != "" { if kubeContext != "" && kubeContext != d.KubeContext { - return nil, nil, errors.New("cannot resolve active Kubernetes context - multiple contexts configured in skaffold.yaml") + return nil, errors.New("cannot resolve active Kubernetes context - multiple contexts configured in skaffold.yaml") } kubeContext = d.KubeContext } if d.StatusCheckDeadlineSeconds != 0 && d.StatusCheckDeadlineSeconds != int(status.DefaultStatusCheckDeadline.Seconds()) { if statusCheckTimeout != -1 && statusCheckTimeout != d.StatusCheckDeadlineSeconds { - return nil, nil, fmt.Errorf("found multiple status check timeouts in skaffold.yaml (not supported in `skaffold apply`): %d, %d", statusCheckTimeout, d.StatusCheckDeadlineSeconds) + return nil, fmt.Errorf("found multiple status check timeouts in skaffold.yaml (not supported in `skaffold apply`): %d, %d", statusCheckTimeout, d.StatusCheckDeadlineSeconds) } statusCheckTimeout = d.StatusCheckDeadlineSeconds } if d.Logs.Prefix != "" { if logPrefix != "" && logPrefix != d.Logs.Prefix { - return nil, nil, fmt.Errorf("found multiple log prefixes in skaffold.yaml (not supported in `skaffold apply`): %s, %s", logPrefix, d.Logs.Prefix) + return nil, fmt.Errorf("found multiple log prefixes in skaffold.yaml (not supported in `skaffold apply`): %s, %s", logPrefix, d.Logs.Prefix) } logPrefix = d.Logs.Prefix } @@ -159,11 +153,11 @@ func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.Component kFlags = ¤tKubectlFlags } if err := validateKubectlFlags(kFlags, currentKubectlFlags); err != nil { - return nil, nil, err + return nil, err } if currentDefaultNamespace != nil { if defaultNamespace != nil && *defaultNamespace != *currentDefaultNamespace { - return nil, nil, fmt.Errorf("found multiple namespaces in skaffold.yaml (not supported in `skaffold apply`): %s, %s", *defaultNamespace, *currentDefaultNamespace) + return nil, fmt.Errorf("found multiple namespaces in skaffold.yaml (not supported in `skaffold apply`): %s, %s", *defaultNamespace, *currentDefaultNamespace) } defaultNamespace = currentDefaultNamespace } @@ -175,11 +169,11 @@ func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.Component Flags: *kFlags, DefaultNamespace: defaultNamespace, } - defaultDeployer, podSelector, err := kubectl.NewDeployer(runCtx, labels, provider, k) + defaultDeployer, err := kubectl.NewDeployer(runCtx, labels, provider, k) if err != nil { - return nil, nil, fmt.Errorf("instantiating default kubectl deployer: %w", err) + return nil, fmt.Errorf("instantiating default kubectl deployer: %w", err) } - return defaultDeployer, kubernetes.ImageListMux{podSelector}, nil + return defaultDeployer, nil } func validateKubectlFlags(flags *v1.KubectlFlags, additional v1.KubectlFlags) error { diff --git a/pkg/skaffold/runner/deployer_test.go b/pkg/skaffold/runner/deployer_test.go index 803ae15cc10..9a7ca5d4453 100644 --- a/pkg/skaffold/runner/deployer_test.go +++ b/pkg/skaffold/runner/deployer_test.go @@ -132,7 +132,7 @@ func TestGetDeployer(tOuter *testing.T) { )) } - deployer, _, err := GetDeployer(&runcontext.RunContext{ + deployer, err := GetDeployer(&runcontext.RunContext{ Opts: config.SkaffoldOptions{ Apply: test.apply, }, @@ -251,7 +251,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) { }, }) } - deployer, _, err := getDefaultDeployer(&runcontext.RunContext{ + deployer, err := getDefaultDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines(pipelines), }, deploy.NoopComponentProvider, nil) diff --git a/pkg/skaffold/runner/v1/deploy_test.go b/pkg/skaffold/runner/v1/deploy_test.go index d7340f8624b..b97e960293e 100644 --- a/pkg/skaffold/runner/v1/deploy_test.go +++ b/pkg/skaffold/runner/v1/deploy_test.go @@ -124,7 +124,7 @@ func TestSkaffoldDeployRenderOnly(t *testing.T) { KubeContext: "does-not-exist", } - deployer, _, err := runner.GetDeployer(runCtx, deploy.NoopComponentProvider, nil) + deployer, err := runner.GetDeployer(runCtx, deploy.NoopComponentProvider, nil) t.RequireNoError(err) r := SkaffoldRunner{ runCtx: runCtx, diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index 8f04b6907b6..2386013bb90 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -34,7 +34,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" @@ -85,7 +84,6 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { return nil, fmt.Errorf("creating tester: %w", err) } - var podSelectors kubernetes.ImageListMux var deployer deploy.Deployer provider := deploy.ComponentProvider{ Accessor: access.NewAccessorProvider(runCtx, labeller, kubectlCLI), @@ -95,7 +93,7 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { Syncer: sync.NewSyncProvider(runCtx, kubectlCLI), } - deployer, podSelectors, err = runner.GetDeployer(runCtx, provider, labeller.Labels()) + deployer, err = runner.GetDeployer(runCtx, provider, labeller.Labels()) if err != nil { endTrace(instrumentation.TraceEndError(err)) return nil, fmt.Errorf("creating deployer: %w", err) @@ -150,7 +148,6 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { sourceDependencies: sourceDependencies, kubectlCLI: kubectlCLI, labeller: labeller, - podSelector: podSelectors, cache: artifactCache, runCtx: runCtx, intents: intents, diff --git a/pkg/skaffold/runner/v1/runner.go b/pkg/skaffold/runner/v1/runner.go index 0d1f6faa40a..371867650ec 100644 --- a/pkg/skaffold/runner/v1/runner.go +++ b/pkg/skaffold/runner/v1/runner.go @@ -23,7 +23,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/filemon" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/test" @@ -46,8 +45,6 @@ type SkaffoldRunner struct { labeller *label.DefaultLabeller artifactStore build.ArtifactStore sourceDependencies graph.SourceDependenciesCache - // podSelector is used to determine relevant pods for logging and portForwarding - podSelector kubernetes.ImageListMux devIteration int isLocalImage func(imageName string) (bool, error) diff --git a/testutil/checks.go b/testutil/checks.go index 648ccbf5a4b..cc3e7d10d27 100644 --- a/testutil/checks.go +++ b/testutil/checks.go @@ -49,7 +49,7 @@ func (t *T) RequireNoError(err error) { } } -func (t *T) RequireNonNilResult(x interface{}, y interface{}, err error) interface{} { +func (t *T) RequireNonNilResult(x interface{}, err error) interface{} { t.Helper() if err != nil { @@ -60,9 +60,5 @@ func (t *T) RequireNonNilResult(x interface{}, y interface{}, err error) interfa t.Errorf("unexpected nil value (failing test now)") t.FailNow() } - if y == nil { - t.Errorf("unexpected nil value (failing test now)") - t.FailNow() - } return x } From f6985d516f8105a6bcf2abc2c295a5eee26ec11b Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Mon, 28 Jun 2021 09:01:45 -0700 Subject: [PATCH 019/103] fix v3alpha version (#6084) --- pkg/skaffold/schema/versions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/skaffold/schema/versions.go b/pkg/skaffold/schema/versions.go index 617b94cb55f..8c8628becb9 100644 --- a/pkg/skaffold/schema/versions.go +++ b/pkg/skaffold/schema/versions.go @@ -144,7 +144,7 @@ var SchemaVersionsV1 = Versions{ // SchemaVersionsV2 refers to all the supported API Schemas for skaffold v2 executables. The API schema versions are // in the range of v3alpha*. var SchemaVersionsV2 = Versions{ - {v3alpha1.Version, v1alpha1.NewSkaffoldConfig}, + {v3alpha1.Version, v3alpha1.NewSkaffoldConfig}, {latestV2.Version, latestV2.NewSkaffoldConfig}, } From e85b2f863a28eb2da35d3d65db389b61eb952c21 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Mon, 28 Jun 2021 09:23:57 -0700 Subject: [PATCH 020/103] put skaffold overrides at end of arg list (#6080) --- pkg/skaffold/deploy/helm/args.go | 8 ++-- pkg/skaffold/deploy/helm/helm_test.go | 62 +++++++++++++-------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/pkg/skaffold/deploy/helm/args.go b/pkg/skaffold/deploy/helm/args.go index f42fafab0e8..8ac79e350c4 100644 --- a/pkg/skaffold/deploy/helm/args.go +++ b/pkg/skaffold/deploy/helm/args.go @@ -173,10 +173,6 @@ func (h *Deployer) installArgs(r latestV1.HelmRelease, builds []graph.Artifact, return nil, err } - if len(r.Overrides.Values) != 0 { - args = append(args, "-f", constants.HelmOverridesFilename) - } - for k, v := range params { var value string @@ -198,6 +194,10 @@ func (h *Deployer) installArgs(r latestV1.HelmRelease, builds []graph.Artifact, return nil, err } + if len(r.Overrides.Values) != 0 { + args = append(args, "-f", constants.HelmOverridesFilename) + } + if r.Wait { args = append(args, "--wait") } diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index ad37eb4e3a8..e3eca33e4bb 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -507,7 +507,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version30b). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, builds: testBuilds, @@ -518,7 +518,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version30b). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, namespace: kubectl.TestNamespace, @@ -530,7 +530,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version30). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, builds: testBuilds, @@ -541,7 +541,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version30). AndRun("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployNamespacedConfig, builds: testBuilds, @@ -552,7 +552,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version30). AndRun("helm --kube-context kubecontext get all --namespace testReleaseFOOBARNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseFOOBARNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseFOOBARNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRunWithOutput("helm --kube-context kubecontext get all --namespace testReleaseFOOBARNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig", helmReleaseInfo("testReleaseFOOBARNamespace", validDeployYaml)), // just need a valid KRM object helm: testDeployEnvTemplateNamespacedConfig, builds: testBuilds, @@ -564,7 +564,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version30). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, namespace: kubectl.TestNamespace, @@ -576,7 +576,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version30). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployNamespacedConfig, namespace: kubectl.TestNamespace, @@ -588,7 +588,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, builds: testBuilds, @@ -599,7 +599,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployNamespacedConfig, builds: testBuilds, @@ -610,7 +610,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all --namespace testReleaseFOOBARNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseFOOBARNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseFOOBARNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRunWithOutput("helm --kube-context kubecontext get all --namespace testReleaseFOOBARNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig", helmReleaseInfo("testReleaseFOOBARNamespace", validDeployYaml)), // just need a valid KRM object helm: testDeployEnvTemplateNamespacedConfig, builds: testBuilds, @@ -622,7 +622,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --repo https://charts.helm.sh/stable -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --repo https://charts.helm.sh/stable --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfigRemoteRepo, builds: testBuilds, @@ -633,7 +633,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, namespace: kubectl.TestNamespace, @@ -645,7 +645,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployNamespacedConfig, namespace: kubectl.TestNamespace, @@ -657,7 +657,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm --recreate-pods examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm --recreate-pods examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployRecreatePodsConfig, builds: testBuilds, @@ -667,7 +667,7 @@ func TestHelmDeploy(t *testing.T) { commands: testutil. CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeploySkipBuildDependenciesConfig, builds: testBuilds, @@ -678,7 +678,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfigParameterUnmatched, builds: testBuilds, @@ -734,7 +734,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRunErr("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig", fmt.Errorf("not found")). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext install skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, builds: testBuilds, @@ -745,7 +745,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRunErr("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig", fmt.Errorf("not found")). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext install skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, builds: testBuilds, @@ -756,7 +756,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRunErr("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig", fmt.Errorf("not found")). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext install skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image.repository=docker.io:5000/skaffold-helm,image.tag=3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image.repository=docker.io:5000/skaffold-helm,image.tag=3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployHelmStyleConfig, builds: testBuilds, @@ -767,7 +767,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRunErr("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig", fmt.Errorf("not found")). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext install skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image.registry=docker.io:5000,image.repository=skaffold-helm,image.tag=3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image.registry=docker.io:5000,image.repository=skaffold-helm,image.tag=3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployHelmExplicitRegistryStyleConfig, builds: testBuilds, @@ -778,7 +778,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm --force examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm --force examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, force: true, @@ -790,7 +790,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, builds: testBuilds, @@ -801,7 +801,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRunErr("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig", fmt.Errorf("unexpected error")). + AndRunErr("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig", fmt.Errorf("unexpected error")). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), shouldErr: true, helm: testDeployConfig, @@ -813,7 +813,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRunErr("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig", fmt.Errorf("unexpected error")). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), shouldErr: true, helm: testDeployConfig, @@ -870,7 +870,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all user-skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade user-skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade user-skaffold-helm examples/test --set-string image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all user-skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployWithTemplatedName, builds: testBuilds, @@ -881,7 +881,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set image.name=skaffold-helm --set image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set missing.key= --set other.key=FOOBAR --set some.key=somevalue --set FOOBAR=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set image.name=skaffold-helm --set image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set missing.key= --set other.key=FOOBAR --set some.key=somevalue --set FOOBAR=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfigTemplated, builds: testBuilds, @@ -892,7 +892,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 -f /some/file-FOOBAR.yaml --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 -f /some/file-FOOBAR.yaml -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfigValuesFilesTemplated, builds: testBuilds, @@ -903,7 +903,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun(fmt.Sprintf("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set-file expanded=%s --set-file value=/some/file.yaml --kubeconfig kubeconfig", strings.ReplaceAll(filepath.Join(home, "file.yaml"), "\\", "\\\\"))). + AndRun(fmt.Sprintf("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set-file expanded=%s --set-file value=/some/file.yaml -f skaffold-overrides.yaml --kubeconfig kubeconfig", strings.ReplaceAll(filepath.Join(home, "file.yaml"), "\\", "\\\\"))). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfigSetFiles, builds: testBuilds, @@ -952,7 +952,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRunEnv("helm --kube-context kubecontext upgrade skaffold-helm --post-renderer SKAFFOLD-BINARY examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig", + AndRunEnv("helm --kube-context kubecontext upgrade skaffold-helm --post-renderer SKAFFOLD-BINARY examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig", []string{"SKAFFOLD_FILENAME=test.yaml"}). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfig, @@ -975,7 +975,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version32). AndRunErr("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --kubeconfig kubeconfig", fmt.Errorf("not found")). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --namespace testReleaseNamespace --create-namespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --namespace testReleaseNamespace --create-namespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRunWithOutput("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig", helmReleaseInfo("testReleaseNamespace", validDeployYaml)), // just need a valid KRM object helm: testDeployCreateNamespaceConfig, builds: testBuilds, @@ -987,7 +987,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version32). AndRun("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRunWithOutput("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig", helmReleaseInfo("testReleaseNamespace", validDeployYaml)), // just need a valid KRM object helm: testDeployCreateNamespaceConfig, builds: testBuilds, From 7dad6fa4b7806a25f311c52b213212c781e4f54d Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Mon, 28 Jun 2021 12:46:15 -0400 Subject: [PATCH 021/103] GCB project IDs guessing to support Artifact Registry (#6093) --- pkg/skaffold/gcp/projectid.go | 2 +- pkg/skaffold/gcp/projectid_test.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/skaffold/gcp/projectid.go b/pkg/skaffold/gcp/projectid.go index 19847a91b8a..9657d03bd34 100644 --- a/pkg/skaffold/gcp/projectid.go +++ b/pkg/skaffold/gcp/projectid.go @@ -32,7 +32,7 @@ func ExtractProjectID(imageName string) (string, error) { } registry := ref.Context().Registry.Name() - if registry == "gcr.io" || strings.HasSuffix(registry, ".gcr.io") { + if registry == "gcr.io" || strings.HasSuffix(registry, ".gcr.io") || strings.HasSuffix(registry, "-docker.pkg.dev") { parts := strings.Split(imageName, "/") if len(parts) >= 2 { return parts[1], nil diff --git a/pkg/skaffold/gcp/projectid_test.go b/pkg/skaffold/gcp/projectid_test.go index 02e4f83828c..f95717de0ca 100644 --- a/pkg/skaffold/gcp/projectid_test.go +++ b/pkg/skaffold/gcp/projectid_test.go @@ -39,6 +39,11 @@ func TestExtractProjectID(t *testing.T) { imageName: "gcr.io/project/image", expected: "project", }, + { + description: "us-east1-docker.pkg.dev", + imageName: "us-east1-docker.pkg.dev/project/yyy/go-hello-world:latest", + expected: "project", + }, { description: "docker hub", imageName: "project/image", From 9cd80d39e43daf6f951a2f198ccfa8bfcd4fcb8e Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Mon, 28 Jun 2021 22:23:03 +0530 Subject: [PATCH 022/103] add source file and module to config parsing error description (#6087) --- cmd/skaffold/app/cmd/fix.go | 8 +- cmd/skaffold/app/cmd/runner.go | 21 +- .../schema/{ => validation}/samples_test.go | 25 +-- pkg/skaffold/schema/validation/validation.go | 60 +++--- .../schema/validation/validation_test.go | 184 ++++++++++-------- 5 files changed, 170 insertions(+), 128 deletions(-) rename pkg/skaffold/schema/{ => validation}/samples_test.go (81%) diff --git a/cmd/skaffold/app/cmd/fix.go b/cmd/skaffold/app/cmd/fix.go index d9fc2b66f2d..39781f31492 100644 --- a/cmd/skaffold/app/cmd/fix.go +++ b/cmd/skaffold/app/cmd/fix.go @@ -25,6 +25,7 @@ import ( "github.com/spf13/cobra" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/validation" @@ -81,9 +82,12 @@ func fix(out io.Writer, configFile string, toVersion string, overwrite bool) err // TODO(dgageot): We should be able run validations on any schema version // but that's not the case. They can only run on the latest version for now. if toVersion == latestV1.Version { - var cfgs []*latestV1.SkaffoldConfig + var cfgs parser.SkaffoldConfigSet for _, cfg := range versionedCfgs { - cfgs = append(cfgs, cfg.(*latestV1.SkaffoldConfig)) + cfgs = append(cfgs, &parser.SkaffoldConfigEntry{ + SkaffoldConfig: cfg.(*latestV1.SkaffoldConfig), + SourceFile: configFile, + IsRootConfig: true}) } if err := validation.Process(cfgs); err != nil { return fmt.Errorf("validating upgraded config: %w", err) diff --git a/cmd/skaffold/app/cmd/runner.go b/cmd/skaffold/app/cmd/runner.go index ed14d87f102..6ba276a2bcb 100644 --- a/cmd/skaffold/app/cmd/runner.go +++ b/cmd/skaffold/app/cmd/runner.go @@ -73,16 +73,19 @@ func createNewRunner(out io.Writer, opts config.SkaffoldOptions) (runner.Runner, } func runContext(out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunContext, []*latestV1.SkaffoldConfig, error) { - configs, err := withFallbackConfig(out, opts, parser.GetAllConfigs) + cfgSet, err := withFallbackConfig(out, opts, parser.GetConfigSet) if err != nil { return nil, nil, err } - setDefaultDeployer(configs) + setDefaultDeployer(cfgSet) - if err := validation.Process(configs); err != nil { + if err := validation.Process(cfgSet); err != nil { return nil, nil, fmt.Errorf("invalid skaffold config: %w", err) } - + var configs []*latestV1.SkaffoldConfig + for _, cfg := range cfgSet { + configs = append(configs, cfg.SkaffoldConfig) + } runCtx, err := runcontext.GetRunContext(opts, configs) if err != nil { return nil, nil, fmt.Errorf("getting run context: %w", err) @@ -96,7 +99,7 @@ func runContext(out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunCont } // withFallbackConfig will try to automatically generate a config if root `skaffold.yaml` file does not exist. -func withFallbackConfig(out io.Writer, opts config.SkaffoldOptions, getCfgs func(opts config.SkaffoldOptions) ([]*latestV1.SkaffoldConfig, error)) ([]*latestV1.SkaffoldConfig, error) { +func withFallbackConfig(out io.Writer, opts config.SkaffoldOptions, getCfgs func(opts config.SkaffoldOptions) (parser.SkaffoldConfigSet, error)) (parser.SkaffoldConfigSet, error) { configs, err := getCfgs(opts) if err == nil { return configs, nil @@ -115,7 +118,9 @@ func withFallbackConfig(out io.Writer, opts config.SkaffoldOptions, getCfgs func defaults.Set(config) - return []*latestV1.SkaffoldConfig{config}, nil + return parser.SkaffoldConfigSet{ + &parser.SkaffoldConfigEntry{SkaffoldConfig: config, IsRootConfig: true}, + }, nil } return nil, fmt.Errorf("skaffold config file %s not found - check your current working directory, or try running `skaffold init`", opts.ConfigurationFile) @@ -128,13 +133,13 @@ func withFallbackConfig(out io.Writer, opts config.SkaffoldOptions, getCfgs func return nil, fmt.Errorf("parsing skaffold config: %w", err) } -func setDefaultDeployer(configs []*latestV1.SkaffoldConfig) { +func setDefaultDeployer(configs parser.SkaffoldConfigSet) { // do not set a default deployer in a multi-config application. if len(configs) > 1 { return } // there always exists at least one config - defaults.SetDefaultDeployer(configs[0]) + defaults.SetDefaultDeployer(configs[0].SkaffoldConfig) } func warnIfUpdateIsAvailable() { diff --git a/pkg/skaffold/schema/samples_test.go b/pkg/skaffold/schema/validation/samples_test.go similarity index 81% rename from pkg/skaffold/schema/samples_test.go rename to pkg/skaffold/schema/validation/samples_test.go index 50718952022..706589b9d85 100644 --- a/pkg/skaffold/schema/samples_test.go +++ b/pkg/skaffold/schema/validation/samples_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package schema +package validation import ( "bytes" @@ -24,16 +24,17 @@ import ( "strings" "testing" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/defaults" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/validation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/walk" "github.com/GoogleContainerTools/skaffold/testutil" ) const ( - samplesRoot = "../../../docs/content/en/samples" + samplesRoot = "../../../../docs/content/en/samples" ) var ( @@ -43,9 +44,9 @@ var ( // Test that every example can be parsed and produces a valid // Skaffold configuration. func TestParseExamples(t *testing.T) { - parseConfigFiles(t, "../../../examples") - parseConfigFiles(t, "../../../integration/examples") - parseConfigFiles(t, "../../../integration/testdata/regressions") + parseConfigFiles(t, "../../../../examples") + parseConfigFiles(t, "../../../../integration/examples") + parseConfigFiles(t, "../../../../integration/testdata/regressions") } // Samples are skaffold.yaml fragments that are used @@ -77,17 +78,17 @@ func TestParseSamples(t *testing.T) { func checkSkaffoldConfig(t *testutil.T, yaml []byte) { configFile := t.TempFile("skaffold.yaml", yaml) - parsed, err := ParseConfigAndUpgrade(configFile) + parsed, err := schema.ParseConfigAndUpgrade(configFile) t.CheckNoError(err) - var cfgs []*latestV1.SkaffoldConfig + var cfgs parser.SkaffoldConfigSet for _, p := range parsed { - cfg := p.(*latestV1.SkaffoldConfig) - err = defaults.Set(cfg) - defaults.SetDefaultDeployer(cfg) + cfg := &parser.SkaffoldConfigEntry{SkaffoldConfig: p.(*latestV1.SkaffoldConfig)} + err = defaults.Set(cfg.SkaffoldConfig) + defaults.SetDefaultDeployer(cfg.SkaffoldConfig) t.CheckNoError(err) cfgs = append(cfgs, cfg) } - err = validation.Process(cfgs) + err = Process(cfgs) t.CheckNoError(err) } diff --git a/pkg/skaffold/schema/validation/validation.go b/pkg/skaffold/schema/validation/validation.go index 1d4dceece5b..f63361172f9 100644 --- a/pkg/skaffold/schema/validation/validation.go +++ b/pkg/skaffold/schema/validation/validation.go @@ -18,7 +18,6 @@ package validation import ( "context" - "errors" "fmt" "reflect" "regexp" @@ -26,10 +25,12 @@ import ( "time" "github.com/docker/docker/api/types" + "github.com/pkg/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/misc" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" @@ -44,19 +45,21 @@ var ( ) // Process checks if the Skaffold pipeline is valid and returns all encountered errors as a concatenated string -func Process(configs []*latestV1.SkaffoldConfig) error { +func Process(configs parser.SkaffoldConfigSet) error { var errs = validateImageNames(configs) for _, config := range configs { - errs = append(errs, visitStructs(config, validateYamltags)...) - errs = append(errs, validateDockerNetworkMode(config.Build.Artifacts)...) - errs = append(errs, validateCustomDependencies(config.Build.Artifacts)...) - errs = append(errs, validateSyncRules(config.Build.Artifacts)...) - errs = append(errs, validatePortForwardResources(config.PortForward)...) - errs = append(errs, validateJibPluginTypes(config.Build.Artifacts)...) - errs = append(errs, validateLogPrefix(config.Deploy.Logs)...) - errs = append(errs, validateArtifactTypes(config.Build)...) - errs = append(errs, validateTaggingPolicy(config.Build)...) - errs = append(errs, validateCustomTest(config.Test)...) + var cfgErrs []error + cfgErrs = append(cfgErrs, visitStructs(config.SkaffoldConfig, validateYamltags)...) + cfgErrs = append(cfgErrs, validateDockerNetworkMode(config.Build.Artifacts)...) + cfgErrs = append(cfgErrs, validateCustomDependencies(config.Build.Artifacts)...) + cfgErrs = append(cfgErrs, validateSyncRules(config.Build.Artifacts)...) + cfgErrs = append(cfgErrs, validatePortForwardResources(config.PortForward)...) + cfgErrs = append(cfgErrs, validateJibPluginTypes(config.Build.Artifacts)...) + cfgErrs = append(cfgErrs, validateLogPrefix(config.Deploy.Logs)...) + cfgErrs = append(cfgErrs, validateArtifactTypes(config.Build)...) + cfgErrs = append(cfgErrs, validateTaggingPolicy(config.Build)...) + cfgErrs = append(cfgErrs, validateCustomTest(config.Test)...) + errs = append(errs, wrapWithContext(config, cfgErrs...)...) } errs = append(errs, validateArtifactDependencies(configs)...) errs = append(errs, validateSingleKubeContext(configs)...) @@ -100,35 +103,35 @@ func validateTaggingPolicy(bc latestV1.BuildConfig) (errs []error) { // validateImageNames makes sure the artifact image names are unique and valid base names, // without tags nor digests. -func validateImageNames(configs []*latestV1.SkaffoldConfig) (errs []error) { - seen := make(map[string]bool) +func validateImageNames(configs parser.SkaffoldConfigSet) (errs []error) { + seen := make(map[string]string) for _, c := range configs { for _, a := range c.Build.Artifacts { - if seen[a.ImageName] { - errs = append(errs, fmt.Errorf("found duplicate images %q: artifact image names must be unique across all configurations", a.ImageName)) + if prevSource, found := seen[a.ImageName]; found { + errs = append(errs, fmt.Errorf("duplicate image %q found in sources %s and %s: artifact image names must be unique across all configurations", a.ImageName, prevSource, c.SourceFile)) continue } - seen[a.ImageName] = true + seen[a.ImageName] = c.SourceFile parsed, err := docker.ParseReference(a.ImageName) if err != nil { - errs = append(errs, fmt.Errorf("invalid image %q: %w", a.ImageName, err)) + errs = append(errs, wrapWithContext(c, fmt.Errorf("invalid image %q: %w", a.ImageName, err))...) continue } if parsed.Tag != "" { - errs = append(errs, fmt.Errorf("invalid image %q: no tag should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/", a.ImageName)) + errs = append(errs, wrapWithContext(c, fmt.Errorf("invalid image %q: no tag should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/", a.ImageName))...) } if parsed.Digest != "" { - errs = append(errs, fmt.Errorf("invalid image %q: no digest should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/", a.ImageName)) + errs = append(errs, wrapWithContext(c, fmt.Errorf("invalid image %q: no digest should be specified. Use taggers instead: https://skaffold.dev/docs/how-tos/taggers/", a.ImageName))...) } } } return } -func validateArtifactDependencies(configs []*latestV1.SkaffoldConfig) (errs []error) { +func validateArtifactDependencies(configs parser.SkaffoldConfigSet) (errs []error) { var artifacts []*latestV1.Artifact for _, c := range configs { artifacts = append(artifacts, c.Build.Artifacts...) @@ -528,7 +531,7 @@ func validateLogPrefix(lc latestV1.LogsConfig) []error { return nil } -func validateSingleKubeContext(configs []*latestV1.SkaffoldConfig) []error { +func validateSingleKubeContext(configs parser.SkaffoldConfigSet) []error { if len(configs) < 2 { return nil } @@ -565,3 +568,16 @@ func validateCustomTest(tcs []*latestV1.TestCase) (errs []error) { } return } + +func wrapWithContext(config *parser.SkaffoldConfigEntry, errs ...error) []error { + var id string + if config.Metadata.Name != "" { + id = fmt.Sprintf("module %q", config.Metadata.Name) + } else { + id = fmt.Sprintf("unnamed config at index %d", config.SourceIndex) + } + for i := range errs { + errs[i] = errors.Wrapf(errs[i], "source: %s, %s", config.SourceFile, id) + } + return errs +} diff --git a/pkg/skaffold/schema/validation/validation_test.go b/pkg/skaffold/schema/validation/validation_test.go index 5690ffc6215..956847f0b64 100644 --- a/pkg/skaffold/schema/validation/validation_test.go +++ b/pkg/skaffold/schema/validation/validation_test.go @@ -27,6 +27,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" @@ -89,7 +90,7 @@ func TestValidateSchema(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - err := Process([]*latestV1.SkaffoldConfig{test.cfg}) + err := Process(parser.SkaffoldConfigSet{&parser.SkaffoldConfigEntry{SkaffoldConfig: test.cfg}}) t.CheckError(test.shouldErr, err) }) @@ -503,14 +504,14 @@ func TestValidateNetworkMode(t *testing.T) { t.Override(&validateYamltags, func(interface{}) error { return nil }) t.Override(&util.OSEnviron, func() []string { return test.env }) - err := Process( - []*latestV1.SkaffoldConfig{{ + err := Process(parser.SkaffoldConfigSet{&parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ Pipeline: latestV1.Pipeline{ Build: latestV1.BuildConfig{ Artifacts: test.artifacts, }, }, - }}) + }}}) t.CheckError(test.shouldErr, err) }) @@ -804,14 +805,14 @@ func TestValidateSyncRules(t *testing.T) { // disable yamltags validation t.Override(&validateYamltags, func(interface{}) error { return nil }) - err := Process( - []*latestV1.SkaffoldConfig{{ + err := Process(parser.SkaffoldConfigSet{&parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ Pipeline: latestV1.Pipeline{ Build: latestV1.BuildConfig{ Artifacts: test.artifacts, }, }, - }}) + }}}) t.CheckError(test.shouldErr, err) }) @@ -959,13 +960,17 @@ func TestValidateImageNames(t *testing.T) { t.Override(&validateYamltags, func(interface{}) error { return nil }) err := Process( - []*latestV1.SkaffoldConfig{{ - Pipeline: latestV1.Pipeline{ - Build: latestV1.BuildConfig{ - Artifacts: test.artifacts, + parser.SkaffoldConfigSet{ + &parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ + Pipeline: latestV1.Pipeline{ + Build: latestV1.BuildConfig{ + Artifacts: test.artifacts, + }, + }, }, }, - }}) + }) t.CheckError(test.shouldErr, err) }) @@ -1061,14 +1066,15 @@ func TestValidateJibPluginType(t *testing.T) { // disable yamltags validation t.Override(&validateYamltags, func(interface{}) error { return nil }) - err := Process( - []*latestV1.SkaffoldConfig{{ + err := Process(parser.SkaffoldConfigSet{&parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ Pipeline: latestV1.Pipeline{ Build: latestV1.BuildConfig{ Artifacts: test.artifacts, }, }, - }}) + }, + }}) t.CheckError(test.shouldErr, err) }) @@ -1093,8 +1099,8 @@ func TestValidateLogsConfig(t *testing.T) { // disable yamltags validation t.Override(&validateYamltags, func(interface{}) error { return nil }) - err := Process( - []*latestV1.SkaffoldConfig{{ + err := Process(parser.SkaffoldConfigSet{&parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ Pipeline: latestV1.Pipeline{ Deploy: latestV1.DeployConfig{ Logs: latestV1.LogsConfig{ @@ -1102,7 +1108,7 @@ func TestValidateLogsConfig(t *testing.T) { }, }, }, - }}) + }}}) t.CheckError(test.shouldErr, err) }) @@ -1205,23 +1211,25 @@ func setDependencies(a []*latestV1.Artifact, d map[int][]int) { } func TestValidateUniqueDependencyAliases(t *testing.T) { - cfgs := []*latestV1.SkaffoldConfig{ - { - Pipeline: latestV1.Pipeline{ - Build: latestV1.BuildConfig{ - Artifacts: []*latestV1.Artifact{ - { - ImageName: "artifact1", - Dependencies: []*latestV1.ArtifactDependency{ - {Alias: "alias2", ImageName: "artifact2a"}, - {Alias: "alias2", ImageName: "artifact2b"}, + cfgs := parser.SkaffoldConfigSet{ + &parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ + Pipeline: latestV1.Pipeline{ + Build: latestV1.BuildConfig{ + Artifacts: []*latestV1.Artifact{ + { + ImageName: "artifact1", + Dependencies: []*latestV1.ArtifactDependency{ + {Alias: "alias2", ImageName: "artifact2a"}, + {Alias: "alias2", ImageName: "artifact2b"}, + }, }, - }, - { - ImageName: "artifact2", - Dependencies: []*latestV1.ArtifactDependency{ - {Alias: "alias1", ImageName: "artifact1"}, - {Alias: "alias2", ImageName: "artifact1"}, + { + ImageName: "artifact2", + Dependencies: []*latestV1.ArtifactDependency{ + {Alias: "alias1", ImageName: "artifact1"}, + {Alias: "alias2", ImageName: "artifact1"}, + }, }, }, }, @@ -1301,66 +1309,71 @@ func TestValidateSingleKubeContext(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - errs := validateSingleKubeContext(test.configs) + set := parser.SkaffoldConfigSet{} + for _, c := range test.configs { + set = append(set, &parser.SkaffoldConfigEntry{SkaffoldConfig: c}) + } + errs := validateSingleKubeContext(set) t.CheckDeepEqual(test.err, errs, cmp.Comparer(errorsComparer)) }) } } func TestValidateValidDependencyAliases(t *testing.T) { - cfgs := []*latestV1.SkaffoldConfig{ - { - Pipeline: latestV1.Pipeline{ - Build: latestV1.BuildConfig{ - Artifacts: []*latestV1.Artifact{ - { - ImageName: "artifact1", - }, - { - ImageName: "artifact2", - ArtifactType: latestV1.ArtifactType{ - DockerArtifact: &latestV1.DockerArtifact{}, + cfgs := parser.SkaffoldConfigSet{ + &parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ + Pipeline: latestV1.Pipeline{ + Build: latestV1.BuildConfig{ + Artifacts: []*latestV1.Artifact{ + { + ImageName: "artifact1", }, - Dependencies: []*latestV1.ArtifactDependency{ - {Alias: "ARTIFACT_1", ImageName: "artifact1"}, - {Alias: "1_ARTIFACT", ImageName: "artifact1"}, + { + ImageName: "artifact2", + ArtifactType: latestV1.ArtifactType{ + DockerArtifact: &latestV1.DockerArtifact{}, + }, + Dependencies: []*latestV1.ArtifactDependency{ + {Alias: "ARTIFACT_1", ImageName: "artifact1"}, + {Alias: "1_ARTIFACT", ImageName: "artifact1"}, + }, }, - }, - { - ImageName: "artifact3", - ArtifactType: latestV1.ArtifactType{ - DockerArtifact: &latestV1.DockerArtifact{}, - }, - Dependencies: []*latestV1.ArtifactDependency{ - {Alias: "artifact!", ImageName: "artifact1"}, - {Alias: "artifact#1", ImageName: "artifact1"}, + { + ImageName: "artifact3", + ArtifactType: latestV1.ArtifactType{ + DockerArtifact: &latestV1.DockerArtifact{}, + }, + Dependencies: []*latestV1.ArtifactDependency{ + {Alias: "artifact!", ImageName: "artifact1"}, + {Alias: "artifact#1", ImageName: "artifact1"}, + }, }, - }, - { - ImageName: "artifact4", - ArtifactType: latestV1.ArtifactType{ - CustomArtifact: &latestV1.CustomArtifact{}, + { + ImageName: "artifact4", + ArtifactType: latestV1.ArtifactType{ + CustomArtifact: &latestV1.CustomArtifact{}, + }, + Dependencies: []*latestV1.ArtifactDependency{ + {Alias: "alias1", ImageName: "artifact1"}, + {Alias: "alias2", ImageName: "artifact2"}, + }, }, - Dependencies: []*latestV1.ArtifactDependency{ - {Alias: "alias1", ImageName: "artifact1"}, - {Alias: "alias2", ImageName: "artifact2"}, - }, - }, - { - ImageName: "artifact5", - ArtifactType: latestV1.ArtifactType{ - BuildpackArtifact: &latestV1.BuildpackArtifact{}, - }, - Dependencies: []*latestV1.ArtifactDependency{ - {Alias: "artifact!", ImageName: "artifact1"}, - {Alias: "artifact#1", ImageName: "artifact1"}, + { + ImageName: "artifact5", + ArtifactType: latestV1.ArtifactType{ + BuildpackArtifact: &latestV1.BuildpackArtifact{}, + }, + Dependencies: []*latestV1.ArtifactDependency{ + {Alias: "artifact!", ImageName: "artifact1"}, + {Alias: "artifact#1", ImageName: "artifact1"}, + }, }, }, }, }, }, - }, - } + }} expected := []error{ fmt.Errorf(`invalid build dependency for artifact "artifact2": alias "1_ARTIFACT" doesn't match required pattern %q`, dependencyAliasPattern), fmt.Errorf(`invalid build dependency for artifact "artifact3": alias "artifact!" doesn't match required pattern %q`, dependencyAliasPattern), @@ -1420,12 +1433,15 @@ func TestValidateTaggingPolicy(t *testing.T) { // disable yamltags validation t.Override(&validateYamltags, func(interface{}) error { return nil }) - err := Process( - []*latestV1.SkaffoldConfig{{ - Pipeline: latestV1.Pipeline{ - Build: test.cfg, + err := Process(parser.SkaffoldConfigSet{ + &parser.SkaffoldConfigEntry{ + SkaffoldConfig: &latestV1.SkaffoldConfig{ + Pipeline: latestV1.Pipeline{ + Build: test.cfg, + }, }, - }}) + }, + }) t.CheckError(test.shouldErr, err) }) From 044c65fddcd0dcaaacca35c08391d1a8beb4dd1e Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Mon, 28 Jun 2021 23:46:39 +0530 Subject: [PATCH 023/103] fix: port-forward for multi-config projects (#6090) --- pkg/skaffold/access/provider.go | 51 ++++++++----------- pkg/skaffold/deploy/helm/deploy.go | 4 +- pkg/skaffold/deploy/helm/helm_test.go | 11 ++-- pkg/skaffold/deploy/kpt/kpt.go | 4 +- pkg/skaffold/deploy/kpt/kpt_test.go | 9 ++-- pkg/skaffold/deploy/kubectl/cli.go | 2 + pkg/skaffold/deploy/kubectl/kubectl.go | 2 +- pkg/skaffold/deploy/kubectl/kubectl_test.go | 15 +++--- pkg/skaffold/deploy/kustomize/kustomize.go | 2 +- .../deploy/kustomize/kustomize_test.go | 11 ++-- .../portforward/forwarder_manager.go | 2 + pkg/skaffold/runner/v1/new.go | 2 +- 12 files changed, 59 insertions(+), 56 deletions(-) diff --git a/pkg/skaffold/access/provider.go b/pkg/skaffold/access/provider.go index 82b3685a06a..9ddec163ee3 100644 --- a/pkg/skaffold/access/provider.go +++ b/pkg/skaffold/access/provider.go @@ -17,8 +17,6 @@ limitations under the License. package access import ( - "sync" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" @@ -26,41 +24,34 @@ import ( ) type Provider interface { - GetKubernetesAccessor(*kubernetes.ImageList) Accessor + GetKubernetesAccessor(portforward.Config, *kubernetes.ImageList) Accessor GetNoopAccessor() Accessor } type fullProvider struct { - kubernetesAccessor func(*kubernetes.ImageList) Accessor + label label.Config + k8sAccessor map[string]Accessor } -var ( - provider *fullProvider - once sync.Once -) - -func NewAccessorProvider(config portforward.Config, labelConfig label.Config, cli *kubectl.CLI) Provider { - once.Do(func() { - provider = &fullProvider{ - kubernetesAccessor: func(podSelector *kubernetes.ImageList) Accessor { - if !config.PortForwardOptions().Enabled() { - return &NoopAccessor{} - } - - return portforward.NewForwarderManager(cli, - podSelector, - labelConfig.RunIDSelector(), - config.Mode(), - config.PortForwardOptions(), - config.PortForwardResources()) - }, - } - }) - return provider +func NewAccessorProvider(labelConfig label.Config) Provider { + return &fullProvider{label: labelConfig, k8sAccessor: make(map[string]Accessor)} } -func (p *fullProvider) GetKubernetesAccessor(s *kubernetes.ImageList) Accessor { - return p.kubernetesAccessor(s) +func (p *fullProvider) GetKubernetesAccessor(config portforward.Config, podSelector *kubernetes.ImageList) Accessor { + if !config.PortForwardOptions().Enabled() { + return &NoopAccessor{} + } + context := config.GetKubeContext() + + if p.k8sAccessor[context] == nil { + p.k8sAccessor[context] = portforward.NewForwarderManager(kubectl.NewCLI(config, ""), + podSelector, + p.label.RunIDSelector(), + config.Mode(), + config.PortForwardOptions(), + config.PortForwardResources()) + } + return p.k8sAccessor[context] } func (p *fullProvider) GetNoopAccessor() Accessor { @@ -70,7 +61,7 @@ func (p *fullProvider) GetNoopAccessor() Accessor { // NoopProvider is used in tests type NoopProvider struct{} -func (p *NoopProvider) GetKubernetesAccessor(_ *kubernetes.ImageList) Accessor { +func (p *NoopProvider) GetKubernetesAccessor(_ portforward.Config, _ *kubernetes.ImageList) Accessor { return &NoopAccessor{} } diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index 87656ddaf4b..ee3bff77515 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -49,6 +49,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" @@ -112,6 +113,7 @@ type Deployer struct { type Config interface { kubectl.Config kstatus.Config + portforward.Config IsMultiConfig() bool } @@ -140,7 +142,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component return &Deployer{ HelmDeploy: h, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(podSelector), + accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index e3eca33e4bb..74d54ccc822 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -1539,11 +1539,12 @@ type helmConfig struct { configFile string } -func (c *helmConfig) ForceDeploy() bool { return c.force } -func (c *helmConfig) GetKubeConfig() string { return kubectl.TestKubeConfig } -func (c *helmConfig) GetKubeContext() string { return kubectl.TestKubeContext } -func (c *helmConfig) GetKubeNamespace() string { return c.namespace } -func (c *helmConfig) ConfigurationFile() string { return c.configFile } +func (c *helmConfig) ForceDeploy() bool { return c.force } +func (c *helmConfig) GetKubeConfig() string { return kubectl.TestKubeConfig } +func (c *helmConfig) GetKubeContext() string { return kubectl.TestKubeContext } +func (c *helmConfig) GetKubeNamespace() string { return c.namespace } +func (c *helmConfig) ConfigurationFile() string { return c.configFile } +func (c *helmConfig) PortForwardResources() []*latestV1.PortForwardResource { return nil } // helmReleaseInfo returns the result of `helm --namespace get all ` with the given KRM manifest. func helmReleaseInfo(namespace, manifest string) string { diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index a8d4fb3ba94..90ffdd38017 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -44,6 +44,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" @@ -94,6 +95,7 @@ type Deployer struct { type Config interface { kubectl.Config kstatus.Config + portforward.Config } // NewDeployer generates a new Deployer object contains the kptDeploy schema. @@ -102,7 +104,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component return &Deployer{ KptDeploy: d, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(podSelector), + accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), diff --git a/pkg/skaffold/deploy/kpt/kpt_test.go b/pkg/skaffold/deploy/kpt/kpt_test.go index f2ae3a8e165..3d2302a9b1b 100644 --- a/pkg/skaffold/deploy/kpt/kpt_test.go +++ b/pkg/skaffold/deploy/kpt/kpt_test.go @@ -1190,7 +1190,8 @@ type kptConfig struct { config string } -func (c *kptConfig) WorkingDir() string { return c.workingDir } -func (c *kptConfig) GetKubeContext() string { return kubectl.TestKubeContext } -func (c *kptConfig) GetKubeNamespace() string { return kubectl.TestNamespace } -func (c *kptConfig) GetKubeConfig() string { return c.config } +func (c *kptConfig) WorkingDir() string { return c.workingDir } +func (c *kptConfig) GetKubeContext() string { return kubectl.TestKubeContext } +func (c *kptConfig) GetKubeNamespace() string { return kubectl.TestNamespace } +func (c *kptConfig) GetKubeConfig() string { return c.config } +func (c *kptConfig) PortForwardResources() []*latestV1.PortForwardResource { return nil } diff --git a/pkg/skaffold/deploy/kubectl/cli.go b/pkg/skaffold/deploy/kubectl/cli.go index 2adccc37436..84e31d8b021 100644 --- a/pkg/skaffold/deploy/kubectl/cli.go +++ b/pkg/skaffold/deploy/kubectl/cli.go @@ -32,6 +32,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" ) @@ -49,6 +50,7 @@ type CLI struct { type Config interface { kubectl.Config kstatus.Config + portforward.Config deploy.Config ForceDeploy() bool WaitForDeletions() config.WaitForDeletions diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index d0668a8c0b4..7e1bdb6c995 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -87,7 +87,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component return &Deployer{ KubectlDeploy: d, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(podSelector), + accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), diff --git a/pkg/skaffold/deploy/kubectl/kubectl_test.go b/pkg/skaffold/deploy/kubectl/kubectl_test.go index 30d73b6af24..8747d91c05a 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl_test.go +++ b/pkg/skaffold/deploy/kubectl/kubectl_test.go @@ -739,10 +739,11 @@ type kubectlConfig struct { waitForDeletions config.WaitForDeletions } -func (c *kubectlConfig) GetKubeContext() string { return "kubecontext" } -func (c *kubectlConfig) GetKubeNamespace() string { return c.Opts.Namespace } -func (c *kubectlConfig) WorkingDir() string { return c.workingDir } -func (c *kubectlConfig) SkipRender() bool { return c.skipRender } -func (c *kubectlConfig) ForceDeploy() bool { return c.force } -func (c *kubectlConfig) DefaultRepo() *string { return &c.defaultRepo } -func (c *kubectlConfig) WaitForDeletions() config.WaitForDeletions { return c.waitForDeletions } +func (c *kubectlConfig) GetKubeContext() string { return "kubecontext" } +func (c *kubectlConfig) GetKubeNamespace() string { return c.Opts.Namespace } +func (c *kubectlConfig) WorkingDir() string { return c.workingDir } +func (c *kubectlConfig) SkipRender() bool { return c.skipRender } +func (c *kubectlConfig) ForceDeploy() bool { return c.force } +func (c *kubectlConfig) DefaultRepo() *string { return &c.defaultRepo } +func (c *kubectlConfig) WaitForDeletions() config.WaitForDeletions { return c.waitForDeletions } +func (c *kubectlConfig) PortForwardResources() []*latestV1.PortForwardResource { return nil } diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index 847690128b3..1235a4e8dd5 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -136,7 +136,7 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C return &Deployer{ KustomizeDeploy: d, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(podSelector), + accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), diff --git a/pkg/skaffold/deploy/kustomize/kustomize_test.go b/pkg/skaffold/deploy/kustomize/kustomize_test.go index 91280ed2e2e..81df97be3e2 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize_test.go +++ b/pkg/skaffold/deploy/kustomize/kustomize_test.go @@ -719,8 +719,9 @@ type kustomizeConfig struct { waitForDeletions config.WaitForDeletions } -func (c *kustomizeConfig) ForceDeploy() bool { return c.force } -func (c *kustomizeConfig) WaitForDeletions() config.WaitForDeletions { return c.waitForDeletions } -func (c *kustomizeConfig) WorkingDir() string { return c.workingDir } -func (c *kustomizeConfig) GetKubeContext() string { return kubectl.TestKubeContext } -func (c *kustomizeConfig) GetKubeNamespace() string { return c.Opts.Namespace } +func (c *kustomizeConfig) ForceDeploy() bool { return c.force } +func (c *kustomizeConfig) WaitForDeletions() config.WaitForDeletions { return c.waitForDeletions } +func (c *kustomizeConfig) WorkingDir() string { return c.workingDir } +func (c *kustomizeConfig) GetKubeContext() string { return kubectl.TestKubeContext } +func (c *kustomizeConfig) GetKubeNamespace() string { return c.Opts.Namespace } +func (c *kustomizeConfig) PortForwardResources() []*latestV1.PortForwardResource { return nil } diff --git a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go index 571f0271500..ea368556845 100644 --- a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go +++ b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go @@ -35,6 +35,8 @@ import ( ) type Config interface { + kubectl.Config + Mode() config.RunMode PortForwardResources() []*latestV1.PortForwardResource PortForwardOptions() config.PortForwardOptions diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index 2386013bb90..9bb3c6a5577 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -86,7 +86,7 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { var deployer deploy.Deployer provider := deploy.ComponentProvider{ - Accessor: access.NewAccessorProvider(runCtx, labeller, kubectlCLI), + Accessor: access.NewAccessorProvider(labeller), Debugger: debug.NewDebugProvider(runCtx), Logger: log.NewLogProvider(runCtx, kubectlCLI), Monitor: status.NewMonitorProvider(labeller), From 3c4efbac361610aa03f4a2cfe6d47ff763833171 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Mon, 28 Jun 2021 15:19:30 -0700 Subject: [PATCH 024/103] Fix instructions to add actionable error codes. (#6094) Instructions pointed changing `skaffold.proto`. Updated them to add codes in `enums.proto` --- DEVELOPMENT.md | 52 ++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index c545349be00..e9215cd0f18 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -111,15 +111,15 @@ Also, [v1.19.0](https://github.com/GoogleContainerTools/skaffold/releases/tag/v1 To take advantage of this framework, contributors can simply use the [`ErrDef`](https://github.com/GoogleContainerTools/skaffold/blob/master/pkg/skaffold/errors/err_def.go#L32) struct to throw meaningful actionable error messages and improve user experience. -e.g In this example [PR](https://github.com/GoogleContainerTools/skaffold/pull/5273), -1. The contributor created 3 distinct error codes in [skaffold.proto](https://github.com/GoogleContainerTools/skaffold/pull/5088/files#diff-3883fe4549a47ae73a7a3a0afc00896b197d5ba8570906ba423769cf5a93a26f) +e.g In this example [PR](https://github.com/GoogleContainerTools/skaffold/pull/5953), +1. The contributor created distinct error codes in [enums.proto](https://github.com/GoogleContainerTools/skaffold/commit/59edbda57ae7d2f5d0b53c075497bca480f555f5#diff-b9c28b2c93efad2841c587b3e93d2d83722c9ae26f5f9c961f87e1ca716b0e69R388) ``` - // Docker build error when listing containers. - INIT_DOCKER_NETWORK_LISTING_CONTAINERS = 122; - // Docker build error indicating an invalid container name (or id). - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME = 123; - // Docker build error indicating the container referenced does not exists in the docker context used. - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST = 124 + // The Kptfile cannot be created via `kpt pkg init`. + RENDER_KPTFILE_INIT_ERR = 1501; + // The Kptfile is not a valid yaml file + RENDER_KPTFILE_INVALID_YAML_ERR = 1401; + // The Kptfile is not a valid API schema + RENDER_KPTFILE_INVALID_SCHEMA_ERR = 1402; ``` The `INIT` in this case stands for skaffold `INIT` phase which includes, parsing of skaffold config and creating a skaffold runner. The other valid phases are `BUILD`, `DEPLOY`, `STATUSCHECK`. Complete list [here](https://skaffold.dev/docs/references/api/grpc/#statuscode) @@ -128,31 +128,33 @@ e.g In this example [PR](https://github.com/GoogleContainerTools/skaffold/pull/5 git status modified: docs/content/en/api/skaffold.swagger.json modified: docs/content/en/docs/references/api/grpc.md - modified: proto/skaffold.pb.go - modified: proto/skaffold.proto + modified: proto/enums/enums.pb.go + modified: proto/enums/enums.proto ``` -3. The contributor then used these error codes when creating an error in their [proposed code change](https://github.com/GoogleContainerTools/skaffold/pull/5088/files#diff-3fc5246574bf7367a232c6d682b22a4e22795d52eb1c81fe2c27ff052939d507R220). - They used the constructor `sErrors.NewError` in [pkg/skaffold/errors](https://github.com/GoogleContainerTools/skaffold/blob/54466ff6983e9fcf977d6e549119b4c1c4dc9e2b/pkg/skaffold/errors/err_def.go#L57) to inantiate an object of struct `ErrDef`. +3. The contributor then used these error codes when creating an error in their [proposed code change](https://github.com/GoogleContainerTools/skaffold/pull/5953/files#diff-4d18270998dbca6b8378ad2e7720a797044d1357d2c5a7a61f2af56b9f2d1a5dR152). + They used the constructor `sErrors.NewErrorWithStatusCode` in [pkg/skaffold/errors](https://github.com/GoogleContainerTools/skaffold/blob/54466ff6983e9fcf977d6e549119b4c1c4dc9e2b/pkg/skaffold/errors/err_def.go#L65) to instantiate an object of struct `ErrDef`. `ErrDef` implements the golang `error` interface. ``` - err := sErrors.NewError(fmt.Errorf(errMsg), - proto.ActionableErr{ - Message: errMsg, - ErrCode: proto.StatusCode_INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME, - Suggestions: []*proto.Suggestion{ - { - SuggestionCode: proto.SuggestionCode_FIX_DOCKER_NETWORK_CONTAINER_NAME, - Action: "Please fix the docker network container name and try again", - }, - }, - })) + err := sErrors.NewErrorWithStatusCode( + proto.ActionableErr{ + Message: fmt.Sprintf("unsupported validator %q", c.Name), + ErrCode: proto.StatusCode_CONFIG_UNKNOWN_VALIDATOR, + Suggestions: []*proto.Suggestion{ + { + SuggestionCode: proto.SuggestionCode_CONFIG_ALLOWLIST_VALIDATORS, + Action: fmt.Sprintf( + "please only use the following validators in skaffold-managed mode: %v. "+ + "to use custom validators, please use kpt-managed mode.", AllowlistedValidators), + }, + }, + }) ``` With above two changes, skaffold will now show a meaning full error message when this error condition is met. ```shell script skaffold dev -invalid skaffold config: container 'does-not-exits' not found, required by image 'skaffold-example' for docker network stack sharing. -Please fix the docker network container name and try again. +unsupported validator "foo" please only use the following validators in skaffold-managed mode: [kubeval]. +To use custom validators, please use kpt-managed mode. ``` ## Building skaffold From 7b496d2d137d2b3a8d1d1bff17bfc68336044b12 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Mon, 28 Jun 2021 18:57:25 -0400 Subject: [PATCH 025/103] Escape parentheses in shJoin (#6101) --- pkg/skaffold/debug/transform.go | 2 +- pkg/skaffold/debug/transform_test.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/skaffold/debug/transform.go b/pkg/skaffold/debug/transform.go index eb57d5c0212..ab53e1a5be9 100644 --- a/pkg/skaffold/debug/transform.go +++ b/pkg/skaffold/debug/transform.go @@ -527,7 +527,7 @@ func shJoin(args []string) string { if i > 0 { result += " " } - if strings.ContainsAny(arg, " \t\r\n\"") { + if strings.ContainsAny(arg, " \t\r\n\"'()[]{}") { arg := strings.ReplaceAll(arg, `"`, `\"`) result += `"` + arg + `"` } else { diff --git a/pkg/skaffold/debug/transform_test.go b/pkg/skaffold/debug/transform_test.go index 6726240f4e2..7086ab2e65a 100644 --- a/pkg/skaffold/debug/transform_test.go +++ b/pkg/skaffold/debug/transform_test.go @@ -202,6 +202,11 @@ func TestShJoin(t *testing.T) { {[]string{`a"b`}, `"a\"b"`}, {[]string{`a"b`}, `"a\"b"`}, {[]string{"a", `a"b`, "b c"}, `a "a\"b" "b c"`}, + {[]string{"a", "b'c'd"}, `a "b'c'd"`}, + {[]string{"a", "b()"}, `a "b()"`}, + {[]string{"a", "b[]"}, `a "b[]"`}, + {[]string{"a", "b{}"}, `a "b{}"`}, + {[]string{"a", "$PORT", "${PORT}", "a ${PORT} and $PORT"}, `a $PORT "${PORT}" "a ${PORT} and $PORT"`}, } for _, test := range tests { testutil.Run(t, strings.Join(test.in, " "), func(t *testutil.T) { From d9fc77194366858aa03fa0c9722cf3804b8e3061 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Mon, 28 Jun 2021 23:28:50 -0700 Subject: [PATCH 026/103] fetch and set up secret for skaffold-metrics project (#6104) --- deploy/setup-secret.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy/setup-secret.sh b/deploy/setup-secret.sh index cca26537975..cf814a1487b 100755 --- a/deploy/setup-secret.sh +++ b/deploy/setup-secret.sh @@ -17,6 +17,7 @@ set -x # set default project id PROJECT_ID="k8s-skaffold" +METRICS_PROJECT_ID="skaffold-metrics" KEY_FILE="./secrets/keys.json" BUCKET_ID="k8s-skaffold-secrets" LATEST_GCS_PATH="keys.json" @@ -30,7 +31,7 @@ done function download_existing_key() { # Download a valid key created within the past two weeks. - KEY_IDS=$(gcloud iam service-accounts keys list --iam-account=metrics-writer@k8s-skaffold.iam.gserviceaccount.com --project=k8s-skaffold --managed-by=user --filter="validAfterTime>-P2W" --format="value(name)") + KEY_IDS=$(gcloud iam service-accounts keys list --iam-account=metrics-writer@${METRICS_PROJECT_ID}.iam.gserviceaccount.com --project=${METRICS_PROJECT_ID} --managed-by=user --format="value(name)") while read -r KEY_ID do if gsutil cp gs://${BUCKET_ID}/${KEY_ID}.json ${KEY_FILE}; then @@ -43,14 +44,14 @@ function download_existing_key() { function upload_new_key() { echo "Creating new service account key..." - gcloud iam service-accounts keys create ${KEY_FILE} --iam-account=metrics-writer@${PROJECT_ID}.iam.gserviceaccount.com --project=${PROJECT_ID} + gcloud iam service-accounts keys create ${KEY_FILE} --iam-account=metrics-writer@${METRICS_PROJECT_ID}.iam.gserviceaccount.com --project=${METRICS_PROJECT_ID} retVal=$? if [ $retVal -ne 0 ]; then echo "No key created." return 1 fi echo "New service account key created." - KEY_ID=$(gcloud iam service-accounts keys list --iam-account=metrics-writer@k8s-skaffold.iam.gserviceaccount.com --project=k8s-skaffold --managed-by=user --filter="validAfterTime.date('%Y-%m-%d', Z) = `date +%F`" --format="value(name)" --limit=1) + KEY_ID=$(gcloud iam service-accounts keys list --iam-account=metrics-writer@${METRICS_PROJECT_ID}.iam.gserviceaccount.com --project=${METRICS_PROJECT_ID} --managed-by=user --format="value(name)" --limit=1) gsutil cp ${KEY_FILE} gs://${BUCKET_ID}/${KEY_ID}.json gsutil cp ${KEY_FILE} gs://${BUCKET_ID}/${LATEST_GCS_PATH} echo "New service account key uploaded to GCS." From b18a8fd557ae538b7602b383af954a76e5429c99 Mon Sep 17 00:00:00 2001 From: Kaan Karakaya Date: Tue, 29 Jun 2021 16:31:50 +0300 Subject: [PATCH 027/103] Fix typo in executed file name (#6105) --- DEVELOPMENT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index e9215cd0f18..d519ea3c8e0 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -123,7 +123,7 @@ e.g In this example [PR](https://github.com/GoogleContainerTools/skaffold/pull/5 ``` The `INIT` in this case stands for skaffold `INIT` phase which includes, parsing of skaffold config and creating a skaffold runner. The other valid phases are `BUILD`, `DEPLOY`, `STATUSCHECK`. Complete list [here](https://skaffold.dev/docs/references/api/grpc/#statuscode) -2. Run `hack/generate_proto.sh`. These will generate go code and structs for the newly added proto fields. +2. Run `hack/generate-proto.sh`. These will generate go code and structs for the newly added proto fields. ```shell script git status modified: docs/content/en/api/skaffold.swagger.json From 5926b5a1d035c601c8bda70998cacbbe4677c690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Petr=C3=B3?= Date: Tue, 29 Jun 2021 15:50:32 +0200 Subject: [PATCH 028/103] Add node selector option for building image on k8s cluster with Kaniko (#6083) --- docs/content/en/schemas/v2beta18.json | 10 ++++++++++ pkg/skaffold/build/cluster/pod.go | 5 +++++ pkg/skaffold/build/cluster/pod_test.go | 2 ++ pkg/skaffold/schema/latest/v1/config.go | 3 +++ 4 files changed, 20 insertions(+) diff --git a/docs/content/en/schemas/v2beta18.json b/docs/content/en/schemas/v2beta18.json index 0c2d938a302..e13efebe141 100755 --- a/docs/content/en/schemas/v2beta18.json +++ b/docs/content/en/schemas/v2beta18.json @@ -748,6 +748,15 @@ "description": "Kubernetes namespace. Defaults to current namespace in Kubernetes configuration.", "x-intellij-html-description": "Kubernetes namespace. Defaults to current namespace in Kubernetes configuration." }, + "nodeSelector": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "describes the Kubernetes node selector for the pod.", + "x-intellij-html-description": "describes the Kubernetes node selector for the pod.", + "default": "{}" + }, "pullSecretMountPath": { "type": "string", "description": "path the pull secret will be mounted at within the running container.", @@ -822,6 +831,7 @@ "dockerConfig", "serviceAccount", "tolerations", + "nodeSelector", "annotations", "runAsUser", "resources", diff --git a/pkg/skaffold/build/cluster/pod.go b/pkg/skaffold/build/cluster/pod.go index 2aa7d32d93c..2773a5f9ac9 100644 --- a/pkg/skaffold/build/cluster/pod.go +++ b/pkg/skaffold/build/cluster/pod.go @@ -109,6 +109,11 @@ func (b *Builder) kanikoPodSpec(artifact *latestV1.KanikoArtifact, tag string) ( pod.Spec.Tolerations = b.ClusterDetails.Tolerations } + // Add nodeSelector for kaniko pod setup + if b.ClusterDetails.NodeSelector != nil { + pod.Spec.NodeSelector = b.ClusterDetails.NodeSelector + } + // Add used-defines Volumes pod.Spec.Volumes = append(pod.Spec.Volumes, b.Volumes...) diff --git a/pkg/skaffold/build/cluster/pod_test.go b/pkg/skaffold/build/cluster/pod_test.go index 7bc72939e7a..ab0b636ff69 100644 --- a/pkg/skaffold/build/cluster/pod_test.go +++ b/pkg/skaffold/build/cluster/pod_test.go @@ -238,6 +238,7 @@ func TestKanikoPodSpec(t *testing.T) { TolerationSeconds: nil, }, }, + NodeSelector: map[string]string{"kubernetes.io/os": "linux"}, }, } pod, _ := builder.kanikoPodSpec(artifact, "tag") @@ -377,6 +378,7 @@ func TestKanikoPodSpec(t *testing.T) { TolerationSeconds: nil, }, }, + NodeSelector: map[string]string{"kubernetes.io/os": "linux"}, }, } diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index a49443f6ede..829138f91bd 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -411,6 +411,9 @@ type ClusterDetails struct { // Tolerations describes the Kubernetes tolerations for the pod. Tolerations []v1.Toleration `yaml:"tolerations,omitempty"` + // NodeSelector describes the Kubernetes node selector for the pod. + NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` + // Annotations describes the Kubernetes annotations for the pod. Annotations map[string]string `yaml:"annotations,omitempty"` From a66f86927c4f3b26544c2d40ee1802bac0efc932 Mon Sep 17 00:00:00 2001 From: Aaron Prindle Date: Tue, 29 Jun 2021 11:45:34 -0700 Subject: [PATCH 029/103] WIP render should validate manifests exist (#6043) --- cmd/skaffold/app/cmd/fix.go | 2 +- cmd/skaffold/app/cmd/runner.go | 2 +- cmd/skaffold/app/cmd/runner_test.go | 2 + docs/content/en/api/skaffold.swagger.json | 45 +- docs/content/en/docs/references/api/grpc.md | 2 + .../schema/validation/samples_test.go | 2 +- pkg/skaffold/schema/validation/validation.go | 61 ++- .../schema/validation/validation_test.go | 89 +++- proto/enums/enums.pb.go | 393 +++++++++--------- proto/enums/enums.proto | 4 + proto/v1/skaffold.pb.go | 2 + proto/v2/skaffold.pb.go | 2 + 12 files changed, 388 insertions(+), 218 deletions(-) diff --git a/cmd/skaffold/app/cmd/fix.go b/cmd/skaffold/app/cmd/fix.go index 39781f31492..4f5dfc6fe1e 100644 --- a/cmd/skaffold/app/cmd/fix.go +++ b/cmd/skaffold/app/cmd/fix.go @@ -89,7 +89,7 @@ func fix(out io.Writer, configFile string, toVersion string, overwrite bool) err SourceFile: configFile, IsRootConfig: true}) } - if err := validation.Process(cfgs); err != nil { + if err := validation.Process(cfgs, validation.GetValidationOpts(opts)); err != nil { return fmt.Errorf("validating upgraded config: %w", err) } } diff --git a/cmd/skaffold/app/cmd/runner.go b/cmd/skaffold/app/cmd/runner.go index 6ba276a2bcb..4a2ca503391 100644 --- a/cmd/skaffold/app/cmd/runner.go +++ b/cmd/skaffold/app/cmd/runner.go @@ -79,7 +79,7 @@ func runContext(out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunCont } setDefaultDeployer(cfgSet) - if err := validation.Process(cfgSet); err != nil { + if err := validation.Process(cfgSet, validation.GetValidationOpts(opts)); err != nil { return nil, nil, fmt.Errorf("invalid skaffold config: %w", err) } var configs []*latestV1.SkaffoldConfig diff --git a/cmd/skaffold/app/cmd/runner_test.go b/cmd/skaffold/app/cmd/runner_test.go index 6c7b3fc8891..c8187a09f1b 100644 --- a/cmd/skaffold/app/cmd/runner_test.go +++ b/cmd/skaffold/app/cmd/runner_test.go @@ -26,6 +26,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/validation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/update" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -86,6 +87,7 @@ func TestCreateNewRunner(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&validation.DefaultConfig, validation.Options{CheckDeploySource: false}) t.Override(&docker.NewAPIClient, func(docker.Config) (docker.LocalDaemon, error) { return docker.NewLocalDaemon(&testutil.FakeAPIClient{ ErrVersion: true, diff --git a/docs/content/en/api/skaffold.swagger.json b/docs/content/en/api/skaffold.swagger.json index 229a0394494..54452dab5f7 100644 --- a/docs/content/en/api/skaffold.swagger.json +++ b/docs/content/en/api/skaffold.swagger.json @@ -174,7 +174,7 @@ }, { "name": "event.buildEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -322,6 +322,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -331,7 +332,7 @@ }, { "name": "event.buildEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -479,6 +480,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -506,7 +508,7 @@ }, { "name": "event.deployEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -654,6 +656,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -663,7 +666,7 @@ }, { "name": "event.deployEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -811,6 +814,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -920,7 +924,7 @@ }, { "name": "event.statusCheckEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1068,6 +1072,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -1077,7 +1082,7 @@ }, { "name": "event.statusCheckEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1225,6 +1230,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -1264,7 +1270,7 @@ }, { "name": "event.resourceStatusCheckEvent.statusCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1412,6 +1418,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -1421,7 +1428,7 @@ }, { "name": "event.resourceStatusCheckEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1569,6 +1576,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -1609,7 +1617,7 @@ }, { "name": "event.fileSyncEvent.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1757,6 +1765,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -1766,7 +1775,7 @@ }, { "name": "event.fileSyncEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -1914,6 +1923,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -1984,7 +1994,7 @@ }, { "name": "event.devLoopEvent.err.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -2132,6 +2142,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -2153,7 +2164,7 @@ }, { "name": "event.terminationEvent.err.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -2301,6 +2312,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -2322,7 +2334,7 @@ }, { "name": "event.TestEvent.actionableErr.errCode", - "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", + "description": " - OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist", "in": "query", "required": false, "type": "string", @@ -2470,6 +2482,7 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -2881,13 +2894,14 @@ "CONFIG_UNKNOWN_API_VERSION_ERR", "CONFIG_UNKNOWN_VALIDATOR", "CONFIG_UNKNOWN_TRANSFORMER", + "CONFIG_MISSING_MANIFEST_FILE_ERR", "INSPECT_UNKNOWN_ERR", "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", "INSPECT_PROFILE_NOT_FOUND_ERR" ], "default": "OK", - "description": "Enum for Status codes
\nThese error codes are prepended by Phase Name e.g.\nINIT, BUILD, TEST, DEPLOY, STATUSCHECK, DEVINIT
\nFor Success Error codes, use range 200 to 250.
\nFor Unknown error codes, use range 500 to 600.
\nFor Cancelled Error code, use range 800 to 850.
\n- OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist" + "description": "Enum for Status codes
\nThese error codes are prepended by Phase Name e.g.\nINIT, BUILD, TEST, DEPLOY, STATUSCHECK, DEVINIT
\nFor Success Error codes, use range 200 to 250.
\nFor Unknown error codes, use range 500 to 600.
\nFor Cancelled Error code, use range 800 to 850.
\n- OK: A default status code for events that do not have an associated phase.\nTypically seen with the DevEndEvent event on success.\n - STATUSCHECK_SUCCESS: Status Check Success\n - BUILD_SUCCESS: Build Success\n - RENDER_SUCCESS: Render Success\n - DEPLOY_SUCCESS: Deploy Success\n - TEST_SUCCESS: Test Success\n - BUILD_PUSH_ACCESS_DENIED: Build error due to push access denied\n - BUILD_PROJECT_NOT_FOUND: Build error due to GCP project not found.\n - BUILD_DOCKER_DAEMON_NOT_RUNNING: Docker build error due to docker daemon not running\n - BUILD_USER_ERROR: Build error due to user application code, e.g. compilation error, dockerfile error etc\n - BUILD_DOCKER_UNAVAILABLE: Build error due to docker not available\n - BUILD_DOCKER_UNAUTHORIZED: Docker build error due to user not authorized to perform the action\n - BUILD_DOCKER_SYSTEM_ERR: Docker system build error\n - BUILD_DOCKER_NOT_MODIFIED_ERR: Docker build error due to Docker build container is already in the desired state\n - BUILD_DOCKER_NOT_IMPLEMENTED_ERR: Docker build error indicating a feature not supported\n - BUILD_DOCKER_DATA_LOSS_ERR: Docker build error indicates that for given build, data was lost or there is data corruption\n - BUILD_DOCKER_FORBIDDEN_ERR: Docker build error indicates user is forbidden to perform the build or step/action.\n - BUILD_DOCKER_CONFLICT_ERR: Docker build error due to some internal error and docker container state conflicts with the requested action and can't be performed\n - BUILD_DOCKER_ERROR_NOT_FOUND: Docker build error indicates the requested object does not exist\n - BUILD_DOCKER_INVALID_PARAM_ERR: Docker build error indication invalid parameter sent to docker command\n - BUILD_DOCKERFILE_NOT_FOUND: Docker build failed due to dockerfile not found\n - BUILD_DOCKER_CACHE_FROM_PULL_ERR: Docker build failed due `cacheFrom` user config error\n - BUILD_DOCKER_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from docker daemon.\n - BUILD_DOCKER_NO_SPACE_ERR: Build error due no space left in docker.\n - BUILD_REGISTRY_GET_DIGEST_ERR: Build error due to digest for built artifact could not be retrieved from registry.\n - BUILD_UNKNOWN_JIB_PLUGIN_TYPE: Build error indicating unknown Jib plugin type. Should be one of [maven, gradle]\n - BUILD_JIB_GRADLE_DEP_ERR: Build error determining dependency for jib gradle project.\n - BUILD_JIB_MAVEN_DEP_ERR: Build error determining dependency for jib gradle project.\n - INIT_DOCKER_NETWORK_LISTING_CONTAINERS: Docker build error when listing containers.\n - INIT_DOCKER_NETWORK_INVALID_CONTAINER_NAME: Docker build error indicating an invalid container name (or id).\n - INIT_DOCKER_NETWORK_CONTAINER_DOES_NOT_EXIST: Docker build error indicating the container referenced does not exists in the docker context used.\n - INIT_DOCKER_NETWORK_INVALID_MODE: Docker Network invalid mode\n - INIT_DOCKER_NETWORK_PARSE_ERR: Error parsing Docker Network mode\n - STATUSCHECK_IMAGE_PULL_ERR: Container image pull error\n - STATUSCHECK_CONTAINER_CREATING: Container creating error\n - STATUSCHECK_RUN_CONTAINER_ERR: Container run error\n - STATUSCHECK_CONTAINER_TERMINATED: Container is already terminated\n - STATUSCHECK_DEPLOYMENT_ROLLOUT_PENDING: Deployment waiting for rollout\n - STATUSCHECK_CONTAINER_RESTARTING: Container restarting error\n - STATUSCHECK_UNHEALTHY: Readiness probe failed\n - STATUSCHECK_CONTAINER_EXEC_ERROR: Executable binary format error\n - STATUSCHECK_NODE_MEMORY_PRESSURE: Node memory pressure error\n - STATUSCHECK_NODE_DISK_PRESSURE: Node disk pressure error\n - STATUSCHECK_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - STATUSCHECK_NODE_PID_PRESSURE: Node PID pressure error\n - STATUSCHECK_NODE_UNSCHEDULABLE: Node unschedulable error\n - STATUSCHECK_NODE_UNREACHABLE: Node unreachable error\n - STATUSCHECK_NODE_NOT_READY: Node not ready error\n - STATUSCHECK_FAILED_SCHEDULING: Scheduler failure error\n - STATUSCHECK_KUBECTL_CONNECTION_ERR: Kubectl connection error\n - STATUSCHECK_KUBECTL_PID_KILLED: Kubectl process killed error\n - STATUSCHECK_KUBECTL_CLIENT_FETCH_ERR: Kubectl client fetch err\n - STATUSCHECK_POD_INITIALIZING: Pod Initializing\n - UNKNOWN_ERROR: Could not determine error and phase\n - STATUSCHECK_UNKNOWN: Status Check error unknown\n - STATUSCHECK_UNKNOWN_UNSCHEDULABLE: Container is unschedulable due to unknown reasons\n - STATUSCHECK_CONTAINER_WAITING_UNKNOWN: Container is waiting due to unknown reason\n - STATUSCHECK_UNKNOWN_EVENT: Container event reason unknown\n - DEPLOY_UNKNOWN: Deploy failed due to unknown reason\n - SYNC_UNKNOWN: SYNC failed due to known reason\n - BUILD_UNKNOWN: Build failed due to unknown reason\n - DEVINIT_UNKNOWN: Dev Init failed due to unknown reason\n - CLEANUP_UNKNOWN: Cleanup failed due to unknown reason\n - INIT_UNKNOWN: Initialization of the Skaffold session failed due to unknown reason(s)\n - BUILD_DOCKER_UNKNOWN: Build failed due to docker unknown error\n - TEST_UNKNOWN: Test failed due to unknown reason\n - SYNC_INIT_ERROR: File Sync Initialize failure\n - DEVINIT_REGISTER_BUILD_DEPS: Failed to configure watcher for build dependencies in dev loop\n - DEVINIT_REGISTER_TEST_DEPS: Failed to configure watcher for test dependencies in dev loop\n - DEVINIT_REGISTER_DEPLOY_DEPS: Failed to configure watcher for deploy dependencies in dev loop\n - DEVINIT_REGISTER_CONFIG_DEP: Failed to configure watcher for Skaffold configuration file.\n - DEVINIT_UNSUPPORTED_V1_MANIFEST: Failed to configure watcher for build dependencies for a base image with v1 manifest.\n - STATUSCHECK_USER_CANCELLED: User cancelled the skaffold dev run\n - STATUSCHECK_DEADLINE_EXCEEDED: Deadline for status check exceeded\n - BUILD_CANCELLED: Build Cancelled\n - DEPLOY_CANCELLED: Deploy cancelled due to user cancellation or one or more deployers failed.\n - BUILD_DOCKER_CANCELLED: Docker build cancelled.\n - BUILD_DOCKER_DEADLINE: Build error due to docker deadline was reached before the docker action completed\n - INIT_CREATE_TAGGER_ERROR: Skaffold was unable to create the configured tagger\n - INIT_MINIKUBE_PAUSED_ERROR: Skaffold was unable to start as Minikube appears to be paused\n - INIT_MINIKUBE_NOT_RUNNING_ERROR: Skaffold was unable to start as Minikube appears to be stopped\n - INIT_CREATE_BUILDER_ERROR: Skaffold was unable to create a configured image builder\n - INIT_CREATE_DEPLOYER_ERROR: Skaffold was unable to create a configured deployer\n - INIT_CREATE_TEST_DEP_ERROR: Skaffold was unable to create a configured test\n - INIT_CACHE_ERROR: Skaffold encountered an error validating the artifact cache\n - INIT_CREATE_WATCH_TRIGGER_ERROR: Skaffold encountered an error when configuring file watching\n - INIT_CREATE_ARTIFACT_DEP_ERROR: Skaffold encountered an error when evaluating artifact dependencies\n - DEPLOY_CLUSTER_CONNECTION_ERR: Unable to connect to cluster\n - DEPLOY_DEBUG_HELPER_RETRIEVE_ERR: Could not retrieve debug helpers.\n - DEPLOY_CLEANUP_ERR: Deploy clean up error\n - DEPLOY_HELM_APPLY_LABELS: Unable to apply helm labels.\n - DEPLOY_HELM_USER_ERR: Deploy error due to user deploy config for helm deployer\n - DEPLOY_NO_MATCHING_BUILD: Helm error when no build result is found of value specified in helm `artifactOverrides`\n - DEPLOY_HELM_VERSION_ERR: Unable to get helm client version\n - DEPLOY_HELM_MIN_VERSION_ERR: Helm version not supported.\n - DEPLOY_KUBECTL_VERSION_ERR: Unable to retrieve kubectl version\n - DEPLOY_KUBECTL_OFFLINE_MODE_ERR: User specified offline mode for rendering but remote manifests presents.\n - DEPLOY_ERR_WAITING_FOR_DELETION: Error waiting for previous version deletion before next version is active.\n - DEPLOY_READ_MANIFEST_ERR: Error reading manifests\n - DEPLOY_READ_REMOTE_MANIFEST_ERR: Error reading remote manifests\n - DEPLOY_LIST_MANIFEST_ERR: Errors listing manifests\n - DEPLOY_KUBECTL_USER_ERR: Deploy error due to user deploy config for kubectl deployer\n - DEPLOY_KUSTOMIZE_USER_ERR: Deploy error due to user deploy config for kustomize deployer\n - DEPLOY_REPLACE_IMAGE_ERR: Error replacing a built artifact in the manifests\n - DEPLOY_TRANSFORM_MANIFEST_ERR: Error transforming a manifest during skaffold debug\n - DEPLOY_SET_LABEL_ERR: Error setting user specified additional labels.\n - DEPLOY_MANIFEST_WRITE_ERR: Error writing hydrated kubernetes manifests.\n - DEPLOY_PARSE_MANIFEST_IMAGES_ERR: Error getting images from a kubernetes manifest.\n - DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE: Helm config `createNamespace` not available\n - DEPLOY_CLUSTER_INTERNAL_SYSTEM_ERR: Kubernetes cluster reported an internal system error\n - DEPLOY_KPTFILE_INIT_ERR: The Kptfile cannot be created via `kpt live init`.\n - TEST_USER_CONFIG_ERR: Error expanding paths\n - TEST_CST_USER_ERR: Error running container-structure-test\n - TEST_IMG_PULL_ERR: Unable to docker pull image\n - TEST_CUSTOM_CMD_PARSE_ERR: Unable to parse test command\n - TEST_CUSTOM_CMD_RUN_NON_ZERO_EXIT_ERR: Command returned non-zero exit code\n - TEST_CUSTOM_CMD_RUN_TIMEDOUT_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_CANCELLED_ERR: command cancelled or timed out\n - TEST_CUSTOM_CMD_RUN_EXECUTION_ERR: command context error\n - TEST_CUSTOM_CMD_RUN_EXITED_ERR: command exited\n - TEST_CUSTOM_CMD_RUN_ERR: error running cmd\n - TEST_CUSTOM_DEPENDENCIES_CMD_ERR: Error getting dependencies from command\n - TEST_CUSTOM_DEPENDENCIES_UNMARSHALL_ERR: Unmarshalling dependency output error\n - TEST_CUSTOM_CMD_RETRIEVE_ERR: Error retrieving the command\n - RENDER_KPTFILE_INIT_ERR: Render errors\nThe Kptfile cannot be created via `kpt pkg init`.\n - RENDER_KPTFILE_INVALID_YAML_ERR: The Kptfile is not a valid yaml file\n - RENDER_KPTFILE_INVALID_SCHEMA_ERR: The Kptfile is not a valid API schema\n - CONFIG_FILE_PARSING_ERR: Catch-all configuration file parsing error\n - CONFIG_FILE_NOT_FOUND_ERR: Main configuration file not found\n - CONFIG_DEPENDENCY_NOT_FOUND_ERR: Dependency configuration file not found\n - CONFIG_DUPLICATE_NAMES_SAME_FILE_ERR: Duplicate config names in the same configuration file\n - CONFIG_DUPLICATE_NAMES_ACROSS_FILES_ERR: Duplicate config names in two configuration files\n - CONFIG_BAD_FILTER_ERR: No configs matching configs filter\n - CONFIG_ZERO_FOUND_ERR: No configs parsed from current file\n - CONFIG_APPLY_PROFILES_ERR: Failed to apply profiles to config\n - CONFIG_DEFAULT_VALUES_ERR: Failed to set default config values\n - CONFIG_FILE_PATHS_SUBSTITUTION_ERR: Failed to substitute absolute file paths in config\n - CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR: Same config imported at least twice with different set of profiles\n - CONFIG_PROFILES_NOT_FOUND_ERR: Profile selection did not match known profile names\n - CONFIG_UNKNOWN_API_VERSION_ERR: Config API version not found\n - CONFIG_UNKNOWN_VALIDATOR: The validator is not allowed in skaffold-managed mode.\n - CONFIG_UNKNOWN_TRANSFORMER: The transformer is not allowed in skaffold-managed mode.\n - CONFIG_MISSING_MANIFEST_FILE_ERR: Manifest file not found\n - INSPECT_UNKNOWN_ERR: Catch-all `skaffold inspect` command error\n - INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR: Trying to add new build environment that already exists\n - INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR: Trying to modify build environment that doesn't exist\n - INSPECT_PROFILE_NOT_FOUND_ERR: Trying to modify a profile that doesn't exist" }, "enumsSuggestionCode": { "type": "string", @@ -2946,6 +2960,7 @@ "CONFIG_FIX_API_VERSION", "CONFIG_ALLOWLIST_VALIDATORS", "CONFIG_ALLOWLIST_transformers", + "CONFIG_FIX_MISSING_MANIFEST_FILE", "INSPECT_USE_MODIFY_OR_NEW_PROFILE", "INSPECT_USE_ADD_BUILD_ENV", "INSPECT_CHECK_INPUT_PROFILE", @@ -2957,7 +2972,7 @@ "CHECK_TEST_COMMAND_AND_IMAGE_NAME" ], "default": "NIL", - "description": "Enum for Suggestion codes\n- NIL: default nil suggestion.\nThis is usually set when no error happens.\n - ADD_DEFAULT_REPO: Add Default Repo\n - CHECK_DEFAULT_REPO: Verify Default Repo\n - CHECK_DEFAULT_REPO_GLOBAL_CONFIG: Verify default repo in the global config\n - GCLOUD_DOCKER_AUTH_CONFIGURE: run gcloud docker auth configure\n - DOCKER_AUTH_CONFIGURE: Run docker auth configure\n - CHECK_GCLOUD_PROJECT: Verify Gcloud Project\n - CHECK_DOCKER_RUNNING: Check if docker is running\n - FIX_USER_BUILD_ERR: Fix User Build Error\n - DOCKER_BUILD_RETRY: Docker build internal error, try again\n - FIX_CACHE_FROM_ARTIFACT_CONFIG: Fix `cacheFrom` config for given artifact and try again\n - FIX_SKAFFOLD_CONFIG_DOCKERFILE: Fix `dockerfile` config for a given artifact and try again.\n - FIX_JIB_PLUGIN_CONFIGURATION: Use a supported Jib plugin type\n - FIX_DOCKER_NETWORK_CONTAINER_NAME: Docker build network invalid docker container name (or id).\n - CHECK_DOCKER_NETWORK_CONTAINER_RUNNING: Docker build network container not existing in the current context.\n - FIX_DOCKER_NETWORK_MODE_WHEN_EXTRACTING_CONTAINER_NAME: Executing extractContainerNameFromNetworkMode with a non valid mode (only container mode allowed)\n - RUN_DOCKER_PRUNE: Prune Docker image\n - SET_CLEANUP_FLAG: Set Cleanup flag for skaffold command.\n - CHECK_CLUSTER_CONNECTION: Check cluster connection\n - CHECK_MINIKUBE_STATUS: Check minikube status\n - INSTALL_HELM: Install helm tool\n - UPGRADE_HELM: Upgrade helm tool\n - FIX_SKAFFOLD_CONFIG_HELM_ARTIFACT_OVERRIDES: Fix helm `releases.artifactOverrides` config to match with `build.artiofacts`\n - UPGRADE_HELM32: Upgrade helm version to v3.2.0 and higher.\n - FIX_SKAFFOLD_CONFIG_HELM_CREATE_NAMESPACE: Set `releases.createNamespace` to false.\n - INSTALL_KUBECTL: Install kubectl tool\n - CHECK_CONTAINER_LOGS: Container run error\n - CHECK_READINESS_PROBE: Pod Health check error\n - CHECK_CONTAINER_IMAGE: Check Container image\n - ADDRESS_NODE_MEMORY_PRESSURE: Node pressure error\n - ADDRESS_NODE_DISK_PRESSURE: Node disk pressure error\n - ADDRESS_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - ADDRESS_NODE_PID_PRESSURE: Node PID pressure error\n - ADDRESS_NODE_UNSCHEDULABLE: Node unschedulable error\n - ADDRESS_NODE_UNREACHABLE: Node unreachable error\n - ADDRESS_NODE_NOT_READY: Node not ready error\n - ADDRESS_FAILED_SCHEDULING: Scheduler failure error\n - CHECK_HOST_CONNECTION: Cluster Connectivity error\n - START_MINIKUBE: Minikube is stopped: use `minikube start`\n - UNPAUSE_MINIKUBE: Minikube is paused: use `minikube unpause`\n - RUN_DOCKER_PULL: Run Docker pull for the image with v1 manifest and try again.\n - SET_RENDER_FLAG_OFFLINE_FALSE: Rerun with correct offline flag value.\n - KPTFILE_MANUAL_INIT: Manually run `kpt pkg init` or `kpt live init`\n - KPTFILE_CHECK_YAML: Check if the Kptfile is correct.\n - CONFIG_CHECK_FILE_PATH: Check configuration file path\n - CONFIG_CHECK_DEPENDENCY_DEFINITION: Check dependency config definition\n - CONFIG_CHANGE_NAMES: Change config name to avoid duplicates\n - CONFIG_CHECK_FILTER: Check config filter\n - CONFIG_CHECK_PROFILE_DEFINITION: Check profile definition in current config\n - CONFIG_CHECK_DEPENDENCY_PROFILES_SELECTION: Check active profile selection for dependency config\n - CONFIG_CHECK_PROFILE_SELECTION: Check profile selection flag\n - CONFIG_FIX_API_VERSION: Fix config API version or upgrade the skaffold binary\n - CONFIG_ALLOWLIST_VALIDATORS: Only the allow listed validators are acceptable in skaffold-managed mode.\n - CONFIG_ALLOWLIST_transformers: Only the allow listed transformers are acceptable in skaffold-managed mode.\n - INSPECT_USE_MODIFY_OR_NEW_PROFILE: Create new build env in a profile instead, or use the 'modify' command\n - INSPECT_USE_ADD_BUILD_ENV: Check profile selection, or use the 'add' command instead\n - INSPECT_CHECK_INPUT_PROFILE: Check profile flag value\n - OPEN_ISSUE: Open an issue so this situation can be diagnosed\n - CHECK_CUSTOM_COMMAND: Test error suggestion codes" + "description": "Enum for Suggestion codes\n- NIL: default nil suggestion.\nThis is usually set when no error happens.\n - ADD_DEFAULT_REPO: Add Default Repo\n - CHECK_DEFAULT_REPO: Verify Default Repo\n - CHECK_DEFAULT_REPO_GLOBAL_CONFIG: Verify default repo in the global config\n - GCLOUD_DOCKER_AUTH_CONFIGURE: run gcloud docker auth configure\n - DOCKER_AUTH_CONFIGURE: Run docker auth configure\n - CHECK_GCLOUD_PROJECT: Verify Gcloud Project\n - CHECK_DOCKER_RUNNING: Check if docker is running\n - FIX_USER_BUILD_ERR: Fix User Build Error\n - DOCKER_BUILD_RETRY: Docker build internal error, try again\n - FIX_CACHE_FROM_ARTIFACT_CONFIG: Fix `cacheFrom` config for given artifact and try again\n - FIX_SKAFFOLD_CONFIG_DOCKERFILE: Fix `dockerfile` config for a given artifact and try again.\n - FIX_JIB_PLUGIN_CONFIGURATION: Use a supported Jib plugin type\n - FIX_DOCKER_NETWORK_CONTAINER_NAME: Docker build network invalid docker container name (or id).\n - CHECK_DOCKER_NETWORK_CONTAINER_RUNNING: Docker build network container not existing in the current context.\n - FIX_DOCKER_NETWORK_MODE_WHEN_EXTRACTING_CONTAINER_NAME: Executing extractContainerNameFromNetworkMode with a non valid mode (only container mode allowed)\n - RUN_DOCKER_PRUNE: Prune Docker image\n - SET_CLEANUP_FLAG: Set Cleanup flag for skaffold command.\n - CHECK_CLUSTER_CONNECTION: Check cluster connection\n - CHECK_MINIKUBE_STATUS: Check minikube status\n - INSTALL_HELM: Install helm tool\n - UPGRADE_HELM: Upgrade helm tool\n - FIX_SKAFFOLD_CONFIG_HELM_ARTIFACT_OVERRIDES: Fix helm `releases.artifactOverrides` config to match with `build.artiofacts`\n - UPGRADE_HELM32: Upgrade helm version to v3.2.0 and higher.\n - FIX_SKAFFOLD_CONFIG_HELM_CREATE_NAMESPACE: Set `releases.createNamespace` to false.\n - INSTALL_KUBECTL: Install kubectl tool\n - CHECK_CONTAINER_LOGS: Container run error\n - CHECK_READINESS_PROBE: Pod Health check error\n - CHECK_CONTAINER_IMAGE: Check Container image\n - ADDRESS_NODE_MEMORY_PRESSURE: Node pressure error\n - ADDRESS_NODE_DISK_PRESSURE: Node disk pressure error\n - ADDRESS_NODE_NETWORK_UNAVAILABLE: Node network unavailable error\n - ADDRESS_NODE_PID_PRESSURE: Node PID pressure error\n - ADDRESS_NODE_UNSCHEDULABLE: Node unschedulable error\n - ADDRESS_NODE_UNREACHABLE: Node unreachable error\n - ADDRESS_NODE_NOT_READY: Node not ready error\n - ADDRESS_FAILED_SCHEDULING: Scheduler failure error\n - CHECK_HOST_CONNECTION: Cluster Connectivity error\n - START_MINIKUBE: Minikube is stopped: use `minikube start`\n - UNPAUSE_MINIKUBE: Minikube is paused: use `minikube unpause`\n - RUN_DOCKER_PULL: Run Docker pull for the image with v1 manifest and try again.\n - SET_RENDER_FLAG_OFFLINE_FALSE: Rerun with correct offline flag value.\n - KPTFILE_MANUAL_INIT: Manually run `kpt pkg init` or `kpt live init`\n - KPTFILE_CHECK_YAML: Check if the Kptfile is correct.\n - CONFIG_CHECK_FILE_PATH: Check configuration file path\n - CONFIG_CHECK_DEPENDENCY_DEFINITION: Check dependency config definition\n - CONFIG_CHANGE_NAMES: Change config name to avoid duplicates\n - CONFIG_CHECK_FILTER: Check config filter\n - CONFIG_CHECK_PROFILE_DEFINITION: Check profile definition in current config\n - CONFIG_CHECK_DEPENDENCY_PROFILES_SELECTION: Check active profile selection for dependency config\n - CONFIG_CHECK_PROFILE_SELECTION: Check profile selection flag\n - CONFIG_FIX_API_VERSION: Fix config API version or upgrade the skaffold binary\n - CONFIG_ALLOWLIST_VALIDATORS: Only the allow listed validators are acceptable in skaffold-managed mode.\n - CONFIG_ALLOWLIST_transformers: Only the allow listed transformers are acceptable in skaffold-managed mode.\n - CONFIG_FIX_MISSING_MANIFEST_FILE: Check mising manifest file section of config and fix as needed.\n - INSPECT_USE_MODIFY_OR_NEW_PROFILE: Create new build env in a profile instead, or use the 'modify' command\n - INSPECT_USE_ADD_BUILD_ENV: Check profile selection, or use the 'add' command instead\n - INSPECT_CHECK_INPUT_PROFILE: Check profile flag value\n - OPEN_ISSUE: Open an issue so this situation can be diagnosed\n - CHECK_CUSTOM_COMMAND: Test error suggestion codes" }, "enumsTesterType": { "type": "string", diff --git a/docs/content/en/docs/references/api/grpc.md b/docs/content/en/docs/references/api/grpc.md index c11572272cf..d115afab20e 100644 --- a/docs/content/en/docs/references/api/grpc.md +++ b/docs/content/en/docs/references/api/grpc.md @@ -1019,6 +1019,7 @@ For Cancelled Error code, use range 800 to 850.
| CONFIG_UNKNOWN_API_VERSION_ERR | 1213 | Config API version not found | | CONFIG_UNKNOWN_VALIDATOR | 1214 | The validator is not allowed in skaffold-managed mode. | | CONFIG_UNKNOWN_TRANSFORMER | 1215 | The transformer is not allowed in skaffold-managed mode. | +| CONFIG_MISSING_MANIFEST_FILE_ERR | 1216 | Manifest file not found | | INSPECT_UNKNOWN_ERR | 1301 | Catch-all `skaffold inspect` command error | | INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR | 1302 | Trying to add new build environment that already exists | | INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR | 1303 | Trying to modify build environment that doesn't exist | @@ -1087,6 +1088,7 @@ Enum for Suggestion codes | CONFIG_FIX_API_VERSION | 707 | Fix config API version or upgrade the skaffold binary | | CONFIG_ALLOWLIST_VALIDATORS | 708 | Only the allow listed validators are acceptable in skaffold-managed mode. | | CONFIG_ALLOWLIST_transformers | 709 | Only the allow listed transformers are acceptable in skaffold-managed mode. | +| CONFIG_FIX_MISSING_MANIFEST_FILE | 710 | Check mising manifest file section of config and fix as needed. | | INSPECT_USE_MODIFY_OR_NEW_PROFILE | 800 | Create new build env in a profile instead, or use the 'modify' command | | INSPECT_USE_ADD_BUILD_ENV | 801 | Check profile selection, or use the 'add' command instead | | INSPECT_CHECK_INPUT_PROFILE | 802 | Check profile flag value | diff --git a/pkg/skaffold/schema/validation/samples_test.go b/pkg/skaffold/schema/validation/samples_test.go index 706589b9d85..71ab6965f8e 100644 --- a/pkg/skaffold/schema/validation/samples_test.go +++ b/pkg/skaffold/schema/validation/samples_test.go @@ -88,7 +88,7 @@ func checkSkaffoldConfig(t *testutil.T, yaml []byte) { t.CheckNoError(err) cfgs = append(cfgs, cfg) } - err = Process(cfgs) + err = Process(cfgs, Options{CheckDeploySource: false}) t.CheckNoError(err) } diff --git a/pkg/skaffold/schema/validation/validation.go b/pkg/skaffold/schema/validation/validation.go index f63361172f9..63dba9e410b 100644 --- a/pkg/skaffold/schema/validation/validation.go +++ b/pkg/skaffold/schema/validation/validation.go @@ -19,6 +19,7 @@ package validation import ( "context" "fmt" + "path/filepath" "reflect" "regexp" "strings" @@ -28,6 +29,7 @@ import ( "github.com/pkg/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/misc" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser" @@ -41,11 +43,25 @@ import ( var ( // for testing validateYamltags = yamltags.ValidateStruct + DefaultConfig = Options{CheckDeploySource: true} dependencyAliasPattern = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_]*$`) ) +type Options struct { + CheckDeploySource bool +} + +func GetValidationOpts(opts config.SkaffoldOptions) Options { + switch opts.Mode() { + case config.RunModes.Dev, config.RunModes.Deploy, config.RunModes.Run, config.RunModes.Debug, config.RunModes.Render: + return Options{CheckDeploySource: true} + default: + return Options{} + } +} + // Process checks if the Skaffold pipeline is valid and returns all encountered errors as a concatenated string -func Process(configs parser.SkaffoldConfigSet) error { +func Process(configs parser.SkaffoldConfigSet, validateConfig Options) error { var errs = validateImageNames(configs) for _, config := range configs { var cfgErrs []error @@ -63,6 +79,10 @@ func Process(configs parser.SkaffoldConfigSet) error { } errs = append(errs, validateArtifactDependencies(configs)...) errs = append(errs, validateSingleKubeContext(configs)...) + if validateConfig.CheckDeploySource { + // TODO(6050) validate for other deploy types - helm, kpt, etc. + errs = append(errs, validateKubectlManifests(configs)...) + } if len(errs) == 0 { return nil } @@ -581,3 +601,42 @@ func wrapWithContext(config *parser.SkaffoldConfigEntry, errs ...error) []error } return errs } + +// validateKubectlManifests +// - validates that kubectl manifest files specified in the skaffold config exist +func validateKubectlManifests(configs parser.SkaffoldConfigSet) (errs []error) { + for _, c := range configs { + if c.IsRemote { + continue + } + if c.Deploy.KubectlDeploy == nil { + continue + } + // validate that manifest files referenced in config exist + for _, pattern := range c.Deploy.KubectlDeploy.Manifests { + if util.IsURL(pattern) { + continue + } + // filepaths are all absolute from config parsing step via tags.MakeFilePathsAbsolute + expanded, err := filepath.Glob(pattern) + if err != nil { + errs = append(errs, err) + } + if len(expanded) == 0 { + msg := fmt.Sprintf("skaffold config named %q referenced file %q that could not be found", c.SourceFile, pattern) + errs = append(errs, sErrors.NewError(fmt.Errorf(msg), + proto.ActionableErr{ + Message: msg, + ErrCode: proto.StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR, + Suggestions: []*proto.Suggestion{ + { + SuggestionCode: proto.SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE, + Action: fmt.Sprintf("Verify that file %q referenced in config %q exists and the path and naming are correct", pattern, c.SourceFile), + }, + }, + })) + } + } + } + return errs +} diff --git a/pkg/skaffold/schema/validation/validation_test.go b/pkg/skaffold/schema/validation/validation_test.go index 956847f0b64..a308c833ca5 100644 --- a/pkg/skaffold/schema/validation/validation_test.go +++ b/pkg/skaffold/schema/validation/validation_test.go @@ -20,6 +20,8 @@ import ( "context" "errors" "fmt" + "os" + "path/filepath" "testing" "github.com/docker/docker/api/types" @@ -90,7 +92,8 @@ func TestValidateSchema(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - err := Process(parser.SkaffoldConfigSet{&parser.SkaffoldConfigEntry{SkaffoldConfig: test.cfg}}) + err := Process(parser.SkaffoldConfigSet{&parser.SkaffoldConfigEntry{SkaffoldConfig: test.cfg}}, + Options{CheckDeploySource: false}) t.CheckError(test.shouldErr, err) }) @@ -511,7 +514,7 @@ func TestValidateNetworkMode(t *testing.T) { Artifacts: test.artifacts, }, }, - }}}) + }}}, Options{CheckDeploySource: false}) t.CheckError(test.shouldErr, err) }) @@ -812,7 +815,7 @@ func TestValidateSyncRules(t *testing.T) { Artifacts: test.artifacts, }, }, - }}}) + }}}, Options{CheckDeploySource: false}) t.CheckError(test.shouldErr, err) }) @@ -970,7 +973,7 @@ func TestValidateImageNames(t *testing.T) { }, }, }, - }) + }, Options{CheckDeploySource: false}) t.CheckError(test.shouldErr, err) }) @@ -1074,7 +1077,7 @@ func TestValidateJibPluginType(t *testing.T) { }, }, }, - }}) + }}, Options{CheckDeploySource: false}) t.CheckError(test.shouldErr, err) }) @@ -1108,7 +1111,7 @@ func TestValidateLogsConfig(t *testing.T) { }, }, }, - }}}) + }}}, Options{CheckDeploySource: false}) t.CheckError(test.shouldErr, err) }) @@ -1441,7 +1444,7 @@ func TestValidateTaggingPolicy(t *testing.T) { }, }, }, - }) + }, Options{CheckDeploySource: false}) t.CheckError(test.shouldErr, err) }) @@ -1507,3 +1510,75 @@ func TestValidateCustomTest(t *testing.T) { }) } } + +func TestValidateKubectlManifests(t *testing.T) { + tempDir := t.TempDir() + tests := []struct { + description string + configs []*latestV1.SkaffoldConfig + files []string + shouldErr bool + }{ + { + description: "specified manifest file exists", + configs: []*latestV1.SkaffoldConfig{ + { + Pipeline: latestV1.Pipeline{ + Deploy: latestV1.DeployConfig{ + DeployType: latestV1.DeployType{ + KubectlDeploy: &latestV1.KubectlDeploy{ + Manifests: []string{filepath.Join(tempDir, "validation-test-exists.yaml")}, + }, + }, + }, + }, + }, + }, + files: []string{"validation-test-exists.yaml"}, + }, + { + description: "specified manifest file does not exist", + configs: []*latestV1.SkaffoldConfig{ + { + Pipeline: latestV1.Pipeline{ + Deploy: latestV1.DeployConfig{ + DeployType: latestV1.DeployType{ + KubectlDeploy: &latestV1.KubectlDeploy{ + Manifests: []string{filepath.Join(tempDir, "validation-test-missing.yaml")}, + }, + }, + }, + }, + }, + }, + files: []string{}, + shouldErr: true, + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + for _, file := range test.files { + out, err := os.Create(filepath.Join(tempDir, file)) + if err != nil { + t.Errorf("error creating manifest file %s: %v", file, err) + } + err = out.Close() + if err != nil { + t.Errorf("error closing manifest file %s: %v", file, err) + } + } + + set := parser.SkaffoldConfigSet{} + for _, c := range test.configs { + set = append(set, &parser.SkaffoldConfigEntry{SkaffoldConfig: c}) + } + errs := validateKubectlManifests(set) + var err error + if len(errs) > 0 { + err = errs[0] + } + t.CheckError(test.shouldErr, err) + }) + } +} diff --git a/proto/enums/enums.pb.go b/proto/enums/enums.pb.go index 50e002e1bf0..d1c08826d8c 100644 --- a/proto/enums/enums.pb.go +++ b/proto/enums/enums.pb.go @@ -552,6 +552,8 @@ const ( StatusCode_CONFIG_UNKNOWN_VALIDATOR StatusCode = 1214 // The transformer is not allowed in skaffold-managed mode. StatusCode_CONFIG_UNKNOWN_TRANSFORMER StatusCode = 1215 + // Manifest file not found + StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR StatusCode = 1216 // Catch-all `skaffold inspect` command error StatusCode_INSPECT_UNKNOWN_ERR StatusCode = 1301 // Trying to add new build environment that already exists @@ -706,6 +708,7 @@ var StatusCode_name = map[int32]string{ 1213: "CONFIG_UNKNOWN_API_VERSION_ERR", 1214: "CONFIG_UNKNOWN_VALIDATOR", 1215: "CONFIG_UNKNOWN_TRANSFORMER", + 1216: "CONFIG_MISSING_MANIFEST_FILE_ERR", 1301: "INSPECT_UNKNOWN_ERR", 1302: "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR", 1303: "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR", @@ -856,6 +859,7 @@ var StatusCode_value = map[string]int32{ "CONFIG_UNKNOWN_API_VERSION_ERR": 1213, "CONFIG_UNKNOWN_VALIDATOR": 1214, "CONFIG_UNKNOWN_TRANSFORMER": 1215, + "CONFIG_MISSING_MANIFEST_FILE_ERR": 1216, "INSPECT_UNKNOWN_ERR": 1301, "INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR": 1302, "INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR": 1303, @@ -983,6 +987,8 @@ const ( SuggestionCode_CONFIG_ALLOWLIST_VALIDATORS SuggestionCode = 708 // Only the allow listed transformers are acceptable in skaffold-managed mode. SuggestionCode_CONFIG_ALLOWLIST_transformers SuggestionCode = 709 + // Check mising manifest file section of config and fix as needed. + SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE SuggestionCode = 710 // Create new build env in a profile instead, or use the 'modify' command SuggestionCode_INSPECT_USE_MODIFY_OR_NEW_PROFILE SuggestionCode = 800 // Check profile selection, or use the 'add' command instead @@ -1054,6 +1060,7 @@ var SuggestionCode_name = map[int32]string{ 707: "CONFIG_FIX_API_VERSION", 708: "CONFIG_ALLOWLIST_VALIDATORS", 709: "CONFIG_ALLOWLIST_transformers", + 710: "CONFIG_FIX_MISSING_MANIFEST_FILE", 800: "INSPECT_USE_MODIFY_OR_NEW_PROFILE", 801: "INSPECT_USE_ADD_BUILD_ENV", 802: "INSPECT_CHECK_INPUT_PROFILE", @@ -1120,6 +1127,7 @@ var SuggestionCode_value = map[string]int32{ "CONFIG_FIX_API_VERSION": 707, "CONFIG_ALLOWLIST_VALIDATORS": 708, "CONFIG_ALLOWLIST_transformers": 709, + "CONFIG_FIX_MISSING_MANIFEST_FILE": 710, "INSPECT_USE_MODIFY_OR_NEW_PROFILE": 800, "INSPECT_USE_ADD_BUILD_ENV": 801, "INSPECT_CHECK_INPUT_PROFILE": 802, @@ -1153,196 +1161,197 @@ func init() { func init() { proto.RegisterFile("enums.proto", fileDescriptor_888b6bd9597961ff) } var fileDescriptor_888b6bd9597961ff = []byte{ - // 3043 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x59, 0x59, 0x90, 0x1c, 0xc5, - 0xd1, 0x66, 0x77, 0x76, 0x76, 0x66, 0x4a, 0x1c, 0x45, 0xa1, 0xfb, 0x96, 0x40, 0x02, 0x16, 0x7e, - 0x89, 0xff, 0xe7, 0x0f, 0x1e, 0xfe, 0xb7, 0x9a, 0xee, 0x9a, 0x99, 0xd2, 0x54, 0x57, 0x77, 0x54, - 0x55, 0xef, 0x6a, 0xf5, 0xd2, 0x21, 0x7e, 0xad, 0x84, 0x60, 0xa5, 0x11, 0xbb, 0x2b, 0x6c, 0x7c, - 0xf2, 0xe0, 0xfb, 0x88, 0xb0, 0x8d, 0x39, 0x7c, 0x3c, 0x00, 0xb6, 0xc3, 0x2f, 0x06, 0x7c, 0x9f, - 0x9c, 0xc6, 0x8e, 0x30, 0xe6, 0xf2, 0x6d, 0x20, 0xec, 0x37, 0xdb, 0xe1, 0x03, 0x1f, 0x61, 0x73, - 0x9f, 0x8e, 0xac, 0xea, 0x73, 0x66, 0x16, 0x3f, 0x10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, 0x6e, 0x30, - 0x48, 0xdf, 0x45, 0xb9, 0xd4, 0x06, 0x6a, 0xb7, 0x7d, 0x54, 0x7e, 0xc4, 0x2e, 0xc5, 0x51, 0x57, - 0x51, 0x9f, 0xb9, 0xa5, 0x47, 0x27, 0xc8, 0x65, 0xe8, 0x92, 0x71, 0x11, 0x76, 0x04, 0x32, 0x3b, - 0x8f, 0x70, 0x96, 0x29, 0xc5, 0x7d, 0xa6, 0xf1, 0x63, 0xf6, 0x11, 0xb6, 0xac, 0xe4, 0xf2, 0xff, - 0xc1, 0x8f, 0x4f, 0x90, 0x7d, 0xe8, 0xe2, 0x55, 0xd5, 0x64, 0xd4, 0x01, 0xea, 0x60, 0x44, 0x3d, - 0x86, 0x9f, 0x98, 0x80, 0xf1, 0x24, 0x33, 0x2e, 0x7b, 0xd8, 0xfe, 0xcd, 0x04, 0x50, 0x80, 0xe1, - 0x61, 0x55, 0x84, 0x5d, 0x8d, 0xef, 0x9c, 0x2c, 0x3c, 0x85, 0xab, 0xca, 0x25, 0xd3, 0x1a, 0x92, - 0xb2, 0xcd, 0xf0, 0x5d, 0x25, 0x59, 0xf1, 0x99, 0xe5, 0x32, 0xf8, 0xee, 0x49, 0xe8, 0x57, 0xd4, - 0xf7, 0x15, 0xe0, 0x57, 0x7b, 0x42, 0xd9, 0x81, 0x36, 0x57, 0x20, 0x23, 0xcf, 0x27, 0x7b, 0xd0, - 0xce, 0x0a, 0x60, 0x95, 0xa7, 0x93, 0xed, 0x68, 0x53, 0x05, 0x36, 0xfc, 0x6c, 0x32, 0xbc, 0xcf, - 0xc8, 0x93, 0xc9, 0x36, 0xb4, 0x71, 0x08, 0x50, 0x79, 0x2e, 0xd9, 0x82, 0xd6, 0x57, 0xcd, 0x28, - 0x3f, 0x95, 0x94, 0x36, 0x1f, 0xfb, 0x4c, 0x92, 0xc7, 0xa8, 0x17, 0x6a, 0x53, 0xce, 0xa2, 0x5b, - 0xed, 0x74, 0x6f, 0x1f, 0xaf, 0xf2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ff, 0xb8, 0xfc, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0x54, 0xc0, 0x12, 0x2b, - 0x1d, 0x00, 0x00, + // 3070 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x59, 0x69, 0x90, 0x1c, 0xc5, + 0x95, 0x66, 0xa6, 0xa7, 0xa7, 0xbb, 0x53, 0x1c, 0x49, 0xa2, 0xfb, 0x96, 0x40, 0x02, 0x06, 0x56, + 0x62, 0x97, 0x0d, 0x7e, 0xec, 0xbf, 0xec, 0xaa, 0xec, 0xee, 0x54, 0x57, 0x65, 0x55, 0x64, 0x66, + 0xcd, 0x68, 0xf4, 0xa7, 0x42, 0xac, 0x46, 0x42, 0x30, 0x52, 0x8b, 0x99, 0x11, 0xbb, 0xec, 0xfa, + 0xe0, 0x87, 0xef, 0x23, 0xc2, 0x17, 0x87, 0x8f, 0x1f, 0x80, 0xed, 0xf0, 0x1f, 0x03, 0xbe, 0x0f, + 0xcc, 0x69, 0x6c, 0x87, 0x31, 0x97, 0x6f, 0x03, 0x61, 0xff, 0xb3, 0x1d, 0x36, 0xc6, 0x47, 0xd8, + 0xdc, 0xa7, 0xe3, 0x65, 0xd6, 0x91, 0xd5, 0xdd, 0x83, 0x7f, 0x10, 0xb4, 0xf2, 0x7d, 0xf5, 0xf2, + 0xe5, 0xcb, 0x97, 0xef, 0x7d, 0xef, 0x0d, 0x5a, 0xb3, 0x70, 0xf2, 0xf4, 0x89, 0xe5, 0x7d, 0xa7, + 0x96, 0x06, 0x2b, 0x03, 0xb2, 0xc6, 0xfc, 0x6f, 0x9f, 0x59, 0x9a, 0x19, 0xa0, 0x35, 0xed, 0xd3, + 0xc7, 0x17, 0x8f, 0x2c, 0x2c, 0xe9, 0xeb, 0x4f, 0x2d, 0x90, 0x8d, 0x68, 0x6d, 0x22, 0xfa, 0x22, + 0x9a, 0x13, 0x69, 0x3b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x8f, 0x17, 0xc8, 0x16, 0xb4, 0x21, 0x93, 0xca, 0xe8, 0x00, 0xf3, 0x74, 0x2a, 0x22, 0x9d, 0x76, + 0xa2, 0x44, 0xf8, 0xf8, 0x28, 0x39, 0x1f, 0xed, 0xb0, 0x42, 0x1b, 0x52, 0xa9, 0x4f, 0x59, 0x18, + 0x09, 0x03, 0x91, 0x89, 0x10, 0x5c, 0x74, 0xf1, 0x31, 0xb2, 0x16, 0x61, 0x0b, 0x4a, 0x14, 0x93, + 0xa9, 0xf5, 0xc6, 0x55, 0xe5, 0xae, 0xd9, 0xa7, 0x89, 0xa0, 0xb3, 0x94, 0x07, 0xb4, 0x1d, 0x30, + 0x7c, 0x9c, 0x6c, 0x43, 0x9b, 0x86, 0xa5, 0x89, 0xee, 0x45, 0x92, 0x1f, 0x62, 0x3e, 0xbe, 0xba, + 0x34, 0x2a, 0x13, 0xab, 0x79, 0xa5, 0x59, 0x08, 0xba, 0xf1, 0x35, 0x64, 0x17, 0xda, 0x56, 0x11, + 0x82, 0x35, 0x61, 0xe4, 0xf3, 0x0e, 0x67, 0xbe, 0x81, 0x2c, 0x92, 0x0b, 0xd0, 0xce, 0x11, 0x08, + 0x0f, 0xe3, 0x80, 0x85, 0x4c, 0xe8, 0x0c, 0x75, 0x82, 0x6c, 0x47, 0x9b, 0x87, 0x4e, 0xa7, 0x69, + 0x1a, 0x44, 0x4a, 0x19, 0xf9, 0xc9, 0x11, 0x79, 0x27, 0x92, 0x6d, 0xee, 0xfb, 0x4c, 0x18, 0xf9, + 0x60, 0xe4, 0x10, 0x5e, 0x24, 0x3a, 0x01, 0xf7, 0xb4, 0x11, 0x9f, 0x22, 0x3b, 0xd1, 0xd6, 0x8a, + 0xd8, 0x78, 0xc6, 0x71, 0xef, 0xb5, 0x64, 0x37, 0xda, 0x5e, 0x41, 0x70, 0x31, 0x4b, 0x03, 0xee, + 0xa7, 0x31, 0x95, 0xd4, 0x9e, 0x76, 0x69, 0xd8, 0x88, 0x0e,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xa6, 0xf0, 0x63, 0x66, 0x56, + 0xeb, 0x2a, 0xb9, 0xfc, 0x3f, 0xf0, 0xe3, 0x13, 0x64, 0x1f, 0xba, 0x78, 0x55, 0x35, 0x39, 0xc3, + 0x80, 0x74, 0x19, 0x53, 0x8f, 0xe1, 0x27, 0x26, 0xa0, 0x8b, 0xc9, 0x8d, 0xcb, 0xe7, 0xdf, 0xbf, + 0x9e, 0x00, 0xa6, 0x30, 0xdc, 0xd3, 0x06, 0x51, 0x57, 0xe1, 0x3b, 0x26, 0xcb, 0x93, 0xc2, 0x53, + 0xe5, 0x82, 0x29, 0x05, 0x41, 0xd9, 0x66, 0xf8, 0x4e, 0x47, 0x56, 0x7e, 0x66, 0x28, 0x0f, 0xbe, + 0x6b, 0x12, 0xca, 0x1a, 0xf5, 0x7d, 0x09, 0xf8, 0xd5, 0x26, 0x2d, 0x3b, 0xd0, 0xe6, 0x0a, 0x64, + 0x64, 0xca, 0xb2, 0x07, 0xed, 0xac, 0x00, 0x56, 0x99, 0xb0, 0x6c, 0x47, 0x9b, 0x2a, 0xb0, 0xe1, + 0xe9, 0xca, 0xf0, 0x3e, 0x23, 0x93, 0x95, 0x6d, 0x68, 0xe3, 0x10, 0xa0, 0x32, 0x55, 0xd9, 0x82, + 0xd6, 0x57, 0xcd, 0x70, 0x27, 0x2a, 0xce, 0xe6, 0x63, 0xa7, 0x29, 0x85, 0x8f, 0x7a, 0x91, 0xd2, + 0x6e, 0x14, 0xdd, 0x62, 0x86, 0x00, 0x66, 0xc6, 0x55, 0x44, 0x11, 0x7e, 0xbe, 0x06, 0x9d, 0x53, + 0x22, 0x4c, 0x5b, 0x57, 0x2e, 0xbf, 0x60, 0xda, 0x7b, 0x37, 0x78, 0x93, 0x20, 0xc0, 0x5f, 0x98, + 0x32, 0x8d, 0x2b, 0x03, 0x6b, 0x4c, 0x65, 0x87, 0xd8, 0x2d, 0x78, 0x7e, 0x87, 0x06, 0x8a, 0xe1, + 0x27, 0xa7, 0x20, 0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, 0xf1, 0x6d, 0xd3, 0x60, 0x74, + 0x2e, 0xcf, 0x86, 0xc3, 0x22, 0x4e, 0x8a, 0x5a, 0x89, 0x6f, 0x9f, 0x26, 0xe7, 0x20, 0x14, 0xc5, + 0x4c, 0xa4, 0x5c, 0xa9, 0x84, 0xe1, 0x77, 0x35, 0x9c, 0x54, 0x90, 0xf1, 0xd1, 0x28, 0x0c, 0xa9, + 0xf0, 0xf1, 0x1f, 0x4c, 0xd3, 0x69, 0x0a, 0x47, 0x45, 0x60, 0x78, 0x7b, 0x94, 0x68, 0x68, 0xb7, + 0x67, 0xd0, 0x9e, 0x71, 0xdf, 0x8e, 0x10, 0x65, 0xe8, 0xb9, 0x81, 0xd8, 0xfd, 0x4b, 0xac, 0x21, + 0x52, 0xd0, 0x88, 0xef, 0x45, 0xbb, 0x2c, 0xda, 0x52, 0xe5, 0x0c, 0x0b, 0xff, 0xd9, 0x46, 0xcf, + 0x64, 0xf8, 0x67, 0x1b, 0xed, 0x2b, 0x0e, 0xfd, 0xe7, 0xb1, 0xe3, 0x2b, 0x57, 0x9d, 0xbe, 0x72, + 0xdf, 0x7f, 0x0f, 0x4e, 0xec, 0xef, 0x0e, 0x06, 0xc7, 0x16, 0x17, 0xbc, 0xc1, 0xc9, 0x95, 0xc3, + 0xc7, 0x4f, 0x2e, 0x2c, 0xe9, 0xc1, 0x60, 0x71, 0x79, 0xff, 0xf2, 0x35, 0x87, 0x8f, 0x1e, 0x1d, + 0x2c, 0x1e, 0xd9, 0x6f, 0xfe, 0xac, 0xba, 0xdf, 0xfc, 0x59, 0xf5, 0xca, 0x69, 0xf3, 0x8f, 0xcb, + 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xef, 0xd2, 0x57, 0x79, 0x1d, 0x00, 0x00, } diff --git a/proto/enums/enums.proto b/proto/enums/enums.proto index f52f61e75e4..c13d0607ae8 100644 --- a/proto/enums/enums.proto +++ b/proto/enums/enums.proto @@ -427,6 +427,8 @@ enum StatusCode { CONFIG_UNKNOWN_VALIDATOR = 1214; // The transformer is not allowed in skaffold-managed mode. CONFIG_UNKNOWN_TRANSFORMER = 1215; + // Manifest file not found + CONFIG_MISSING_MANIFEST_FILE_ERR = 1216; // Inspect command errors @@ -581,6 +583,8 @@ enum SuggestionCode { CONFIG_ALLOWLIST_VALIDATORS = 708; // Only the allow listed transformers are acceptable in skaffold-managed mode. CONFIG_ALLOWLIST_transformers = 709; + // Check mising manifest file section of config and fix as needed. + CONFIG_FIX_MISSING_MANIFEST_FILE = 710; // `skaffold inspect` command error suggestion codes diff --git a/proto/v1/skaffold.pb.go b/proto/v1/skaffold.pb.go index 0ffef490f8f..a21b5c14c45 100644 --- a/proto/v1/skaffold.pb.go +++ b/proto/v1/skaffold.pb.go @@ -248,6 +248,7 @@ const StatusCode_CONFIG_PROFILES_NOT_FOUND_ERR = StatusCode(enums.StatusCode_CON const StatusCode_CONFIG_UNKNOWN_API_VERSION_ERR = StatusCode(enums.StatusCode_CONFIG_UNKNOWN_API_VERSION_ERR) const StatusCode_CONFIG_UNKNOWN_VALIDATOR = StatusCode(enums.StatusCode_CONFIG_UNKNOWN_VALIDATOR) const StatusCode_CONFIG_UNKNOWN_TRANSFORMER = StatusCode(enums.StatusCode_CONFIG_UNKNOWN_TRANSFORMER) +const StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR = StatusCode(enums.StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR) const StatusCode_INSPECT_UNKNOWN_ERR = StatusCode(enums.StatusCode_INSPECT_UNKNOWN_ERR) const StatusCode_INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR = StatusCode(enums.StatusCode_INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR) const StatusCode_INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR = StatusCode(enums.StatusCode_INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR) @@ -313,6 +314,7 @@ const SuggestionCode_CONFIG_CHECK_PROFILE_SELECTION = SuggestionCode(enums.Sugge const SuggestionCode_CONFIG_FIX_API_VERSION = SuggestionCode(enums.SuggestionCode_CONFIG_FIX_API_VERSION) const SuggestionCode_CONFIG_ALLOWLIST_VALIDATORS = SuggestionCode(enums.SuggestionCode_CONFIG_ALLOWLIST_VALIDATORS) const SuggestionCode_CONFIG_ALLOWLIST_transformers = SuggestionCode(enums.SuggestionCode_CONFIG_ALLOWLIST_transformers) +const SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE = SuggestionCode(enums.SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE) const SuggestionCode_INSPECT_USE_MODIFY_OR_NEW_PROFILE = SuggestionCode(enums.SuggestionCode_INSPECT_USE_MODIFY_OR_NEW_PROFILE) const SuggestionCode_INSPECT_USE_ADD_BUILD_ENV = SuggestionCode(enums.SuggestionCode_INSPECT_USE_ADD_BUILD_ENV) const SuggestionCode_INSPECT_CHECK_INPUT_PROFILE = SuggestionCode(enums.SuggestionCode_INSPECT_CHECK_INPUT_PROFILE) diff --git a/proto/v2/skaffold.pb.go b/proto/v2/skaffold.pb.go index 1e3d9e18d18..cd355632ee3 100644 --- a/proto/v2/skaffold.pb.go +++ b/proto/v2/skaffold.pb.go @@ -248,6 +248,7 @@ const StatusCode_CONFIG_PROFILES_NOT_FOUND_ERR = StatusCode(enums.StatusCode_CON const StatusCode_CONFIG_UNKNOWN_API_VERSION_ERR = StatusCode(enums.StatusCode_CONFIG_UNKNOWN_API_VERSION_ERR) const StatusCode_CONFIG_UNKNOWN_VALIDATOR = StatusCode(enums.StatusCode_CONFIG_UNKNOWN_VALIDATOR) const StatusCode_CONFIG_UNKNOWN_TRANSFORMER = StatusCode(enums.StatusCode_CONFIG_UNKNOWN_TRANSFORMER) +const StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR = StatusCode(enums.StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR) const StatusCode_INSPECT_UNKNOWN_ERR = StatusCode(enums.StatusCode_INSPECT_UNKNOWN_ERR) const StatusCode_INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR = StatusCode(enums.StatusCode_INSPECT_BUILD_ENV_ALREADY_EXISTS_ERR) const StatusCode_INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR = StatusCode(enums.StatusCode_INSPECT_BUILD_ENV_INCORRECT_TYPE_ERR) @@ -313,6 +314,7 @@ const SuggestionCode_CONFIG_CHECK_PROFILE_SELECTION = SuggestionCode(enums.Sugge const SuggestionCode_CONFIG_FIX_API_VERSION = SuggestionCode(enums.SuggestionCode_CONFIG_FIX_API_VERSION) const SuggestionCode_CONFIG_ALLOWLIST_VALIDATORS = SuggestionCode(enums.SuggestionCode_CONFIG_ALLOWLIST_VALIDATORS) const SuggestionCode_CONFIG_ALLOWLIST_transformers = SuggestionCode(enums.SuggestionCode_CONFIG_ALLOWLIST_transformers) +const SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE = SuggestionCode(enums.SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE) const SuggestionCode_INSPECT_USE_MODIFY_OR_NEW_PROFILE = SuggestionCode(enums.SuggestionCode_INSPECT_USE_MODIFY_OR_NEW_PROFILE) const SuggestionCode_INSPECT_USE_ADD_BUILD_ENV = SuggestionCode(enums.SuggestionCode_INSPECT_USE_ADD_BUILD_ENV) const SuggestionCode_INSPECT_CHECK_INPUT_PROFILE = SuggestionCode(enums.SuggestionCode_INSPECT_CHECK_INPUT_PROFILE) From af8aa31b119b813c8fa808ff73d2d124812cd3e9 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 29 Jun 2021 12:04:52 -0700 Subject: [PATCH 030/103] log failure (#6108) --- pkg/skaffold/instrumentation/export.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/skaffold/instrumentation/export.go b/pkg/skaffold/instrumentation/export.go index 4f9645d6b6c..433ccf7e59a 100644 --- a/pkg/skaffold/instrumentation/export.go +++ b/pkg/skaffold/instrumentation/export.go @@ -94,7 +94,12 @@ func exportMetrics(ctx context.Context, filename string, meter skaffoldMeter) er for _, m := range meters { createMetrics(ctx, m) } - p.Stop(ctx) + if err := p.Stop(ctx); err != nil { + logrus.Debugf("error uploading metrics: %s", err) + logrus.Debugf("writing to file %s instead", filename) + b, _ = json.Marshal(meters) + return ioutil.WriteFile(filename, b, 0666) + } logrus.Debugf("metrics uploading complete in %s", time.Since(start).String()) if fileExists { From 58a4652fcf6859fe7792b7e7bf5f202b5e5c9291 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Tue, 29 Jun 2021 15:46:14 -0400 Subject: [PATCH 031/103] Optimize k8s-skaffold/skaffold image (#6106) * Optimize k8s-skaffold/skaffold image * builder should include skaffold source * builder wants /usr/bin/skaffold --- deploy/skaffold/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/deploy/skaffold/Dockerfile b/deploy/skaffold/Dockerfile index dc05a6e5f05..36ff5712768 100644 --- a/deploy/skaffold/Dockerfile +++ b/deploy/skaffold/Dockerfile @@ -13,12 +13,14 @@ # limitations under the License. # This base image has to be updated manually after running `make build_deps` -FROM gcr.io/k8s-skaffold/build_deps:45b0b2b2c59e1b381f5386d6c960dd87c3a3c9d8 as builder +FROM gcr.io/k8s-skaffold/build_deps:45b0b2b2c59e1b381f5386d6c960dd87c3a3c9d8 as build WORKDIR /skaffold -COPY . . -FROM builder as release +FROM build as builder ARG VERSION -RUN make clean out/skaffold VERSION=$VERSION && mv out/skaffold /usr/bin/skaffold -RUN rm -rf secrets $SECRET cmd/skaffold/app/cmd/statik/statik.go +COPY . . +RUN make clean out/skaffold VERSION=$VERSION && mv out/skaffold /usr/bin/skaffold && rm -rf secrets $SECRET cmd/skaffold/app/cmd/statik/statik.go + +FROM build as release +COPY --from=builder /usr/bin/skaffold /usr/bin/skaffold RUN skaffold credits -d /THIRD_PARTY_NOTICES From 1f46f249c832bb2a99e3285ad327647c95ff4bb9 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 29 Jun 2021 14:31:53 -0700 Subject: [PATCH 032/103] release: v1.27.0 --- CHANGELOG.md | 61 +++++++++++++++++++ examples/bazel/skaffold.yaml | 2 +- examples/buildpacks-java/skaffold.yaml | 2 +- examples/buildpacks-node/skaffold.yaml | 2 +- examples/buildpacks-python/skaffold.yaml | 2 +- examples/buildpacks/skaffold.yaml | 2 +- examples/custom-buildx/skaffold.yaml | 2 +- examples/custom-tests/skaffold.yaml | 2 +- examples/custom/skaffold.yaml | 2 +- examples/gcb-kaniko/skaffold.yaml | 2 +- examples/generate-pipeline/skaffold.yaml | 2 +- .../getting-started-kustomize/skaffold.yaml | 2 +- examples/getting-started/skaffold.yaml | 2 +- examples/google-cloud-build/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- examples/helm-deployment/skaffold.yaml | 2 +- examples/helm-remote-repo/skaffold.yaml | 2 +- examples/hot-reload/skaffold.yaml | 2 +- examples/jib-gradle/build.gradle | 2 +- examples/jib-gradle/skaffold.yaml | 2 +- examples/jib-multimodule/pom.xml | 2 +- examples/jib-multimodule/skaffold.yaml | 2 +- examples/jib-sync/build.gradle | 2 +- examples/jib-sync/pom.xml | 2 +- examples/jib-sync/skaffold-gradle.yaml | 2 +- examples/jib-sync/skaffold-maven.yaml | 2 +- examples/jib/pom.xml | 2 +- examples/jib/skaffold.yaml | 2 +- examples/kaniko/skaffold.yaml | 2 +- .../kustomize/skaffold-kustomize-args.yaml | 2 +- examples/kustomize/skaffold.yaml | 2 +- examples/microservices/skaffold.yaml | 2 +- .../base/skaffold.yaml | 2 +- .../leeroy-app/skaffold.yaml | 2 +- .../leeroy-web/skaffold.yaml | 2 +- .../multi-config-microservices/skaffold.yaml | 2 +- examples/nodejs/skaffold.yaml | 2 +- examples/profile-patches/skaffold.yaml | 2 +- examples/profiles/skaffold.yaml | 2 +- examples/react-reload/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- examples/ruby/backend/Gemfile.lock | 4 +- examples/ruby/skaffold.yaml | 2 +- .../simple-artifact-dependency/skaffold.yaml | 2 +- examples/structure-tests/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- examples/templated-fields/skaffold.yaml | 2 +- examples/typescript/skaffold.yaml | 2 +- pkg/skaffold/schema/latest/v1/config.go | 2 +- 49 files changed, 110 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f643fd9e780..9112757aeb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,64 @@ +# v1.27.0 Release - 06/29/2021 +Note: This release comes with a new config version, `v2beta18`. To upgrade your skaffold.yaml, use `skaffold fix`. If you choose not to upgrade, skaffold will auto-upgrade as best as it can. + +Highlights: +* Skaffold CLI respects `--kube-context` & `--kubeconfig` command line flags and uses it instead of active kubernetes context. +* Status-Check now runs per deployer sequentially. For `skaffold.yaml` with multiple deployers, the next deploy will start after previous deployed resources stabilize. Docs coming soon! + +New Features: +* Configure nodes for running cluster builds (e.g. kaniko) by using the node selector config option `cluster.nodeSelector`. [#6083](https://github.com/GoogleContainerTools/skaffold/pull/6083) +* Better defaults for GCB project when using Artifact Registry images [#6093](https://github.com/GoogleContainerTools/skaffold/pull/6093) +* Skaffold init now supports Jib and Buildpacks artifacts by default [#6063](https://github.com/GoogleContainerTools/skaffold/pull/6063) +* Structured tests configuration supports custom parameters [#6055](https://github.com/GoogleContainerTools/skaffold/pull/6055) + +Fixes: +* log metrics upload failure and write to file instead. [#6108](https://github.com/GoogleContainerTools/skaffold/pull/6108) +* Skaffold Render now validates manifests [#6043](https://github.com/GoogleContainerTools/skaffold/pull/6043) +* Port-forwarding improvements for multi-config projects [#6090](https://github.com/GoogleContainerTools/skaffold/pull/6090) +* Fix helm deploy error when configuring helm arg list and skaffold overrides[#6080](https://github.com/GoogleContainerTools/skaffold/pull/6080) +* Use non alpine image and protoc 3.17.3 in proto generation [#6073](https://github.com/GoogleContainerTools/skaffold/pull/6073) +* Fix setting `kubeContext` in skaffold [#6024](https://github.com/GoogleContainerTools/skaffold/pull/6024) +* Use StdEncoding for git hash directory name [#6071](https://github.com/GoogleContainerTools/skaffold/pull/6071) +* fix status-check to return success only on exact success criteria match [#6010](https://github.com/GoogleContainerTools/skaffold/pull/6010) +* fix: gcb api throttling retry backoff not implemented correctly [#6023](https://github.com/GoogleContainerTools/skaffold/pull/6023) +* Ensure events are serialized [#6064](https://github.com/GoogleContainerTools/skaffold/pull/6064) + +Updates and Refactors: +* add source file and module to config parsing error description [#6087](https://github.com/GoogleContainerTools/skaffold/pull/6087) +* Refactor to move podSelector, Syncer, StatusCheck, Debugger, Port-forwarder under Deployer [#6076](https://github.com/GoogleContainerTools/skaffold/pull/6076), + [#6053](https://github.com/GoogleContainerTools/skaffold/pull/6053), [#6026](https://github.com/GoogleContainerTools/skaffold/pull/6026), + [#6021](https://github.com/GoogleContainerTools/skaffold/pull/6021), + [#6044](https://github.com/GoogleContainerTools/skaffold/pull/6044) +* fix v3alpha version [#6084](https://github.com/GoogleContainerTools/skaffold/pull/6084), +* [v2] Update v2 with new UX [#6086](https://github.com/GoogleContainerTools/skaffold/pull/6086) +* Update to github.com/gogo/protobuf v1.3.2 (GO-2021-0053) [#6022](https://github.com/GoogleContainerTools/skaffold/pull/6022) + +Docs, Test, and Release Updates: +* Document Helm image reference strategies [#6017](https://github.com/GoogleContainerTools/skaffold/pull/6017) +* Optimize k8s-skaffold/skaffold image [#6106](https://github.com/GoogleContainerTools/skaffold/pull/6106) +* Fix typo in executed file name [#6105](https://github.com/GoogleContainerTools/skaffold/pull/6105) +* Escape parentheses in shJoin [#6101](https://github.com/GoogleContainerTools/skaffold/pull/6101) +* Fix instructions to add actionable error codes. [#6094](https://github.com/GoogleContainerTools/skaffold/pull/6094) +* Updates to ko builder design proposal to add implementation approach [#6046](https://github.com/GoogleContainerTools/skaffold/pull/6046) +* fix invalid config version links in DEVELOPMENT.md [#6058](https://github.com/GoogleContainerTools/skaffold/pull/6058) + + +Huge thanks goes out to all of our contributors for this release: + +- Aaron Prindle +- Brian de Alwis +- Chanseok Oh +- Daniel Petró +- Gaurav +- Halvard Skogsrud +- Jack +- Kaan Karakaya +- Marlon Gamez +- Mridula +- Nick Kubala +- Tejal Desai +- Yuwen Ma + # v1.26.0 Release - 06/08/2021 Highlights: diff --git a/examples/bazel/skaffold.yaml b/examples/bazel/skaffold.yaml index 5e1075ddd56..1b01fc1a31a 100644 --- a/examples/bazel/skaffold.yaml +++ b/examples/bazel/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/buildpacks-java/skaffold.yaml b/examples/buildpacks-java/skaffold.yaml index 6b2e923c7df..f81af0a96a2 100644 --- a/examples/buildpacks-java/skaffold.yaml +++ b/examples/buildpacks-java/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/buildpacks-node/skaffold.yaml b/examples/buildpacks-node/skaffold.yaml index 57bf6c6b33e..7a7ad961084 100644 --- a/examples/buildpacks-node/skaffold.yaml +++ b/examples/buildpacks-node/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/buildpacks-python/skaffold.yaml b/examples/buildpacks-python/skaffold.yaml index c1cd05be98c..8c5f40a0b3e 100644 --- a/examples/buildpacks-python/skaffold.yaml +++ b/examples/buildpacks-python/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/buildpacks/skaffold.yaml b/examples/buildpacks/skaffold.yaml index 13a200dca17..d9a2f676412 100644 --- a/examples/buildpacks/skaffold.yaml +++ b/examples/buildpacks/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/custom-buildx/skaffold.yaml b/examples/custom-buildx/skaffold.yaml index da376080530..6b5e3091c3f 100644 --- a/examples/custom-buildx/skaffold.yaml +++ b/examples/custom-buildx/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: diff --git a/examples/custom-tests/skaffold.yaml b/examples/custom-tests/skaffold.yaml index 9f57cf76281..22d14182b38 100644 --- a/examples/custom-tests/skaffold.yaml +++ b/examples/custom-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/custom/skaffold.yaml b/examples/custom/skaffold.yaml index f822bd902f5..0ec8861d220 100644 --- a/examples/custom/skaffold.yaml +++ b/examples/custom/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/gcb-kaniko/skaffold.yaml b/examples/gcb-kaniko/skaffold.yaml index f38d6f62d3d..e6686f61ddf 100644 --- a/examples/gcb-kaniko/skaffold.yaml +++ b/examples/gcb-kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: googleCloudBuild: diff --git a/examples/generate-pipeline/skaffold.yaml b/examples/generate-pipeline/skaffold.yaml index 0d528afd4d3..d47225948e8 100644 --- a/examples/generate-pipeline/skaffold.yaml +++ b/examples/generate-pipeline/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/getting-started-kustomize/skaffold.yaml b/examples/getting-started-kustomize/skaffold.yaml index c17e5750d30..8ba8b8c79b4 100644 --- a/examples/getting-started-kustomize/skaffold.yaml +++ b/examples/getting-started-kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config metadata: name: getting-started-kustomize diff --git a/examples/getting-started/skaffold.yaml b/examples/getting-started/skaffold.yaml index f5f42111557..641084e39f9 100644 --- a/examples/getting-started/skaffold.yaml +++ b/examples/getting-started/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/google-cloud-build/skaffold.yaml b/examples/google-cloud-build/skaffold.yaml index f585467131e..810bf8cd801 100644 --- a/examples/google-cloud-build/skaffold.yaml +++ b/examples/google-cloud-build/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: googleCloudBuild: diff --git a/examples/helm-deployment-dependencies/skaffold.yaml b/examples/helm-deployment-dependencies/skaffold.yaml index 578e8e834a4..97a0fbde30c 100644 --- a/examples/helm-deployment-dependencies/skaffold.yaml +++ b/examples/helm-deployment-dependencies/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: tagPolicy: diff --git a/examples/helm-deployment/skaffold.yaml b/examples/helm-deployment/skaffold.yaml index f20eef6246b..a3228ecc763 100644 --- a/examples/helm-deployment/skaffold.yaml +++ b/examples/helm-deployment/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/helm-remote-repo/skaffold.yaml b/examples/helm-remote-repo/skaffold.yaml index ee8fed68342..6a5e31cd341 100644 --- a/examples/helm-remote-repo/skaffold.yaml +++ b/examples/helm-remote-repo/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config deploy: helm: diff --git a/examples/hot-reload/skaffold.yaml b/examples/hot-reload/skaffold.yaml index 33ab67476db..7a45aafff0b 100644 --- a/examples/hot-reload/skaffold.yaml +++ b/examples/hot-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/jib-gradle/build.gradle b/examples/jib-gradle/build.gradle index fc0d4d81fa0..ebfa4cda8b7 100644 --- a/examples/jib-gradle/build.gradle +++ b/examples/jib-gradle/build.gradle @@ -3,7 +3,7 @@ plugins { id 'groovy' id 'io.spring.dependency-management' version '1.0.6.RELEASE' id 'net.ltgt.apt-idea' version '0.18' - id 'com.google.cloud.tools.jib' version '3.0.0' + id 'com.google.cloud.tools.jib' version '3.1.1' } sourceCompatibility = 1.8 diff --git a/examples/jib-gradle/skaffold.yaml b/examples/jib-gradle/skaffold.yaml index 92ac915d93f..f958c60c1e8 100644 --- a/examples/jib-gradle/skaffold.yaml +++ b/examples/jib-gradle/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/jib-multimodule/pom.xml b/examples/jib-multimodule/pom.xml index 72c6366955f..d5580ab183c 100644 --- a/examples/jib-multimodule/pom.xml +++ b/examples/jib-multimodule/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.1.1 + 3.0.0 diff --git a/examples/jib-multimodule/skaffold.yaml b/examples/jib-multimodule/skaffold.yaml index 96ae7e28cd3..fc5c21c43f1 100644 --- a/examples/jib-multimodule/skaffold.yaml +++ b/examples/jib-multimodule/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/jib-sync/build.gradle b/examples/jib-sync/build.gradle index 86be9f5397b..f325f852f7d 100644 --- a/examples/jib-sync/build.gradle +++ b/examples/jib-sync/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id 'org.springframework.boot' version '2.0.5.RELEASE' id 'io.spring.dependency-management' version '1.0.7.RELEASE' - id 'com.google.cloud.tools.jib' version '3.1.1' + id 'com.google.cloud.tools.jib' version '3.0.0' } repositories { diff --git a/examples/jib-sync/pom.xml b/examples/jib-sync/pom.xml index 1eaf0aed95e..c5678a310b8 100644 --- a/examples/jib-sync/pom.xml +++ b/examples/jib-sync/pom.xml @@ -9,7 +9,7 @@ 1.8 - 3.1.1 + 3.0.0 diff --git a/examples/jib-sync/skaffold-gradle.yaml b/examples/jib-sync/skaffold-gradle.yaml index 277879ef5b7..b5111c07b70 100644 --- a/examples/jib-sync/skaffold-gradle.yaml +++ b/examples/jib-sync/skaffold-gradle.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/jib-sync/skaffold-maven.yaml b/examples/jib-sync/skaffold-maven.yaml index e73d0cac5b8..d1e986475cd 100644 --- a/examples/jib-sync/skaffold-maven.yaml +++ b/examples/jib-sync/skaffold-maven.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/jib/pom.xml b/examples/jib/pom.xml index 49732a06e6a..78a4a718e4a 100644 --- a/examples/jib/pom.xml +++ b/examples/jib/pom.xml @@ -9,7 +9,7 @@ 1.8 - 3.1.1 + 3.0.0 diff --git a/examples/jib/skaffold.yaml b/examples/jib/skaffold.yaml index 079bfd1e9ca..2f8901388b7 100644 --- a/examples/jib/skaffold.yaml +++ b/examples/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/kaniko/skaffold.yaml b/examples/kaniko/skaffold.yaml index 277850e9619..62166545be9 100644 --- a/examples/kaniko/skaffold.yaml +++ b/examples/kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/kustomize/skaffold-kustomize-args.yaml b/examples/kustomize/skaffold-kustomize-args.yaml index e5bd0a96c45..815e8a664f7 100644 --- a/examples/kustomize/skaffold-kustomize-args.yaml +++ b/examples/kustomize/skaffold-kustomize-args.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config deploy: kustomize: diff --git a/examples/kustomize/skaffold.yaml b/examples/kustomize/skaffold.yaml index 890a52775a3..10480c65c8f 100644 --- a/examples/kustomize/skaffold.yaml +++ b/examples/kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config deploy: kustomize: {} diff --git a/examples/microservices/skaffold.yaml b/examples/microservices/skaffold.yaml index 3de2d385baf..b4714d5aa6e 100644 --- a/examples/microservices/skaffold.yaml +++ b/examples/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/multi-config-microservices/base/skaffold.yaml b/examples/multi-config-microservices/base/skaffold.yaml index 86269ef8e2e..9b6f530f97f 100644 --- a/examples/multi-config-microservices/base/skaffold.yaml +++ b/examples/multi-config-microservices/base/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/multi-config-microservices/leeroy-app/skaffold.yaml b/examples/multi-config-microservices/leeroy-app/skaffold.yaml index c5bbed7b446..456b33284fc 100644 --- a/examples/multi-config-microservices/leeroy-app/skaffold.yaml +++ b/examples/multi-config-microservices/leeroy-app/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config metadata: name: app-config diff --git a/examples/multi-config-microservices/leeroy-web/skaffold.yaml b/examples/multi-config-microservices/leeroy-web/skaffold.yaml index 29cc2f707f5..6cabbd2ebc7 100644 --- a/examples/multi-config-microservices/leeroy-web/skaffold.yaml +++ b/examples/multi-config-microservices/leeroy-web/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config metadata: name: web-config diff --git a/examples/multi-config-microservices/skaffold.yaml b/examples/multi-config-microservices/skaffold.yaml index b2293dbe23d..cf2172417fe 100644 --- a/examples/multi-config-microservices/skaffold.yaml +++ b/examples/multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config requires: - path: ./leeroy-app diff --git a/examples/nodejs/skaffold.yaml b/examples/nodejs/skaffold.yaml index 96b03614fec..3e423ee4117 100644 --- a/examples/nodejs/skaffold.yaml +++ b/examples/nodejs/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: diff --git a/examples/profile-patches/skaffold.yaml b/examples/profile-patches/skaffold.yaml index fd46666a7f3..89c5551995b 100644 --- a/examples/profile-patches/skaffold.yaml +++ b/examples/profile-patches/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: # only build and deploy "base-service" on main profile diff --git a/examples/profiles/skaffold.yaml b/examples/profiles/skaffold.yaml index 81f69fa6743..88efd92dc79 100644 --- a/examples/profiles/skaffold.yaml +++ b/examples/profiles/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: # only build and deploy "world-service" on main profile diff --git a/examples/react-reload/skaffold.yaml b/examples/react-reload/skaffold.yaml index 75124bbc16e..93b80760296 100644 --- a/examples/react-reload/skaffold.yaml +++ b/examples/react-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/remote-multi-config-microservices/skaffold.yaml b/examples/remote-multi-config-microservices/skaffold.yaml index 4c1a79edd8c..78708e84bc3 100644 --- a/examples/remote-multi-config-microservices/skaffold.yaml +++ b/examples/remote-multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config requires: - git: diff --git a/examples/ruby/backend/Gemfile.lock b/examples/ruby/backend/Gemfile.lock index 823faa57d4d..a5a6ab0c273 100644 --- a/examples/ruby/backend/Gemfile.lock +++ b/examples/ruby/backend/Gemfile.lock @@ -1,8 +1,8 @@ GEM remote: https://rubygems.org/ specs: - nio4r (2.5.7) - puma (4.3.8) + nio4r (2.5.2) + puma (4.3.5) nio4r (~> 2.0) rack (2.1.4) rack-unreloader (1.7.0) diff --git a/examples/ruby/skaffold.yaml b/examples/ruby/skaffold.yaml index 85097dd2a7e..01752662caa 100644 --- a/examples/ruby/skaffold.yaml +++ b/examples/ruby/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/simple-artifact-dependency/skaffold.yaml b/examples/simple-artifact-dependency/skaffold.yaml index d0ec16515af..9ef02451c1e 100644 --- a/examples/simple-artifact-dependency/skaffold.yaml +++ b/examples/simple-artifact-dependency/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/structure-tests/skaffold.yaml b/examples/structure-tests/skaffold.yaml index e75ae7a0527..004b3c52169 100644 --- a/examples/structure-tests/skaffold.yaml +++ b/examples/structure-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/tagging-with-environment-variables/skaffold.yaml b/examples/tagging-with-environment-variables/skaffold.yaml index 5a6b0419890..5e3e539f76f 100644 --- a/examples/tagging-with-environment-variables/skaffold.yaml +++ b/examples/tagging-with-environment-variables/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: artifacts: diff --git a/examples/templated-fields/skaffold.yaml b/examples/templated-fields/skaffold.yaml index 06f584fc32a..4f5c9a586d5 100644 --- a/examples/templated-fields/skaffold.yaml +++ b/examples/templated-fields/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config metadata: name: my-app diff --git a/examples/typescript/skaffold.yaml b/examples/typescript/skaffold.yaml index 9a1f9d2c7d0..f66439034a3 100644 --- a/examples/typescript/skaffold.yaml +++ b/examples/typescript/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta17 +apiVersion: skaffold/v2beta18 kind: Config build: diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index 829138f91bd..961f303a683 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) -// This config version is not yet released, it is SAFE TO MODIFY the structs in this file. +// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file. const Version string = "skaffold/v2beta18" // NewSkaffoldConfig creates a SkaffoldConfig From 83168c83be72a419a3d3e527465e79c13056fb64 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Wed, 30 Jun 2021 13:27:35 -0700 Subject: [PATCH 033/103] change proto v1 package name (#6112) --- cmd/skaffold/app/cmd/runner.go | 2 +- docs/content/en/api/skaffold.swagger.json | 260 ++++++------ docs/content/en/docs/references/api/grpc.md | 226 +++++------ hack/generate-proto.sh | 6 +- integration/cache_test.go | 2 +- integration/debug_test.go | 2 +- integration/dev_test.go | 2 +- integration/rpc_test.go | 2 +- integration/sync_test.go | 2 +- integration/test_events_test.go | 2 +- pkg/diag/recommender/container_errors.go | 2 +- pkg/diag/validator/pod.go | 2 +- pkg/diag/validator/pod_test.go | 2 +- pkg/diag/validator/recommender.go | 2 +- pkg/diag/validator/resource.go | 2 +- pkg/diag/validator/resource_test.go | 2 +- pkg/skaffold/build/build_problems.go | 2 +- pkg/skaffold/build/build_problems_test.go | 2 +- pkg/skaffold/build/cache/lookup_test.go | 2 +- pkg/skaffold/build/docker/docker_test.go | 2 +- pkg/skaffold/build/docker/errors.go | 2 +- pkg/skaffold/build/jib/errors.go | 2 +- pkg/skaffold/deploy/deploy_problems.go | 2 +- pkg/skaffold/deploy/deploy_problems_test.go | 2 +- pkg/skaffold/deploy/error/errors.go | 2 +- pkg/skaffold/deploy/error/errors_test.go | 2 +- pkg/skaffold/deploy/helm/errors.go | 2 +- pkg/skaffold/deploy/kubectl/errors.go | 2 +- pkg/skaffold/deploy/kustomize/errors.go | 2 +- pkg/skaffold/deploy/resource/deployment.go | 2 +- .../deploy/resource/deployment_test.go | 2 +- pkg/skaffold/deploy/resource/status.go | 2 +- pkg/skaffold/deploy/resource/status_test.go | 2 +- pkg/skaffold/docker/errors.go | 2 +- pkg/skaffold/docker/image_test.go | 2 +- pkg/skaffold/docker/parse.go | 2 +- pkg/skaffold/errors/err_def.go | 2 +- pkg/skaffold/errors/errors.go | 2 +- pkg/skaffold/errors/errors_test.go | 2 +- pkg/skaffold/errors/problem.go | 2 +- pkg/skaffold/event/event.go | 2 +- pkg/skaffold/event/event_test.go | 2 +- pkg/skaffold/event/util.go | 2 +- pkg/skaffold/event/util_test.go | 2 +- pkg/skaffold/initializer/init_problems.go | 2 +- .../initializer/init_problems_test.go | 2 +- .../inspect/buildEnv/modify_gcb_test.go | 2 +- pkg/skaffold/inspect/errors.go | 2 +- pkg/skaffold/inspect/output.go | 2 +- pkg/skaffold/instrumentation/export.go | 2 +- pkg/skaffold/instrumentation/export_test.go | 2 +- pkg/skaffold/instrumentation/meter.go | 2 +- pkg/skaffold/instrumentation/types.go | 2 +- pkg/skaffold/kubernetes/manifest/errors.go | 2 +- .../kubernetes/status/status_check.go | 2 +- .../kubernetes/status/status_check_test.go | 2 +- pkg/skaffold/parser/config_test.go | 2 +- pkg/skaffold/render/renderer/renderer.go | 2 +- pkg/skaffold/render/transform/transform.go | 2 +- pkg/skaffold/render/validate/validate.go | 2 +- pkg/skaffold/runner/v1/dev.go | 2 +- pkg/skaffold/schema/errors/errors.go | 2 +- pkg/skaffold/schema/errors/errors_test.go | 2 +- pkg/skaffold/schema/validation/validation.go | 2 +- pkg/skaffold/server/endpoints.go | 2 +- pkg/skaffold/server/server.go | 2 +- pkg/skaffold/server/server_test.go | 2 +- pkg/skaffold/test/custom/error.go | 2 +- pkg/skaffold/test/structure/error.go | 2 +- proto/v1/skaffold.pb.go | 380 +++++++++--------- proto/v1/skaffold.pb.gw.go | 4 +- proto/v1/skaffold.proto | 4 +- 72 files changed, 509 insertions(+), 503 deletions(-) diff --git a/cmd/skaffold/app/cmd/runner.go b/cmd/skaffold/app/cmd/runner.go index 4a2ca503391..d68937c2648 100644 --- a/cmd/skaffold/app/cmd/runner.go +++ b/cmd/skaffold/app/cmd/runner.go @@ -39,7 +39,7 @@ import ( latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/validation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/update" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) // For tests diff --git a/docs/content/en/api/skaffold.swagger.json b/docs/content/en/api/skaffold.swagger.json index 54452dab5f7..94b22c75204 100644 --- a/docs/content/en/api/skaffold.swagger.json +++ b/docs/content/en/api/skaffold.swagger.json @@ -35,7 +35,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/protoTriggerState" + "$ref": "#/definitions/v1TriggerState" } } ], @@ -68,7 +68,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/protoTriggerState" + "$ref": "#/definitions/v1TriggerState" } } ], @@ -88,13 +88,13 @@ "type": "object", "properties": { "result": { - "$ref": "#/definitions/protoLogEntry" + "$ref": "#/definitions/v1LogEntry" }, "error": { "$ref": "#/definitions/runtimeStreamError" } }, - "description": "Stream result of protoLogEntry" + "description": "Stream result of v1LogEntry" } }, "default": { @@ -2519,13 +2519,13 @@ "type": "object", "properties": { "result": { - "$ref": "#/definitions/protoLogEntry" + "$ref": "#/definitions/v1LogEntry" }, "error": { "$ref": "#/definitions/runtimeStreamError" } }, - "description": "Stream result of protoLogEntry" + "description": "Stream result of v1LogEntry" } }, "default": { @@ -2564,7 +2564,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/protoEvent" + "$ref": "#/definitions/v1Event" } } ], @@ -2597,7 +2597,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/protoIntent" + "$ref": "#/definitions/v1Intent" } } ], @@ -2614,7 +2614,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/protoState" + "$ref": "#/definitions/v1State" } }, "default": { @@ -2653,7 +2653,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/protoTriggerState" + "$ref": "#/definitions/v1TriggerState" } } ], @@ -2984,7 +2984,65 @@ "default": "UNKNOWN_TEST_TYPE", "description": "Enum indicating test tools used\n- UNKNOWN_TEST_TYPE: Could not determine Test Type\n - UNIT: Unit tests\n - CONTAINER_STRUCTURE_TEST: Container Structure tests" }, - "protoActionableErr": { + "protobufAny": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "runtimeError": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "runtimeStreamError": { + "type": "object", + "properties": { + "grpc_code": { + "type": "integer", + "format": "int32" + }, + "http_code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "http_status": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1ActionableErr": { "type": "object", "properties": { "errCode": { @@ -2996,13 +3054,13 @@ "suggestions": { "type": "array", "items": { - "$ref": "#/definitions/protoSuggestion" + "$ref": "#/definitions/v1Suggestion" } } }, "description": "`ActionableErr` defines an error that occurred along with an optional list of suggestions" }, - "protoBuildEvent": { + "v1BuildEvent": { "type": "object", "properties": { "artifact": { @@ -3018,12 +3076,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "`BuildEvent` describes the build status per artifact, and will be emitted by Skaffold anytime a build starts or finishes, successfully or not.\nIf the build fails, an error will be attached to the event." }, - "protoBuildMetadata": { + "v1BuildMetadata": { "type": "object", "properties": { "numberOfArtifacts": { @@ -3048,7 +3106,7 @@ } } }, - "protoBuildState": { + "v1BuildState": { "type": "object", "properties": { "artifacts": { @@ -3067,7 +3125,7 @@ }, "description": "`BuildState` maps Skaffold artifacts to their current build states" }, - "protoDebuggingContainerEvent": { + "v1DebuggingContainerEvent": { "type": "object", "properties": { "status": { @@ -3101,7 +3159,7 @@ }, "description": "DebuggingContainerEvent is raised when a debugging container is started or terminated" }, - "protoDeployEvent": { + "v1DeployEvent": { "type": "object", "properties": { "status": { @@ -3114,12 +3172,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "`DeployEvent` represents the status of a deployment, and is emitted by Skaffold\nanytime a deployment starts or completes, successfully or not." }, - "protoDeployMetadata": { + "v1DeployMetadata": { "type": "object", "properties": { "deployers": { @@ -3133,7 +3191,7 @@ } } }, - "protoDeployState": { + "v1DeployState": { "type": "object", "properties": { "status": { @@ -3148,7 +3206,7 @@ }, "description": "`DeployState` describes the status of the current deploy" }, - "protoDevLoopEvent": { + "v1DevLoopEvent": { "type": "object", "properties": { "iteration": { @@ -3159,51 +3217,51 @@ "type": "string" }, "err": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "`DevLoopEvent` marks the start and end of a dev loop." }, - "protoEvent": { + "v1Event": { "type": "object", "properties": { "metaEvent": { - "$ref": "#/definitions/protoMetaEvent" + "$ref": "#/definitions/v1MetaEvent" }, "buildEvent": { - "$ref": "#/definitions/protoBuildEvent" + "$ref": "#/definitions/v1BuildEvent" }, "deployEvent": { - "$ref": "#/definitions/protoDeployEvent" + "$ref": "#/definitions/v1DeployEvent" }, "portEvent": { - "$ref": "#/definitions/protoPortEvent" + "$ref": "#/definitions/v1PortEvent" }, "statusCheckEvent": { - "$ref": "#/definitions/protoStatusCheckEvent" + "$ref": "#/definitions/v1StatusCheckEvent" }, "resourceStatusCheckEvent": { - "$ref": "#/definitions/protoResourceStatusCheckEvent" + "$ref": "#/definitions/v1ResourceStatusCheckEvent" }, "fileSyncEvent": { - "$ref": "#/definitions/protoFileSyncEvent" + "$ref": "#/definitions/v1FileSyncEvent" }, "debuggingContainerEvent": { - "$ref": "#/definitions/protoDebuggingContainerEvent" + "$ref": "#/definitions/v1DebuggingContainerEvent" }, "devLoopEvent": { - "$ref": "#/definitions/protoDevLoopEvent" + "$ref": "#/definitions/v1DevLoopEvent" }, "terminationEvent": { - "$ref": "#/definitions/protoTerminationEvent" + "$ref": "#/definitions/v1TerminationEvent" }, "TestEvent": { - "$ref": "#/definitions/protoTestEvent" + "$ref": "#/definitions/v1TestEvent" } }, "description": "`Event` describes an event in the Skaffold process.\nIt is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusCheckEvent, ResourceStatusCheckEvent, FileSyncEvent, or DebuggingContainerEvent." }, - "protoFileSyncEvent": { + "v1FileSyncEvent": { "type": "object", "properties": { "fileCount": { @@ -3223,12 +3281,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "FileSyncEvent describes the sync status." }, - "protoFileSyncState": { + "v1FileSyncState": { "type": "object", "properties": { "status": { @@ -3240,7 +3298,7 @@ }, "description": "`FileSyncState` contains the status of the current file sync" }, - "protoIntOrString": { + "v1IntOrString": { "type": "object", "properties": { "type": { @@ -3257,7 +3315,7 @@ }, "description": "IntOrString is a type that can hold an int32 or a string." }, - "protoIntent": { + "v1Intent": { "type": "object", "properties": { "build": { @@ -3272,7 +3330,7 @@ }, "description": "Intent represents user intents for a given phase." }, - "protoLogEntry": { + "v1LogEntry": { "type": "object", "properties": { "timestamp": { @@ -3280,7 +3338,7 @@ "format": "date-time" }, "event": { - "$ref": "#/definitions/protoEvent" + "$ref": "#/definitions/v1Event" }, "entry": { "type": "string" @@ -3288,7 +3346,7 @@ }, "description": "LogEntry describes an event and a string description of the event." }, - "protoMetaEvent": { + "v1MetaEvent": { "type": "object", "properties": { "entry": { @@ -3296,23 +3354,23 @@ "description": "entry, for example: `\"Starting Skaffold: {Version:v0.39.0-16-g5bb7c9e0 ConfigVersion:skaffold/v1 GitVersion: GitCommit:5bb7c9e078e4d522a5ffc42a2f1274fd17d75902 GitTreeState:dirty BuildDate01:29Z GoVersion:go1.13rc1 Compiler:gc Platform:linux/amd64}\"`" }, "metadata": { - "$ref": "#/definitions/protoMetadata", + "$ref": "#/definitions/v1Metadata", "description": "Metadata describing skaffold pipeline" } }, "description": "`MetaEvent` provides general information regarding Skaffold" }, - "protoMetadata": { + "v1Metadata": { "type": "object", "properties": { "build": { - "$ref": "#/definitions/protoBuildMetadata" + "$ref": "#/definitions/v1BuildMetadata" }, "deploy": { - "$ref": "#/definitions/protoDeployMetadata" + "$ref": "#/definitions/v1DeployMetadata" }, "test": { - "$ref": "#/definitions/protoTestMetadata" + "$ref": "#/definitions/v1TestMetadata" }, "additional": { "type": "object", @@ -3323,7 +3381,7 @@ } } }, - "protoPortEvent": { + "v1PortEvent": { "type": "object", "properties": { "localPort": { @@ -3356,12 +3414,12 @@ "type": "string" }, "targetPort": { - "$ref": "#/definitions/protoIntOrString" + "$ref": "#/definitions/v1IntOrString" } }, "description": "PortEvent Event describes each port forwarding event." }, - "protoResourceStatusCheckEvent": { + "v1ResourceStatusCheckEvent": { "type": "object", "properties": { "resource": { @@ -3380,48 +3438,48 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "A Resource StatusCheck Event, indicates progress for each kubernetes deployment.\nFor every resource, there will be exactly one event with `status` *Succeeded* or *Failed* event.\nThere can be multiple events with `status` *Pending*.\nSkaffold polls for resource status every 0.5 second. If the resource status changes, an event with `status` “Pending”, “Complete” and “Failed”\nwill be sent with the new status." }, - "protoState": { + "v1State": { "type": "object", "properties": { "buildState": { - "$ref": "#/definitions/protoBuildState" + "$ref": "#/definitions/v1BuildState" }, "deployState": { - "$ref": "#/definitions/protoDeployState" + "$ref": "#/definitions/v1DeployState" }, "forwardedPorts": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/protoPortEvent" + "$ref": "#/definitions/v1PortEvent" } }, "statusCheckState": { - "$ref": "#/definitions/protoStatusCheckState" + "$ref": "#/definitions/v1StatusCheckState" }, "fileSyncState": { - "$ref": "#/definitions/protoFileSyncState" + "$ref": "#/definitions/v1FileSyncState" }, "debuggingContainers": { "type": "array", "items": { - "$ref": "#/definitions/protoDebuggingContainerEvent" + "$ref": "#/definitions/v1DebuggingContainerEvent" } }, "metadata": { - "$ref": "#/definitions/protoMetadata" + "$ref": "#/definitions/v1Metadata" }, "testState": { - "$ref": "#/definitions/protoTestState" + "$ref": "#/definitions/v1TestState" } }, "description": "`State` represents the current state of the Skaffold components" }, - "protoStatusCheckEvent": { + "v1StatusCheckEvent": { "type": "object", "properties": { "status": { @@ -3437,12 +3495,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "`StatusCheckEvent` describes if the status check for kubernetes rollout has started, is in progress, has succeeded or failed." }, - "protoStatusCheckState": { + "v1StatusCheckState": { "type": "object", "properties": { "status": { @@ -3462,7 +3520,7 @@ }, "description": "`StatusCheckState` describes the state of status check of current deployed resources." }, - "protoSuggestion": { + "v1Suggestion": { "type": "object", "properties": { "suggestionCode": { @@ -3474,31 +3532,31 @@ }, "description": "Suggestion defines the action a user needs to recover from an error." }, - "protoTerminationEvent": { + "v1TerminationEvent": { "type": "object", "properties": { "status": { "type": "string" }, "err": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "`TerminationEvent` marks the end of the skaffold session" }, - "protoTestEvent": { + "v1TestEvent": { "type": "object", "properties": { "status": { "type": "string" }, "actionableErr": { - "$ref": "#/definitions/protoActionableErr" + "$ref": "#/definitions/v1ActionableErr" } }, "description": "`TestEvent` represents the status of a test, and is emitted by Skaffold\nanytime a test starts or completes, successfully or not." }, - "protoTestMetadata": { + "v1TestMetadata": { "type": "object", "properties": { "Testers": { @@ -3510,7 +3568,7 @@ }, "description": "TestMetadata describes the test pipeline" }, - "protoTestState": { + "v1TestState": { "type": "object", "properties": { "status": { @@ -3524,7 +3582,7 @@ }, "description": "`TestState` describes the current state of the test" }, - "protoTriggerState": { + "v1TriggerState": { "type": "object", "properties": { "enabled": { @@ -3532,64 +3590,6 @@ } }, "description": "TriggerState represents trigger state for a given phase." - }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "runtimeStreamError": { - "type": "object", - "properties": { - "grpc_code": { - "type": "integer", - "format": "int32" - }, - "http_code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "http_status": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } } } } diff --git a/docs/content/en/docs/references/api/grpc.md b/docs/content/en/docs/references/api/grpc.md index d115afab20e..f4994528f3b 100644 --- a/docs/content/en/docs/references/api/grpc.md +++ b/docs/content/en/docs/references/api/grpc.md @@ -29,21 +29,21 @@ You can find the source for v1/skaffold.proto [on Github](https://github.com/Goo ### Services - + #### SkaffoldService Describes all the methods for the Skaffold API | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| GetState | [.google.protobuf.Empty](#google.protobuf.Empty) | [State](#proto.State) | Returns the state of the current Skaffold execution | -| EventLog | [LogEntry](#proto.LogEntry) stream | [LogEntry](#proto.LogEntry) stream | DEPRECATED. Events should be used instead. TODO remove (https://github.com/GoogleContainerTools/skaffold/issues/3168) | -| Events | [.google.protobuf.Empty](#google.protobuf.Empty) | [LogEntry](#proto.LogEntry) stream | Returns all the events of the current Skaffold execution from the start | -| Execute | [UserIntentRequest](#proto.UserIntentRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. | -| AutoBuild | [TriggerRequest](#proto.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic build trigger | -| AutoSync | [TriggerRequest](#proto.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic sync trigger | -| AutoDeploy | [TriggerRequest](#proto.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic deploy trigger | -| Handle | [Event](#proto.Event) | [.google.protobuf.Empty](#google.protobuf.Empty) | EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. | +| GetState | [.google.protobuf.Empty](#google.protobuf.Empty) | [State](#proto.v1.State) | Returns the state of the current Skaffold execution | +| EventLog | [LogEntry](#proto.v1.LogEntry) stream | [LogEntry](#proto.v1.LogEntry) stream | DEPRECATED. Events should be used instead. TODO remove (https://github.com/GoogleContainerTools/skaffold/issues/3168) | +| Events | [.google.protobuf.Empty](#google.protobuf.Empty) | [LogEntry](#proto.v1.LogEntry) stream | Returns all the events of the current Skaffold execution from the start | +| Execute | [UserIntentRequest](#proto.v1.UserIntentRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. | +| AutoBuild | [TriggerRequest](#proto.v1.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic build trigger | +| AutoSync | [TriggerRequest](#proto.v1.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic sync trigger | +| AutoDeploy | [TriggerRequest](#proto.v1.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic deploy trigger | +| Handle | [Event](#proto.v1.Event) | [.google.protobuf.Empty](#google.protobuf.Empty) | EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. | @@ -52,16 +52,16 @@ Describes all the methods for the Skaffold API - + #### ActionableErr `ActionableErr` defines an error that occurred along with an optional list of suggestions | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | error code representing the error | +| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | error code representing the error | | message | [string](#string) | | message describing the error. | -| suggestions | [Suggestion](#proto.Suggestion) | repeated | list of suggestions | +| suggestions | [Suggestion](#proto.v1.Suggestion) | repeated | list of suggestions | @@ -69,7 +69,7 @@ Describes all the methods for the Skaffold API - + #### BuildEvent `BuildEvent` describes the build status per artifact, and will be emitted by Skaffold anytime a build starts or finishes, successfully or not. If the build fails, an error will be attached to the event. @@ -80,8 +80,8 @@ If the build fails, an error will be attached to the event. | artifact | [string](#string) | | artifact name | | status | [string](#string) | | artifact build status oneof: InProgress, Completed, Failed | | err | [string](#string) | | Deprecated. Use actionableErr.message. error when build status is Failed. | -| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -89,7 +89,7 @@ If the build fails, an error will be attached to the event. - + #### BuildMetadata @@ -97,9 +97,9 @@ If the build fails, an error will be attached to the event. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | numberOfArtifacts | [int32](#int32) | | | -| builders | [BuildMetadata.ImageBuilder](#proto.BuildMetadata.ImageBuilder) | repeated | | -| type | [enums.BuildType](#proto.enums.BuildType) | | | -| additional | [BuildMetadata.AdditionalEntry](#proto.BuildMetadata.AdditionalEntry) | repeated | Additional key value pairs to describe the deploy pipeline | +| builders | [BuildMetadata.ImageBuilder](#proto.v1.BuildMetadata.ImageBuilder) | repeated | | +| type | [proto.enums.BuildType](#proto.enums.BuildType) | | | +| additional | [BuildMetadata.AdditionalEntry](#proto.v1.BuildMetadata.AdditionalEntry) | repeated | Additional key value pairs to describe the deploy pipeline | @@ -107,7 +107,7 @@ If the build fails, an error will be attached to the event. - + #### BuildMetadata.AdditionalEntry @@ -123,14 +123,14 @@ If the build fails, an error will be attached to the event. - + #### BuildMetadata.ImageBuilder | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [enums.BuilderType](#proto.enums.BuilderType) | | | +| type | [proto.enums.BuilderType](#proto.enums.BuilderType) | | | | count | [int32](#int32) | | | @@ -139,16 +139,16 @@ If the build fails, an error will be attached to the event. - + #### BuildState `BuildState` maps Skaffold artifacts to their current build states | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| artifacts | [BuildState.ArtifactsEntry](#proto.BuildState.ArtifactsEntry) | repeated | A map of `artifact name -> build-state`. Artifact name is defined in the `skaffold.yaml`. The `build-state` can be:
- `"Not started"`: not yet started
- `"In progress"`: build started
- `"Complete"`: build succeeded
- `"Failed"`: build failed | +| artifacts | [BuildState.ArtifactsEntry](#proto.v1.BuildState.ArtifactsEntry) | repeated | A map of `artifact name -> build-state`. Artifact name is defined in the `skaffold.yaml`. The `build-state` can be:
- `"Not started"`: not yet started
- `"In progress"`: build started
- `"Complete"`: build succeeded
- `"Failed"`: build failed | | autoTrigger | [bool](#bool) | | | -| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | | +| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | | @@ -156,7 +156,7 @@ If the build fails, an error will be attached to the event. - + #### BuildState.ArtifactsEntry @@ -172,7 +172,7 @@ If the build fails, an error will be attached to the event. - + #### DebuggingContainerEvent DebuggingContainerEvent is raised when a debugging container is started or terminated @@ -186,7 +186,7 @@ DebuggingContainerEvent is raised when a debugging container is started or termi | artifact | [string](#string) | | the corresponding artifact's image name | | runtime | [string](#string) | | the detected language runtime | | workingDir | [string](#string) | | the working directory in the container image | -| debugPorts | [DebuggingContainerEvent.DebugPortsEntry](#proto.DebuggingContainerEvent.DebugPortsEntry) | repeated | the exposed debugging-related ports | +| debugPorts | [DebuggingContainerEvent.DebugPortsEntry](#proto.v1.DebuggingContainerEvent.DebugPortsEntry) | repeated | the exposed debugging-related ports | @@ -194,7 +194,7 @@ DebuggingContainerEvent is raised when a debugging container is started or termi - + #### DebuggingContainerEvent.DebugPortsEntry @@ -210,7 +210,7 @@ DebuggingContainerEvent is raised when a debugging container is started or termi - + #### DeployEvent `DeployEvent` represents the status of a deployment, and is emitted by Skaffold anytime a deployment starts or completes, successfully or not. @@ -220,8 +220,8 @@ anytime a deployment starts or completes, successfully or not. | ----- | ---- | ----- | ----------- | | status | [string](#string) | | deployment status oneof: InProgress, Completed, Failed | | err | [string](#string) | | Deprecated. Use actionableErr.message. error when status is Failed | -| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -229,15 +229,15 @@ anytime a deployment starts or completes, successfully or not. - + #### DeployMetadata | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| deployers | [DeployMetadata.Deployer](#proto.DeployMetadata.Deployer) | repeated | | -| cluster | [enums.ClusterType](#proto.enums.ClusterType) | | | +| deployers | [DeployMetadata.Deployer](#proto.v1.DeployMetadata.Deployer) | repeated | | +| cluster | [proto.enums.ClusterType](#proto.enums.ClusterType) | | | @@ -245,14 +245,14 @@ anytime a deployment starts or completes, successfully or not. - + #### DeployMetadata.Deployer | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [enums.DeployerType](#proto.enums.DeployerType) | | | +| type | [proto.enums.DeployerType](#proto.enums.DeployerType) | | | | count | [int32](#int32) | | | @@ -261,7 +261,7 @@ anytime a deployment starts or completes, successfully or not. - + #### DeployState `DeployState` describes the status of the current deploy @@ -270,7 +270,7 @@ anytime a deployment starts or completes, successfully or not. | ----- | ---- | ----- | ----------- | | status | [string](#string) | | | | autoTrigger | [bool](#bool) | | | -| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | | +| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | | @@ -278,7 +278,7 @@ anytime a deployment starts or completes, successfully or not. - + #### DevLoopEvent `DevLoopEvent` marks the start and end of a dev loop. @@ -287,7 +287,7 @@ anytime a deployment starts or completes, successfully or not. | ----- | ---- | ----- | ----------- | | iteration | [int32](#int32) | | dev loop iteration. 0 represents initialization loop. | | status | [string](#string) | | dev loop status oneof: In Progress, Completed, Failed | -| err | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| err | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -295,7 +295,7 @@ anytime a deployment starts or completes, successfully or not. - + #### Event `Event` describes an event in the Skaffold process. It is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusCheckEvent, ResourceStatusCheckEvent, FileSyncEvent, or DebuggingContainerEvent. @@ -303,17 +303,17 @@ It is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusChe | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| metaEvent | [MetaEvent](#proto.MetaEvent) | | contains general information regarding Skaffold like version info | -| buildEvent | [BuildEvent](#proto.BuildEvent) | | describes if the build status per artifact. Status could be one of "InProgress", "Completed" or "Failed". | -| deployEvent | [DeployEvent](#proto.DeployEvent) | | describes if the deployment has started, is in progress or is complete. | -| portEvent | [PortEvent](#proto.PortEvent) | | describes each port forwarding event. | -| statusCheckEvent | [StatusCheckEvent](#proto.StatusCheckEvent) | | describes if the Status check has started, is in progress, has succeeded or failed. | -| resourceStatusCheckEvent | [ResourceStatusCheckEvent](#proto.ResourceStatusCheckEvent) | | indicates progress for each kubernetes deployment. | -| fileSyncEvent | [FileSyncEvent](#proto.FileSyncEvent) | | describes the sync status. | -| debuggingContainerEvent | [DebuggingContainerEvent](#proto.DebuggingContainerEvent) | | describes the appearance or disappearance of a debugging container | -| devLoopEvent | [DevLoopEvent](#proto.DevLoopEvent) | | describes a start and end of a dev loop. | -| terminationEvent | [TerminationEvent](#proto.TerminationEvent) | | describes a skaffold termination event | -| TestEvent | [TestEvent](#proto.TestEvent) | | describes if the test has started, is in progress or is complete. | +| metaEvent | [MetaEvent](#proto.v1.MetaEvent) | | contains general information regarding Skaffold like version info | +| buildEvent | [BuildEvent](#proto.v1.BuildEvent) | | describes if the build status per artifact. Status could be one of "InProgress", "Completed" or "Failed". | +| deployEvent | [DeployEvent](#proto.v1.DeployEvent) | | describes if the deployment has started, is in progress or is complete. | +| portEvent | [PortEvent](#proto.v1.PortEvent) | | describes each port forwarding event. | +| statusCheckEvent | [StatusCheckEvent](#proto.v1.StatusCheckEvent) | | describes if the Status check has started, is in progress, has succeeded or failed. | +| resourceStatusCheckEvent | [ResourceStatusCheckEvent](#proto.v1.ResourceStatusCheckEvent) | | indicates progress for each kubernetes deployment. | +| fileSyncEvent | [FileSyncEvent](#proto.v1.FileSyncEvent) | | describes the sync status. | +| debuggingContainerEvent | [DebuggingContainerEvent](#proto.v1.DebuggingContainerEvent) | | describes the appearance or disappearance of a debugging container | +| devLoopEvent | [DevLoopEvent](#proto.v1.DevLoopEvent) | | describes a start and end of a dev loop. | +| terminationEvent | [TerminationEvent](#proto.v1.TerminationEvent) | | describes a skaffold termination event | +| TestEvent | [TestEvent](#proto.v1.TestEvent) | | describes if the test has started, is in progress or is complete. | @@ -321,7 +321,7 @@ It is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusChe - + #### FileSyncEvent FileSyncEvent describes the sync status. @@ -332,8 +332,8 @@ FileSyncEvent describes the sync status. | image | [string](#string) | | the container image to which files are sycned. | | status | [string](#string) | | status of file sync. one of: Not Started, In progress, Succeeded, Failed. | | err | [string](#string) | | Deprecated. Use actionableErr.message. error in case of status failed. | -| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -341,7 +341,7 @@ FileSyncEvent describes the sync status. - + #### FileSyncState `FileSyncState` contains the status of the current file sync @@ -357,7 +357,7 @@ FileSyncEvent describes the sync status. - + #### IntOrString IntOrString is a type that can hold an int32 or a string. @@ -374,7 +374,7 @@ IntOrString is a type that can hold an int32 or a string. - + #### Intent Intent represents user intents for a given phase. @@ -391,7 +391,7 @@ Intent represents user intents for a given phase. - + #### LogEntry LogEntry describes an event and a string description of the event. @@ -399,7 +399,7 @@ LogEntry describes an event and a string description of the event. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | timestamp | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp of the event. | -| event | [Event](#proto.Event) | | the actual event that is one of | +| event | [Event](#proto.v1.Event) | | the actual event that is one of | | entry | [string](#string) | | description of the event. | @@ -408,7 +408,7 @@ LogEntry describes an event and a string description of the event. - + #### MetaEvent `MetaEvent` provides general information regarding Skaffold @@ -416,7 +416,7 @@ LogEntry describes an event and a string description of the event. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | entry | [string](#string) | | entry, for example: `"Starting Skaffold: {Version:v0.39.0-16-g5bb7c9e0 ConfigVersion:skaffold/v1 GitVersion: GitCommit:5bb7c9e078e4d522a5ffc42a2f1274fd17d75902 GitTreeState:dirty BuildDate01:29Z GoVersion:go1.13rc1 Compiler:gc Platform:linux/amd64}"` | -| metadata | [Metadata](#proto.Metadata) | | Metadata describing skaffold pipeline | +| metadata | [Metadata](#proto.v1.Metadata) | | Metadata describing skaffold pipeline | @@ -424,17 +424,17 @@ LogEntry describes an event and a string description of the event. - + #### Metadata | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| build | [BuildMetadata](#proto.BuildMetadata) | | | -| deploy | [DeployMetadata](#proto.DeployMetadata) | | | -| test | [TestMetadata](#proto.TestMetadata) | | | -| additional | [Metadata.AdditionalEntry](#proto.Metadata.AdditionalEntry) | repeated | Additional key value pairs to describe the build pipeline | +| build | [BuildMetadata](#proto.v1.BuildMetadata) | | | +| deploy | [DeployMetadata](#proto.v1.DeployMetadata) | | | +| test | [TestMetadata](#proto.v1.TestMetadata) | | | +| additional | [Metadata.AdditionalEntry](#proto.v1.Metadata.AdditionalEntry) | repeated | Additional key value pairs to describe the build pipeline | @@ -442,7 +442,7 @@ LogEntry describes an event and a string description of the event. - + #### Metadata.AdditionalEntry @@ -458,7 +458,7 @@ LogEntry describes an event and a string description of the event. - + #### PortEvent PortEvent Event describes each port forwarding event. @@ -474,7 +474,7 @@ PortEvent Event describes each port forwarding event. | resourceType | [string](#string) | | resource type e.g. "pod", "service". | | resourceName | [string](#string) | | name of the resource to forward. | | address | [string](#string) | | address on which to bind | -| targetPort | [IntOrString](#proto.IntOrString) | | target port is the resource port that will be forwarded. | +| targetPort | [IntOrString](#proto.v1.IntOrString) | | target port is the resource port that will be forwarded. | @@ -482,7 +482,7 @@ PortEvent Event describes each port forwarding event. - + #### Request @@ -497,7 +497,7 @@ PortEvent Event describes each port forwarding event. - + #### ResourceStatusCheckEvent A Resource StatusCheck Event, indicates progress for each kubernetes deployment. For every resource, there will be exactly one event with `status` *Succeeded* or *Failed* event. @@ -512,8 +512,8 @@ will be sent with the new status. | status | [string](#string) | | | | message | [string](#string) | | | | err | [string](#string) | | Deprecated. Use actionableErr.message. | -| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | | -| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | | +| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -521,7 +521,7 @@ will be sent with the new status. - + #### Response @@ -536,21 +536,21 @@ will be sent with the new status. - + #### State `State` represents the current state of the Skaffold components | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| buildState | [BuildState](#proto.BuildState) | | | -| deployState | [DeployState](#proto.DeployState) | | | -| forwardedPorts | [State.ForwardedPortsEntry](#proto.State.ForwardedPortsEntry) | repeated | | -| statusCheckState | [StatusCheckState](#proto.StatusCheckState) | | | -| fileSyncState | [FileSyncState](#proto.FileSyncState) | | | -| debuggingContainers | [DebuggingContainerEvent](#proto.DebuggingContainerEvent) | repeated | | -| metadata | [Metadata](#proto.Metadata) | | | -| testState | [TestState](#proto.TestState) | | | +| buildState | [BuildState](#proto.v1.BuildState) | | | +| deployState | [DeployState](#proto.v1.DeployState) | | | +| forwardedPorts | [State.ForwardedPortsEntry](#proto.v1.State.ForwardedPortsEntry) | repeated | | +| statusCheckState | [StatusCheckState](#proto.v1.StatusCheckState) | | | +| fileSyncState | [FileSyncState](#proto.v1.FileSyncState) | | | +| debuggingContainers | [DebuggingContainerEvent](#proto.v1.DebuggingContainerEvent) | repeated | | +| metadata | [Metadata](#proto.v1.Metadata) | | | +| testState | [TestState](#proto.v1.TestState) | | | @@ -558,7 +558,7 @@ will be sent with the new status. - + #### State.ForwardedPortsEntry @@ -566,7 +566,7 @@ will be sent with the new status. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | key | [int32](#int32) | | | -| value | [PortEvent](#proto.PortEvent) | | | +| value | [PortEvent](#proto.v1.PortEvent) | | | @@ -574,14 +574,14 @@ will be sent with the new status. - + #### StateResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| state | [State](#proto.State) | | | +| state | [State](#proto.v1.State) | | | @@ -589,7 +589,7 @@ will be sent with the new status. - + #### StatusCheckEvent `StatusCheckEvent` describes if the status check for kubernetes rollout has started, is in progress, has succeeded or failed. @@ -599,8 +599,8 @@ will be sent with the new status. | status | [string](#string) | | | | message | [string](#string) | | | | err | [string](#string) | | Deprecated. Use actionableErr.message. | -| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -608,7 +608,7 @@ will be sent with the new status. - + #### StatusCheckState `StatusCheckState` describes the state of status check of current deployed resources. @@ -616,8 +616,8 @@ will be sent with the new status. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | | -| resources | [StatusCheckState.ResourcesEntry](#proto.StatusCheckState.ResourcesEntry) | repeated | A map of `resource name -> status-check-state`. Where `resource-name` is the kubernetes resource name. The `status-check-state` can be
- `"Not started"`: indicates that `status-check` has just started.
- `"In progress"`: InProgress is sent after every resource check is complete.
- `"Succeeded"`: - `"Failed"`: | -| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | StatusCheck statusCode | +| resources | [StatusCheckState.ResourcesEntry](#proto.v1.StatusCheckState.ResourcesEntry) | repeated | A map of `resource name -> status-check-state`. Where `resource-name` is the kubernetes resource name. The `status-check-state` can be
- `"Not started"`: indicates that `status-check` has just started.
- `"In progress"`: InProgress is sent after every resource check is complete.
- `"Succeeded"`: - `"Failed"`: | +| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | StatusCheck statusCode | @@ -625,7 +625,7 @@ will be sent with the new status. - + #### StatusCheckState.ResourcesEntry @@ -641,14 +641,14 @@ will be sent with the new status. - + #### Suggestion Suggestion defines the action a user needs to recover from an error. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| suggestionCode | [enums.SuggestionCode](#proto.enums.SuggestionCode) | | code representing a suggestion | +| suggestionCode | [proto.enums.SuggestionCode](#proto.enums.SuggestionCode) | | code representing a suggestion | | action | [string](#string) | | action represents the suggestion action | @@ -657,7 +657,7 @@ Suggestion defines the action a user needs to recover from an error. - + #### TerminationEvent `TerminationEvent` marks the end of the skaffold session @@ -665,7 +665,7 @@ Suggestion defines the action a user needs to recover from an error. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | status oneof: Completed or Failed | -| err | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| err | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -673,7 +673,7 @@ Suggestion defines the action a user needs to recover from an error. - + #### TestEvent `TestEvent` represents the status of a test, and is emitted by Skaffold anytime a test starts or completes, successfully or not. @@ -682,7 +682,7 @@ anytime a test starts or completes, successfully or not. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | test status oneof: InProgress, Completed, Failed | -| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | +| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | @@ -690,14 +690,14 @@ anytime a test starts or completes, successfully or not. - + #### TestMetadata TestMetadata describes the test pipeline | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| Testers | [TestMetadata.Tester](#proto.TestMetadata.Tester) | repeated | | +| Testers | [TestMetadata.Tester](#proto.v1.TestMetadata.Tester) | repeated | | @@ -705,14 +705,14 @@ TestMetadata describes the test pipeline - + #### TestMetadata.Tester | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [enums.TesterType](#proto.enums.TesterType) | | | +| type | [proto.enums.TesterType](#proto.enums.TesterType) | | | | count | [int32](#int32) | | | @@ -721,7 +721,7 @@ TestMetadata describes the test pipeline - + #### TestState `TestState` describes the current state of the test @@ -729,7 +729,7 @@ TestMetadata describes the test pipeline | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | Status of the current test | -| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | Teststate status code | +| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Teststate status code | @@ -737,14 +737,14 @@ TestMetadata describes the test pipeline - + #### TriggerRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| state | [TriggerState](#proto.TriggerState) | | | +| state | [TriggerState](#proto.v1.TriggerState) | | | @@ -752,7 +752,7 @@ TestMetadata describes the test pipeline - + #### TriggerState TriggerState represents trigger state for a given phase. @@ -767,14 +767,14 @@ TriggerState represents trigger state for a given phase. - + #### UserIntentRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| intent | [Intent](#proto.Intent) | | | +| intent | [Intent](#proto.v1.Intent) | | | diff --git a/hack/generate-proto.sh b/hack/generate-proto.sh index 7b9cd56792b..f8b23775495 100755 --- a/hack/generate-proto.sh +++ b/hack/generate-proto.sh @@ -20,8 +20,10 @@ docker build -t gen-proto -f hack/proto/Dockerfile --target generate-files proto docker run --rm gen-proto cat enums/github.com/GoogleContainerTools/skaffold/proto/enums/enums.pb.go > proto/enums/enums.pb.go # Copy v1 files -docker run --rm gen-proto cat v1/skaffold.pb.go > proto/v1/skaffold.pb.go -docker run --rm gen-proto cat v1/skaffold.pb.gw.go > proto/v1/skaffold.pb.gw.go +#docker run --rm gen-proto cat v1/skaffold.pb.go > proto/v1/skaffold.pb.go +#docker run --rm gen-proto cat v1/skaffold.pb.gw.go > proto/v1/skaffold.pb.gw.go +docker run --rm gen-proto cat /proto/github.com/GoogleContainerTools/skaffold/proto/v1/skaffold.pb.go > proto/v1/skaffold.pb.go +docker run --rm gen-proto cat /proto/github.com/GoogleContainerTools/skaffold/proto/v1/skaffold.pb.gw.go > proto/v1/skaffold.pb.gw.go # Copy v2 files docker run --rm gen-proto cat /proto/github.com/GoogleContainerTools/skaffold/proto/v2/skaffold.pb.go > proto/v2/skaffold.pb.go diff --git a/integration/cache_test.go b/integration/cache_test.go index c050028871b..539a2cda8f5 100644 --- a/integration/cache_test.go +++ b/integration/cache_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "github.com/GoogleContainerTools/skaffold/integration/skaffold" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func TestCacheAPITriggers(t *testing.T) { diff --git a/integration/debug_test.go b/integration/debug_test.go index cc61fbe07c2..417338d3ca4 100644 --- a/integration/debug_test.go +++ b/integration/debug_test.go @@ -24,7 +24,7 @@ import ( "github.com/GoogleContainerTools/skaffold/integration/skaffold" debugannotations "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug/annotations" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/integration/dev_test.go b/integration/dev_test.go index b26f6981faa..a5567001e73 100644 --- a/integration/dev_test.go +++ b/integration/dev_test.go @@ -36,7 +36,7 @@ import ( "github.com/GoogleContainerTools/skaffold/integration/skaffold" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/integration/rpc_test.go b/integration/rpc_test.go index b0220d5f1ff..e9ad597e1fb 100644 --- a/integration/rpc_test.go +++ b/integration/rpc_test.go @@ -34,7 +34,7 @@ import ( "github.com/GoogleContainerTools/skaffold/integration/skaffold" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/integration/sync_test.go b/integration/sync_test.go index f6a462709a6..1951200b705 100644 --- a/integration/sync_test.go +++ b/integration/sync_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "github.com/GoogleContainerTools/skaffold/integration/skaffold" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func TestDevSync(t *testing.T) { diff --git a/integration/test_events_test.go b/integration/test_events_test.go index 6c5377e5b2f..6ccab0dc432 100644 --- a/integration/test_events_test.go +++ b/integration/test_events_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "github.com/GoogleContainerTools/skaffold/integration/skaffold" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func TestTestEvents(t *testing.T) { diff --git a/pkg/diag/recommender/container_errors.go b/pkg/diag/recommender/container_errors.go index b7bfd050af8..7d58884f3a5 100644 --- a/pkg/diag/recommender/container_errors.go +++ b/pkg/diag/recommender/container_errors.go @@ -17,7 +17,7 @@ limitations under the License. package recommender import ( - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) type ContainerError struct { diff --git a/pkg/diag/validator/pod.go b/pkg/diag/validator/pod.go index 0f2644e38bb..18a77bfb5ab 100644 --- a/pkg/diag/validator/pod.go +++ b/pkg/diag/validator/pod.go @@ -31,7 +31,7 @@ import ( corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "github.com/GoogleContainerTools/skaffold/pkg/diag/recommender" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/diag/validator/pod_test.go b/pkg/diag/validator/pod_test.go index ba15af272e4..3212ac15b2b 100644 --- a/pkg/diag/validator/pod_test.go +++ b/pkg/diag/validator/pod_test.go @@ -31,7 +31,7 @@ import ( fakekubeclientset "k8s.io/client-go/kubernetes/fake" "github.com/GoogleContainerTools/skaffold/pkg/diag/recommender" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/diag/validator/recommender.go b/pkg/diag/validator/recommender.go index e2fcd2d1c25..3ca9423de13 100644 --- a/pkg/diag/validator/recommender.go +++ b/pkg/diag/validator/recommender.go @@ -17,7 +17,7 @@ limitations under the License. package validator import ( - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) // Recommender makes recommendations based on err in the actionable error diff --git a/pkg/diag/validator/resource.go b/pkg/diag/validator/resource.go index 0d6ab809d87..e5a13269352 100644 --- a/pkg/diag/validator/resource.go +++ b/pkg/diag/validator/resource.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Resource struct { diff --git a/pkg/diag/validator/resource_test.go b/pkg/diag/validator/resource_test.go index 523fe7c9665..6572e2696cd 100644 --- a/pkg/diag/validator/resource_test.go +++ b/pkg/diag/validator/resource_test.go @@ -23,7 +23,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/build_problems.go b/pkg/skaffold/build/build_problems.go index 465b0cc1828..1d9fa1aec06 100644 --- a/pkg/skaffold/build/build_problems.go +++ b/pkg/skaffold/build/build_problems.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/build/build_problems_test.go b/pkg/skaffold/build/build_problems_test.go index 9d6fd724c35..bbb5d3f0324 100644 --- a/pkg/skaffold/build/build_problems_test.go +++ b/pkg/skaffold/build/build_problems_test.go @@ -23,7 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/cache/lookup_test.go b/pkg/skaffold/build/cache/lookup_test.go index 2b6c80c1f7e..24d1f30c7fe 100644 --- a/pkg/skaffold/build/cache/lookup_test.go +++ b/pkg/skaffold/build/cache/lookup_test.go @@ -30,7 +30,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/docker/docker_test.go b/pkg/skaffold/build/docker/docker_test.go index 26acc12e969..14d6c094a11 100644 --- a/pkg/skaffold/build/docker/docker_test.go +++ b/pkg/skaffold/build/docker/docker_test.go @@ -31,7 +31,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/docker/errors.go b/pkg/skaffold/build/docker/errors.go index 28305aaa106..07f7dc9986d 100644 --- a/pkg/skaffold/build/docker/errors.go +++ b/pkg/skaffold/build/docker/errors.go @@ -27,7 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/build/jib/errors.go b/pkg/skaffold/build/jib/errors.go index e9522498b60..849bfc958a7 100644 --- a/pkg/skaffold/build/jib/errors.go +++ b/pkg/skaffold/build/jib/errors.go @@ -22,7 +22,7 @@ import ( "github.com/sirupsen/logrus" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func unknownPluginType(ws string) error { diff --git a/pkg/skaffold/deploy/deploy_problems.go b/pkg/skaffold/deploy/deploy_problems.go index d2a9c19d53a..2d3c21e0698 100644 --- a/pkg/skaffold/deploy/deploy_problems.go +++ b/pkg/skaffold/deploy/deploy_problems.go @@ -24,7 +24,7 @@ import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/types" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/deploy/deploy_problems_test.go b/pkg/skaffold/deploy/deploy_problems_test.go index b43d58f5b64..f1bc6594f60 100644 --- a/pkg/skaffold/deploy/deploy_problems_test.go +++ b/pkg/skaffold/deploy/deploy_problems_test.go @@ -24,7 +24,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/deploy/error/errors.go b/pkg/skaffold/deploy/error/errors.go index 16493c2de77..adb1c120393 100644 --- a/pkg/skaffold/deploy/error/errors.go +++ b/pkg/skaffold/deploy/error/errors.go @@ -24,7 +24,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/types" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/error/errors_test.go b/pkg/skaffold/deploy/error/errors_test.go index 662e6c580ae..b2922b0dfcd 100644 --- a/pkg/skaffold/deploy/error/errors_test.go +++ b/pkg/skaffold/deploy/error/errors_test.go @@ -21,7 +21,7 @@ import ( "testing" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/deploy/helm/errors.go b/pkg/skaffold/deploy/helm/errors.go index 7d63cd93e93..bfbb5d408cf 100644 --- a/pkg/skaffold/deploy/helm/errors.go +++ b/pkg/skaffold/deploy/helm/errors.go @@ -23,7 +23,7 @@ import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/kubectl/errors.go b/pkg/skaffold/deploy/kubectl/errors.go index 1a9450bc94d..cdec8ed42da 100644 --- a/pkg/skaffold/deploy/kubectl/errors.go +++ b/pkg/skaffold/deploy/kubectl/errors.go @@ -21,7 +21,7 @@ import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/kustomize/errors.go b/pkg/skaffold/deploy/kustomize/errors.go index 1abd9227a86..1653906b854 100644 --- a/pkg/skaffold/deploy/kustomize/errors.go +++ b/pkg/skaffold/deploy/kustomize/errors.go @@ -18,7 +18,7 @@ package kustomize import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func userErr(err error) error { diff --git a/pkg/skaffold/deploy/resource/deployment.go b/pkg/skaffold/deploy/resource/deployment.go index d571df7e70e..e7aebda1be7 100644 --- a/pkg/skaffold/deploy/resource/deployment.go +++ b/pkg/skaffold/deploy/resource/deployment.go @@ -30,7 +30,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/resource/deployment_test.go b/pkg/skaffold/deploy/resource/deployment_test.go index 03e112c2f16..0779c55d820 100644 --- a/pkg/skaffold/deploy/resource/deployment_test.go +++ b/pkg/skaffold/deploy/resource/deployment_test.go @@ -27,7 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/diag/validator" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/deploy/resource/status.go b/pkg/skaffold/deploy/resource/status.go index ed488468c46..3d3e3d7c081 100644 --- a/pkg/skaffold/deploy/resource/status.go +++ b/pkg/skaffold/deploy/resource/status.go @@ -19,7 +19,7 @@ package resource import ( "fmt" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Status struct { diff --git a/pkg/skaffold/deploy/resource/status_test.go b/pkg/skaffold/deploy/resource/status_test.go index 7ae20b10940..8d8d62e75d0 100644 --- a/pkg/skaffold/deploy/resource/status_test.go +++ b/pkg/skaffold/deploy/resource/status_test.go @@ -19,7 +19,7 @@ package resource import ( "testing" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/docker/errors.go b/pkg/skaffold/docker/errors.go index b7f75e33637..78d3c7806bc 100644 --- a/pkg/skaffold/docker/errors.go +++ b/pkg/skaffold/docker/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func remoteDigestGetErr(err error) error { diff --git a/pkg/skaffold/docker/image_test.go b/pkg/skaffold/docker/image_test.go index 36b07512435..736c0801485 100644 --- a/pkg/skaffold/docker/image_test.go +++ b/pkg/skaffold/docker/image_test.go @@ -30,7 +30,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/docker/parse.go b/pkg/skaffold/docker/parse.go index c883e29c487..da70fdb1310 100644 --- a/pkg/skaffold/docker/parse.go +++ b/pkg/skaffold/docker/parse.go @@ -39,7 +39,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) type from struct { diff --git a/pkg/skaffold/errors/err_def.go b/pkg/skaffold/errors/err_def.go index da8592e5f3d..3c489be31e0 100644 --- a/pkg/skaffold/errors/err_def.go +++ b/pkg/skaffold/errors/err_def.go @@ -19,7 +19,7 @@ package errors import ( "fmt" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Error interface { diff --git a/pkg/skaffold/errors/errors.go b/pkg/skaffold/errors/errors.go index 6cc8a82892d..e4008d03afb 100644 --- a/pkg/skaffold/errors/errors.go +++ b/pkg/skaffold/errors/errors.go @@ -22,7 +22,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" protoV2 "github.com/GoogleContainerTools/skaffold/proto/v2" ) diff --git a/pkg/skaffold/errors/errors_test.go b/pkg/skaffold/errors/errors_test.go index da21b0308b6..63d0dde4c6e 100644 --- a/pkg/skaffold/errors/errors_test.go +++ b/pkg/skaffold/errors/errors_test.go @@ -23,7 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/errors/problem.go b/pkg/skaffold/errors/problem.go index 3136ec66620..b64a3632d82 100644 --- a/pkg/skaffold/errors/problem.go +++ b/pkg/skaffold/errors/problem.go @@ -23,7 +23,7 @@ import ( "sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/event/event.go b/pkg/skaffold/event/event.go index e7bf7c941e3..c8923a7f6d7 100644 --- a/pkg/skaffold/event/event.go +++ b/pkg/skaffold/event/event.go @@ -33,7 +33,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/version" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/event/event_test.go b/pkg/skaffold/event/event_test.go index 7ee55bcc4e1..dd7767efd36 100644 --- a/pkg/skaffold/event/event_test.go +++ b/pkg/skaffold/event/event_test.go @@ -34,7 +34,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" schemautil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/event/util.go b/pkg/skaffold/event/util.go index d88237767cc..35a11961b13 100644 --- a/pkg/skaffold/event/util.go +++ b/pkg/skaffold/event/util.go @@ -20,7 +20,7 @@ import ( "strings" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func initializeMetadata(pipelines []latestV1.Pipeline, kubeContext string) *proto.Metadata { diff --git a/pkg/skaffold/event/util_test.go b/pkg/skaffold/event/util_test.go index 6d3263e5f61..5ce335943f3 100644 --- a/pkg/skaffold/event/util_test.go +++ b/pkg/skaffold/event/util_test.go @@ -21,7 +21,7 @@ import ( "testing" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/initializer/init_problems.go b/pkg/skaffold/initializer/init_problems.go index cc01d9d9bb9..c809e68a083 100644 --- a/pkg/skaffold/initializer/init_problems.go +++ b/pkg/skaffold/initializer/init_problems.go @@ -21,7 +21,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/initializer/init_problems_test.go b/pkg/skaffold/initializer/init_problems_test.go index d6e03af264a..a19e1fbdb1e 100644 --- a/pkg/skaffold/initializer/init_problems_test.go +++ b/pkg/skaffold/initializer/init_problems_test.go @@ -23,7 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go b/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go index 4032f90d3cd..5473614ca39 100644 --- a/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go +++ b/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go @@ -27,7 +27,7 @@ import ( v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/inspect/errors.go b/pkg/skaffold/inspect/errors.go index 12b101309b8..892767c6301 100644 --- a/pkg/skaffold/inspect/errors.go +++ b/pkg/skaffold/inspect/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) // BuildEnvAlreadyExists specifies that there's an existing build environment definition for the same type. diff --git a/pkg/skaffold/inspect/output.go b/pkg/skaffold/inspect/output.go index 1609d1f5aeb..bb5e7757b94 100644 --- a/pkg/skaffold/inspect/output.go +++ b/pkg/skaffold/inspect/output.go @@ -22,7 +22,7 @@ import ( "io" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Formatter interface { diff --git a/pkg/skaffold/instrumentation/export.go b/pkg/skaffold/instrumentation/export.go index 433ccf7e59a..624d7a42a65 100644 --- a/pkg/skaffold/instrumentation/export.go +++ b/pkg/skaffold/instrumentation/export.go @@ -48,7 +48,7 @@ import ( "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/cmd/statik" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func ExportMetrics(exitCode int) error { diff --git a/pkg/skaffold/instrumentation/export_test.go b/pkg/skaffold/instrumentation/export_test.go index 264b51d04b9..7df55d2a87a 100644 --- a/pkg/skaffold/instrumentation/export_test.go +++ b/pkg/skaffold/instrumentation/export_test.go @@ -31,7 +31,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/controller/basic" "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/cmd/statik" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/instrumentation/meter.go b/pkg/skaffold/instrumentation/meter.go index 946de67f9ca..bd3e6ad6c38 100644 --- a/pkg/skaffold/instrumentation/meter.go +++ b/pkg/skaffold/instrumentation/meter.go @@ -28,7 +28,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/version" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yamltags" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/instrumentation/types.go b/pkg/skaffold/instrumentation/types.go index 67e329adda8..77245dd67bb 100644 --- a/pkg/skaffold/instrumentation/types.go +++ b/pkg/skaffold/instrumentation/types.go @@ -21,7 +21,7 @@ import ( "github.com/sirupsen/logrus" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) // skaffoldMeter describes the data used to determine operational metrics. diff --git a/pkg/skaffold/kubernetes/manifest/errors.go b/pkg/skaffold/kubernetes/manifest/errors.go index 6443b265af1..2ac1ae2ae5b 100644 --- a/pkg/skaffold/kubernetes/manifest/errors.go +++ b/pkg/skaffold/kubernetes/manifest/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func replaceImageErr(err error) error { diff --git a/pkg/skaffold/kubernetes/status/status_check.go b/pkg/skaffold/kubernetes/status/status_check.go index 81acb612716..4dd460c73f7 100644 --- a/pkg/skaffold/kubernetes/status/status_check.go +++ b/pkg/skaffold/kubernetes/status/status_check.go @@ -44,7 +44,7 @@ import ( kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/kubernetes/status/status_check_test.go b/pkg/skaffold/kubernetes/status/status_check_test.go index b508cd5c12e..a9574a9540e 100644 --- a/pkg/skaffold/kubernetes/status/status_check_test.go +++ b/pkg/skaffold/kubernetes/status/status_check_test.go @@ -38,7 +38,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" testEvent "github.com/GoogleContainerTools/skaffold/testutil/event" ) diff --git a/pkg/skaffold/parser/config_test.go b/pkg/skaffold/parser/config_test.go index 62e4d76942e..ff0643565d2 100644 --- a/pkg/skaffold/parser/config_test.go +++ b/pkg/skaffold/parser/config_test.go @@ -28,7 +28,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/git" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/render/renderer/renderer.go b/pkg/skaffold/render/renderer/renderer.go index 36b6ee98f45..ab6f5d25bba 100644 --- a/pkg/skaffold/render/renderer/renderer.go +++ b/pkg/skaffold/render/renderer/renderer.go @@ -36,7 +36,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/validate" latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/render/transform/transform.go b/pkg/skaffold/render/transform/transform.go index 4848a202feb..e1f69572ac0 100644 --- a/pkg/skaffold/render/transform/transform.go +++ b/pkg/skaffold/render/transform/transform.go @@ -22,7 +22,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/kptfile" latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/render/validate/validate.go b/pkg/skaffold/render/validate/validate.go index 1467c81aa76..fc312031eaf 100644 --- a/pkg/skaffold/render/validate/validate.go +++ b/pkg/skaffold/render/validate/validate.go @@ -21,7 +21,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/kptfile" latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/runner/v1/dev.go b/pkg/skaffold/runner/v1/dev.go index 7c1ae4024e1..38d06754637 100644 --- a/pkg/skaffold/runner/v1/dev.go +++ b/pkg/skaffold/runner/v1/dev.go @@ -36,7 +36,7 @@ import ( latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/schema/errors/errors.go b/pkg/skaffold/schema/errors/errors.go index e3355b0aea0..87ac53c2d61 100644 --- a/pkg/skaffold/schema/errors/errors.go +++ b/pkg/skaffold/schema/errors/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) // ConfigParsingError returns a generic config parsing error diff --git a/pkg/skaffold/schema/errors/errors_test.go b/pkg/skaffold/schema/errors/errors_test.go index e6eab4381aa..7284b088792 100644 --- a/pkg/skaffold/schema/errors/errors_test.go +++ b/pkg/skaffold/schema/errors/errors_test.go @@ -23,7 +23,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/proto/enums" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/schema/validation/validation.go b/pkg/skaffold/schema/validation/validation.go index 63dba9e410b..dfa4dc70f24 100644 --- a/pkg/skaffold/schema/validation/validation.go +++ b/pkg/skaffold/schema/validation/validation.go @@ -37,7 +37,7 @@ import ( latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yamltags" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/server/endpoints.go b/pkg/skaffold/server/endpoints.go index 33a5c79aac7..e5f8c305448 100644 --- a/pkg/skaffold/server/endpoints.go +++ b/pkg/skaffold/server/endpoints.go @@ -24,7 +24,7 @@ import ( "google.golang.org/grpc/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func (s *server) GetState(context.Context, *empty.Empty) (*proto.State, error) { diff --git a/pkg/skaffold/server/server.go b/pkg/skaffold/server/server.go index 920155d5a19..9ef0dcf2158 100644 --- a/pkg/skaffold/server/server.go +++ b/pkg/skaffold/server/server.go @@ -34,7 +34,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" v2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/server/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" protoV2 "github.com/GoogleContainerTools/skaffold/proto/v2" ) diff --git a/pkg/skaffold/server/server_test.go b/pkg/skaffold/server/server_test.go index 064db0e90b3..a783f0141c5 100644 --- a/pkg/skaffold/server/server_test.go +++ b/pkg/skaffold/server/server_test.go @@ -24,7 +24,7 @@ import ( "google.golang.org/grpc" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/test/custom/error.go b/pkg/skaffold/test/custom/error.go index 119e7e70075..945f109af82 100644 --- a/pkg/skaffold/test/custom/error.go +++ b/pkg/skaffold/test/custom/error.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func cmdRunRetrieveErr(command string, imageName string, err error) error { diff --git a/pkg/skaffold/test/structure/error.go b/pkg/skaffold/test/structure/error.go index 50dafd07d96..265987c9ca1 100644 --- a/pkg/skaffold/test/structure/error.go +++ b/pkg/skaffold/test/structure/error.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - "github.com/GoogleContainerTools/skaffold/proto/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v1" ) func containerStructureTestErr(err error) error { diff --git a/proto/v1/skaffold.pb.go b/proto/v1/skaffold.pb.go index a21b5c14c45..7abe7c740e3 100644 --- a/proto/v1/skaffold.pb.go +++ b/proto/v1/skaffold.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: v1/skaffold.proto -package proto +package v1 import ( context "context" @@ -2593,184 +2593,186 @@ func (m *IntOrString) GetStrVal() string { } func init() { - proto.RegisterType((*StateResponse)(nil), "proto.StateResponse") - proto.RegisterType((*Response)(nil), "proto.Response") - proto.RegisterType((*Request)(nil), "proto.Request") - proto.RegisterType((*State)(nil), "proto.State") - proto.RegisterMapType((map[int32]*PortEvent)(nil), "proto.State.ForwardedPortsEntry") - proto.RegisterType((*Metadata)(nil), "proto.Metadata") - proto.RegisterMapType((map[string]string)(nil), "proto.Metadata.AdditionalEntry") - proto.RegisterType((*BuildMetadata)(nil), "proto.BuildMetadata") - proto.RegisterMapType((map[string]string)(nil), "proto.BuildMetadata.AdditionalEntry") - proto.RegisterType((*BuildMetadata_ImageBuilder)(nil), "proto.BuildMetadata.ImageBuilder") - proto.RegisterType((*TestMetadata)(nil), "proto.TestMetadata") - proto.RegisterType((*TestMetadata_Tester)(nil), "proto.TestMetadata.Tester") - proto.RegisterType((*DeployMetadata)(nil), "proto.DeployMetadata") - proto.RegisterType((*DeployMetadata_Deployer)(nil), "proto.DeployMetadata.Deployer") - proto.RegisterType((*BuildState)(nil), "proto.BuildState") - proto.RegisterMapType((map[string]string)(nil), "proto.BuildState.ArtifactsEntry") - proto.RegisterType((*TestState)(nil), "proto.TestState") - proto.RegisterType((*DeployState)(nil), "proto.DeployState") - proto.RegisterType((*StatusCheckState)(nil), "proto.StatusCheckState") - proto.RegisterMapType((map[string]string)(nil), "proto.StatusCheckState.ResourcesEntry") - proto.RegisterType((*FileSyncState)(nil), "proto.FileSyncState") - proto.RegisterType((*Event)(nil), "proto.Event") - proto.RegisterType((*TerminationEvent)(nil), "proto.TerminationEvent") - proto.RegisterType((*DevLoopEvent)(nil), "proto.DevLoopEvent") - proto.RegisterType((*ActionableErr)(nil), "proto.ActionableErr") - proto.RegisterType((*MetaEvent)(nil), "proto.MetaEvent") - proto.RegisterType((*BuildEvent)(nil), "proto.BuildEvent") - proto.RegisterType((*TestEvent)(nil), "proto.TestEvent") - proto.RegisterType((*DeployEvent)(nil), "proto.DeployEvent") - proto.RegisterType((*StatusCheckEvent)(nil), "proto.StatusCheckEvent") - proto.RegisterType((*ResourceStatusCheckEvent)(nil), "proto.ResourceStatusCheckEvent") - proto.RegisterType((*PortEvent)(nil), "proto.PortEvent") - proto.RegisterType((*FileSyncEvent)(nil), "proto.FileSyncEvent") - proto.RegisterType((*DebuggingContainerEvent)(nil), "proto.DebuggingContainerEvent") - proto.RegisterMapType((map[string]uint32)(nil), "proto.DebuggingContainerEvent.DebugPortsEntry") - proto.RegisterType((*LogEntry)(nil), "proto.LogEntry") - proto.RegisterType((*UserIntentRequest)(nil), "proto.UserIntentRequest") - proto.RegisterType((*TriggerRequest)(nil), "proto.TriggerRequest") - proto.RegisterType((*TriggerState)(nil), "proto.TriggerState") - proto.RegisterType((*Intent)(nil), "proto.Intent") - proto.RegisterType((*Suggestion)(nil), "proto.Suggestion") - proto.RegisterType((*IntOrString)(nil), "proto.IntOrString") + proto.RegisterType((*StateResponse)(nil), "proto.v1.StateResponse") + proto.RegisterType((*Response)(nil), "proto.v1.Response") + proto.RegisterType((*Request)(nil), "proto.v1.Request") + proto.RegisterType((*State)(nil), "proto.v1.State") + proto.RegisterMapType((map[int32]*PortEvent)(nil), "proto.v1.State.ForwardedPortsEntry") + proto.RegisterType((*Metadata)(nil), "proto.v1.Metadata") + proto.RegisterMapType((map[string]string)(nil), "proto.v1.Metadata.AdditionalEntry") + proto.RegisterType((*BuildMetadata)(nil), "proto.v1.BuildMetadata") + proto.RegisterMapType((map[string]string)(nil), "proto.v1.BuildMetadata.AdditionalEntry") + proto.RegisterType((*BuildMetadata_ImageBuilder)(nil), "proto.v1.BuildMetadata.ImageBuilder") + proto.RegisterType((*TestMetadata)(nil), "proto.v1.TestMetadata") + proto.RegisterType((*TestMetadata_Tester)(nil), "proto.v1.TestMetadata.Tester") + proto.RegisterType((*DeployMetadata)(nil), "proto.v1.DeployMetadata") + proto.RegisterType((*DeployMetadata_Deployer)(nil), "proto.v1.DeployMetadata.Deployer") + proto.RegisterType((*BuildState)(nil), "proto.v1.BuildState") + proto.RegisterMapType((map[string]string)(nil), "proto.v1.BuildState.ArtifactsEntry") + proto.RegisterType((*TestState)(nil), "proto.v1.TestState") + proto.RegisterType((*DeployState)(nil), "proto.v1.DeployState") + proto.RegisterType((*StatusCheckState)(nil), "proto.v1.StatusCheckState") + proto.RegisterMapType((map[string]string)(nil), "proto.v1.StatusCheckState.ResourcesEntry") + proto.RegisterType((*FileSyncState)(nil), "proto.v1.FileSyncState") + proto.RegisterType((*Event)(nil), "proto.v1.Event") + proto.RegisterType((*TerminationEvent)(nil), "proto.v1.TerminationEvent") + proto.RegisterType((*DevLoopEvent)(nil), "proto.v1.DevLoopEvent") + proto.RegisterType((*ActionableErr)(nil), "proto.v1.ActionableErr") + proto.RegisterType((*MetaEvent)(nil), "proto.v1.MetaEvent") + proto.RegisterType((*BuildEvent)(nil), "proto.v1.BuildEvent") + proto.RegisterType((*TestEvent)(nil), "proto.v1.TestEvent") + proto.RegisterType((*DeployEvent)(nil), "proto.v1.DeployEvent") + proto.RegisterType((*StatusCheckEvent)(nil), "proto.v1.StatusCheckEvent") + proto.RegisterType((*ResourceStatusCheckEvent)(nil), "proto.v1.ResourceStatusCheckEvent") + proto.RegisterType((*PortEvent)(nil), "proto.v1.PortEvent") + proto.RegisterType((*FileSyncEvent)(nil), "proto.v1.FileSyncEvent") + proto.RegisterType((*DebuggingContainerEvent)(nil), "proto.v1.DebuggingContainerEvent") + proto.RegisterMapType((map[string]uint32)(nil), "proto.v1.DebuggingContainerEvent.DebugPortsEntry") + proto.RegisterType((*LogEntry)(nil), "proto.v1.LogEntry") + proto.RegisterType((*UserIntentRequest)(nil), "proto.v1.UserIntentRequest") + proto.RegisterType((*TriggerRequest)(nil), "proto.v1.TriggerRequest") + proto.RegisterType((*TriggerState)(nil), "proto.v1.TriggerState") + proto.RegisterType((*Intent)(nil), "proto.v1.Intent") + proto.RegisterType((*Suggestion)(nil), "proto.v1.Suggestion") + proto.RegisterType((*IntOrString)(nil), "proto.v1.IntOrString") } func init() { proto.RegisterFile("v1/skaffold.proto", fileDescriptor_9ef8072bea85606e) } var fileDescriptor_9ef8072bea85606e = []byte{ - // 2066 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4f, 0x73, 0x1b, 0x49, - 0x15, 0xf7, 0x48, 0x1a, 0x49, 0xf3, 0x24, 0xd9, 0x72, 0x27, 0xb6, 0xc5, 0x24, 0x24, 0x66, 0x2a, - 0x1b, 0x42, 0x76, 0x57, 0x8a, 0x9d, 0x2d, 0x58, 0x4c, 0x02, 0x95, 0xd8, 0xde, 0x38, 0x4b, 0x48, - 0x42, 0xcb, 0x50, 0x14, 0x05, 0x95, 0x1a, 0x4b, 0xed, 0xd9, 0x29, 0x4b, 0x33, 0x62, 0x66, 0xe4, - 0x45, 0x17, 0x0a, 0xf8, 0x00, 0x54, 0x6d, 0xf1, 0x1d, 0xf8, 0x0e, 0x1c, 0x39, 0xec, 0x27, 0xd8, - 0x13, 0x14, 0x47, 0x28, 0x8e, 0x5c, 0xf8, 0x00, 0x54, 0xff, 0x9b, 0xe9, 0x96, 0x66, 0x2c, 0x3b, - 0x29, 0x8a, 0x4b, 0xa2, 0x7e, 0xfd, 0x7b, 0x7f, 0xfb, 0xf5, 0x7b, 0x6f, 0xda, 0xb0, 0x7e, 0xbe, - 0xd3, 0x8b, 0xcf, 0xdc, 0xd3, 0xd3, 0x70, 0x34, 0xec, 0x4e, 0xa2, 0x30, 0x09, 0x91, 0xc9, 0xfe, - 0xb3, 0x6f, 0x7a, 0x61, 0xe8, 0x8d, 0x48, 0xcf, 0x9d, 0xf8, 0x3d, 0x37, 0x08, 0xc2, 0xc4, 0x4d, - 0xfc, 0x30, 0x88, 0x39, 0xc8, 0xbe, 0x2d, 0x76, 0xd9, 0xea, 0x64, 0x7a, 0xda, 0x4b, 0xfc, 0x31, - 0x89, 0x13, 0x77, 0x3c, 0x11, 0x80, 0x1b, 0xf3, 0x00, 0x32, 0x9e, 0x24, 0x33, 0xb1, 0xb9, 0x4e, - 0x82, 0xe9, 0x38, 0xee, 0xb1, 0x7f, 0x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0x7d, 0x92, 0x22, 0x78, 0x82, 0x29, 0x2c, 0xf6, 0x63, 0x58, 0x9b, 0xdb, - 0x56, 0x03, 0x65, 0xf1, 0x40, 0x5d, 0x57, 0x03, 0x65, 0x29, 0x61, 0x71, 0x7e, 0x57, 0x86, 0x96, - 0xe6, 0x30, 0xfa, 0x00, 0xd6, 0x83, 0xe9, 0xf8, 0x84, 0x44, 0xaf, 0x4e, 0x9f, 0x44, 0x89, 0x7f, - 0xea, 0x0e, 0x92, 0x58, 0x04, 0x7d, 0x71, 0x03, 0x3d, 0x86, 0x3a, 0x0b, 0x10, 0xcd, 0xa7, 0x12, - 0xb3, 0xfe, 0x1b, 0x79, 0x61, 0xec, 0x3e, 0x1f, 0xbb, 0x1e, 0x79, 0xca, 0x91, 0x38, 0x65, 0x41, - 0xf7, 0xa1, 0x92, 0xcc, 0x26, 0x84, 0xc5, 0x69, 0x75, 0x77, 0x53, 0xb0, 0xf2, 0x5a, 0xc3, 0xd0, - 0xc7, 0xb3, 0x09, 0xc1, 0x0c, 0x83, 0x0e, 0x72, 0x42, 0x75, 0x27, 0x57, 0xd9, 0x45, 0xf1, 0xc2, - 0xd0, 0x54, 0x6d, 0x41, 0x1f, 0x08, 0x0b, 0x0c, 0x66, 0x41, 0x67, 0xd1, 0x02, 0x12, 0x29, 0x36, - 0x5c, 0x07, 0x73, 0x10, 0x4e, 0x83, 0x84, 0x05, 0xd2, 0xc4, 0x7c, 0xf1, 0xae, 0x67, 0xf0, 0x85, - 0x01, 0x4d, 0x35, 0x35, 0xd0, 0x47, 0x50, 0xa3, 0x6b, 0x1a, 0x53, 0x83, 0xb9, 0x69, 0xe7, 0x24, - 0x50, 0x97, 0x43, 0xb0, 0x84, 0xda, 0x3f, 0x84, 0x2a, 0xff, 0x89, 0xde, 0xd7, 0x7c, 0xda, 0xd2, - 0x7c, 0xe2, 0x90, 0x65, 0x2e, 0x39, 0x5f, 0x19, 0xb0, 0xaa, 0xe7, 0x36, 0x7a, 0x04, 0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 0xa2, 0x2a, 0xf8, 0xbd, - 0xc8, 0x55, 0xf2, 0x02, 0xaa, 0x47, 0x6e, 0x30, 0x1c, 0x11, 0xa4, 0x15, 0x96, 0x42, 0xb9, 0x37, - 0x99, 0xdc, 0x4d, 0x67, 0x3d, 0x3b, 0xc8, 0xde, 0x67, 0x4c, 0xc0, 0x9e, 0x71, 0xff, 0x75, 0xf9, - 0xa4, 0xca, 0xf0, 0x0f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x04, 0x2e, 0xed, 0x6c, 0xf9, 0x1a, - 0x00, 0x00, + // 2111 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x93, 0xdb, 0x48, + 0x15, 0x1f, 0xf9, 0x53, 0x7a, 0x9e, 0xcf, 0x4e, 0x32, 0x63, 0x94, 0xec, 0x6e, 0x56, 0x24, 0x90, + 0x2c, 0x59, 0x3b, 0x4e, 0x20, 0x59, 0x52, 0x3b, 0x2c, 0x33, 0x93, 0x49, 0x26, 0xd9, 0x2c, 0xd9, + 0xc8, 0xb3, 0x7b, 0xe0, 0xa3, 0x16, 0xd9, 0xee, 0x51, 0x54, 0xb1, 0x25, 0x23, 0xc9, 0x5e, 0x7c, + 0x03, 0x2e, 0xfc, 0x01, 0xec, 0x89, 0xff, 0x80, 0xff, 0x83, 0x03, 0x77, 0x28, 0x4e, 0x54, 0xc1, + 0x81, 0x03, 0xc5, 0x91, 0x0b, 0x07, 0x2e, 0x54, 0xbf, 0xee, 0x96, 0x5a, 0xb2, 0x35, 0xce, 0x4c, + 0x8a, 0x2a, 0x2e, 0x33, 0xea, 0xee, 0xdf, 0xfb, 0xec, 0xd7, 0xef, 0xbd, 0x6e, 0xc3, 0xd6, 0xb4, + 0xd3, 0x8e, 0x5e, 0x39, 0x27, 0x27, 0xc1, 0x70, 0xd0, 0x1a, 0x87, 0x41, 0x1c, 0x10, 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x06, 0x61, 0x1c, 0x35, 0x2b, 0x57, 0xcb, 0x37, 0x1a, 0x77, 0xbe, 0x9e, 0xb3, + 0xb2, 0xf5, 0x28, 0x83, 0x3a, 0xf4, 0xe3, 0x70, 0x66, 0xe7, 0x48, 0xc9, 0x23, 0xd8, 0x64, 0xbe, + 0x98, 0x44, 0x07, 0x2f, 0x69, 0xff, 0x15, 0x57, 0xa5, 0x8a, 0xaa, 0x98, 0x59, 0x76, 0x2a, 0xc2, + 0x9e, 0xa3, 0x21, 0xbb, 0xb0, 0x76, 0xe2, 0x0d, 0x69, 0x77, 0xe6, 0xf7, 0x39, 0x93, 0x1a, 0x32, + 0xd9, 0x49, 0x99, 0x3c, 0x52, 0x97, 0xed, 0x2c, 0x9a, 0x74, 0xe1, 0xc2, 0x80, 0xf6, 0x26, 0xae, + 0xeb, 0xf9, 0xee, 0x41, 0xe0, 0xc7, 0x8e, 0xe7, 0xd3, 0x30, 0x6a, 0xd6, 0xd1, 0xb0, 0x77, 0x55, + 0xa7, 0xe4, 0x41, 0x87, 0x53, 0xea, 0xc7, 0xf6, 0x22, 0x6a, 0xd2, 0x02, 0x7d, 0x44, 0x63, 0x67, + 0xe0, 0xc4, 0x4e, 0x53, 0x47, 0x75, 0x48, 0xca, 0xe9, 0x13, 0xb1, 0x62, 0x27, 0x18, 0xd2, 0x01, + 0x23, 0xa6, 0x51, 0xcc, 0xf5, 0x37, 0x90, 0xe0, 0x42, 0x4a, 0x70, 0x2c, 0x97, 0xec, 0x14, 0x65, + 0x7e, 0x0e, 0x17, 0x16, 0x78, 0x99, 0x05, 0xd3, 0x2b, 0x3a, 0xc3, 0x50, 0xa8, 0xda, 0xec, 0x93, + 0xdc, 0x84, 0xea, 0xd4, 0x19, 0x4e, 0xe4, 0x3e, 0x2b, 0x7c, 0x19, 0x19, 0x37, 0x82, 0x23, 0x1e, + 0x94, 0x3e, 0xd0, 0x9e, 0x56, 0xf4, 0xf2, 0x66, 0xc5, 0xfa, 0x6d, 0x09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, + 0x13, 0xed, 0xdb, 0xf2, 0x46, 0xf0, 0x68, 0xc5, 0x2e, 0xe2, 0x41, 0x3e, 0x84, 0xd5, 0x01, 0x9d, + 0x3e, 0x0b, 0x82, 0x31, 0xe7, 0x69, 0xe4, 0xfb, 0x9c, 0x87, 0xca, 0xea, 0xd1, 0x8a, 0x9d, 0x41, + 0xb3, 0x9d, 0x88, 0x69, 0x38, 0xf2, 0x7c, 0xbc, 0xca, 0x70, 0x0e, 0x90, 0xdf, 0x89, 0xe3, 0x1c, + 0x82, 0xed, 0x44, 0x9e, 0x8a, 0x05, 0x02, 0xcb, 0x69, 0x9c, 0x45, 0x63, 0x51, 0x9b, 0x99, 0x04, + 0x42, 0x32, 0xd8, 0x5f, 0x05, 0xa0, 0xec, 0xe3, 0x0b, 0x56, 0x17, 0xac, 0xcf, 0x60, 0x33, 0x2f, + 0xaa, 0xf0, 0x2c, 0xdd, 0x84, 0x32, 0x0d, 0x43, 0x11, 0xe3, 0xca, 0x66, 0xec, 0xf5, 0xb1, 0xde, + 0xf7, 0x86, 0xf4, 0x30, 0x0c, 0x6d, 0x86, 0xb1, 0x02, 0x58, 0x55, 0x7d, 0x40, 0xae, 0x80, 0xe1, + 0xc5, 0x34, 0x44, 0x21, 0xa2, 0x91, 0x4a, 0x27, 0x14, 0x81, 0xa5, 0x45, 0x02, 0xcb, 0xaf, 0x21, + 0xf0, 0x2b, 0x0d, 0xd6, 0x32, 0xd3, 0xa4, 0x03, 0x75, 0x1a, 0x86, 0x98, 0x96, 0xb4, 0xd3, 0xd3, + 0x92, 0xc4, 0x91, 0x26, 0xd4, 0x47, 0x34, 0x8a, 0x1c, 0x57, 0x66, 0x1c, 0x39, 0x24, 0xf7, 0xa0, + 0x11, 0x4d, 0x5c, 0x97, 0x46, 0x78, 0xfb, 0x6c, 0x96, 0x31, 0x63, 0x2a, 0xc7, 0xbc, 0x9b, 0x2c, + 0xda, 0x2a, 0xd0, 0x7a, 0x01, 0x46, 0x92, 0x37, 0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0x01, 0x4d, 0x06, 0x60, 0xec, 0x4d, 0xe2, 0x00, 0x1b, 0x5d, 0xd2, 0x9c, 0x0b, + 0xde, 0x65, 0xbc, 0xaf, 0x23, 0xef, 0x77, 0xcc, 0x6d, 0xc6, 0x1b, 0xe3, 0xb1, 0xcd, 0xee, 0xfc, + 0x5f, 0x48, 0x31, 0x3c, 0xec, 0x49, 0x0f, 0x74, 0x26, 0x85, 0x15, 0x95, 0x73, 0x08, 0xb9, 0x86, + 0x42, 0xde, 0x36, 0x2f, 0xe1, 0x76, 0xcd, 0xfc, 0xfe, 0x42, 0x19, 0x27, 0x00, 0x4c, 0x06, 0xef, + 0x43, 0xcf, 0x21, 0xe5, 0x1b, 0x28, 0xe5, 0xaa, 0xb9, 0xc3, 0xa4, 0xf0, 0xf3, 0xb2, 0x50, 0xce, + 0x73, 0xa8, 0x1d, 0x39, 0xfe, 0x60, 0x48, 0x49, 0x3e, 0xf3, 0x14, 0xb2, 0xbe, 0x82, 0xac, 0xb7, + 0xad, 0xad, 0x74, 0x5f, 0xdb, 0x2f, 0x91, 0xc7, 0x03, 0xed, 0xbd, 0xfd, 0xbb, 0x3f, 0xec, 0xb8, + 0x5e, 0xfc, 0x72, 0xd2, 0x6b, 0xf5, 0x83, 0x51, 0xfb, 0x31, 0x72, 0x48, 0x92, 0xf2, 0x71, 0x10, + 0x0c, 0xa3, 0xe4, 0x67, 0x3b, 0xfe, 0xfb, 0x5a, 0x7b, 0xda, 0xf9, 0xb4, 0xdc, 0xab, 0xe1, 0xf7, + 0xdd, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x26, 0x79, 0x74, 0xd7, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2814,7 +2816,7 @@ func NewSkaffoldServiceClient(cc grpc.ClientConnInterface) SkaffoldServiceClient func (c *skaffoldServiceClient) GetState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*State, error) { out := new(State) - err := c.cc.Invoke(ctx, "/proto.SkaffoldService/GetState", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/GetState", in, out, opts...) if err != nil { return nil, err } @@ -2822,7 +2824,7 @@ func (c *skaffoldServiceClient) GetState(ctx context.Context, in *emptypb.Empty, } func (c *skaffoldServiceClient) EventLog(ctx context.Context, opts ...grpc.CallOption) (SkaffoldService_EventLogClient, error) { - stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[0], "/proto.SkaffoldService/EventLog", opts...) + stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[0], "/proto.v1.SkaffoldService/EventLog", opts...) if err != nil { return nil, err } @@ -2853,7 +2855,7 @@ func (x *skaffoldServiceEventLogClient) Recv() (*LogEntry, error) { } func (c *skaffoldServiceClient) Events(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldService_EventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[1], "/proto.SkaffoldService/Events", opts...) + stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[1], "/proto.v1.SkaffoldService/Events", opts...) if err != nil { return nil, err } @@ -2886,7 +2888,7 @@ func (x *skaffoldServiceEventsClient) Recv() (*LogEntry, error) { func (c *skaffoldServiceClient) Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.SkaffoldService/Execute", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/Execute", in, out, opts...) if err != nil { return nil, err } @@ -2895,7 +2897,7 @@ func (c *skaffoldServiceClient) Execute(ctx context.Context, in *UserIntentReque func (c *skaffoldServiceClient) AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoBuild", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/AutoBuild", in, out, opts...) if err != nil { return nil, err } @@ -2904,7 +2906,7 @@ func (c *skaffoldServiceClient) AutoBuild(ctx context.Context, in *TriggerReques func (c *skaffoldServiceClient) AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoSync", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/AutoSync", in, out, opts...) if err != nil { return nil, err } @@ -2913,7 +2915,7 @@ func (c *skaffoldServiceClient) AutoSync(ctx context.Context, in *TriggerRequest func (c *skaffoldServiceClient) AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoDeploy", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/AutoDeploy", in, out, opts...) if err != nil { return nil, err } @@ -2922,7 +2924,7 @@ func (c *skaffoldServiceClient) AutoDeploy(ctx context.Context, in *TriggerReque func (c *skaffoldServiceClient) Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.SkaffoldService/Handle", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/Handle", in, out, opts...) if err != nil { return nil, err } @@ -2993,7 +2995,7 @@ func _SkaffoldService_GetState_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.SkaffoldService/GetState", + FullMethod: "/proto.v1.SkaffoldService/GetState", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).GetState(ctx, req.(*emptypb.Empty)) @@ -3058,7 +3060,7 @@ func _SkaffoldService_Execute_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.SkaffoldService/Execute", + FullMethod: "/proto.v1.SkaffoldService/Execute", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).Execute(ctx, req.(*UserIntentRequest)) @@ -3076,7 +3078,7 @@ func _SkaffoldService_AutoBuild_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.SkaffoldService/AutoBuild", + FullMethod: "/proto.v1.SkaffoldService/AutoBuild", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).AutoBuild(ctx, req.(*TriggerRequest)) @@ -3094,7 +3096,7 @@ func _SkaffoldService_AutoSync_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.SkaffoldService/AutoSync", + FullMethod: "/proto.v1.SkaffoldService/AutoSync", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).AutoSync(ctx, req.(*TriggerRequest)) @@ -3112,7 +3114,7 @@ func _SkaffoldService_AutoDeploy_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.SkaffoldService/AutoDeploy", + FullMethod: "/proto.v1.SkaffoldService/AutoDeploy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).AutoDeploy(ctx, req.(*TriggerRequest)) @@ -3130,7 +3132,7 @@ func _SkaffoldService_Handle_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.SkaffoldService/Handle", + FullMethod: "/proto.v1.SkaffoldService/Handle", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).Handle(ctx, req.(*Event)) @@ -3139,7 +3141,7 @@ func _SkaffoldService_Handle_Handler(srv interface{}, ctx context.Context, dec f } var _SkaffoldService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "proto.SkaffoldService", + ServiceName: "proto.v1.SkaffoldService", HandlerType: (*SkaffoldServiceServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/proto/v1/skaffold.pb.gw.go b/proto/v1/skaffold.pb.gw.go index 3f4d86c5f93..3fbb0d761b8 100644 --- a/proto/v1/skaffold.pb.gw.go +++ b/proto/v1/skaffold.pb.gw.go @@ -2,11 +2,11 @@ // source: v1/skaffold.proto /* -Package proto is a reverse proxy. +Package v1 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package proto +package v1 import ( "context" diff --git a/proto/v1/skaffold.proto b/proto/v1/skaffold.proto index 642205aa28a..335efc7894d 100644 --- a/proto/v1/skaffold.proto +++ b/proto/v1/skaffold.proto @@ -1,5 +1,7 @@ syntax = "proto3"; -package proto; +package proto.v1; + +option go_package = "github.com/GoogleContainerTools/skaffold/proto/v1"; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; From 43d19d6edb4218e951e5ef7fde4a68660cf36426 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Wed, 30 Jun 2021 13:29:12 -0700 Subject: [PATCH 034/103] Add information about workspace and dockerfile to artifact metadata (#6111) * add information about workspace and dockerfile to artifact metadata * gofmt --- pkg/skaffold/event/v2/metadata.go | 5 +- proto/v2/skaffold.pb.go | 299 ++++++++++++++++-------------- proto/v2/skaffold.proto | 4 +- 3 files changed, 165 insertions(+), 143 deletions(-) diff --git a/pkg/skaffold/event/v2/metadata.go b/pkg/skaffold/event/v2/metadata.go index d032f4208ec..0e99c5435e8 100644 --- a/pkg/skaffold/event/v2/metadata.go +++ b/pkg/skaffold/event/v2/metadata.go @@ -82,7 +82,8 @@ func getArtifacts(b latestV1.BuildConfig) []*proto.BuildMetadata_Artifact { result := []*proto.BuildMetadata_Artifact{} for _, a := range b.Artifacts { artifact := &proto.BuildMetadata_Artifact{ - Name: a.ImageName, + Name: a.ImageName, + Context: a.Workspace, } switch { case a.BazelArtifact != nil: @@ -93,10 +94,12 @@ func getArtifacts(b latestV1.BuildConfig) []*proto.BuildMetadata_Artifact { artifact.Type = proto.BuilderType_CUSTOM case a.DockerArtifact != nil: artifact.Type = proto.BuilderType_DOCKER + artifact.Dockerfile = a.DockerArtifact.DockerfilePath case a.JibArtifact != nil: artifact.Type = proto.BuilderType_JIB case a.KanikoArtifact != nil: artifact.Type = proto.BuilderType_KANIKO + artifact.Dockerfile = a.KanikoArtifact.DockerfilePath default: artifact.Type = proto.BuilderType_UNKNOWN_BUILDER_TYPE } diff --git a/proto/v2/skaffold.pb.go b/proto/v2/skaffold.pb.go index cd355632ee3..9885c0741a2 100644 --- a/proto/v2/skaffold.pb.go +++ b/proto/v2/skaffold.pb.go @@ -669,6 +669,8 @@ func (m *BuildMetadata) GetAdditional() map[string]string { type BuildMetadata_Artifact struct { Type enums.BuilderType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.enums.BuilderType" json:"type,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Context string `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"` + Dockerfile string `protobuf:"bytes,4,opt,name=dockerfile,proto3" json:"dockerfile,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -713,6 +715,20 @@ func (m *BuildMetadata_Artifact) GetName() string { return "" } +func (m *BuildMetadata_Artifact) GetContext() string { + if m != nil { + return m.Context + } + return "" +} + +func (m *BuildMetadata_Artifact) GetDockerfile() string { + if m != nil { + return m.Dockerfile + } + return "" +} + // TestMetadata describes the test pipeline type TestMetadata struct { Testers []*TestMetadata_Tester `protobuf:"bytes,1,rep,name=Testers,proto3" json:"Testers,omitempty"` @@ -2750,147 +2766,148 @@ func init() { func init() { proto.RegisterFile("v2/skaffold.proto", fileDescriptor_39088757fd9c8e40) } var fileDescriptor_39088757fd9c8e40 = []byte{ - // 2225 bytes of a gzipped FileDescriptorProto - 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1, 0x30, 0xea, 0xf0, 0xbf, 0xa2, 0xcb, 0xfe, 0x04, 0x1a, - 0x47, 0xd4, 0xa1, 0x04, 0x93, 0x68, 0x14, 0xf8, 0x11, 0x41, 0xef, 0x41, 0x39, 0x62, 0x1d, 0xcd, - 0xc2, 0x7a, 0xe1, 0x76, 0xbd, 0x7b, 0xad, 0xad, 0x2c, 0x6b, 0x0b, 0x9c, 0x18, 0xb5, 0xd7, 0xa0, - 0x96, 0x88, 0x2c, 0x40, 0x69, 0x18, 0xf5, 0xb9, 0x80, 0x85, 0xd9, 0xa7, 0x7d, 0x13, 0xaa, 0x98, - 0xfc, 0x32, 0x26, 0x11, 0x45, 0x08, 0x66, 0x7d, 0x67, 0x48, 0xe4, 0x28, 0xff, 0xb6, 0xff, 0x39, - 0x0b, 0x65, 0xae, 0x0d, 0xfd, 0x10, 0xe0, 0x24, 0xf6, 0x06, 0xee, 0x91, 0x36, 0xe5, 0x72, 0x3a, - 0xe5, 0x76, 0x32, 0x86, 0x35, 0x1c, 0xba, 0x07, 0x75, 0x97, 0x8c, 0x06, 0xc1, 0x58, 0x88, 0x15, - 0xb9, 0xd8, 0xf5, 0x54, 0xec, 0x41, 0x3a, 0x88, 0x75, 0x24, 0x7a, 0x08, 0xf3, 0xa7, 0x41, 0xf8, - 0xad, 0x13, 0xba, 0xc4, 0xfd, 0x32, 0x08, 0x69, 0xd4, 0x2c, 0xad, 0x97, 0x6e, 0xd7, 0xbb, 0xef, - 0x64, 0xbc, 0x6c, 0xef, 0x19, 0xa8, 0x5d, 0x9f, 0x86, 0x63, 0x9c, 0x11, 0x45, 0x7b, 0xb0, 0xc0, - 0x62, 0x11, 0x47, 0x3b, 0xcf, 0x49, 0xef, 0x4c, 0x98, 0x32, 0xcb, 0x4d, 0x69, 0x99, 0xea, 0x74, - 0x04, 0xce, 0xc9, 0xa0, 0x4d, 0x68, 0x9c, 0x7a, 0x03, 0x72, 0x34, 0xf6, 0x7b, 0x42, 0x49, 0x99, - 0x2b, 0x59, 0x4d, 0x95, 0xec, 0xe9, 0xc3, 0xd8, 0x44, 0xa3, 0x23, 0x58, 0x72, 0xc9, 0x49, 0xdc, - 0xef, 0x7b, 0x7e, 0x7f, 0x27, 0xf0, 0xa9, 0xe3, 0xf9, 0x24, 0x8c, 0x9a, 0x15, 0xee, 0xd8, 0x2d, - 0x3d, 0x28, 0x59, 0xd0, 0xee, 0x39, 0xf1, 0x29, 0x9e, 0x24, 0x8d, 0xda, 0x50, 0x1b, 0x12, 0xea, - 0xb8, 0x0e, 0x75, 0x9a, 0x55, 0x6e, 0x0e, 0x4a, 0x35, 0x7d, 0x21, 0x47, 0x70, 0x82, 0x41, 0x1b, - 0x60, 0x51, 0x12, 0x51, 0x61, 0x7f, 0x8d, 0x0b, 0x2c, 0xa5, 0x02, 0xc7, 0x6a, 0x08, 0xa7, 0xa8, - 0xd6, 0x37, 0xb0, 0x34, 0x21, 0xca, 0x2c, 0x99, 0xce, 0xc8, 0x98, 0xa7, 0x42, 0x19, 0xb3, 0x4f, - 0x74, 0x07, 0xca, 0xe7, 0xce, 0x20, 0x56, 0xeb, 0xac, 0x05, 0x97, 0x89, 0x49, 0x1d, 0xc2, 0x17, - 0x01, 0xbc, 0x5f, 0xfc, 0xb4, 0x60, 0xff, 0xb9, 0x08, 0x35, 0x65, 0x28, 0xfa, 0x18, 0xca, 0x3c, - 0x7d, 0x64, 0x86, 0xad, 0x66, 0x32, 0x2c, 0x71, 0x48, 0xa0, 0xd0, 0x1d, 0xa8, 0x88, 0xac, 0x91, - 0x53, 0x36, 0xb3, 0xa9, 0x95, 0x08, 0x48, 0x1c, 0xfa, 0x00, 0x66, 0x99, 0x67, 0xcd, 0x12, 0xc7, - 0xaf, 0x98, 0xae, 0x27, 0x68, 0x8e, 0x41, 0xcb, 0x50, 0x0e, 0x63, 0xff, 0xf0, 0x01, 0x4f, 0x16, - 0x0b, 0x8b, 0x06, 0xda, 0x06, 0x70, 0x5c, 0xd7, 0x63, 0x9b, 0xd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, 0xa9, 0x32, - 0xf1, 0xcc, 0x3e, 0x77, 0x32, 0x61, 0x6d, 0xd6, 0xb3, 0xf6, 0x4d, 0x61, 0xb6, 0xcc, 0xbe, 0x29, - 0x3a, 0x58, 0xa6, 0x52, 0x12, 0x0e, 0x3d, 0x9f, 0xe7, 0x88, 0xd0, 0x3b, 0x97, 0x8d, 0xe0, 0x71, - 0x06, 0xc1, 0x32, 0x35, 0x2b, 0xc5, 0x16, 0x81, 0xb1, 0x3a, 0xa1, 0xa2, 0x91, 0x57, 0x11, 0xd1, - 0x4c, 0xcc, 0x52, 0xf8, 0xf6, 0x1c, 0x00, 0x61, 0x1f, 0xcf, 0xd8, 0x81, 0x66, 0x7f, 0x05, 0x0b, - 0xd9, 0x19, 0xa7, 0x16, 0x81, 0xf7, 0xa1, 0x44, 0xc2, 0x50, 0x6e, 0x4c, 0x2d, 0xaa, 0x5b, 0x3d, - 0x4e, 0x54, 0x4e, 0x06, 0x64, 0x37, 0x0c, 0x31, 0xc3, 0x30, 0x06, 0xd2, 0x30, 0xba, 0xd1, 0x06, - 0x54, 0x49, 0x18, 0xf2, 0xf2, 0x56, 0x78, 0x79, 0x79, 0x53, 0x38, 0xd4, 0x84, 0xea, 0x90, 0x44, - 0x91, 0xd3, 0x57, 0x95, 0x4b, 0x35, 0xd1, 0x27, 0x50, 0x8f, 0xe2, 0x7e, 0x9f, 0x44, 0xfc, 0x9a, - 0x2a, 0xef, 0x53, 0xda, 0x15, 0xee, 0x28, 0x19, 0xc4, 0x3a, 0xd0, 0x7e, 0x0a, 0x56, 0x52, 0x45, - 0x58, 0x59, 0x24, 0xac, 0x62, 0x4a, 0x2f, 0x45, 0xc3, 0xb8, 0x84, 0x14, 0x2f, 0xbe, 0x84, 0xd8, - 0x7f, 0x62, 0xe7, 0x45, 0xb6, 0x92, 0xac, 0x42, 0x95, 0x45, 0xff, 0x99, 0xe7, 0xaa, 0x10, 0xb2, - 0xe6, 0xa1, 0x8b, 0x6e, 0x02, 0x44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, - 0x71, 0x10, 0x0c, 0xa2, 0x24, 0x23, 0xc4, 0x4f, 0xa0, 0x9d, 0xf3, 0xee, 0x97, 0xa5, 0x93, 0x0a, - 0xff, 0xbe, 0xfb, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x75, 0xab, 0x24, 0x7a, 0x1d, 0x00, - 0x00, + // 2252 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x5b, 0x6f, 0x1b, 0xc7, + 0x15, 0x16, 0x49, 0xf1, 0xb2, 0x87, 0xa2, 0x2c, 0x8d, 0x14, 0x89, 0xa5, 0x65, 0x47, 0xde, 0x24, + 0xad, 0x73, 0x23, 0x2d, 0xba, 0x8d, 0x03, 0xa3, 0x4a, 0x20, 0xc9, 0xba, 0xd5, 0x8e, 0x1d, 0x8f, + 0x94, 0x00, 0xbd, 0x04, 0xc6, 0x6a, 0x77, 0x44, 0x2f, 0x44, 0xee, 0xb2, 0xbb, 0x43, 0x25, 0x7c, + 0x2b, 0xfa, 0x50, 0xf4, 0xa1, 0x4f, 0x6d, 0x7e, 0x40, 0x81, 0x3e, 0xf5, 0xad, 0x0f, 0xf9, 0x07, + 0x05, 0xfa, 0x07, 0x0a, 0xf4, 0xbd, 0x40, 0x1f, 0x8a, 0xa2, 0x3f, 0xa2, 0x98, 0xdb, 0xee, 0xcc, + 0x2e, 0x69, 0x49, 0x36, 0x8c, 0xbe, 0x48, 0x3b, 0x33, 0xdf, 0xb9, 0xcc, 0x99, 0x33, 0x67, 0xbe, + 0x19, 0xc2, 0xe2, 0x79, 0xb7, 0x13, 0x9f, 0x39, 0xa7, 0xa7, 0x61, 0xdf, 0x6b, 0x0f, 0xa3, 0x90, + 0x86, 0xa8, 0xc6, 0xff, 0xb5, 0xcf, 0xbb, 0xad, 0xb5, 0x5e, 0x18, 0xf6, 0xfa, 0xa4, 0xe3, 0x0c, + 0xfd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, 0x69, 0x40, 0xe2, 0xd8, 0xe9, + 0xa9, 0xca, 0xa5, 0x9a, 0xe8, 0x23, 0xa8, 0xc7, 0xa3, 0x5e, 0x8f, 0xc4, 0xfc, 0x86, 0x2b, 0xaf, + 0x62, 0xda, 0xed, 0xef, 0x28, 0x19, 0xc4, 0x3a, 0xd0, 0x7e, 0x0a, 0x56, 0x52, 0x45, 0x58, 0x59, + 0x24, 0xac, 0x62, 0xca, 0x59, 0x8a, 0x86, 0x71, 0x7f, 0x29, 0x5e, 0x7c, 0x7f, 0xb1, 0xff, 0xcc, + 0xce, 0x8b, 0x6c, 0x25, 0x59, 0x85, 0x2a, 0x8b, 0xfe, 0x33, 0xdf, 0x53, 0x21, 0x64, 0xcd, 0x43, + 0x0f, 0xdd, 0x00, 0x88, 0xc5, 0xca, 0xb0, 0x31, 0x31, 0x2b, 0x4b, 0xf6, 0x1c, 0x7a, 0x2c, 0xf2, + 0x61, 0xe4, 0xf7, 0xfc, 0x40, 0x12, 0x46, 0xd9, 0x42, 0xef, 0x43, 0xb9, 0x4f, 0xce, 0x49, 0x9f, + 0xd7, 0xa2, 0xf9, 0xe4, 0xc2, 0x2a, 0x42, 0xf7, 0x28, 0xec, 0x3d, 0x62, 0x83, 0x58, 0x60, 0xf4, + 0xb0, 0x95, 0x8d, 0xb0, 0xd9, 0x7f, 0x2a, 0xc0, 0xd2, 0x84, 0xe2, 0x85, 0xde, 0x86, 0x86, 0xab, + 0x52, 0xf5, 0x71, 0x7a, 0xe5, 0x36, 0x3b, 0x99, 0xde, 0x61, 0xe8, 0x3d, 0x4e, 0x59, 0xae, 0x6a, + 0xea, 0x16, 0x4b, 0xe6, 0x42, 0x75, 0x61, 0x39, 0xf2, 0xdd, 0xe7, 0x7b, 0x61, 0x34, 0x70, 0x28, + 0x25, 0xde, 0x67, 0x12, 0x26, 0x28, 0xef, 0xc4, 0x31, 0xfb, 0x6f, 0x05, 0xb0, 0x92, 0xca, 0x88, + 0xe6, 0xa1, 0x98,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98, 0x0d, 0x41, 0xdb, 0x5e, 0xc2, + 0xca, 0xf7, 0xb9, 0x95, 0xf5, 0xd6, 0x2a, 0xb3, 0x22, 0xf6, 0xe3, 0x44, 0x3b, 0x4f, 0xa0, 0x72, + 0xe0, 0x04, 0x5e, 0x9f, 0xa0, 0xec, 0x2a, 0x4e, 0x55, 0xbd, 0xc6, 0x55, 0xaf, 0xd8, 0x8b, 0x69, + 0x1e, 0x76, 0x9e, 0x73, 0x1d, 0xf7, 0x0b, 0xef, 0x6d, 0xdf, 0xfd, 0xd9, 0x46, 0xcf, 0xa7, 0xcf, + 0x47, 0x27, 0x6d, 0x37, 0x1c, 0x74, 0xf6, 0xb9, 0x86, 0xa4, 0xe0, 0x1e, 0x87, 0x61, 0x3f, 0x4e, + 0x32, 0x42, 0xfc, 0x7a, 0xda, 0x39, 0xef, 0x7e, 0x5e, 0x3a, 0xa9, 0xf0, 0xef, 0xbb, 0xff, 0x0b, + 0x00, 0x00, 0xff, 0xff, 0xdd, 0xc7, 0xd9, 0xd9, 0xb5, 0x1d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/v2/skaffold.proto b/proto/v2/skaffold.proto index 88b6fa236c9..51f8905d859 100644 --- a/proto/v2/skaffold.proto +++ b/proto/v2/skaffold.proto @@ -45,7 +45,9 @@ message Metadata { message BuildMetadata { message Artifact { enums.BuilderType type = 1; - string name = 2; + string name = 2; // image name + string context = 3; // skaffold.yaml context field + string dockerfile = 4; // skaffold.yaml path to dockerfile. Not guaranteed to be filled } repeated Artifact artifacts = 1; enums.BuildType type = 2; From 56a84aa63c7239b14907eaf92edb9b6cb7ee7e78 Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Wed, 30 Jun 2021 14:10:23 -0700 Subject: [PATCH 035/103] Bump schema version to v2beta19 (#6116) --- docs/config.toml | 2 +- docs/content/en/docs/references/cli/_index.md | 2 +- docs/content/en/schemas/v2beta19.json | 3186 +++++++++++++++++ integration/examples/bazel/skaffold.yaml | 2 +- .../examples/buildpacks-java/skaffold.yaml | 2 +- .../examples/buildpacks-node/skaffold.yaml | 2 +- .../examples/buildpacks-python/skaffold.yaml | 2 +- integration/examples/buildpacks/skaffold.yaml | 2 +- .../examples/custom-buildx/skaffold.yaml | 2 +- .../examples/custom-tests/skaffold.yaml | 2 +- integration/examples/custom/skaffold.yaml | 2 +- integration/examples/gcb-kaniko/skaffold.yaml | 2 +- .../examples/generate-pipeline/skaffold.yaml | 2 +- .../getting-started-kustomize/skaffold.yaml | 2 +- .../examples/getting-started/skaffold.yaml | 2 +- .../examples/google-cloud-build/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- .../examples/helm-deployment/skaffold.yaml | 2 +- .../examples/helm-remote-repo/skaffold.yaml | 2 +- integration/examples/hot-reload/skaffold.yaml | 2 +- integration/examples/jib-gradle/skaffold.yaml | 2 +- .../examples/jib-multimodule/skaffold.yaml | 2 +- .../examples/jib-sync/skaffold-gradle.yaml | 2 +- .../examples/jib-sync/skaffold-maven.yaml | 2 +- integration/examples/jib/skaffold.yaml | 2 +- integration/examples/kaniko/skaffold.yaml | 2 +- .../kustomize/skaffold-kustomize-args.yaml | 2 +- integration/examples/kustomize/skaffold.yaml | 2 +- .../examples/microservices/skaffold.yaml | 2 +- .../base/skaffold.yaml | 2 +- .../leeroy-app/skaffold.yaml | 2 +- .../leeroy-web/skaffold.yaml | 2 +- .../multi-config-microservices/skaffold.yaml | 2 +- integration/examples/nodejs/skaffold.yaml | 2 +- .../examples/profile-patches/skaffold.yaml | 2 +- integration/examples/profiles/skaffold.yaml | 2 +- .../examples/react-reload/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- integration/examples/ruby/skaffold.yaml | 2 +- .../simple-artifact-dependency/skaffold.yaml | 2 +- .../examples/structure-tests/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- .../examples/templated-fields/skaffold.yaml | 2 +- integration/examples/typescript/skaffold.yaml | 2 +- .../testdata/build-dependencies/skaffold.yaml | 2 +- .../testdata/build/secret/skaffold.yaml | 2 +- integration/testdata/build/skaffold.yaml | 2 +- .../testdata/build/squash/skaffold.yaml | 2 +- integration/testdata/build/ssh/skaffold.yaml | 2 +- .../testdata/custom-test/skaffold.yaml | 2 +- integration/testdata/debug/skaffold.yaml | 2 +- .../testdata/deploy-multiple/skaffold.yaml | 2 +- integration/testdata/dev/skaffold.yaml | 2 +- .../diagnose/multi-config/diagnose.tmpl | 6 +- .../diagnose/multi-config/skaffold.yaml | 2 +- .../diagnose/multi-config/skaffold2.yaml | 2 +- .../diagnose/multi-config/skaffold3.yaml | 2 +- .../diagnose/temp-config/diagnose.tmpl | 2 +- .../diagnose/temp-config/skaffold.yaml | 2 +- .../testdata/gke_loadbalancer/skaffold.yaml | 2 +- integration/testdata/hello/skaffold.yaml | 2 +- .../testdata/init/compose/skaffold.yaml | 2 +- .../init/hello-with-manifest/skaffold.yaml | 2 +- .../inspect/cluster/skaffold.add.default.yaml | 2 +- .../inspect/cluster/skaffold.add.profile.yaml | 2 +- .../inspect/cluster/skaffold.cluster.yaml | 2 +- .../inspect/cluster/skaffold.local.yaml | 2 +- .../cluster/skaffold.modified.default.yaml | 2 +- .../cluster/skaffold.modified.profile.yaml | 2 +- .../inspect/gcb/skaffold.add.default.yaml | 2 +- .../inspect/gcb/skaffold.add.profile.yaml | 2 +- .../testdata/inspect/gcb/skaffold.gcb.yaml | 2 +- .../testdata/inspect/gcb/skaffold.local.yaml | 2 +- .../gcb/skaffold.modified.default.yaml | 2 +- .../gcb/skaffold.modified.profile.yaml | 2 +- integration/testdata/jib/skaffold.yaml | 2 +- .../kaniko-explicit-repo/skaffold.yaml | 2 +- .../app/skaffold.yaml | 2 +- .../kaniko-insecure-registry/skaffold.yaml | 2 +- .../kaniko-microservices/skaffold.yaml | 2 +- .../testdata/kaniko-sub-folder/skaffold.yaml | 2 +- .../testdata/kaniko-target/skaffold.yaml | 2 +- integration/testdata/tagPolicy/skaffold.yaml | 2 +- .../testdata/test-events/skaffold.yaml | 2 +- .../testdata/init/allcli/skaffold.yaml | 2 +- .../getting-started-kustomize/skaffold.yaml | 2 +- .../init/hello-no-manifest/skaffold.yaml | 2 +- .../testdata/init/hello/skaffold.yaml | 2 +- .../testdata/init/ignore-tags/skaffold.yaml | 2 +- .../testdata/init/microservices/skaffold.yaml | 2 +- .../testdata/init/windows/skaffold.yaml | 2 +- pkg/skaffold/schema/latest/v1/config.go | 4 +- pkg/skaffold/schema/v2beta17/upgrade.go | 2 +- pkg/skaffold/schema/v2beta17/upgrade_test.go | 2 +- pkg/skaffold/schema/v2beta18/config.go | 1482 ++++++++ pkg/skaffold/schema/v2beta18/upgrade.go | 38 + pkg/skaffold/schema/v2beta18/upgrade_test.go | 201 ++ pkg/skaffold/schema/versions.go | 2 + 98 files changed, 5005 insertions(+), 96 deletions(-) create mode 100755 docs/content/en/schemas/v2beta19.json create mode 100755 pkg/skaffold/schema/v2beta18/config.go create mode 100755 pkg/skaffold/schema/v2beta18/upgrade.go create mode 100755 pkg/skaffold/schema/v2beta18/upgrade_test.go diff --git a/docs/config.toml b/docs/config.toml index 5c755329c0e..0940cf57448 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -82,7 +82,7 @@ weight = 1 copyright = "Skaffold Authors" privacy_policy = "https://policies.google.com/privacy" github_repo = "https://github.com/GoogleContainerTools/skaffold" -skaffold_version = "skaffold/v2beta18" +skaffold_version = "skaffold/v2beta19" # Google Custom Search Engine ID. Remove or comment out to disable search. # gcs_engine_id = "013756393218025596041:3nojel67sum" diff --git a/docs/content/en/docs/references/cli/_index.md b/docs/content/en/docs/references/cli/_index.md index df942a69a44..0cc9b66c79c 100644 --- a/docs/content/en/docs/references/cli/_index.md +++ b/docs/content/en/docs/references/cli/_index.md @@ -811,7 +811,7 @@ Options: -m, --module=[]: Filter Skaffold configs to only the provided named modules --overwrite=false: Overwrite original config with fixed config --remote-cache-dir='': Specify the location of the git repositories cache (default $HOME/.skaffold/repos) - --version='skaffold/v2beta18': Target schema version to upgrade to + --version='skaffold/v2beta19': Target schema version to upgrade to Usage: skaffold fix [options] diff --git a/docs/content/en/schemas/v2beta19.json b/docs/content/en/schemas/v2beta19.json new file mode 100755 index 00000000000..e13efebe141 --- /dev/null +++ b/docs/content/en/schemas/v2beta19.json @@ -0,0 +1,3186 @@ +{ + "type": "object", + "anyOf": [ + { + "$ref": "#/definitions/SkaffoldConfig" + } + ], + "$schema": "http://json-schema-org/draft-07/schema#", + "definitions": { + "Activation": { + "properties": { + "command": { + "type": "string", + "description": "a Skaffold command for which the profile is auto-activated.", + "x-intellij-html-description": "a Skaffold command for which the profile is auto-activated.", + "examples": [ + "dev" + ] + }, + "env": { + "type": "string", + "description": "a `key=pattern` pair. The profile is auto-activated if an Environment Variable `key` matches the pattern. If the pattern starts with `!`, activation happens if the remaining pattern is _not_ matched. The pattern matches if the Environment Variable value is exactly `pattern`, or the regex `pattern` is found in it. An empty `pattern` (e.g. `env: \"key=\"`) always only matches if the Environment Variable is undefined or empty.", + "x-intellij-html-description": "a key=pattern pair. The profile is auto-activated if an Environment Variable key matches the pattern. If the pattern starts with !, activation happens if the remaining pattern is not matched. The pattern matches if the Environment Variable value is exactly pattern, or the regex pattern is found in it. An empty pattern (e.g. env: "key=") always only matches if the Environment Variable is undefined or empty.", + "examples": [ + "ENV=production" + ] + }, + "kubeContext": { + "type": "string", + "description": "a Kubernetes context for which the profile is auto-activated.", + "x-intellij-html-description": "a Kubernetes context for which the profile is auto-activated.", + "examples": [ + "minikube" + ] + } + }, + "preferredOrder": [ + "env", + "kubeContext", + "command" + ], + "additionalProperties": false, + "type": "object", + "description": "criteria by which a profile is auto-activated.", + "x-intellij-html-description": "criteria by which a profile is auto-activated." + }, + "Artifact": { + "required": [ + "image" + ], + "type": "object", + "anyOf": [ + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "docker": { + "$ref": "#/definitions/DockerArtifact", + "description": "*beta* describes an artifact built from a Dockerfile.", + "x-intellij-html-description": "beta describes an artifact built from a Dockerfile." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "docker" + ], + "additionalProperties": false + }, + { + "properties": { + "bazel": { + "$ref": "#/definitions/BazelArtifact", + "description": "*beta* requires bazel CLI to be installed and the sources to contain [Bazel](https://bazel.build/) configuration files.", + "x-intellij-html-description": "beta requires bazel CLI to be installed and the sources to contain Bazel configuration files." + }, + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "bazel" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "jib": { + "$ref": "#/definitions/JibArtifact", + "description": "builds images using the [Jib plugins for Maven or Gradle](https://github.com/GoogleContainerTools/jib/).", + "x-intellij-html-description": "builds images using the Jib plugins for Maven or Gradle." + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "jib" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "kaniko": { + "$ref": "#/definitions/KanikoArtifact", + "description": "builds images using [kaniko](https://github.com/GoogleContainerTools/kaniko).", + "x-intellij-html-description": "builds images using kaniko." + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "kaniko" + ], + "additionalProperties": false + }, + { + "properties": { + "buildpacks": { + "$ref": "#/definitions/BuildpackArtifact", + "description": "builds images using [Cloud Native Buildpacks](https://buildpacks.io/).", + "x-intellij-html-description": "builds images using Cloud Native Buildpacks." + }, + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "buildpacks" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "custom": { + "$ref": "#/definitions/CustomArtifact", + "description": "*beta* builds images using a custom build script written by the user.", + "x-intellij-html-description": "beta builds images using a custom build script written by the user." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "custom" + ], + "additionalProperties": false + } + ], + "description": "items that need to be built, along with the context in which they should be built.", + "x-intellij-html-description": "items that need to be built, along with the context in which they should be built." + }, + "ArtifactDependency": { + "required": [ + "image" + ], + "properties": { + "alias": { + "type": "string", + "description": "a token that is replaced with the image reference in the builder definition files. For example, the `docker` builder will use the alias as a build-arg key. Defaults to the value of `image`.", + "x-intellij-html-description": "a token that is replaced with the image reference in the builder definition files. For example, the docker builder will use the alias as a build-arg key. Defaults to the value of image." + }, + "image": { + "type": "string", + "description": "a reference to an artifact's image name.", + "x-intellij-html-description": "a reference to an artifact's image name." + } + }, + "preferredOrder": [ + "image", + "alias" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a specific build dependency for an artifact.", + "x-intellij-html-description": "describes a specific build dependency for an artifact." + }, + "BazelArtifact": { + "required": [ + "target" + ], + "properties": { + "args": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional args to pass to `bazel build`.", + "x-intellij-html-description": "additional args to pass to bazel build.", + "default": "[]", + "examples": [ + "[\"-flag\", \"--otherflag\"]" + ] + }, + "target": { + "type": "string", + "description": "`bazel build` target to run.", + "x-intellij-html-description": "bazel build target to run.", + "examples": [ + "//:skaffold_example.tar" + ] + } + }, + "preferredOrder": [ + "target", + "args" + ], + "additionalProperties": false, + "type": "object", + "description": "describes an artifact built with [Bazel](https://bazel.build/).", + "x-intellij-html-description": "describes an artifact built with Bazel." + }, + "BuildConfig": { + "type": "object", + "anyOf": [ + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy" + ], + "additionalProperties": false + }, + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "local": { + "$ref": "#/definitions/LocalBuild", + "description": "*beta* describes how to do a build on the local docker daemon and optionally push to a repository.", + "x-intellij-html-description": "beta describes how to do a build on the local docker daemon and optionally push to a repository." + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy", + "local" + ], + "additionalProperties": false + }, + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "googleCloudBuild": { + "$ref": "#/definitions/GoogleCloudBuild", + "description": "*beta* describes how to do a remote build on [Google Cloud Build](https://cloud.google.com/cloud-build/).", + "x-intellij-html-description": "beta describes how to do a remote build on Google Cloud Build." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy", + "googleCloudBuild" + ], + "additionalProperties": false + }, + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "cluster": { + "$ref": "#/definitions/ClusterDetails", + "description": "*beta* describes how to do an on-cluster build.", + "x-intellij-html-description": "beta describes how to do an on-cluster build." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy", + "cluster" + ], + "additionalProperties": false + } + ], + "description": "contains all the configuration for the build steps.", + "x-intellij-html-description": "contains all the configuration for the build steps." + }, + "BuildpackArtifact": { + "required": [ + "builder" + ], + "properties": { + "builder": { + "type": "string", + "description": "builder image used.", + "x-intellij-html-description": "builder image used." + }, + "buildpacks": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of strings, where each string is a specific buildpack to use with the builder. If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. Order matters.", + "x-intellij-html-description": "a list of strings, where each string is a specific buildpack to use with the builder. If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. Order matters.", + "default": "[]" + }, + "dependencies": { + "$ref": "#/definitions/BuildpackDependencies", + "description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact.", + "x-intellij-html-description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact." + }, + "env": { + "items": { + "type": "string" + }, + "type": "array", + "description": "environment variables, in the `key=value` form, passed to the build. Values can use the go template syntax.", + "x-intellij-html-description": "environment variables, in the key=value form, passed to the build. Values can use the go template syntax.", + "default": "[]", + "examples": [ + "[\"key1=value1\", \"key2=value2\", \"key3={{.ENV_VARIABLE}}\"]" + ] + }, + "projectDescriptor": { + "type": "string", + "description": "path to the project descriptor file.", + "x-intellij-html-description": "path to the project descriptor file.", + "default": "project.toml" + }, + "runImage": { + "type": "string", + "description": "overrides the stack's default run image.", + "x-intellij-html-description": "overrides the stack's default run image." + }, + "trustBuilder": { + "type": "boolean", + "description": "indicates that the builder should be trusted.", + "x-intellij-html-description": "indicates that the builder should be trusted.", + "default": "false" + }, + "volumes": { + "description": "support mounting host volumes into the container.", + "x-intellij-html-description": "support mounting host volumes into the container." + } + }, + "preferredOrder": [ + "builder", + "runImage", + "env", + "buildpacks", + "trustBuilder", + "projectDescriptor", + "dependencies", + "volumes" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* describes an artifact built using [Cloud Native Buildpacks](https://buildpacks.io/). It can be used to build images out of project's sources without any additional configuration.", + "x-intellij-html-description": "alpha describes an artifact built using Cloud Native Buildpacks. It can be used to build images out of project's sources without any additional configuration." + }, + "BuildpackDependencies": { + "properties": { + "ignore": { + "items": { + "type": "string" + }, + "type": "array", + "description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with `paths`.", + "x-intellij-html-description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both paths and in ignore, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with paths.", + "default": "[]" + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "x-intellij-html-description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "default": "[]" + } + }, + "preferredOrder": [ + "paths", + "ignore" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* used to specify dependencies for an artifact built by buildpacks.", + "x-intellij-html-description": "alpha used to specify dependencies for an artifact built by buildpacks." + }, + "BuildpackVolume": { + "required": [ + "host", + "target" + ], + "properties": { + "host": { + "type": "string", + "description": "local volume or absolute directory of the path to mount.", + "x-intellij-html-description": "local volume or absolute directory of the path to mount." + }, + "options": { + "type": "string", + "description": "specify a list of comma-separated mount options. Valid options are: `ro` (default): volume contents are read-only. `rw`: volume contents are readable and writable. `volume-opt==`: can be specified more than once, takes a key-value pair.", + "x-intellij-html-description": "specify a list of comma-separated mount options. Valid options are: ro (default): volume contents are read-only. rw: volume contents are readable and writable. volume-opt=<key>=<value>: can be specified more than once, takes a key-value pair." + }, + "target": { + "type": "string", + "description": "path where the file or directory is available in the container. It is strongly recommended to not specify locations under `/cnb` or `/layers`.", + "x-intellij-html-description": "path where the file or directory is available in the container. It is strongly recommended to not specify locations under /cnb or /layers." + } + }, + "preferredOrder": [ + "host", + "target", + "options" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* used to mount host volumes or directories in the build container.", + "x-intellij-html-description": "alpha used to mount host volumes or directories in the build container." + }, + "ClusterDetails": { + "properties": { + "HTTPS_PROXY": { + "type": "string", + "description": "for kaniko pod.", + "x-intellij-html-description": "for kaniko pod." + }, + "HTTP_PROXY": { + "type": "string", + "description": "for kaniko pod.", + "x-intellij-html-description": "for kaniko pod." + }, + "annotations": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "describes the Kubernetes annotations for the pod.", + "x-intellij-html-description": "describes the Kubernetes annotations for the pod.", + "default": "{}" + }, + "concurrency": { + "type": "integer", + "description": "how many artifacts can be built concurrently. 0 means \"no-limit\".", + "x-intellij-html-description": "how many artifacts can be built concurrently. 0 means "no-limit".", + "default": "0" + }, + "dockerConfig": { + "$ref": "#/definitions/DockerConfig", + "description": "describes how to mount the local Docker configuration into a pod.", + "x-intellij-html-description": "describes how to mount the local Docker configuration into a pod." + }, + "namespace": { + "type": "string", + "description": "Kubernetes namespace. Defaults to current namespace in Kubernetes configuration.", + "x-intellij-html-description": "Kubernetes namespace. Defaults to current namespace in Kubernetes configuration." + }, + "nodeSelector": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "describes the Kubernetes node selector for the pod.", + "x-intellij-html-description": "describes the Kubernetes node selector for the pod.", + "default": "{}" + }, + "pullSecretMountPath": { + "type": "string", + "description": "path the pull secret will be mounted at within the running container.", + "x-intellij-html-description": "path the pull secret will be mounted at within the running container." + }, + "pullSecretName": { + "type": "string", + "description": "name of the Kubernetes secret for pulling base images and pushing the final image. If given, the secret needs to contain the Google Cloud service account secret key under the key `kaniko-secret`.", + "x-intellij-html-description": "name of the Kubernetes secret for pulling base images and pushing the final image. If given, the secret needs to contain the Google Cloud service account secret key under the key kaniko-secret.", + "default": "kaniko-secret" + }, + "pullSecretPath": { + "type": "string", + "description": "path to the Google Cloud service account secret key file.", + "x-intellij-html-description": "path to the Google Cloud service account secret key file." + }, + "randomDockerConfigSecret": { + "type": "boolean", + "description": "adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "x-intellij-html-description": "adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "default": "false" + }, + "randomPullSecret": { + "type": "boolean", + "description": "adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "x-intellij-html-description": "adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "default": "false" + }, + "resources": { + "$ref": "#/definitions/ResourceRequirements", + "description": "define the resource requirements for the kaniko pod.", + "x-intellij-html-description": "define the resource requirements for the kaniko pod." + }, + "runAsUser": { + "type": "integer", + "description": "defines the UID to request for running the container. If omitted, no SecurityContext will be specified for the pod and will therefore be inherited from the service account.", + "x-intellij-html-description": "defines the UID to request for running the container. If omitted, no SecurityContext will be specified for the pod and will therefore be inherited from the service account." + }, + "serviceAccount": { + "type": "string", + "description": "describes the Kubernetes service account to use for the pod. Defaults to 'default'.", + "x-intellij-html-description": "describes the Kubernetes service account to use for the pod. Defaults to 'default'." + }, + "timeout": { + "type": "string", + "description": "amount of time (in seconds) that this build is allowed to run. Defaults to 20 minutes (`20m`).", + "x-intellij-html-description": "amount of time (in seconds) that this build is allowed to run. Defaults to 20 minutes (20m)." + }, + "tolerations": { + "items": {}, + "type": "array", + "description": "describes the Kubernetes tolerations for the pod.", + "x-intellij-html-description": "describes the Kubernetes tolerations for the pod.", + "default": "[]" + }, + "volumes": { + "items": {}, + "type": "array", + "description": "defines container mounts for ConfigMap and Secret resources.", + "x-intellij-html-description": "defines container mounts for ConfigMap and Secret resources.", + "default": "[]" + } + }, + "preferredOrder": [ + "HTTP_PROXY", + "HTTPS_PROXY", + "pullSecretPath", + "pullSecretName", + "pullSecretMountPath", + "namespace", + "timeout", + "dockerConfig", + "serviceAccount", + "tolerations", + "nodeSelector", + "annotations", + "runAsUser", + "resources", + "concurrency", + "volumes", + "randomPullSecret", + "randomDockerConfigSecret" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes how to do an on-cluster build.", + "x-intellij-html-description": "beta describes how to do an on-cluster build." + }, + "ConfigDependency": { + "properties": { + "activeProfiles": { + "items": { + "$ref": "#/definitions/ProfileDependency" + }, + "type": "array", + "description": "describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config.", + "x-intellij-html-description": "describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config." + }, + "configs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "includes specific named configs within the file path. If empty, then all configs in the file are included.", + "x-intellij-html-description": "includes specific named configs within the file path. If empty, then all configs in the file are included.", + "default": "[]" + }, + "git": { + "$ref": "#/definitions/GitInfo", + "description": "describes a remote git repository containing the required configs.", + "x-intellij-html-description": "describes a remote git repository containing the required configs." + }, + "path": { + "type": "string", + "description": "describes the path to the file containing the required configs.", + "x-intellij-html-description": "describes the path to the file containing the required configs." + } + }, + "preferredOrder": [ + "configs", + "path", + "git", + "activeProfiles" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a dependency on another skaffold configuration.", + "x-intellij-html-description": "describes a dependency on another skaffold configuration." + }, + "CustomArtifact": { + "properties": { + "buildCommand": { + "type": "string", + "description": "command executed to build the image.", + "x-intellij-html-description": "command executed to build the image." + }, + "dependencies": { + "$ref": "#/definitions/CustomDependencies", + "description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact.", + "x-intellij-html-description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact." + } + }, + "preferredOrder": [ + "buildCommand", + "dependencies" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes an artifact built from a custom build script written by the user. It can be used to build images with builders that aren't directly integrated with skaffold.", + "x-intellij-html-description": "beta describes an artifact built from a custom build script written by the user. It can be used to build images with builders that aren't directly integrated with skaffold." + }, + "CustomDependencies": { + "properties": { + "command": { + "type": "string", + "description": "represents a custom command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array.", + "x-intellij-html-description": "represents a custom command that skaffold executes to obtain dependencies. The output of this command must be a valid JSON array." + }, + "dockerfile": { + "$ref": "#/definitions/DockerfileDependency", + "description": "should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies.", + "x-intellij-html-description": "should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies." + }, + "ignore": { + "items": { + "type": "string" + }, + "type": "array", + "description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with `paths`.", + "x-intellij-html-description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both paths and in ignore, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with paths.", + "default": "[]" + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "x-intellij-html-description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "default": "[]" + } + }, + "preferredOrder": [ + "dockerfile", + "command", + "paths", + "ignore" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* used to specify dependencies for an artifact built by a custom build script. Either `dockerfile` or `paths` should be specified for file watching to work as expected.", + "x-intellij-html-description": "beta used to specify dependencies for an artifact built by a custom build script. Either dockerfile or paths should be specified for file watching to work as expected." + }, + "CustomTemplateTagger": { + "required": [ + "template" + ], + "properties": { + "components": { + "items": { + "$ref": "#/definitions/TaggerComponent" + }, + "type": "array", + "description": "TaggerComponents that the template (see field above) can be executed against.", + "x-intellij-html-description": "TaggerComponents that the template (see field above) can be executed against." + }, + "template": { + "type": "string", + "description": "used to produce the image name and tag. See golang [text/template](https://golang.org/pkg/text/template/). The template is executed against the provided components with those variables injected.", + "x-intellij-html-description": "used to produce the image name and tag. See golang text/template. The template is executed against the provided components with those variables injected.", + "examples": [ + "{{.DATE}}" + ] + } + }, + "preferredOrder": [ + "template", + "components" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "CustomTest": { + "required": [ + "command" + ], + "properties": { + "command": { + "type": "string", + "description": "custom command to be executed. If the command exits with a non-zero return code, the test will be considered to have failed.", + "x-intellij-html-description": "custom command to be executed. If the command exits with a non-zero return code, the test will be considered to have failed." + }, + "dependencies": { + "$ref": "#/definitions/CustomTestDependencies", + "description": "additional test-specific file dependencies; changes to these files will re-run this test.", + "x-intellij-html-description": "additional test-specific file dependencies; changes to these files will re-run this test." + }, + "timeoutSeconds": { + "type": "integer", + "description": "sets the wait time for skaffold for the command to complete. If unset or 0, Skaffold will wait until the command completes.", + "x-intellij-html-description": "sets the wait time for skaffold for the command to complete. If unset or 0, Skaffold will wait until the command completes." + } + }, + "preferredOrder": [ + "command", + "timeoutSeconds", + "dependencies" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the custom test command provided by the user. Custom tests are run after an image build whenever build or test dependencies are changed.", + "x-intellij-html-description": "describes the custom test command provided by the user. Custom tests are run after an image build whenever build or test dependencies are changed." + }, + "CustomTestDependencies": { + "properties": { + "command": { + "type": "string", + "description": "represents a command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array.", + "x-intellij-html-description": "represents a command that skaffold executes to obtain dependencies. The output of this command must be a valid JSON array." + }, + "ignore": { + "items": { + "type": "string" + }, + "type": "array", + "description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both retest and file synchronization. Will only work in conjunction with `paths`.", + "x-intellij-html-description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both paths and in ignore, it will be ignored, and will be excluded from both retest and file synchronization. Will only work in conjunction with paths.", + "default": "[]" + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "locates the file dependencies for the command relative to workspace. Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization.", + "x-intellij-html-description": "locates the file dependencies for the command relative to workspace. Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization.", + "default": "[]", + "examples": [ + "[\"src/test/**\"]" + ] + } + }, + "preferredOrder": [ + "command", + "paths", + "ignore" + ], + "additionalProperties": false, + "type": "object", + "description": "used to specify dependencies for custom test command. `paths` should be specified for file watching to work as expected.", + "x-intellij-html-description": "used to specify dependencies for custom test command. paths should be specified for file watching to work as expected." + }, + "DateTimeTagger": { + "properties": { + "format": { + "type": "string", + "description": "formats the date and time. See [#Time.Format](https://golang.org/pkg/time/#Time.Format).", + "x-intellij-html-description": "formats the date and time. See #Time.Format.", + "default": "2006-01-02_15-04-05.999_MST" + }, + "timezone": { + "type": "string", + "description": "sets the timezone for the date and time. See [Time.LoadLocation](https://golang.org/pkg/time/#Time.LoadLocation). Defaults to the local timezone.", + "x-intellij-html-description": "sets the timezone for the date and time. See Time.LoadLocation. Defaults to the local timezone." + } + }, + "preferredOrder": [ + "format", + "timezone" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with the build timestamp.", + "x-intellij-html-description": "beta tags images with the build timestamp." + }, + "DeployConfig": { + "properties": { + "helm": { + "$ref": "#/definitions/HelmDeploy", + "description": "*beta* uses the `helm` CLI to apply the charts to the cluster.", + "x-intellij-html-description": "beta uses the helm CLI to apply the charts to the cluster." + }, + "kpt": { + "$ref": "#/definitions/KptDeploy", + "description": "*alpha* uses the `kpt` CLI to manage and deploy manifests.", + "x-intellij-html-description": "alpha uses the kpt CLI to manage and deploy manifests." + }, + "kubeContext": { + "type": "string", + "description": "Kubernetes context that Skaffold should deploy to.", + "x-intellij-html-description": "Kubernetes context that Skaffold should deploy to.", + "examples": [ + "minikube" + ] + }, + "kubectl": { + "$ref": "#/definitions/KubectlDeploy", + "description": "*beta* uses a client side `kubectl apply` to deploy manifests. You'll need a `kubectl` CLI version installed that's compatible with your cluster.", + "x-intellij-html-description": "beta uses a client side kubectl apply to deploy manifests. You'll need a kubectl CLI version installed that's compatible with your cluster." + }, + "kustomize": { + "$ref": "#/definitions/KustomizeDeploy", + "description": "*beta* uses the `kustomize` CLI to \"patch\" a deployment for a target environment.", + "x-intellij-html-description": "beta uses the kustomize CLI to "patch" a deployment for a target environment." + }, + "logs": { + "$ref": "#/definitions/LogsConfig", + "description": "configures how container logs are printed as a result of a deployment.", + "x-intellij-html-description": "configures how container logs are printed as a result of a deployment." + }, + "statusCheck": { + "type": "boolean", + "description": "*beta* enables waiting for deployments to stabilize.", + "x-intellij-html-description": "beta enables waiting for deployments to stabilize." + }, + "statusCheckDeadlineSeconds": { + "type": "integer", + "description": "*beta* deadline for deployments to stabilize in seconds.", + "x-intellij-html-description": "beta deadline for deployments to stabilize in seconds." + } + }, + "preferredOrder": [ + "helm", + "kpt", + "kubectl", + "kustomize", + "statusCheck", + "statusCheckDeadlineSeconds", + "kubeContext", + "logs" + ], + "additionalProperties": false, + "type": "object", + "description": "contains all the configuration needed by the deploy steps.", + "x-intellij-html-description": "contains all the configuration needed by the deploy steps." + }, + "DockerArtifact": { + "properties": { + "addHost": { + "items": { + "type": "string" + }, + "type": "array", + "description": "add host.", + "x-intellij-html-description": "add host.", + "default": "[]", + "examples": [ + "[\"host1:ip1\", \"host2:ip2\"]" + ] + }, + "buildArgs": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "arguments passed to the docker build.", + "x-intellij-html-description": "arguments passed to the docker build.", + "default": "{}", + "examples": [ + "{\"key1\": \"value1\", \"key2\": \"{{ .ENV_VAR }}\"}" + ] + }, + "cacheFrom": { + "items": { + "type": "string" + }, + "type": "array", + "description": "the Docker images used as cache sources.", + "x-intellij-html-description": "the Docker images used as cache sources.", + "default": "[]", + "examples": [ + "[\"golang:1.10.1-alpine3.7\", \"alpine:3.7\"]" + ] + }, + "dockerfile": { + "type": "string", + "description": "locates the Dockerfile relative to workspace.", + "x-intellij-html-description": "locates the Dockerfile relative to workspace.", + "default": "Dockerfile" + }, + "network": { + "type": "string", + "description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are `host`: use the host's networking stack. `bridge`: use the bridged network configuration. `container:`: reuse another container's network stack. `none`: no networking in the container.", + "x-intellij-html-description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are host: use the host's networking stack. bridge: use the bridged network configuration. container:<name|id>: reuse another container's network stack. none: no networking in the container.", + "enum": [ + "host", + "bridge", + "container:", + "none" + ] + }, + "noCache": { + "type": "boolean", + "description": "used to pass in --no-cache to docker build to prevent caching.", + "x-intellij-html-description": "used to pass in --no-cache to docker build to prevent caching.", + "default": "false" + }, + "secret": { + "$ref": "#/definitions/DockerSecret", + "description": "contains information about a local secret passed to `docker build`, along with optional destination information.", + "x-intellij-html-description": "contains information about a local secret passed to docker build, along with optional destination information." + }, + "squash": { + "type": "boolean", + "description": "used to pass in --squash to docker build to squash docker image layers into single layer.", + "x-intellij-html-description": "used to pass in --squash to docker build to squash docker image layers into single layer.", + "default": "false" + }, + "ssh": { + "type": "string", + "description": "used to pass in --ssh to docker build to use SSH agent. Format is \"default|[=|[,]]\".", + "x-intellij-html-description": "used to pass in --ssh to docker build to use SSH agent. Format is "default|[=|[,]]"." + }, + "target": { + "type": "string", + "description": "Dockerfile target name to build.", + "x-intellij-html-description": "Dockerfile target name to build." + } + }, + "preferredOrder": [ + "dockerfile", + "target", + "buildArgs", + "network", + "addHost", + "cacheFrom", + "noCache", + "squash", + "secret", + "ssh" + ], + "additionalProperties": false, + "type": "object", + "description": "describes an artifact built from a Dockerfile, usually using `docker build`.", + "x-intellij-html-description": "describes an artifact built from a Dockerfile, usually using docker build." + }, + "DockerConfig": { + "properties": { + "path": { + "type": "string", + "description": "path to the docker `config.json`.", + "x-intellij-html-description": "path to the docker config.json." + }, + "secretName": { + "type": "string", + "description": "Kubernetes secret that contains the `config.json` Docker configuration. Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'.", + "x-intellij-html-description": "Kubernetes secret that contains the config.json Docker configuration. Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'." + } + }, + "preferredOrder": [ + "path", + "secretName" + ], + "additionalProperties": false, + "type": "object", + "description": "contains information about the docker `config.json` to mount.", + "x-intellij-html-description": "contains information about the docker config.json to mount." + }, + "DockerSecret": { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "id of the secret.", + "x-intellij-html-description": "id of the secret." + }, + "src": { + "type": "string", + "description": "path to the secret on the host machine.", + "x-intellij-html-description": "path to the secret on the host machine." + } + }, + "preferredOrder": [ + "id", + "src" + ], + "additionalProperties": false, + "type": "object", + "description": "contains information about a local secret passed to `docker build`, along with optional destination information.", + "x-intellij-html-description": "contains information about a local secret passed to docker build, along with optional destination information." + }, + "DockerfileDependency": { + "properties": { + "buildArgs": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "key/value pairs used to resolve values of `ARG` instructions in a Dockerfile. Values can be constants or environment variables via the go template syntax.", + "x-intellij-html-description": "key/value pairs used to resolve values of ARG instructions in a Dockerfile. Values can be constants or environment variables via the go template syntax.", + "default": "{}", + "examples": [ + "{\"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"'{{.ENV_VARIABLE}}'\"}" + ] + }, + "path": { + "type": "string", + "description": "locates the Dockerfile relative to workspace.", + "x-intellij-html-description": "locates the Dockerfile relative to workspace." + } + }, + "preferredOrder": [ + "path", + "buildArgs" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile.", + "x-intellij-html-description": "beta used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile." + }, + "EnvTemplateTagger": { + "required": [ + "template" + ], + "properties": { + "template": { + "type": "string", + "description": "used to produce the image name and tag. See golang [text/template](https://golang.org/pkg/text/template/). The template is executed against the current environment, with those variables injected.", + "x-intellij-html-description": "used to produce the image name and tag. See golang text/template. The template is executed against the current environment, with those variables injected.", + "examples": [ + "{{.RELEASE}}" + ] + } + }, + "preferredOrder": [ + "template" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "GitInfo": { + "required": [ + "repo" + ], + "properties": { + "path": { + "type": "string", + "description": "relative path from the repo root to the skaffold configuration file. eg. `getting-started/skaffold.yaml`.", + "x-intellij-html-description": "relative path from the repo root to the skaffold configuration file. eg. getting-started/skaffold.yaml." + }, + "ref": { + "type": "string", + "description": "git ref the package should be cloned from. eg. `master` or `main`.", + "x-intellij-html-description": "git ref the package should be cloned from. eg. master or main." + }, + "repo": { + "type": "string", + "description": "git repository the package should be cloned from. e.g. `https://github.com/GoogleContainerTools/skaffold.git`.", + "x-intellij-html-description": "git repository the package should be cloned from. e.g. https://github.com/GoogleContainerTools/skaffold.git." + }, + "sync": { + "type": "boolean", + "description": "when set to `true` will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to `false`.", + "x-intellij-html-description": "when set to true will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to false." + } + }, + "preferredOrder": [ + "repo", + "path", + "ref", + "sync" + ], + "additionalProperties": false, + "type": "object", + "description": "contains information on the origin of skaffold configurations cloned from a git repository.", + "x-intellij-html-description": "contains information on the origin of skaffold configurations cloned from a git repository." + }, + "GitTagger": { + "properties": { + "ignoreChanges": { + "type": "boolean", + "description": "specifies whether to omit the `-dirty` postfix if there are uncommitted changes.", + "x-intellij-html-description": "specifies whether to omit the -dirty postfix if there are uncommitted changes.", + "default": "false" + }, + "prefix": { + "type": "string", + "description": "adds a fixed prefix to the tag.", + "x-intellij-html-description": "adds a fixed prefix to the tag." + }, + "variant": { + "type": "string", + "description": "determines the behavior of the git tagger. Valid variants are: `Tags` (default): use git tags or fall back to abbreviated commit hash. `CommitSha`: use the full git commit sha. `AbbrevCommitSha`: use the abbreviated git commit sha. `TreeSha`: use the full tree hash of the artifact workingdir. `AbbrevTreeSha`: use the abbreviated tree hash of the artifact workingdir.", + "x-intellij-html-description": "determines the behavior of the git tagger. Valid variants are: Tags (default): use git tags or fall back to abbreviated commit hash. CommitSha: use the full git commit sha. AbbrevCommitSha: use the abbreviated git commit sha. TreeSha: use the full tree hash of the artifact workingdir. AbbrevTreeSha: use the abbreviated tree hash of the artifact workingdir." + } + }, + "preferredOrder": [ + "variant", + "prefix", + "ignoreChanges" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with the git tag or commit of the artifact's workspace.", + "x-intellij-html-description": "beta tags images with the git tag or commit of the artifact's workspace." + }, + "GoogleCloudBuild": { + "properties": { + "concurrency": { + "type": "integer", + "description": "how many artifacts can be built concurrently. 0 means \"no-limit\".", + "x-intellij-html-description": "how many artifacts can be built concurrently. 0 means "no-limit".", + "default": "0" + }, + "diskSizeGb": { + "type": "integer", + "description": "disk size of the VM that runs the build. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions).", + "x-intellij-html-description": "disk size of the VM that runs the build. See Cloud Build Reference." + }, + "dockerImage": { + "type": "string", + "description": "image that runs a Docker build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Docker build. See Cloud Builders.", + "default": "gcr.io/cloud-builders/docker" + }, + "gradleImage": { + "type": "string", + "description": "image that runs a Gradle build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Gradle build. See Cloud Builders.", + "default": "gcr.io/cloud-builders/gradle" + }, + "kanikoImage": { + "type": "string", + "description": "image that runs a Kaniko build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Kaniko build. See Cloud Builders.", + "default": "gcr.io/kaniko-project/executor" + }, + "logStreamingOption": { + "type": "string", + "description": "specifies the behavior when writing build logs to Google Cloud Storage. Valid options are: `STREAM_DEFAULT`: Service may automatically determine build log streaming behavior. `STREAM_ON`: Build logs should be streamed to Google Cloud Storage. `STREAM_OFF`: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#logstreamingoption).", + "x-intellij-html-description": "specifies the behavior when writing build logs to Google Cloud Storage. Valid options are: STREAM_DEFAULT: Service may automatically determine build log streaming behavior. STREAM_ON: Build logs should be streamed to Google Cloud Storage. STREAM_OFF: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. See Cloud Build Reference." + }, + "logging": { + "type": "string", + "description": "specifies the logging mode. Valid modes are: `LOGGING_UNSPECIFIED`: The service determines the logging mode. `LEGACY`: Stackdriver logging and Cloud Storage logging are enabled (default). `GCS_ONLY`: Only Cloud Storage logging is enabled. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#loggingmode).", + "x-intellij-html-description": "specifies the logging mode. Valid modes are: LOGGING_UNSPECIFIED: The service determines the logging mode. LEGACY: Stackdriver logging and Cloud Storage logging are enabled (default). GCS_ONLY: Only Cloud Storage logging is enabled. See Cloud Build Reference." + }, + "machineType": { + "type": "string", + "description": "type of the VM that runs the build. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions).", + "x-intellij-html-description": "type of the VM that runs the build. See Cloud Build Reference." + }, + "mavenImage": { + "type": "string", + "description": "image that runs a Maven build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Maven build. See Cloud Builders.", + "default": "gcr.io/cloud-builders/mvn" + }, + "packImage": { + "type": "string", + "description": "image that runs a Cloud Native Buildpacks build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Cloud Native Buildpacks build. See Cloud Builders.", + "default": "gcr.io/k8s-skaffold/pack" + }, + "projectId": { + "type": "string", + "description": "ID of your Cloud Platform Project. If it is not provided, Skaffold will guess it from the image name. For example, given the artifact image name `gcr.io/myproject/image`, Skaffold will use the `myproject` GCP project.", + "x-intellij-html-description": "ID of your Cloud Platform Project. If it is not provided, Skaffold will guess it from the image name. For example, given the artifact image name gcr.io/myproject/image, Skaffold will use the myproject GCP project." + }, + "timeout": { + "type": "string", + "description": "amount of time (in seconds) that this build should be allowed to run. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build).", + "x-intellij-html-description": "amount of time (in seconds) that this build should be allowed to run. See Cloud Build Reference." + }, + "workerPool": { + "type": "string", + "description": "configures a pool of workers to run the build.", + "x-intellij-html-description": "configures a pool of workers to run the build." + } + }, + "preferredOrder": [ + "projectId", + "diskSizeGb", + "machineType", + "timeout", + "logging", + "logStreamingOption", + "dockerImage", + "kanikoImage", + "mavenImage", + "gradleImage", + "packImage", + "concurrency", + "workerPool" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes how to do a remote build on [Google Cloud Build](https://cloud.google.com/cloud-build/docs/). Docker and Jib artifacts can be built on Cloud Build. The `projectId` needs to be provided and the currently logged in user should be given permissions to trigger new builds.", + "x-intellij-html-description": "beta describes how to do a remote build on Google Cloud Build. Docker and Jib artifacts can be built on Cloud Build. The projectId needs to be provided and the currently logged in user should be given permissions to trigger new builds." + }, + "HelmConventionConfig": { + "properties": { + "explicitRegistry": { + "type": "boolean", + "description": "separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`.", + "x-intellij-html-description": "separates image.registry to the image config syntax. Useful for some charts e.g. postgresql.", + "default": "false" + } + }, + "preferredOrder": [ + "explicitRegistry" + ], + "additionalProperties": false, + "type": "object", + "description": "image config in the syntax of image.repository and image.tag.", + "x-intellij-html-description": "image config in the syntax of image.repository and image.tag." + }, + "HelmDeploy": { + "required": [ + "releases" + ], + "properties": { + "flags": { + "$ref": "#/definitions/HelmDeployFlags", + "description": "additional option flags that are passed on the command line to `helm`.", + "x-intellij-html-description": "additional option flags that are passed on the command line to helm." + }, + "releases": { + "items": { + "$ref": "#/definitions/HelmRelease" + }, + "type": "array", + "description": "a list of Helm releases.", + "x-intellij-html-description": "a list of Helm releases." + } + }, + "preferredOrder": [ + "releases", + "flags" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* uses the `helm` CLI to apply the charts to the cluster.", + "x-intellij-html-description": "beta uses the helm CLI to apply the charts to the cluster." + }, + "HelmDeployFlags": { + "properties": { + "global": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on every command.", + "x-intellij-html-description": "additional flags passed on every command.", + "default": "[]" + }, + "install": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed to (`helm install`).", + "x-intellij-html-description": "additional flags passed to (helm install).", + "default": "[]" + }, + "upgrade": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed to (`helm upgrade`).", + "x-intellij-html-description": "additional flags passed to (helm upgrade).", + "default": "[]" + } + }, + "preferredOrder": [ + "global", + "install", + "upgrade" + ], + "additionalProperties": false, + "type": "object", + "description": "additional option flags that are passed on the command line to `helm`.", + "x-intellij-html-description": "additional option flags that are passed on the command line to helm." + }, + "HelmFQNConfig": { + "properties": { + "property": { + "type": "string", + "description": "defines the image config.", + "x-intellij-html-description": "defines the image config." + } + }, + "preferredOrder": [ + "property" + ], + "additionalProperties": false, + "type": "object", + "description": "image config to use the FullyQualifiedImageName as param to set.", + "x-intellij-html-description": "image config to use the FullyQualifiedImageName as param to set." + }, + "HelmImageStrategy": { + "type": "object", + "anyOf": [ + { + "additionalProperties": false + }, + { + "properties": { + "fqn": { + "$ref": "#/definitions/HelmFQNConfig", + "description": "image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`.", + "x-intellij-html-description": "image configuration uses the syntax IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG." + } + }, + "preferredOrder": [ + "fqn" + ], + "additionalProperties": false + }, + { + "properties": { + "helm": { + "$ref": "#/definitions/HelmConventionConfig", + "description": "image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`.", + "x-intellij-html-description": "image configuration uses the syntax IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG." + } + }, + "preferredOrder": [ + "helm" + ], + "additionalProperties": false + } + ], + "description": "adds image configurations to the Helm `values` file.", + "x-intellij-html-description": "adds image configurations to the Helm values file." + }, + "HelmPackaged": { + "properties": { + "appVersion": { + "type": "string", + "description": "sets the `appVersion` on the chart to this version.", + "x-intellij-html-description": "sets the appVersion on the chart to this version." + }, + "version": { + "type": "string", + "description": "sets the `version` on the chart to this semver version.", + "x-intellij-html-description": "sets the version on the chart to this semver version." + } + }, + "preferredOrder": [ + "version", + "appVersion" + ], + "additionalProperties": false, + "type": "object", + "description": "parameters for packaging helm chart (`helm package`).", + "x-intellij-html-description": "parameters for packaging helm chart (helm package)." + }, + "HelmRelease": { + "required": [ + "name" + ], + "properties": { + "artifactOverrides": { + "description": "key value pairs where the key represents the parameter used in the `--set-string` Helm CLI flag to define a container image and the value corresponds to artifact i.e. `ImageName` defined in `Build.Artifacts` section. The resulting command-line is controlled by `ImageStrategy`.", + "x-intellij-html-description": "key value pairs where the key represents the parameter used in the --set-string Helm CLI flag to define a container image and the value corresponds to artifact i.e. ImageName defined in Build.Artifacts section. The resulting command-line is controlled by ImageStrategy." + }, + "chartPath": { + "type": "string", + "description": "local path to a packaged Helm chart or an unpacked Helm chart directory.", + "x-intellij-html-description": "local path to a packaged Helm chart or an unpacked Helm chart directory." + }, + "createNamespace": { + "type": "boolean", + "description": "if `true`, Skaffold will send `--create-namespace` flag to Helm CLI. `--create-namespace` flag is available in Helm since version 3.2. Defaults is `false`.", + "x-intellij-html-description": "if true, Skaffold will send --create-namespace flag to Helm CLI. --create-namespace flag is available in Helm since version 3.2. Defaults is false." + }, + "imageStrategy": { + "$ref": "#/definitions/HelmImageStrategy", + "description": "controls how an `ArtifactOverrides` entry is turned into `--set-string` Helm CLI flag or flags.", + "x-intellij-html-description": "controls how an ArtifactOverrides entry is turned into --set-string Helm CLI flag or flags." + }, + "name": { + "type": "string", + "description": "name of the Helm release. It accepts environment variables via the go template syntax.", + "x-intellij-html-description": "name of the Helm release. It accepts environment variables via the go template syntax." + }, + "namespace": { + "type": "string", + "description": "Kubernetes namespace.", + "x-intellij-html-description": "Kubernetes namespace." + }, + "overrides": { + "description": "key-value pairs. If present, Skaffold will build a Helm `values` file that overrides the original and use it to call Helm CLI (`--f` flag).", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will build a Helm values file that overrides the original and use it to call Helm CLI (--f flag)." + }, + "packaged": { + "$ref": "#/definitions/HelmPackaged", + "description": "parameters for packaging helm chart (`helm package`).", + "x-intellij-html-description": "parameters for packaging helm chart (helm package)." + }, + "recreatePods": { + "type": "boolean", + "description": "if `true`, Skaffold will send `--recreate-pods` flag to Helm CLI when upgrading a new version of a chart in subsequent dev loop deploy.", + "x-intellij-html-description": "if true, Skaffold will send --recreate-pods flag to Helm CLI when upgrading a new version of a chart in subsequent dev loop deploy.", + "default": "false" + }, + "remoteChart": { + "type": "string", + "description": "refers to a remote Helm chart reference or URL.", + "x-intellij-html-description": "refers to a remote Helm chart reference or URL." + }, + "repo": { + "type": "string", + "description": "specifies the helm repository for remote charts. If present, Skaffold will send `--repo` Helm CLI flag or flags.", + "x-intellij-html-description": "specifies the helm repository for remote charts. If present, Skaffold will send --repo Helm CLI flag or flags." + }, + "setFiles": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "key-value pairs. If present, Skaffold will send `--set-file` flag to Helm CLI and append all pairs after the flag.", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will send --set-file flag to Helm CLI and append all pairs after the flag.", + "default": "{}" + }, + "setValueTemplates": { + "description": "key-value pairs. If present, Skaffold will try to parse the value part of each key-value pair using environment variables in the system, then send `--set` flag to Helm CLI and append all parsed pairs after the flag.", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will try to parse the value part of each key-value pair using environment variables in the system, then send --set flag to Helm CLI and append all parsed pairs after the flag." + }, + "setValues": { + "description": "key-value pairs. If present, Skaffold will send `--set` flag to Helm CLI and append all pairs after the flag.", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will send --set flag to Helm CLI and append all pairs after the flag." + }, + "skipBuildDependencies": { + "type": "boolean", + "description": "should build dependencies be skipped. Ignored for `remoteChart`.", + "x-intellij-html-description": "should build dependencies be skipped. Ignored for remoteChart.", + "default": "false" + }, + "upgradeOnChange": { + "type": "boolean", + "description": "specifies whether to upgrade helm chart on code changes. Default is `true` when helm chart is local (has `chartPath`). Default is `false` when helm chart is remote (has `remoteChart`).", + "x-intellij-html-description": "specifies whether to upgrade helm chart on code changes. Default is true when helm chart is local (has chartPath). Default is false when helm chart is remote (has remoteChart)." + }, + "useHelmSecrets": { + "type": "boolean", + "description": "instructs skaffold to use secrets plugin on deployment.", + "x-intellij-html-description": "instructs skaffold to use secrets plugin on deployment.", + "default": "false" + }, + "valuesFiles": { + "items": { + "type": "string" + }, + "type": "array", + "description": "paths to the Helm `values` files.", + "x-intellij-html-description": "paths to the Helm values files.", + "default": "[]" + }, + "version": { + "type": "string", + "description": "version of the chart.", + "x-intellij-html-description": "version of the chart." + }, + "wait": { + "type": "boolean", + "description": "if `true`, Skaffold will send `--wait` flag to Helm CLI.", + "x-intellij-html-description": "if true, Skaffold will send --wait flag to Helm CLI.", + "default": "false" + } + }, + "preferredOrder": [ + "name", + "chartPath", + "remoteChart", + "valuesFiles", + "artifactOverrides", + "namespace", + "version", + "setValues", + "setValueTemplates", + "setFiles", + "createNamespace", + "wait", + "recreatePods", + "skipBuildDependencies", + "useHelmSecrets", + "repo", + "upgradeOnChange", + "overrides", + "packaged", + "imageStrategy" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a helm release to be deployed.", + "x-intellij-html-description": "describes a helm release to be deployed." + }, + "InputDigest": { + "type": "object", + "description": "*beta* tags hashes the image content.", + "x-intellij-html-description": "beta tags hashes the image content." + }, + "JSONPatch": { + "required": [ + "path" + ], + "properties": { + "from": { + "type": "string", + "description": "source position in the yaml, used for `copy` or `move` operations.", + "x-intellij-html-description": "source position in the yaml, used for copy or move operations." + }, + "op": { + "type": "string", + "description": "operation carried by the patch: `add`, `remove`, `replace`, `move`, `copy` or `test`.", + "x-intellij-html-description": "operation carried by the patch: add, remove, replace, move, copy or test.", + "default": "replace" + }, + "path": { + "type": "string", + "description": "position in the yaml where the operation takes place. For example, this targets the `dockerfile` of the first artifact built.", + "x-intellij-html-description": "position in the yaml where the operation takes place. For example, this targets the dockerfile of the first artifact built.", + "examples": [ + "/build/artifacts/0/docker/dockerfile" + ] + }, + "value": { + "description": "value to apply. Can be any portion of yaml.", + "x-intellij-html-description": "value to apply. Can be any portion of yaml." + } + }, + "preferredOrder": [ + "op", + "path", + "from", + "value" + ], + "additionalProperties": false, + "type": "object", + "description": "patch to be applied by a profile.", + "x-intellij-html-description": "patch to be applied by a profile." + }, + "JibArtifact": { + "properties": { + "args": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional build flags passed to the builder.", + "x-intellij-html-description": "additional build flags passed to the builder.", + "default": "[]", + "examples": [ + "[\"--no-build-cache\"]" + ] + }, + "fromImage": { + "type": "string", + "description": "overrides the configured jib base image.", + "x-intellij-html-description": "overrides the configured jib base image." + }, + "project": { + "type": "string", + "description": "selects which sub-project to build for multi-module builds.", + "x-intellij-html-description": "selects which sub-project to build for multi-module builds." + }, + "type": { + "type": "string", + "description": "the Jib builder type; normally determined automatically. Valid types are `maven`: for Maven. `gradle`: for Gradle.", + "x-intellij-html-description": "the Jib builder type; normally determined automatically. Valid types are maven: for Maven. gradle: for Gradle.", + "enum": [ + "maven", + "gradle" + ] + } + }, + "preferredOrder": [ + "project", + "args", + "type", + "fromImage" + ], + "additionalProperties": false, + "type": "object", + "description": "builds images using the [Jib plugins for Maven and Gradle](https://github.com/GoogleContainerTools/jib/).", + "x-intellij-html-description": "builds images using the Jib plugins for Maven and Gradle." + }, + "KanikoArtifact": { + "properties": { + "buildArgs": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "arguments passed to the docker build. It also accepts environment variables and generated values via the go template syntax. Exposed generated values: IMAGE_REPO, IMAGE_NAME, IMAGE_TAG.", + "x-intellij-html-description": "arguments passed to the docker build. It also accepts environment variables and generated values via the go template syntax. Exposed generated values: IMAGEREPO, IMAGENAME, IMAGE_TAG.", + "default": "{}", + "examples": [ + "{\"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"'{{.ENV_VARIABLE}}'\"}" + ] + }, + "cache": { + "$ref": "#/definitions/KanikoCache", + "description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds.", + "x-intellij-html-description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds." + }, + "cleanup": { + "type": "boolean", + "description": "to clean the filesystem at the end of the build.", + "x-intellij-html-description": "to clean the filesystem at the end of the build.", + "default": "false" + }, + "digestFile": { + "type": "string", + "description": "to specify a file in the container. This file will receive the digest of a built image. This can be used to automatically track the exact image built by kaniko.", + "x-intellij-html-description": "to specify a file in the container. This file will receive the digest of a built image. This can be used to automatically track the exact image built by kaniko." + }, + "dockerfile": { + "type": "string", + "description": "locates the Dockerfile relative to workspace.", + "x-intellij-html-description": "locates the Dockerfile relative to workspace.", + "default": "Dockerfile" + }, + "env": { + "items": {}, + "type": "array", + "description": "environment variables passed to the kaniko pod. It also accepts environment variables via the go template syntax.", + "x-intellij-html-description": "environment variables passed to the kaniko pod. It also accepts environment variables via the go template syntax.", + "default": "[]", + "examples": [ + "[{\"name\": \"key1\", \"value\": \"value1\"}, {\"name\": \"key2\", \"value\": \"value2\"}, {\"name\": \"key3\", \"value\": \"'{{.ENV_VARIABLE}}'\"}]" + ] + }, + "force": { + "type": "boolean", + "description": "building outside of a container.", + "x-intellij-html-description": "building outside of a container.", + "default": "false" + }, + "image": { + "type": "string", + "description": "Docker image used by the Kaniko pod. Defaults to the latest released version of `gcr.io/kaniko-project/executor`.", + "x-intellij-html-description": "Docker image used by the Kaniko pod. Defaults to the latest released version of gcr.io/kaniko-project/executor." + }, + "imageNameWithDigestFile": { + "type": "string", + "description": "specify a file to save the image name with digest of the built image to.", + "x-intellij-html-description": "specify a file to save the image name with digest of the built image to." + }, + "initImage": { + "type": "string", + "description": "image used to run init container which mounts kaniko context.", + "x-intellij-html-description": "image used to run init container which mounts kaniko context." + }, + "insecure": { + "type": "boolean", + "description": "if you want to push images to a plain HTTP registry.", + "x-intellij-html-description": "if you want to push images to a plain HTTP registry.", + "default": "false" + }, + "insecurePull": { + "type": "boolean", + "description": "if you want to pull images from a plain HTTP registry.", + "x-intellij-html-description": "if you want to pull images from a plain HTTP registry.", + "default": "false" + }, + "insecureRegistry": { + "items": { + "type": "string" + }, + "type": "array", + "description": "to use plain HTTP requests when accessing a registry.", + "x-intellij-html-description": "to use plain HTTP requests when accessing a registry.", + "default": "[]" + }, + "label": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "key: value to set some metadata to the final image. This is equivalent as using the LABEL within the Dockerfile.", + "x-intellij-html-description": "key: value to set some metadata to the final image. This is equivalent as using the LABEL within the Dockerfile.", + "default": "{}" + }, + "logFormat": { + "type": "string", + "description": " to set the log format.", + "x-intellij-html-description": " to set the log format." + }, + "logTimestamp": { + "type": "boolean", + "description": "to add timestamps to log format.", + "x-intellij-html-description": "to add timestamps to log format.", + "default": "false" + }, + "noPush": { + "type": "boolean", + "description": "if you only want to build the image, without pushing to a registry.", + "x-intellij-html-description": "if you only want to build the image, without pushing to a registry.", + "default": "false" + }, + "ociLayoutPath": { + "type": "string", + "description": "to specify a directory in the container where the OCI image layout of a built image will be placed. This can be used to automatically track the exact image built by kaniko.", + "x-intellij-html-description": "to specify a directory in the container where the OCI image layout of a built image will be placed. This can be used to automatically track the exact image built by kaniko." + }, + "registryCertificate": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "to provide a certificate for TLS communication with a given registry. my.registry.url: /path/to/the/certificate.cert is the expected format.", + "x-intellij-html-description": "to provide a certificate for TLS communication with a given registry. my.registry.url: /path/to/the/certificate.cert is the expected format.", + "default": "{}" + }, + "registryMirror": { + "type": "string", + "description": "if you want to use a registry mirror instead of default `index.docker.io`.", + "x-intellij-html-description": "if you want to use a registry mirror instead of default index.docker.io." + }, + "reproducible": { + "type": "boolean", + "description": "used to strip timestamps out of the built image.", + "x-intellij-html-description": "used to strip timestamps out of the built image.", + "default": "false" + }, + "singleSnapshot": { + "type": "boolean", + "description": "takes a single snapshot of the filesystem at the end of the build. So only one layer will be appended to the base image.", + "x-intellij-html-description": "takes a single snapshot of the filesystem at the end of the build. So only one layer will be appended to the base image.", + "default": "false" + }, + "skipTLS": { + "type": "boolean", + "description": "skips TLS certificate validation when pushing to a registry.", + "x-intellij-html-description": "skips TLS certificate validation when pushing to a registry.", + "default": "false" + }, + "skipTLSVerifyPull": { + "type": "boolean", + "description": "skips TLS certificate validation when pulling from a registry.", + "x-intellij-html-description": "skips TLS certificate validation when pulling from a registry.", + "default": "false" + }, + "skipTLSVerifyRegistry": { + "items": { + "type": "string" + }, + "type": "array", + "description": "skips TLS certificate validation when accessing a registry.", + "x-intellij-html-description": "skips TLS certificate validation when accessing a registry.", + "default": "[]" + }, + "skipUnusedStages": { + "type": "boolean", + "description": "builds only used stages if defined to true. Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile.", + "x-intellij-html-description": "builds only used stages if defined to true. Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile.", + "default": "false" + }, + "snapshotMode": { + "type": "string", + "description": "how Kaniko will snapshot the filesystem.", + "x-intellij-html-description": "how Kaniko will snapshot the filesystem." + }, + "tarPath": { + "type": "string", + "description": "path to save the image as a tarball at path instead of pushing the image.", + "x-intellij-html-description": "path to save the image as a tarball at path instead of pushing the image." + }, + "target": { + "type": "string", + "description": "to indicate which build stage is the target build stage.", + "x-intellij-html-description": "to indicate which build stage is the target build stage." + }, + "useNewRun": { + "type": "boolean", + "description": "to Use the experimental run implementation for detecting changes without requiring file system snapshots. In some cases, this may improve build performance by 75%.", + "x-intellij-html-description": "to Use the experimental run implementation for detecting changes without requiring file system snapshots. In some cases, this may improve build performance by 75%.", + "default": "false" + }, + "verbosity": { + "type": "string", + "description": " to set the logging level.", + "x-intellij-html-description": " to set the logging level." + }, + "volumeMounts": { + "items": {}, + "type": "array", + "description": "volume mounts passed to kaniko pod.", + "x-intellij-html-description": "volume mounts passed to kaniko pod.", + "default": "[]" + }, + "whitelistVarRun": { + "type": "boolean", + "description": "used to ignore `/var/run` when taking image snapshot. Set it to false to preserve /var/run/* in destination image.", + "x-intellij-html-description": "used to ignore /var/run when taking image snapshot. Set it to false to preserve /var/run/* in destination image.", + "default": "false" + } + }, + "preferredOrder": [ + "cleanup", + "insecure", + "insecurePull", + "noPush", + "force", + "logTimestamp", + "reproducible", + "singleSnapshot", + "skipTLS", + "skipTLSVerifyPull", + "skipUnusedStages", + "useNewRun", + "whitelistVarRun", + "dockerfile", + "target", + "initImage", + "image", + "digestFile", + "imageNameWithDigestFile", + "logFormat", + "ociLayoutPath", + "registryMirror", + "snapshotMode", + "tarPath", + "verbosity", + "insecureRegistry", + "skipTLSVerifyRegistry", + "env", + "cache", + "registryCertificate", + "label", + "buildArgs", + "volumeMounts" + ], + "additionalProperties": false, + "type": "object", + "description": "describes an artifact built from a Dockerfile, with kaniko.", + "x-intellij-html-description": "describes an artifact built from a Dockerfile, with kaniko." + }, + "KanikoCache": { + "properties": { + "hostPath": { + "type": "string", + "description": "specifies a path on the host that is mounted to each pod as read only cache volume containing base images. If set, must exist on each node and prepopulated with kaniko-warmer.", + "x-intellij-html-description": "specifies a path on the host that is mounted to each pod as read only cache volume containing base images. If set, must exist on each node and prepopulated with kaniko-warmer." + }, + "repo": { + "type": "string", + "description": "a remote repository to store cached layers. If none is specified, one will be inferred from the image name. See [Kaniko Caching](https://github.com/GoogleContainerTools/kaniko#caching).", + "x-intellij-html-description": "a remote repository to store cached layers. If none is specified, one will be inferred from the image name. See Kaniko Caching." + }, + "ttl": { + "type": "string", + "description": "Cache timeout in hours.", + "x-intellij-html-description": "Cache timeout in hours." + } + }, + "preferredOrder": [ + "repo", + "hostPath", + "ttl" + ], + "additionalProperties": false, + "type": "object", + "description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds.", + "x-intellij-html-description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds." + }, + "KptApplyInventory": { + "properties": { + "dir": { + "type": "string", + "description": "equivalent to the dir in `kpt live apply `. If not provided, kpt deployer will create a hidden directory `.kpt-hydrated` to store the manipulated resource output and the kpt inventory-template.yaml file.", + "x-intellij-html-description": "equivalent to the dir in kpt live apply <dir>. If not provided, kpt deployer will create a hidden directory .kpt-hydrated to store the manipulated resource output and the kpt inventory-template.yaml file." + }, + "inventoryID": { + "type": "string", + "description": "*alpha* identifier for a group of applied resources. This value is only needed when the `kpt live` is working on a pre-applied cluster resources.", + "x-intellij-html-description": "alpha identifier for a group of applied resources. This value is only needed when the kpt live is working on a pre-applied cluster resources." + }, + "inventoryNamespace": { + "type": "string", + "description": "*alpha* sets the inventory namespace.", + "x-intellij-html-description": "alpha sets the inventory namespace." + } + }, + "preferredOrder": [ + "dir", + "inventoryID", + "inventoryNamespace" + ], + "additionalProperties": false, + "type": "object", + "description": "sets the kpt inventory directory.", + "x-intellij-html-description": "sets the kpt inventory directory." + }, + "KptApplyOptions": { + "properties": { + "pollPeriod": { + "type": "string", + "description": "sets for the polling period for resource statuses. Default to 2s.", + "x-intellij-html-description": "sets for the polling period for resource statuses. Default to 2s." + }, + "prunePropagationPolicy": { + "type": "string", + "description": "sets the propagation policy for pruning. Possible settings are Background, Foreground, Orphan. Default to \"Background\".", + "x-intellij-html-description": "sets the propagation policy for pruning. Possible settings are Background, Foreground, Orphan. Default to "Background"." + }, + "pruneTimeout": { + "type": "string", + "description": "sets the time threshold to wait for all pruned resources to be deleted.", + "x-intellij-html-description": "sets the time threshold to wait for all pruned resources to be deleted." + }, + "reconcileTimeout": { + "type": "string", + "description": "sets the time threshold to wait for all resources to reach the current status.", + "x-intellij-html-description": "sets the time threshold to wait for all resources to reach the current status." + } + }, + "preferredOrder": [ + "pollPeriod", + "prunePropagationPolicy", + "pruneTimeout", + "reconcileTimeout" + ], + "additionalProperties": false, + "type": "object", + "description": "adds additional configurations used when calling `kpt live apply`.", + "x-intellij-html-description": "adds additional configurations used when calling kpt live apply." + }, + "KptDeploy": { + "required": [ + "dir" + ], + "properties": { + "dir": { + "type": "string", + "description": "path to the config directory (Required). By default, the Dir contains the application configurations, [kustomize config files](https://kubectl.docs.kubernetes.io/pages/examples/kustomize.html) and [declarative kpt functions](https://googlecontainertools.github.io/kpt/guides/consumer/function/#declarative-run).", + "x-intellij-html-description": "path to the config directory (Required). By default, the Dir contains the application configurations, kustomize config files and declarative kpt functions." + }, + "fn": { + "$ref": "#/definitions/KptFn", + "description": "adds additional configurations for `kpt fn`.", + "x-intellij-html-description": "adds additional configurations for kpt fn." + }, + "live": { + "$ref": "#/definitions/KptLive", + "description": "adds additional configurations for `kpt live`.", + "x-intellij-html-description": "adds additional configurations for kpt live." + } + }, + "preferredOrder": [ + "dir", + "fn", + "live" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* uses the `kpt` CLI to manage and deploy manifests.", + "x-intellij-html-description": "alpha uses the kpt CLI to manage and deploy manifests." + }, + "KptFn": { + "properties": { + "fnPath": { + "type": "string", + "description": "directory to discover the declarative kpt functions. If not provided, kpt deployer uses `kpt.Dir`.", + "x-intellij-html-description": "directory to discover the declarative kpt functions. If not provided, kpt deployer uses kpt.Dir." + }, + "globalScope": { + "type": "boolean", + "description": "sets the global scope for the kpt functions. see `kpt help fn run`.", + "x-intellij-html-description": "sets the global scope for the kpt functions. see kpt help fn run.", + "default": "false" + }, + "image": { + "type": "string", + "description": "a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath will be ignored.", + "x-intellij-html-description": "a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath will be ignored." + }, + "mount": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of storage options to mount to the fn image.", + "x-intellij-html-description": "a list of storage options to mount to the fn image.", + "default": "[]" + }, + "network": { + "type": "boolean", + "description": "enables network access for the kpt function containers.", + "x-intellij-html-description": "enables network access for the kpt function containers.", + "default": "false" + }, + "networkName": { + "type": "string", + "description": "docker network name to run the kpt function containers (default \"bridge\").", + "x-intellij-html-description": "docker network name to run the kpt function containers (default "bridge")." + }, + "sinkDir": { + "type": "string", + "description": "directory to where the manipulated resource output is stored.", + "x-intellij-html-description": "directory to where the manipulated resource output is stored." + } + }, + "preferredOrder": [ + "fnPath", + "image", + "networkName", + "globalScope", + "network", + "mount", + "sinkDir" + ], + "additionalProperties": false, + "type": "object", + "description": "adds additional configurations used when calling `kpt fn`.", + "x-intellij-html-description": "adds additional configurations used when calling kpt fn." + }, + "KptLive": { + "properties": { + "apply": { + "$ref": "#/definitions/KptApplyInventory", + "description": "sets the kpt inventory directory.", + "x-intellij-html-description": "sets the kpt inventory directory." + }, + "options": { + "$ref": "#/definitions/KptApplyOptions", + "description": "adds additional configurations for `kpt live apply` commands.", + "x-intellij-html-description": "adds additional configurations for kpt live apply commands." + } + }, + "preferredOrder": [ + "apply", + "options" + ], + "additionalProperties": false, + "type": "object", + "description": "adds additional configurations used when calling `kpt live`.", + "x-intellij-html-description": "adds additional configurations used when calling kpt live." + }, + "KubectlDeploy": { + "properties": { + "defaultNamespace": { + "type": "string", + "description": "default namespace passed to kubectl on deployment if no other override is given.", + "x-intellij-html-description": "default namespace passed to kubectl on deployment if no other override is given." + }, + "flags": { + "$ref": "#/definitions/KubectlFlags", + "description": "additional flags passed to `kubectl`.", + "x-intellij-html-description": "additional flags passed to kubectl." + }, + "manifests": { + "items": { + "type": "string" + }, + "type": "array", + "description": "the Kubernetes yaml or json manifests.", + "x-intellij-html-description": "the Kubernetes yaml or json manifests.", + "default": "[\"k8s/*.yaml\"]" + }, + "remoteManifests": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Kubernetes manifests in remote clusters.", + "x-intellij-html-description": "Kubernetes manifests in remote clusters.", + "default": "[]" + } + }, + "preferredOrder": [ + "manifests", + "remoteManifests", + "flags", + "defaultNamespace" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* uses a client side `kubectl apply` to deploy manifests. You'll need a `kubectl` CLI version installed that's compatible with your cluster.", + "x-intellij-html-description": "beta uses a client side kubectl apply to deploy manifests. You'll need a kubectl CLI version installed that's compatible with your cluster." + }, + "KubectlFlags": { + "properties": { + "apply": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on creations (`kubectl apply`).", + "x-intellij-html-description": "additional flags passed on creations (kubectl apply).", + "default": "[]" + }, + "delete": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on deletions (`kubectl delete`).", + "x-intellij-html-description": "additional flags passed on deletions (kubectl delete).", + "default": "[]" + }, + "disableValidation": { + "type": "boolean", + "description": "passes the `--validate=false` flag to supported `kubectl` commands when enabled.", + "x-intellij-html-description": "passes the --validate=false flag to supported kubectl commands when enabled.", + "default": "false" + }, + "global": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on every command.", + "x-intellij-html-description": "additional flags passed on every command.", + "default": "[]" + } + }, + "preferredOrder": [ + "global", + "apply", + "delete", + "disableValidation" + ], + "additionalProperties": false, + "type": "object", + "description": "additional flags passed on the command line to kubectl either on every command (Global), on creations (Apply) or deletions (Delete).", + "x-intellij-html-description": "additional flags passed on the command line to kubectl either on every command (Global), on creations (Apply) or deletions (Delete)." + }, + "KustomizeDeploy": { + "properties": { + "buildArgs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional args passed to `kustomize build`.", + "x-intellij-html-description": "additional args passed to kustomize build.", + "default": "[]" + }, + "defaultNamespace": { + "type": "string", + "description": "default namespace passed to kubectl on deployment if no other override is given.", + "x-intellij-html-description": "default namespace passed to kubectl on deployment if no other override is given." + }, + "flags": { + "$ref": "#/definitions/KubectlFlags", + "description": "additional flags passed to `kubectl`.", + "x-intellij-html-description": "additional flags passed to kubectl." + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "path to Kustomization files.", + "x-intellij-html-description": "path to Kustomization files.", + "default": "[\".\"]" + } + }, + "preferredOrder": [ + "paths", + "flags", + "buildArgs", + "defaultNamespace" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* uses the `kustomize` CLI to \"patch\" a deployment for a target environment.", + "x-intellij-html-description": "beta uses the kustomize CLI to "patch" a deployment for a target environment." + }, + "LocalBuild": { + "properties": { + "concurrency": { + "type": "integer", + "description": "how many artifacts can be built concurrently. 0 means \"no-limit\".", + "x-intellij-html-description": "how many artifacts can be built concurrently. 0 means "no-limit".", + "default": "1" + }, + "push": { + "type": "boolean", + "description": "should images be pushed to a registry. If not specified, images are pushed only if the current Kubernetes context connects to a remote cluster.", + "x-intellij-html-description": "should images be pushed to a registry. If not specified, images are pushed only if the current Kubernetes context connects to a remote cluster." + }, + "tryImportMissing": { + "type": "boolean", + "description": "whether to attempt to import artifacts from Docker (either a local or remote registry) if not in the cache.", + "x-intellij-html-description": "whether to attempt to import artifacts from Docker (either a local or remote registry) if not in the cache.", + "default": "false" + }, + "useBuildkit": { + "type": "boolean", + "description": "use BuildKit to build Docker images.", + "x-intellij-html-description": "use BuildKit to build Docker images.", + "default": "false" + }, + "useDockerCLI": { + "type": "boolean", + "description": "use `docker` command-line interface instead of Docker Engine APIs.", + "x-intellij-html-description": "use docker command-line interface instead of Docker Engine APIs.", + "default": "false" + } + }, + "preferredOrder": [ + "push", + "tryImportMissing", + "useDockerCLI", + "useBuildkit", + "concurrency" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes how to do a build on the local docker daemon and optionally push to a repository.", + "x-intellij-html-description": "beta describes how to do a build on the local docker daemon and optionally push to a repository." + }, + "LogsConfig": { + "properties": { + "prefix": { + "type": "string", + "description": "defines the prefix shown on each log line. Valid values are `container`: prefix logs lines with the name of the container. `podAndContainer`: prefix logs lines with the names of the pod and of the container. `auto`: same as `podAndContainer` except that the pod name is skipped if it's the same as the container name. `none`: don't add a prefix.", + "x-intellij-html-description": "defines the prefix shown on each log line. Valid values are container: prefix logs lines with the name of the container. podAndContainer: prefix logs lines with the names of the pod and of the container. auto: same as podAndContainer except that the pod name is skipped if it's the same as the container name. none: don't add a prefix.", + "default": "auto", + "enum": [ + "container", + "podAndContainer", + "auto", + "none" + ] + } + }, + "preferredOrder": [ + "prefix" + ], + "additionalProperties": false, + "type": "object", + "description": "configures how container logs are printed as a result of a deployment.", + "x-intellij-html-description": "configures how container logs are printed as a result of a deployment." + }, + "Metadata": { + "properties": { + "name": { + "type": "string", + "description": "an identifier for the project.", + "x-intellij-html-description": "an identifier for the project." + } + }, + "preferredOrder": [ + "name" + ], + "additionalProperties": false, + "type": "object", + "description": "holds an optional name of the project.", + "x-intellij-html-description": "holds an optional name of the project." + }, + "PortForwardResource": { + "properties": { + "address": { + "type": "string", + "description": "local address to bind to. Defaults to the loopback address 127.0.0.1.", + "x-intellij-html-description": "local address to bind to. Defaults to the loopback address 127.0.0.1." + }, + "localPort": { + "type": "integer", + "description": "local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. *Optional*.", + "x-intellij-html-description": "local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. Optional." + }, + "namespace": { + "type": "string", + "description": "namespace of the resource to port forward.", + "x-intellij-html-description": "namespace of the resource to port forward." + }, + "port": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "description": "resource port that will be forwarded.", + "x-intellij-html-description": "resource port that will be forwarded." + }, + "resourceName": { + "type": "string", + "description": "name of the Kubernetes resource to port forward.", + "x-intellij-html-description": "name of the Kubernetes resource to port forward." + }, + "resourceType": { + "type": "string", + "description": "Kubernetes type that should be port forwarded. Acceptable resource types include: `Service`, `Pod` and Controller resource type that has a pod spec: `ReplicaSet`, `ReplicationController`, `Deployment`, `StatefulSet`, `DaemonSet`, `Job`, `CronJob`.", + "x-intellij-html-description": "Kubernetes type that should be port forwarded. Acceptable resource types include: Service, Pod and Controller resource type that has a pod spec: ReplicaSet, ReplicationController, Deployment, StatefulSet, DaemonSet, Job, CronJob." + } + }, + "preferredOrder": [ + "resourceType", + "resourceName", + "namespace", + "port", + "address", + "localPort" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a resource to port forward.", + "x-intellij-html-description": "describes a resource to port forward." + }, + "Profile": { + "required": [ + "name" + ], + "properties": { + "activation": { + "items": { + "$ref": "#/definitions/Activation" + }, + "type": "array", + "description": "criteria by which a profile can be auto-activated. The profile is auto-activated if any one of the activations are triggered. An activation is triggered if all of the criteria (env, kubeContext, command) are triggered.", + "x-intellij-html-description": "criteria by which a profile can be auto-activated. The profile is auto-activated if any one of the activations are triggered. An activation is triggered if all of the criteria (env, kubeContext, command) are triggered." + }, + "build": { + "$ref": "#/definitions/BuildConfig", + "description": "describes how images are built.", + "x-intellij-html-description": "describes how images are built." + }, + "deploy": { + "$ref": "#/definitions/DeployConfig", + "description": "describes how images are deployed.", + "x-intellij-html-description": "describes how images are deployed." + }, + "name": { + "type": "string", + "description": "a unique profile name.", + "x-intellij-html-description": "a unique profile name.", + "examples": [ + "profile-prod" + ] + }, + "patches": { + "items": { + "$ref": "#/definitions/JSONPatch" + }, + "type": "array", + "description": "patches applied to the configuration. Patches use the JSON patch notation.", + "x-intellij-html-description": "patches applied to the configuration. Patches use the JSON patch notation." + }, + "portForward": { + "items": { + "$ref": "#/definitions/PortForwardResource" + }, + "type": "array", + "description": "describes user defined resources to port-forward.", + "x-intellij-html-description": "describes user defined resources to port-forward." + }, + "test": { + "items": { + "$ref": "#/definitions/TestCase" + }, + "type": "array", + "description": "describes how images are tested.", + "x-intellij-html-description": "describes how images are tested." + } + }, + "preferredOrder": [ + "name", + "activation", + "patches", + "build", + "test", + "deploy", + "portForward" + ], + "additionalProperties": false, + "type": "object", + "description": "used to override any `build`, `test` or `deploy` configuration.", + "x-intellij-html-description": "used to override any build, test or deploy configuration." + }, + "ProfileDependency": { + "required": [ + "name" + ], + "properties": { + "activatedBy": { + "items": { + "type": "string" + }, + "type": "array", + "description": "describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated.", + "x-intellij-html-description": "describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated.", + "default": "[]" + }, + "name": { + "type": "string", + "description": "describes name of the profile to activate in the dependency config. It should exist in the dependency config.", + "x-intellij-html-description": "describes name of the profile to activate in the dependency config. It should exist in the dependency config." + } + }, + "preferredOrder": [ + "name", + "activatedBy" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a mapping from referenced config profiles to the current config profiles. If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles.", + "x-intellij-html-description": "describes a mapping from referenced config profiles to the current config profiles. If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles." + }, + "ResourceRequirement": { + "properties": { + "cpu": { + "type": "string", + "description": "the number cores to be used.", + "x-intellij-html-description": "the number cores to be used.", + "examples": [ + "2`, `2.0` or `200m" + ] + }, + "ephemeralStorage": { + "type": "string", + "description": "the amount of Ephemeral storage to allocate to the pod.", + "x-intellij-html-description": "the amount of Ephemeral storage to allocate to the pod.", + "examples": [ + "1Gi` or `1000Mi" + ] + }, + "memory": { + "type": "string", + "description": "the amount of memory to allocate to the pod.", + "x-intellij-html-description": "the amount of memory to allocate to the pod.", + "examples": [ + "1Gi` or `1000Mi" + ] + }, + "resourceStorage": { + "type": "string", + "description": "the amount of resource storage to allocate to the pod.", + "x-intellij-html-description": "the amount of resource storage to allocate to the pod.", + "examples": [ + "1Gi` or `1000Mi" + ] + } + }, + "preferredOrder": [ + "cpu", + "memory", + "ephemeralStorage", + "resourceStorage" + ], + "additionalProperties": false, + "type": "object", + "description": "stores the CPU/Memory requirements for the pod.", + "x-intellij-html-description": "stores the CPU/Memory requirements for the pod." + }, + "ResourceRequirements": { + "properties": { + "limits": { + "$ref": "#/definitions/ResourceRequirement", + "description": "[resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod.", + "x-intellij-html-description": "resource limits for the Kaniko pod." + }, + "requests": { + "$ref": "#/definitions/ResourceRequirement", + "description": "[resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod.", + "x-intellij-html-description": "resource requests for the Kaniko pod." + } + }, + "preferredOrder": [ + "requests", + "limits" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the resource requirements for the kaniko pod.", + "x-intellij-html-description": "describes the resource requirements for the kaniko pod." + }, + "ResourceType": { + "type": "string", + "description": "describes the Kubernetes resource types used for port forwarding.", + "x-intellij-html-description": "describes the Kubernetes resource types used for port forwarding." + }, + "ShaTagger": { + "type": "object", + "description": "*beta* tags images with their sha256 digest.", + "x-intellij-html-description": "beta tags images with their sha256 digest." + }, + "SkaffoldConfig": { + "required": [ + "apiVersion", + "kind" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "version of the configuration.", + "x-intellij-html-description": "version of the configuration." + }, + "build": { + "$ref": "#/definitions/BuildConfig", + "description": "describes how images are built.", + "x-intellij-html-description": "describes how images are built." + }, + "deploy": { + "$ref": "#/definitions/DeployConfig", + "description": "describes how images are deployed.", + "x-intellij-html-description": "describes how images are deployed." + }, + "kind": { + "type": "string", + "description": "always `Config`.", + "x-intellij-html-description": "always Config.", + "default": "Config" + }, + "metadata": { + "$ref": "#/definitions/Metadata", + "description": "holds additional information about the config.", + "x-intellij-html-description": "holds additional information about the config." + }, + "portForward": { + "items": { + "$ref": "#/definitions/PortForwardResource" + }, + "type": "array", + "description": "describes user defined resources to port-forward.", + "x-intellij-html-description": "describes user defined resources to port-forward." + }, + "profiles": { + "items": { + "$ref": "#/definitions/Profile" + }, + "type": "array", + "description": "*beta* can override be used to `build`, `test` or `deploy` configuration.", + "x-intellij-html-description": "beta can override be used to build, test or deploy configuration." + }, + "requires": { + "items": { + "$ref": "#/definitions/ConfigDependency" + }, + "type": "array", + "description": "describes a list of other required configs for the current config.", + "x-intellij-html-description": "describes a list of other required configs for the current config." + }, + "test": { + "items": { + "$ref": "#/definitions/TestCase" + }, + "type": "array", + "description": "describes how images are tested.", + "x-intellij-html-description": "describes how images are tested." + } + }, + "preferredOrder": [ + "apiVersion", + "kind", + "metadata", + "requires", + "build", + "test", + "deploy", + "portForward", + "profiles" + ], + "additionalProperties": false, + "type": "object", + "description": "holds the fields parsed from the Skaffold configuration file (skaffold.yaml).", + "x-intellij-html-description": "holds the fields parsed from the Skaffold configuration file (skaffold.yaml)." + }, + "Sync": { + "properties": { + "auto": { + "type": "boolean", + "description": "delegates discovery of sync rules to the build system. Only available for jib and buildpacks.", + "x-intellij-html-description": "delegates discovery of sync rules to the build system. Only available for jib and buildpacks." + }, + "infer": { + "items": { + "type": "string" + }, + "type": "array", + "description": "file patterns which may be synced into the container The container destination is inferred by the builder based on the instructions of a Dockerfile. Available for docker and kaniko artifacts and custom artifacts that declare dependencies on a dockerfile.", + "x-intellij-html-description": "file patterns which may be synced into the container The container destination is inferred by the builder based on the instructions of a Dockerfile. Available for docker and kaniko artifacts and custom artifacts that declare dependencies on a dockerfile.", + "default": "[]" + }, + "manual": { + "items": { + "$ref": "#/definitions/SyncRule" + }, + "type": "array", + "description": "manual sync rules indicating the source and destination.", + "x-intellij-html-description": "manual sync rules indicating the source and destination." + } + }, + "preferredOrder": [ + "manual", + "infer", + "auto" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* specifies what files to sync into the container. This is a list of sync rules indicating the intent to sync for source files. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta specifies what files to sync into the container. This is a list of sync rules indicating the intent to sync for source files. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + }, + "SyncRule": { + "required": [ + "src", + "dest" + ], + "properties": { + "dest": { + "type": "string", + "description": "destination path in the container where the files should be synced to.", + "x-intellij-html-description": "destination path in the container where the files should be synced to.", + "examples": [ + "\"app/\"" + ] + }, + "src": { + "type": "string", + "description": "a glob pattern to match local paths against. Directories should be delimited by `/` on all platforms.", + "x-intellij-html-description": "a glob pattern to match local paths against. Directories should be delimited by / on all platforms.", + "examples": [ + "\"css/**/*.css\"" + ] + }, + "strip": { + "type": "string", + "description": "specifies the path prefix to remove from the source path when transplanting the files into the destination folder.", + "x-intellij-html-description": "specifies the path prefix to remove from the source path when transplanting the files into the destination folder.", + "examples": [ + "\"css/\"" + ] + } + }, + "preferredOrder": [ + "src", + "dest", + "strip" + ], + "additionalProperties": false, + "type": "object", + "description": "specifies which local files to sync to remote folders.", + "x-intellij-html-description": "specifies which local files to sync to remote folders." + }, + "TagPolicy": { + "properties": { + "customTemplate": { + "$ref": "#/definitions/CustomTemplateTagger", + "description": "*beta* tags images with a configurable template string *composed of other taggers*.", + "x-intellij-html-description": "beta tags images with a configurable template string composed of other taggers." + }, + "dateTime": { + "$ref": "#/definitions/DateTimeTagger", + "description": "*beta* tags images with the build timestamp.", + "x-intellij-html-description": "beta tags images with the build timestamp." + }, + "envTemplate": { + "$ref": "#/definitions/EnvTemplateTagger", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "gitCommit": { + "$ref": "#/definitions/GitTagger", + "description": "*beta* tags images with the git tag or commit of the artifact's workspace.", + "x-intellij-html-description": "beta tags images with the git tag or commit of the artifact's workspace." + }, + "inputDigest": { + "$ref": "#/definitions/InputDigest", + "description": "*beta* tags images with their sha256 digest of their content.", + "x-intellij-html-description": "beta tags images with their sha256 digest of their content." + }, + "sha256": { + "$ref": "#/definitions/ShaTagger", + "description": "*beta* tags images with their sha256 digest.", + "x-intellij-html-description": "beta tags images with their sha256 digest." + } + }, + "preferredOrder": [ + "gitCommit", + "sha256", + "envTemplate", + "dateTime", + "customTemplate", + "inputDigest" + ], + "additionalProperties": false, + "type": "object", + "description": "contains all the configuration for the tagging step.", + "x-intellij-html-description": "contains all the configuration for the tagging step." + }, + "TaggerComponent": { + "type": "object", + "anyOf": [ + { + "properties": { + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name" + ], + "additionalProperties": false + }, + { + "properties": { + "gitCommit": { + "$ref": "#/definitions/GitTagger", + "description": "*beta* tags images with the git tag or commit of the artifact's workspace.", + "x-intellij-html-description": "beta tags images with the git tag or commit of the artifact's workspace." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "gitCommit" + ], + "additionalProperties": false + }, + { + "properties": { + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + }, + "sha256": { + "$ref": "#/definitions/ShaTagger", + "description": "*beta* tags images with their sha256 digest.", + "x-intellij-html-description": "beta tags images with their sha256 digest." + } + }, + "preferredOrder": [ + "name", + "sha256" + ], + "additionalProperties": false + }, + { + "properties": { + "envTemplate": { + "$ref": "#/definitions/EnvTemplateTagger", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "envTemplate" + ], + "additionalProperties": false + }, + { + "properties": { + "dateTime": { + "$ref": "#/definitions/DateTimeTagger", + "description": "*beta* tags images with the build timestamp.", + "x-intellij-html-description": "beta tags images with the build timestamp." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "dateTime" + ], + "additionalProperties": false + }, + { + "properties": { + "customTemplate": { + "$ref": "#/definitions/CustomTemplateTagger", + "description": "*beta* tags images with a configurable template string *composed of other taggers*.", + "x-intellij-html-description": "beta tags images with a configurable template string composed of other taggers." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "customTemplate" + ], + "additionalProperties": false + }, + { + "properties": { + "inputDigest": { + "$ref": "#/definitions/InputDigest", + "description": "*beta* tags images with their sha256 digest of their content.", + "x-intellij-html-description": "beta tags images with their sha256 digest of their content." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "inputDigest" + ], + "additionalProperties": false + } + ], + "description": "*beta* a component of CustomTemplateTagger.", + "x-intellij-html-description": "beta a component of CustomTemplateTagger." + }, + "TestCase": { + "required": [ + "image" + ], + "properties": { + "context": { + "type": "string", + "description": "directory containing the test sources.", + "x-intellij-html-description": "directory containing the test sources.", + "default": "." + }, + "custom": { + "items": { + "$ref": "#/definitions/CustomTest" + }, + "type": "array", + "description": "the set of custom tests to run after an artifact is built.", + "x-intellij-html-description": "the set of custom tests to run after an artifact is built." + }, + "image": { + "type": "string", + "description": "artifact on which to run those tests.", + "x-intellij-html-description": "artifact on which to run those tests.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "structureTests": { + "items": { + "type": "string" + }, + "type": "array", + "description": "the [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) to run on that artifact.", + "x-intellij-html-description": "the Container Structure Tests to run on that artifact.", + "default": "[]", + "examples": [ + "[\"./test/*\"]" + ] + }, + "structureTestsArgs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional configuration arguments passed to `container-structure-test` binary.", + "x-intellij-html-description": "additional configuration arguments passed to container-structure-test binary.", + "default": "[]", + "examples": [ + "[\"--driver=tar\", \"--no-color\", \"-q\"]" + ] + } + }, + "preferredOrder": [ + "image", + "context", + "custom", + "structureTests", + "structureTestsArgs" + ], + "additionalProperties": false, + "type": "object", + "description": "a list of tests to run on images that Skaffold builds.", + "x-intellij-html-description": "a list of tests to run on images that Skaffold builds." + } + } +} diff --git a/integration/examples/bazel/skaffold.yaml b/integration/examples/bazel/skaffold.yaml index 1b01fc1a31a..a5b0b6b5672 100644 --- a/integration/examples/bazel/skaffold.yaml +++ b/integration/examples/bazel/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks-java/skaffold.yaml b/integration/examples/buildpacks-java/skaffold.yaml index f81af0a96a2..4fdd8fcf341 100644 --- a/integration/examples/buildpacks-java/skaffold.yaml +++ b/integration/examples/buildpacks-java/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks-node/skaffold.yaml b/integration/examples/buildpacks-node/skaffold.yaml index 7a7ad961084..52af709cbba 100644 --- a/integration/examples/buildpacks-node/skaffold.yaml +++ b/integration/examples/buildpacks-node/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks-python/skaffold.yaml b/integration/examples/buildpacks-python/skaffold.yaml index 8c5f40a0b3e..6f94b11e235 100644 --- a/integration/examples/buildpacks-python/skaffold.yaml +++ b/integration/examples/buildpacks-python/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks/skaffold.yaml b/integration/examples/buildpacks/skaffold.yaml index d9a2f676412..d3588f362b8 100644 --- a/integration/examples/buildpacks/skaffold.yaml +++ b/integration/examples/buildpacks/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/custom-buildx/skaffold.yaml b/integration/examples/custom-buildx/skaffold.yaml index 6b5e3091c3f..0ff38c3abb1 100644 --- a/integration/examples/custom-buildx/skaffold.yaml +++ b/integration/examples/custom-buildx/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: diff --git a/integration/examples/custom-tests/skaffold.yaml b/integration/examples/custom-tests/skaffold.yaml index 22d14182b38..ca824035cbd 100644 --- a/integration/examples/custom-tests/skaffold.yaml +++ b/integration/examples/custom-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/custom/skaffold.yaml b/integration/examples/custom/skaffold.yaml index 0ec8861d220..dc96b26d7d0 100644 --- a/integration/examples/custom/skaffold.yaml +++ b/integration/examples/custom/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/gcb-kaniko/skaffold.yaml b/integration/examples/gcb-kaniko/skaffold.yaml index e6686f61ddf..61dbb59c7eb 100644 --- a/integration/examples/gcb-kaniko/skaffold.yaml +++ b/integration/examples/gcb-kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: googleCloudBuild: diff --git a/integration/examples/generate-pipeline/skaffold.yaml b/integration/examples/generate-pipeline/skaffold.yaml index d47225948e8..fe6ce5e3b9b 100644 --- a/integration/examples/generate-pipeline/skaffold.yaml +++ b/integration/examples/generate-pipeline/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/getting-started-kustomize/skaffold.yaml b/integration/examples/getting-started-kustomize/skaffold.yaml index 8ba8b8c79b4..92c39d9c50f 100644 --- a/integration/examples/getting-started-kustomize/skaffold.yaml +++ b/integration/examples/getting-started-kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: getting-started-kustomize diff --git a/integration/examples/getting-started/skaffold.yaml b/integration/examples/getting-started/skaffold.yaml index 641084e39f9..a0d647ceaeb 100644 --- a/integration/examples/getting-started/skaffold.yaml +++ b/integration/examples/getting-started/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/google-cloud-build/skaffold.yaml b/integration/examples/google-cloud-build/skaffold.yaml index 810bf8cd801..a09b7b94e63 100644 --- a/integration/examples/google-cloud-build/skaffold.yaml +++ b/integration/examples/google-cloud-build/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: googleCloudBuild: diff --git a/integration/examples/helm-deployment-dependencies/skaffold.yaml b/integration/examples/helm-deployment-dependencies/skaffold.yaml index 97a0fbde30c..dd01304e03e 100644 --- a/integration/examples/helm-deployment-dependencies/skaffold.yaml +++ b/integration/examples/helm-deployment-dependencies/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: tagPolicy: diff --git a/integration/examples/helm-deployment/skaffold.yaml b/integration/examples/helm-deployment/skaffold.yaml index a3228ecc763..5e7b798b400 100644 --- a/integration/examples/helm-deployment/skaffold.yaml +++ b/integration/examples/helm-deployment/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/helm-remote-repo/skaffold.yaml b/integration/examples/helm-remote-repo/skaffold.yaml index 6a5e31cd341..2c69f5d8895 100644 --- a/integration/examples/helm-remote-repo/skaffold.yaml +++ b/integration/examples/helm-remote-repo/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config deploy: helm: diff --git a/integration/examples/hot-reload/skaffold.yaml b/integration/examples/hot-reload/skaffold.yaml index 7a45aafff0b..ae087dda5e5 100644 --- a/integration/examples/hot-reload/skaffold.yaml +++ b/integration/examples/hot-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/jib-gradle/skaffold.yaml b/integration/examples/jib-gradle/skaffold.yaml index f958c60c1e8..c1a538db90a 100644 --- a/integration/examples/jib-gradle/skaffold.yaml +++ b/integration/examples/jib-gradle/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/jib-multimodule/skaffold.yaml b/integration/examples/jib-multimodule/skaffold.yaml index fc5c21c43f1..f5a643a86a2 100644 --- a/integration/examples/jib-multimodule/skaffold.yaml +++ b/integration/examples/jib-multimodule/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/jib-sync/skaffold-gradle.yaml b/integration/examples/jib-sync/skaffold-gradle.yaml index b5111c07b70..e60a5adc12e 100644 --- a/integration/examples/jib-sync/skaffold-gradle.yaml +++ b/integration/examples/jib-sync/skaffold-gradle.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/jib-sync/skaffold-maven.yaml b/integration/examples/jib-sync/skaffold-maven.yaml index d1e986475cd..90f4ed86844 100644 --- a/integration/examples/jib-sync/skaffold-maven.yaml +++ b/integration/examples/jib-sync/skaffold-maven.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/jib/skaffold.yaml b/integration/examples/jib/skaffold.yaml index 2f8901388b7..d3a22ce5ce2 100644 --- a/integration/examples/jib/skaffold.yaml +++ b/integration/examples/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/kaniko/skaffold.yaml b/integration/examples/kaniko/skaffold.yaml index 62166545be9..3090303406c 100644 --- a/integration/examples/kaniko/skaffold.yaml +++ b/integration/examples/kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/kustomize/skaffold-kustomize-args.yaml b/integration/examples/kustomize/skaffold-kustomize-args.yaml index 815e8a664f7..5dc96089794 100644 --- a/integration/examples/kustomize/skaffold-kustomize-args.yaml +++ b/integration/examples/kustomize/skaffold-kustomize-args.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config deploy: kustomize: diff --git a/integration/examples/kustomize/skaffold.yaml b/integration/examples/kustomize/skaffold.yaml index 10480c65c8f..6b2216749e7 100644 --- a/integration/examples/kustomize/skaffold.yaml +++ b/integration/examples/kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config deploy: kustomize: {} diff --git a/integration/examples/microservices/skaffold.yaml b/integration/examples/microservices/skaffold.yaml index b4714d5aa6e..a9da68e7d7a 100644 --- a/integration/examples/microservices/skaffold.yaml +++ b/integration/examples/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/multi-config-microservices/base/skaffold.yaml b/integration/examples/multi-config-microservices/base/skaffold.yaml index 9b6f530f97f..2436585792e 100644 --- a/integration/examples/multi-config-microservices/base/skaffold.yaml +++ b/integration/examples/multi-config-microservices/base/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml b/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml index 456b33284fc..19a5e82a121 100644 --- a/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml +++ b/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: app-config diff --git a/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml b/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml index 6cabbd2ebc7..3d4c45c88a6 100644 --- a/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml +++ b/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: web-config diff --git a/integration/examples/multi-config-microservices/skaffold.yaml b/integration/examples/multi-config-microservices/skaffold.yaml index cf2172417fe..03a07b81ed3 100644 --- a/integration/examples/multi-config-microservices/skaffold.yaml +++ b/integration/examples/multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config requires: - path: ./leeroy-app diff --git a/integration/examples/nodejs/skaffold.yaml b/integration/examples/nodejs/skaffold.yaml index 3e423ee4117..065692d3087 100644 --- a/integration/examples/nodejs/skaffold.yaml +++ b/integration/examples/nodejs/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: diff --git a/integration/examples/profile-patches/skaffold.yaml b/integration/examples/profile-patches/skaffold.yaml index 89c5551995b..1757efe6229 100644 --- a/integration/examples/profile-patches/skaffold.yaml +++ b/integration/examples/profile-patches/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: # only build and deploy "base-service" on main profile diff --git a/integration/examples/profiles/skaffold.yaml b/integration/examples/profiles/skaffold.yaml index 88efd92dc79..152ae750aae 100644 --- a/integration/examples/profiles/skaffold.yaml +++ b/integration/examples/profiles/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: # only build and deploy "world-service" on main profile diff --git a/integration/examples/react-reload/skaffold.yaml b/integration/examples/react-reload/skaffold.yaml index 93b80760296..87caba6f0d8 100644 --- a/integration/examples/react-reload/skaffold.yaml +++ b/integration/examples/react-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/remote-multi-config-microservices/skaffold.yaml b/integration/examples/remote-multi-config-microservices/skaffold.yaml index 78708e84bc3..01e29e70eb6 100644 --- a/integration/examples/remote-multi-config-microservices/skaffold.yaml +++ b/integration/examples/remote-multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config requires: - git: diff --git a/integration/examples/ruby/skaffold.yaml b/integration/examples/ruby/skaffold.yaml index 01752662caa..025a8a3966e 100644 --- a/integration/examples/ruby/skaffold.yaml +++ b/integration/examples/ruby/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/simple-artifact-dependency/skaffold.yaml b/integration/examples/simple-artifact-dependency/skaffold.yaml index 9ef02451c1e..2e3f7c69d21 100644 --- a/integration/examples/simple-artifact-dependency/skaffold.yaml +++ b/integration/examples/simple-artifact-dependency/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/structure-tests/skaffold.yaml b/integration/examples/structure-tests/skaffold.yaml index 004b3c52169..0837b660831 100644 --- a/integration/examples/structure-tests/skaffold.yaml +++ b/integration/examples/structure-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/tagging-with-environment-variables/skaffold.yaml b/integration/examples/tagging-with-environment-variables/skaffold.yaml index 5e3e539f76f..9e2ec8042a1 100644 --- a/integration/examples/tagging-with-environment-variables/skaffold.yaml +++ b/integration/examples/tagging-with-environment-variables/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/examples/templated-fields/skaffold.yaml b/integration/examples/templated-fields/skaffold.yaml index 4f5c9a586d5..f9a969ddae9 100644 --- a/integration/examples/templated-fields/skaffold.yaml +++ b/integration/examples/templated-fields/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: my-app diff --git a/integration/examples/typescript/skaffold.yaml b/integration/examples/typescript/skaffold.yaml index f66439034a3..83b11c4e0e4 100644 --- a/integration/examples/typescript/skaffold.yaml +++ b/integration/examples/typescript/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: diff --git a/integration/testdata/build-dependencies/skaffold.yaml b/integration/testdata/build-dependencies/skaffold.yaml index cf12b0982f1..448307119b4 100644 --- a/integration/testdata/build-dependencies/skaffold.yaml +++ b/integration/testdata/build-dependencies/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: tagPolicy: diff --git a/integration/testdata/build/secret/skaffold.yaml b/integration/testdata/build/secret/skaffold.yaml index cd5d491060b..7955b73bc07 100644 --- a/integration/testdata/build/secret/skaffold.yaml +++ b/integration/testdata/build/secret/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: local: diff --git a/integration/testdata/build/skaffold.yaml b/integration/testdata/build/skaffold.yaml index a27a5b15c0a..12a67f2732d 100644 --- a/integration/testdata/build/skaffold.yaml +++ b/integration/testdata/build/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: local: diff --git a/integration/testdata/build/squash/skaffold.yaml b/integration/testdata/build/squash/skaffold.yaml index df9173cebcb..6a08d2df6e8 100644 --- a/integration/testdata/build/squash/skaffold.yaml +++ b/integration/testdata/build/squash/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/build/ssh/skaffold.yaml b/integration/testdata/build/ssh/skaffold.yaml index e58f3563f94..bc39442df92 100644 --- a/integration/testdata/build/ssh/skaffold.yaml +++ b/integration/testdata/build/ssh/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: local: diff --git a/integration/testdata/custom-test/skaffold.yaml b/integration/testdata/custom-test/skaffold.yaml index 0caea5527db..5ba5124a165 100644 --- a/integration/testdata/custom-test/skaffold.yaml +++ b/integration/testdata/custom-test/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/debug/skaffold.yaml b/integration/testdata/debug/skaffold.yaml index f8278c4fccf..2804b58d0bc 100644 --- a/integration/testdata/debug/skaffold.yaml +++ b/integration/testdata/debug/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/deploy-multiple/skaffold.yaml b/integration/testdata/deploy-multiple/skaffold.yaml index 7d0840cb987..4dfceaa17b7 100644 --- a/integration/testdata/deploy-multiple/skaffold.yaml +++ b/integration/testdata/deploy-multiple/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/dev/skaffold.yaml b/integration/testdata/dev/skaffold.yaml index dcae4c34100..ff24bad8d3e 100644 --- a/integration/testdata/dev/skaffold.yaml +++ b/integration/testdata/dev/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/diagnose/multi-config/diagnose.tmpl b/integration/testdata/diagnose/multi-config/diagnose.tmpl index 1bb9434ebec..31ce9726fb6 100644 --- a/integration/testdata/diagnose/multi-config/diagnose.tmpl +++ b/integration/testdata/diagnose/multi-config/diagnose.tmpl @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: cfg2 @@ -19,7 +19,7 @@ deploy: logs: prefix: container --- -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: cfg3 @@ -40,7 +40,7 @@ deploy: logs: prefix: container --- -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/diagnose/multi-config/skaffold.yaml b/integration/testdata/diagnose/multi-config/skaffold.yaml index 8be047b0125..c24c805986b 100644 --- a/integration/testdata/diagnose/multi-config/skaffold.yaml +++ b/integration/testdata/diagnose/multi-config/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config requires: - path: ./skaffold2.yaml diff --git a/integration/testdata/diagnose/multi-config/skaffold2.yaml b/integration/testdata/diagnose/multi-config/skaffold2.yaml index b30c5589d3d..ad7d463bd57 100644 --- a/integration/testdata/diagnose/multi-config/skaffold2.yaml +++ b/integration/testdata/diagnose/multi-config/skaffold2.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: cfg2 diff --git a/integration/testdata/diagnose/multi-config/skaffold3.yaml b/integration/testdata/diagnose/multi-config/skaffold3.yaml index d9e68338aea..ce3d0ab1052 100644 --- a/integration/testdata/diagnose/multi-config/skaffold3.yaml +++ b/integration/testdata/diagnose/multi-config/skaffold3.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: cfg3 diff --git a/integration/testdata/diagnose/temp-config/diagnose.tmpl b/integration/testdata/diagnose/temp-config/diagnose.tmpl index edc5722554b..662b4eb9e27 100644 --- a/integration/testdata/diagnose/temp-config/diagnose.tmpl +++ b/integration/testdata/diagnose/temp-config/diagnose.tmpl @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/diagnose/temp-config/skaffold.yaml b/integration/testdata/diagnose/temp-config/skaffold.yaml index b30814ac310..5ceabd66cb8 100644 --- a/integration/testdata/diagnose/temp-config/skaffold.yaml +++ b/integration/testdata/diagnose/temp-config/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/gke_loadbalancer/skaffold.yaml b/integration/testdata/gke_loadbalancer/skaffold.yaml index bc3dfbd5f6f..8c61bd245d9 100644 --- a/integration/testdata/gke_loadbalancer/skaffold.yaml +++ b/integration/testdata/gke_loadbalancer/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/hello/skaffold.yaml b/integration/testdata/hello/skaffold.yaml index 4eb2ebf21a1..af3d8ee8a3e 100644 --- a/integration/testdata/hello/skaffold.yaml +++ b/integration/testdata/hello/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/init/compose/skaffold.yaml b/integration/testdata/init/compose/skaffold.yaml index 1e7ee2f2e4b..2438180086a 100644 --- a/integration/testdata/init/compose/skaffold.yaml +++ b/integration/testdata/init/compose/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: compose diff --git a/integration/testdata/init/hello-with-manifest/skaffold.yaml b/integration/testdata/init/hello-with-manifest/skaffold.yaml index 6d9cf0fbe8f..7664c8e5037 100644 --- a/integration/testdata/init/hello-with-manifest/skaffold.yaml +++ b/integration/testdata/init/hello-with-manifest/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: hello-with-manifest diff --git a/integration/testdata/inspect/cluster/skaffold.add.default.yaml b/integration/testdata/inspect/cluster/skaffold.add.default.yaml index 8f42a199505..d5e0c773e1d 100644 --- a/integration/testdata/inspect/cluster/skaffold.add.default.yaml +++ b/integration/testdata/inspect/cluster/skaffold.add.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.add.profile.yaml b/integration/testdata/inspect/cluster/skaffold.add.profile.yaml index 1ba90787b42..ed6d1d4145a 100644 --- a/integration/testdata/inspect/cluster/skaffold.add.profile.yaml +++ b/integration/testdata/inspect/cluster/skaffold.add.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.cluster.yaml b/integration/testdata/inspect/cluster/skaffold.cluster.yaml index 3d0cdd541f7..490cba363cd 100644 --- a/integration/testdata/inspect/cluster/skaffold.cluster.yaml +++ b/integration/testdata/inspect/cluster/skaffold.cluster.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.local.yaml b/integration/testdata/inspect/cluster/skaffold.local.yaml index 7f2b3e6933a..496152e8a70 100644 --- a/integration/testdata/inspect/cluster/skaffold.local.yaml +++ b/integration/testdata/inspect/cluster/skaffold.local.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.modified.default.yaml b/integration/testdata/inspect/cluster/skaffold.modified.default.yaml index 6fc0518ca44..d30e55451fb 100644 --- a/integration/testdata/inspect/cluster/skaffold.modified.default.yaml +++ b/integration/testdata/inspect/cluster/skaffold.modified.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml b/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml index 877ee09372a..5c98b568c6e 100644 --- a/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml +++ b/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.add.default.yaml b/integration/testdata/inspect/gcb/skaffold.add.default.yaml index f5df8d24a2b..7968a1810a3 100644 --- a/integration/testdata/inspect/gcb/skaffold.add.default.yaml +++ b/integration/testdata/inspect/gcb/skaffold.add.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.add.profile.yaml b/integration/testdata/inspect/gcb/skaffold.add.profile.yaml index dbceb89612c..1bdce8f866a 100644 --- a/integration/testdata/inspect/gcb/skaffold.add.profile.yaml +++ b/integration/testdata/inspect/gcb/skaffold.add.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.gcb.yaml b/integration/testdata/inspect/gcb/skaffold.gcb.yaml index f29d298cfee..3b1987ca21d 100644 --- a/integration/testdata/inspect/gcb/skaffold.gcb.yaml +++ b/integration/testdata/inspect/gcb/skaffold.gcb.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.local.yaml b/integration/testdata/inspect/gcb/skaffold.local.yaml index 49f342e8398..db36bbcbb6a 100644 --- a/integration/testdata/inspect/gcb/skaffold.local.yaml +++ b/integration/testdata/inspect/gcb/skaffold.local.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.modified.default.yaml b/integration/testdata/inspect/gcb/skaffold.modified.default.yaml index beb00c83f6b..c92008b7a9b 100644 --- a/integration/testdata/inspect/gcb/skaffold.modified.default.yaml +++ b/integration/testdata/inspect/gcb/skaffold.modified.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml b/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml index af42db675c8..aeb1cdbe3b5 100644 --- a/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml +++ b/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/jib/skaffold.yaml b/integration/testdata/jib/skaffold.yaml index 073b3108c95..0e37034ee3d 100644 --- a/integration/testdata/jib/skaffold.yaml +++ b/integration/testdata/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-explicit-repo/skaffold.yaml b/integration/testdata/kaniko-explicit-repo/skaffold.yaml index b77d0193e47..a04baf4b2c1 100644 --- a/integration/testdata/kaniko-explicit-repo/skaffold.yaml +++ b/integration/testdata/kaniko-explicit-repo/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml b/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml index 641084e39f9..a0d647ceaeb 100644 --- a/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml +++ b/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-insecure-registry/skaffold.yaml b/integration/testdata/kaniko-insecure-registry/skaffold.yaml index c1eedc6b29e..b049683ee6a 100644 --- a/integration/testdata/kaniko-insecure-registry/skaffold.yaml +++ b/integration/testdata/kaniko-insecure-registry/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config profiles: - name: build-artifact diff --git a/integration/testdata/kaniko-microservices/skaffold.yaml b/integration/testdata/kaniko-microservices/skaffold.yaml index 118a0534684..c5eb751b668 100644 --- a/integration/testdata/kaniko-microservices/skaffold.yaml +++ b/integration/testdata/kaniko-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-sub-folder/skaffold.yaml b/integration/testdata/kaniko-sub-folder/skaffold.yaml index 9fb13de959c..10aaad18a63 100644 --- a/integration/testdata/kaniko-sub-folder/skaffold.yaml +++ b/integration/testdata/kaniko-sub-folder/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-target/skaffold.yaml b/integration/testdata/kaniko-target/skaffold.yaml index 458ad10e8b8..f815d6440a0 100644 --- a/integration/testdata/kaniko-target/skaffold.yaml +++ b/integration/testdata/kaniko-target/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/tagPolicy/skaffold.yaml b/integration/testdata/tagPolicy/skaffold.yaml index 516c8842502..93e2bdf3772 100644 --- a/integration/testdata/tagPolicy/skaffold.yaml +++ b/integration/testdata/tagPolicy/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/integration/testdata/test-events/skaffold.yaml b/integration/testdata/test-events/skaffold.yaml index a5dd6afbcf8..28868437803 100644 --- a/integration/testdata/test-events/skaffold.yaml +++ b/integration/testdata/test-events/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml index 73d25a755f8..92eee376be0 100644 --- a/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: allcli diff --git a/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml index 2707b91dc9d..853e108ac23 100644 --- a/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: getting-started-kustomize diff --git a/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml index 074853d3945..038c48ced16 100644 --- a/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: hello diff --git a/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml index 7997cf5ce75..599b9497af0 100644 --- a/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: hello diff --git a/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml index 83de2727b5d..0073704afc0 100644 --- a/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: ignore-tags diff --git a/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml index 720ae65664a..43d8ee718f4 100644 --- a/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: microservices diff --git a/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml index 351ac015d2b..af20c28494c 100644 --- a/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: windows diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index 961f303a683..369a74e7aab 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -25,8 +25,8 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) -// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file. -const Version string = "skaffold/v2beta18" +// This config version is not yet released, it is SAFE TO MODIFY the structs in this file. +const Version string = "skaffold/v2beta19" // NewSkaffoldConfig creates a SkaffoldConfig func NewSkaffoldConfig() util.VersionedConfig { diff --git a/pkg/skaffold/schema/v2beta17/upgrade.go b/pkg/skaffold/schema/v2beta17/upgrade.go index c17f7a2769b..e0de602e465 100755 --- a/pkg/skaffold/schema/v2beta17/upgrade.go +++ b/pkg/skaffold/schema/v2beta17/upgrade.go @@ -17,8 +17,8 @@ limitations under the License. package v2beta17 import ( - next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta18" pkgutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) diff --git a/pkg/skaffold/schema/v2beta17/upgrade_test.go b/pkg/skaffold/schema/v2beta17/upgrade_test.go index 163ca6b3491..2a799173ba9 100755 --- a/pkg/skaffold/schema/v2beta17/upgrade_test.go +++ b/pkg/skaffold/schema/v2beta17/upgrade_test.go @@ -19,7 +19,7 @@ package v2beta17 import ( "testing" - next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta18" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/schema/v2beta18/config.go b/pkg/skaffold/schema/v2beta18/config.go new file mode 100755 index 00000000000..0eeda77090f --- /dev/null +++ b/pkg/skaffold/schema/v2beta18/config.go @@ -0,0 +1,1482 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2beta18 + +import ( + "encoding/json" + + v1 "k8s.io/api/core/v1" + "sigs.k8s.io/kustomize/kyaml/yaml" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" +) + +// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file. +const Version string = "skaffold/v2beta18" + +// NewSkaffoldConfig creates a SkaffoldConfig +func NewSkaffoldConfig() util.VersionedConfig { + return new(SkaffoldConfig) +} + +// SkaffoldConfig holds the fields parsed from the Skaffold configuration file (skaffold.yaml). +type SkaffoldConfig struct { + // APIVersion is the version of the configuration. + APIVersion string `yaml:"apiVersion" yamltags:"required"` + + // Kind is always `Config`. Defaults to `Config`. + Kind string `yaml:"kind" yamltags:"required"` + + // Metadata holds additional information about the config. + Metadata Metadata `yaml:"metadata,omitempty"` + + // Dependencies describes a list of other required configs for the current config. + Dependencies []ConfigDependency `yaml:"requires,omitempty"` + + // Pipeline defines the Build/Test/Deploy phases. + Pipeline `yaml:",inline"` + + // Profiles *beta* can override be used to `build`, `test` or `deploy` configuration. + Profiles []Profile `yaml:"profiles,omitempty"` +} + +// Metadata holds an optional name of the project. +type Metadata struct { + // Name is an identifier for the project. + Name string `yaml:"name,omitempty"` +} + +// Pipeline describes a Skaffold pipeline. +type Pipeline struct { + // Build describes how images are built. + Build BuildConfig `yaml:"build,omitempty"` + + // Test describes how images are tested. + Test []*TestCase `yaml:"test,omitempty"` + + // Deploy describes how images are deployed. + Deploy DeployConfig `yaml:"deploy,omitempty"` + + // PortForward describes user defined resources to port-forward. + PortForward []*PortForwardResource `yaml:"portForward,omitempty"` +} + +// GitInfo contains information on the origin of skaffold configurations cloned from a git repository. +type GitInfo struct { + // Repo is the git repository the package should be cloned from. e.g. `https://github.com/GoogleContainerTools/skaffold.git`. + Repo string `yaml:"repo" yamltags:"required"` + + // Path is the relative path from the repo root to the skaffold configuration file. eg. `getting-started/skaffold.yaml`. + Path string `yaml:"path,omitempty"` + + // Ref is the git ref the package should be cloned from. eg. `master` or `main`. + Ref string `yaml:"ref,omitempty"` + + // Sync when set to `true` will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to `false`. + Sync *bool `yaml:"sync,omitempty"` +} + +// ConfigDependency describes a dependency on another skaffold configuration. +type ConfigDependency struct { + // Names includes specific named configs within the file path. If empty, then all configs in the file are included. + Names []string `yaml:"configs,omitempty"` + + // Path describes the path to the file containing the required configs. + Path string `yaml:"path,omitempty" skaffold:"filepath" yamltags:"oneOf=paths"` + + // GitRepo describes a remote git repository containing the required configs. + GitRepo *GitInfo `yaml:"git,omitempty" yamltags:"oneOf=paths"` + + // ActiveProfiles describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config. + ActiveProfiles []ProfileDependency `yaml:"activeProfiles,omitempty"` +} + +// ProfileDependency describes a mapping from referenced config profiles to the current config profiles. +// If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles. +type ProfileDependency struct { + // Name describes name of the profile to activate in the dependency config. It should exist in the dependency config. + Name string `yaml:"name" yamltags:"required"` + + // ActivatedBy describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated. + ActivatedBy []string `yaml:"activatedBy,omitempty"` +} + +func (c *SkaffoldConfig) GetVersion() string { + return c.APIVersion +} + +// ResourceType describes the Kubernetes resource types used for port forwarding. +type ResourceType string + +// PortForwardResource describes a resource to port forward. +type PortForwardResource struct { + // Type is the Kubernetes type that should be port forwarded. + // Acceptable resource types include: `Service`, `Pod` and Controller resource type that has a pod spec: `ReplicaSet`, `ReplicationController`, `Deployment`, `StatefulSet`, `DaemonSet`, `Job`, `CronJob`. + Type ResourceType `yaml:"resourceType,omitempty"` + + // Name is the name of the Kubernetes resource to port forward. + Name string `yaml:"resourceName,omitempty"` + + // Namespace is the namespace of the resource to port forward. + Namespace string `yaml:"namespace,omitempty"` + + // Port is the resource port that will be forwarded. + Port util.IntOrString `yaml:"port,omitempty"` + + // Address is the local address to bind to. Defaults to the loopback address 127.0.0.1. + Address string `yaml:"address,omitempty"` + + // LocalPort is the local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. *Optional*. + LocalPort int `yaml:"localPort,omitempty"` +} + +// BuildConfig contains all the configuration for the build steps. +type BuildConfig struct { + // Artifacts lists the images you're going to be building. + Artifacts []*Artifact `yaml:"artifacts,omitempty"` + + // InsecureRegistries is a list of registries declared by the user to be insecure. + // These registries will be connected to via HTTP instead of HTTPS. + InsecureRegistries []string `yaml:"insecureRegistries,omitempty"` + + // TagPolicy *beta* determines how images are tagged. + // A few strategies are provided here, although you most likely won't need to care! + // If not specified, it defaults to `gitCommit: {variant: Tags}`. + TagPolicy TagPolicy `yaml:"tagPolicy,omitempty"` + + BuildType `yaml:",inline"` +} + +// TagPolicy contains all the configuration for the tagging step. +type TagPolicy struct { + // GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. + GitTagger *GitTagger `yaml:"gitCommit,omitempty" yamltags:"oneOf=tag"` + + // ShaTagger *beta* tags images with their sha256 digest. + ShaTagger *ShaTagger `yaml:"sha256,omitempty" yamltags:"oneOf=tag"` + + // EnvTemplateTagger *beta* tags images with a configurable template string. + EnvTemplateTagger *EnvTemplateTagger `yaml:"envTemplate,omitempty" yamltags:"oneOf=tag"` + + // DateTimeTagger *beta* tags images with the build timestamp. + DateTimeTagger *DateTimeTagger `yaml:"dateTime,omitempty" yamltags:"oneOf=tag"` + + // CustomTemplateTagger *beta* tags images with a configurable template string *composed of other taggers*. + CustomTemplateTagger *CustomTemplateTagger `yaml:"customTemplate,omitempty" yamltags:"oneOf=tag"` + + // InputDigest *beta* tags images with their sha256 digest of their content. + InputDigest *InputDigest `yaml:"inputDigest,omitempty" yamltags:"oneOf=tag"` +} + +// ShaTagger *beta* tags images with their sha256 digest. +type ShaTagger struct{} + +// InputDigest *beta* tags hashes the image content. +type InputDigest struct{} + +// GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. +type GitTagger struct { + // Variant determines the behavior of the git tagger. Valid variants are: + // `Tags` (default): use git tags or fall back to abbreviated commit hash. + // `CommitSha`: use the full git commit sha. + // `AbbrevCommitSha`: use the abbreviated git commit sha. + // `TreeSha`: use the full tree hash of the artifact workingdir. + // `AbbrevTreeSha`: use the abbreviated tree hash of the artifact workingdir. + Variant string `yaml:"variant,omitempty"` + + // Prefix adds a fixed prefix to the tag. + Prefix string `yaml:"prefix,omitempty"` + + // IgnoreChanges specifies whether to omit the `-dirty` postfix if there are uncommitted changes. + IgnoreChanges bool `yaml:"ignoreChanges,omitempty"` +} + +// EnvTemplateTagger *beta* tags images with a configurable template string. +type EnvTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the current environment, + // with those variables injected. + // For example: `{{.RELEASE}}`. + Template string `yaml:"template,omitempty" yamltags:"required"` +} + +// DateTimeTagger *beta* tags images with the build timestamp. +type DateTimeTagger struct { + // Format formats the date and time. + // See [#Time.Format](https://golang.org/pkg/time/#Time.Format). + // Defaults to `2006-01-02_15-04-05.999_MST`. + Format string `yaml:"format,omitempty"` + + // TimeZone sets the timezone for the date and time. + // See [Time.LoadLocation](https://golang.org/pkg/time/#Time.LoadLocation). + // Defaults to the local timezone. + TimeZone string `yaml:"timezone,omitempty"` +} + +// CustomTemplateTagger *beta* tags images with a configurable template string. +type CustomTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the provided components with those variables injected. + // For example: `{{.DATE}}` where DATE references a TaggerComponent. + Template string `yaml:"template,omitempty" yamltags:"required"` + + // Components lists TaggerComponents that the template (see field above) can be executed against. + Components []TaggerComponent `yaml:"components,omitempty"` +} + +// TaggerComponent *beta* is a component of CustomTemplateTagger. +type TaggerComponent struct { + // Name is an identifier for the component. + Name string `yaml:"name,omitempty"` + + // Component is a tagging strategy to be used in CustomTemplateTagger. + Component TagPolicy `yaml:",inline" yamltags:"skipTrim"` +} + +// BuildType contains the specific implementation and parameters needed +// for the build step. Only one field should be populated. +type BuildType struct { + // LocalBuild *beta* describes how to do a build on the local docker daemon + // and optionally push to a repository. + LocalBuild *LocalBuild `yaml:"local,omitempty" yamltags:"oneOf=build"` + + // GoogleCloudBuild *beta* describes how to do a remote build on + // [Google Cloud Build](https://cloud.google.com/cloud-build/). + GoogleCloudBuild *GoogleCloudBuild `yaml:"googleCloudBuild,omitempty" yamltags:"oneOf=build"` + + // Cluster *beta* describes how to do an on-cluster build. + Cluster *ClusterDetails `yaml:"cluster,omitempty" yamltags:"oneOf=build"` +} + +// LocalBuild *beta* describes how to do a build on the local docker daemon +// and optionally push to a repository. +type LocalBuild struct { + // Push should images be pushed to a registry. + // If not specified, images are pushed only if the current Kubernetes context + // connects to a remote cluster. + Push *bool `yaml:"push,omitempty"` + + // TryImportMissing whether to attempt to import artifacts from + // Docker (either a local or remote registry) if not in the cache. + TryImportMissing bool `yaml:"tryImportMissing,omitempty"` + + // UseDockerCLI use `docker` command-line interface instead of Docker Engine APIs. + UseDockerCLI bool `yaml:"useDockerCLI,omitempty"` + + // UseBuildkit use BuildKit to build Docker images. + UseBuildkit bool `yaml:"useBuildkit,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `1`. + Concurrency *int `yaml:"concurrency,omitempty"` +} + +// GoogleCloudBuild *beta* describes how to do a remote build on +// [Google Cloud Build](https://cloud.google.com/cloud-build/docs/). +// Docker and Jib artifacts can be built on Cloud Build. The `projectId` needs +// to be provided and the currently logged in user should be given permissions to trigger +// new builds. +type GoogleCloudBuild struct { + // ProjectID is the ID of your Cloud Platform Project. + // If it is not provided, Skaffold will guess it from the image name. + // For example, given the artifact image name `gcr.io/myproject/image`, Skaffold + // will use the `myproject` GCP project. + ProjectID string `yaml:"projectId,omitempty"` + + // DiskSizeGb is the disk size of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + DiskSizeGb int64 `yaml:"diskSizeGb,omitempty"` + + // MachineType is the type of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + MachineType string `yaml:"machineType,omitempty"` + + // Timeout is the amount of time (in seconds) that this build should be allowed to run. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build). + Timeout string `yaml:"timeout,omitempty"` + + // Logging specifies the logging mode. + // Valid modes are: + // `LOGGING_UNSPECIFIED`: The service determines the logging mode. + // `LEGACY`: Stackdriver logging and Cloud Storage logging are enabled (default). + // `GCS_ONLY`: Only Cloud Storage logging is enabled. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#loggingmode). + Logging string `yaml:"logging,omitempty"` + + // LogStreamingOption specifies the behavior when writing build logs to Google Cloud Storage. + // Valid options are: + // `STREAM_DEFAULT`: Service may automatically determine build log streaming behavior. + // `STREAM_ON`: Build logs should be streamed to Google Cloud Storage. + // `STREAM_OFF`: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#logstreamingoption). + LogStreamingOption string `yaml:"logStreamingOption,omitempty"` + + // DockerImage is the image that runs a Docker build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/docker`. + DockerImage string `yaml:"dockerImage,omitempty"` + + // KanikoImage is the image that runs a Kaniko build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/kaniko-project/executor`. + KanikoImage string `yaml:"kanikoImage,omitempty"` + + // MavenImage is the image that runs a Maven build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/mvn`. + MavenImage string `yaml:"mavenImage,omitempty"` + + // GradleImage is the image that runs a Gradle build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/gradle`. + GradleImage string `yaml:"gradleImage,omitempty"` + + // PackImage is the image that runs a Cloud Native Buildpacks build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/k8s-skaffold/pack`. + PackImage string `yaml:"packImage,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // WorkerPool configures a pool of workers to run the build. + WorkerPool string `yaml:"workerPool,omitempty"` +} + +// KanikoCache configures Kaniko caching. If a cache is specified, Kaniko will +// use a remote cache which will speed up builds. +type KanikoCache struct { + // Repo is a remote repository to store cached layers. If none is specified, one will be + // inferred from the image name. See [Kaniko Caching](https://github.com/GoogleContainerTools/kaniko#caching). + Repo string `yaml:"repo,omitempty"` + // HostPath specifies a path on the host that is mounted to each pod as read only cache volume containing base images. + // If set, must exist on each node and prepopulated with kaniko-warmer. + HostPath string `yaml:"hostPath,omitempty"` + // TTL Cache timeout in hours. + TTL string `yaml:"ttl,omitempty"` +} + +// ClusterDetails *beta* describes how to do an on-cluster build. +type ClusterDetails struct { + // HTTPProxy for kaniko pod. + HTTPProxy string `yaml:"HTTP_PROXY,omitempty"` + + // HTTPSProxy for kaniko pod. + HTTPSProxy string `yaml:"HTTPS_PROXY,omitempty"` + + // PullSecretPath is the path to the Google Cloud service account secret key file. + PullSecretPath string `yaml:"pullSecretPath,omitempty"` + + // PullSecretName is the name of the Kubernetes secret for pulling base images + // and pushing the final image. If given, the secret needs to contain the Google Cloud + // service account secret key under the key `kaniko-secret`. + // Defaults to `kaniko-secret`. + PullSecretName string `yaml:"pullSecretName,omitempty"` + + // PullSecretMountPath is the path the pull secret will be mounted at within the running container. + PullSecretMountPath string `yaml:"pullSecretMountPath,omitempty"` + + // Namespace is the Kubernetes namespace. + // Defaults to current namespace in Kubernetes configuration. + Namespace string `yaml:"namespace,omitempty"` + + // Timeout is the amount of time (in seconds) that this build is allowed to run. + // Defaults to 20 minutes (`20m`). + Timeout string `yaml:"timeout,omitempty"` + + // DockerConfig describes how to mount the local Docker configuration into a pod. + DockerConfig *DockerConfig `yaml:"dockerConfig,omitempty"` + + // ServiceAccountName describes the Kubernetes service account to use for the pod. + // Defaults to 'default'. + ServiceAccountName string `yaml:"serviceAccount,omitempty"` + + // Tolerations describes the Kubernetes tolerations for the pod. + Tolerations []v1.Toleration `yaml:"tolerations,omitempty"` + + // NodeSelector describes the Kubernetes node selector for the pod. + NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` + + // Annotations describes the Kubernetes annotations for the pod. + Annotations map[string]string `yaml:"annotations,omitempty"` + + // RunAsUser defines the UID to request for running the container. + // If omitted, no SecurityContext will be specified for the pod and will therefore be inherited + // from the service account. + RunAsUser *int64 `yaml:"runAsUser,omitempty"` + + // Resources define the resource requirements for the kaniko pod. + Resources *ResourceRequirements `yaml:"resources,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // Volumes defines container mounts for ConfigMap and Secret resources. + Volumes []v1.Volume `yaml:"volumes,omitempty"` + + // RandomPullSecret adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomPullSecret bool `yaml:"randomPullSecret,omitempty"` + + // RandomDockerConfigSecret adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomDockerConfigSecret bool `yaml:"randomDockerConfigSecret,omitempty"` +} + +// DockerConfig contains information about the docker `config.json` to mount. +type DockerConfig struct { + // Path is the path to the docker `config.json`. + Path string `yaml:"path,omitempty"` + + // SecretName is the Kubernetes secret that contains the `config.json` Docker configuration. + // Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'. + SecretName string `yaml:"secretName,omitempty"` +} + +// ResourceRequirements describes the resource requirements for the kaniko pod. +type ResourceRequirements struct { + // Requests [resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Requests *ResourceRequirement `yaml:"requests,omitempty"` + + // Limits [resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Limits *ResourceRequirement `yaml:"limits,omitempty"` +} + +// ResourceRequirement stores the CPU/Memory requirements for the pod. +type ResourceRequirement struct { + // CPU the number cores to be used. + // For example: `2`, `2.0` or `200m`. + CPU string `yaml:"cpu,omitempty"` + + // Memory the amount of memory to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + Memory string `yaml:"memory,omitempty"` + + // EphemeralStorage the amount of Ephemeral storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + EphemeralStorage string `yaml:"ephemeralStorage,omitempty"` + + // ResourceStorage the amount of resource storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + ResourceStorage string `yaml:"resourceStorage,omitempty"` +} + +// TestCase is a list of tests to run on images that Skaffold builds. +type TestCase struct { + // ImageName is the artifact on which to run those tests. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image" yamltags:"required"` + + // Workspace is the directory containing the test sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // CustomTests lists the set of custom tests to run after an artifact is built. + CustomTests []CustomTest `yaml:"custom,omitempty"` + + // StructureTests lists the [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) + // to run on that artifact. + // For example: `["./test/*"]`. + StructureTests []string `yaml:"structureTests,omitempty" skaffold:"filepath"` + + // StructureTestArgs lists additional configuration arguments passed to `container-structure-test` binary. + // For example: `["--driver=tar", "--no-color", "-q"]`. + StructureTestArgs []string `yaml:"structureTestsArgs,omitempty"` +} + +// DeployConfig contains all the configuration needed by the deploy steps. +type DeployConfig struct { + DeployType `yaml:",inline"` + + // StatusCheck *beta* enables waiting for deployments to stabilize. + StatusCheck *bool `yaml:"statusCheck,omitempty"` + + // StatusCheckDeadlineSeconds *beta* is the deadline for deployments to stabilize in seconds. + StatusCheckDeadlineSeconds int `yaml:"statusCheckDeadlineSeconds,omitempty"` + + // KubeContext is the Kubernetes context that Skaffold should deploy to. + // For example: `minikube`. + KubeContext string `yaml:"kubeContext,omitempty"` + + // Logs configures how container logs are printed as a result of a deployment. + Logs LogsConfig `yaml:"logs,omitempty"` +} + +// DeployType contains the specific implementation and parameters needed +// for the deploy step. All three deployer types can be used at the same +// time for hybrid workflows. +type DeployType struct { + // HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. + HelmDeploy *HelmDeploy `yaml:"helm,omitempty"` + + // KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. + KptDeploy *KptDeploy `yaml:"kpt,omitempty"` + + // KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. + // You'll need a `kubectl` CLI version installed that's compatible with your cluster. + KubectlDeploy *KubectlDeploy `yaml:"kubectl,omitempty"` + + // KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. + KustomizeDeploy *KustomizeDeploy `yaml:"kustomize,omitempty"` +} + +// KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. +// You'll need a `kubectl` CLI version installed that's compatible with your cluster. +type KubectlDeploy struct { + // Manifests lists the Kubernetes yaml or json manifests. + // Defaults to `["k8s/*.yaml"]`. + Manifests []string `yaml:"manifests,omitempty" skaffold:"filepath"` + + // RemoteManifests lists Kubernetes manifests in remote clusters. + RemoteManifests []string `yaml:"remoteManifests,omitempty"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` +} + +// KubectlFlags are additional flags passed on the command +// line to kubectl either on every command (Global), on creations (Apply) +// or deletions (Delete). +type KubectlFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Apply are additional flags passed on creations (`kubectl apply`). + Apply []string `yaml:"apply,omitempty"` + + // Delete are additional flags passed on deletions (`kubectl delete`). + Delete []string `yaml:"delete,omitempty"` + + // DisableValidation passes the `--validate=false` flag to supported + // `kubectl` commands when enabled. + DisableValidation bool `yaml:"disableValidation,omitempty"` +} + +// HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. +type HelmDeploy struct { + // Releases is a list of Helm releases. + Releases []HelmRelease `yaml:"releases,omitempty" yamltags:"required"` + + // Flags are additional option flags that are passed on the command + // line to `helm`. + Flags HelmDeployFlags `yaml:"flags,omitempty"` +} + +// HelmDeployFlags are additional option flags that are passed on the command +// line to `helm`. +type HelmDeployFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Install are additional flags passed to (`helm install`). + Install []string `yaml:"install,omitempty"` + + // Upgrade are additional flags passed to (`helm upgrade`). + Upgrade []string `yaml:"upgrade,omitempty"` +} + +// KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. +type KustomizeDeploy struct { + // KustomizePaths is the path to Kustomization files. + // Defaults to `["."]`. + KustomizePaths []string `yaml:"paths,omitempty" skaffold:"filepath"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // BuildArgs are additional args passed to `kustomize build`. + BuildArgs []string `yaml:"buildArgs,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` +} + +// KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. +type KptDeploy struct { + // Dir is the path to the config directory (Required). + // By default, the Dir contains the application configurations, + // [kustomize config files](https://kubectl.docs.kubernetes.io/pages/examples/kustomize.html) + // and [declarative kpt functions](https://googlecontainertools.github.io/kpt/guides/consumer/function/#declarative-run). + Dir string `yaml:"dir" yamltags:"required" skaffold:"filepath"` + + // Fn adds additional configurations for `kpt fn`. + Fn KptFn `yaml:"fn,omitempty"` + + // Live adds additional configurations for `kpt live`. + Live KptLive `yaml:"live,omitempty"` +} + +// KptFn adds additional configurations used when calling `kpt fn`. +type KptFn struct { + // FnPath is the directory to discover the declarative kpt functions. + // If not provided, kpt deployer uses `kpt.Dir`. + FnPath string `yaml:"fnPath,omitempty" skaffold:"filepath"` + + // Image is a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath + // will be ignored. + Image string `yaml:"image,omitempty"` + + // NetworkName is the docker network name to run the kpt function containers (default "bridge"). + NetworkName string `yaml:"networkName,omitempty"` + + // GlobalScope sets the global scope for the kpt functions. see `kpt help fn run`. + GlobalScope bool `yaml:"globalScope,omitempty"` + + // Network enables network access for the kpt function containers. + Network bool `yaml:"network,omitempty"` + + // Mount is a list of storage options to mount to the fn image. + Mount []string `yaml:"mount,omitempty"` + + // SinkDir is the directory to where the manipulated resource output is stored. + SinkDir string `yaml:"sinkDir,omitempty" skaffold:"filepath"` +} + +// KptLive adds additional configurations used when calling `kpt live`. +type KptLive struct { + // Apply sets the kpt inventory directory. + Apply KptApplyInventory `yaml:"apply,omitempty"` + + // Options adds additional configurations for `kpt live apply` commands. + Options KptApplyOptions `yaml:"options,omitempty"` +} + +// KptApplyInventory sets the kpt inventory directory. +type KptApplyInventory struct { + // Dir is equivalent to the dir in `kpt live apply `. If not provided, + // kpt deployer will create a hidden directory `.kpt-hydrated` to store the manipulated + // resource output and the kpt inventory-template.yaml file. + Dir string `yaml:"dir,omitempty"` + + // InventoryID *alpha* is the identifier for a group of applied resources. + // This value is only needed when the `kpt live` is working on a pre-applied cluster resources. + InventoryID string `yaml:"inventoryID,omitempty"` + + // InventoryNamespace *alpha* sets the inventory namespace. + InventoryNamespace string `yaml:"inventoryNamespace,omitempty"` +} + +// KptApplyOptions adds additional configurations used when calling `kpt live apply`. +type KptApplyOptions struct { + // PollPeriod sets for the polling period for resource statuses. Default to 2s. + PollPeriod string `yaml:"pollPeriod,omitempty"` + + // PrunePropagationPolicy sets the propagation policy for pruning. + // Possible settings are Background, Foreground, Orphan. + // Default to "Background". + PrunePropagationPolicy string `yaml:"prunePropagationPolicy,omitempty"` + + // PruneTimeout sets the time threshold to wait for all pruned resources to be deleted. + PruneTimeout string `yaml:"pruneTimeout,omitempty"` + + // ReconcileTimeout sets the time threshold to wait for all resources to reach the current status. + ReconcileTimeout string `yaml:"reconcileTimeout,omitempty"` +} + +// HelmRelease describes a helm release to be deployed. +type HelmRelease struct { + // Name is the name of the Helm release. + // It accepts environment variables via the go template syntax. + Name string `yaml:"name,omitempty" yamltags:"required"` + + // ChartPath is the local path to a packaged Helm chart or an unpacked Helm chart directory. + ChartPath string `yaml:"chartPath,omitempty" yamltags:"oneOf=chartSource" skaffold:"filepath"` + + // RemoteChart refers to a remote Helm chart reference or URL. + RemoteChart string `yaml:"remoteChart,omitempty" yamltags:"oneOf=chartSource"` + + // ValuesFiles are the paths to the Helm `values` files. + ValuesFiles []string `yaml:"valuesFiles,omitempty" skaffold:"filepath"` + + // ArtifactOverrides are key value pairs where the + // key represents the parameter used in the `--set-string` Helm CLI flag to define a container + // image and the value corresponds to artifact i.e. `ImageName` defined in `Build.Artifacts` section. + // The resulting command-line is controlled by `ImageStrategy`. + ArtifactOverrides util.FlatMap `yaml:"artifactOverrides,omitempty"` + + // Namespace is the Kubernetes namespace. + Namespace string `yaml:"namespace,omitempty"` + + // Version is the version of the chart. + Version string `yaml:"version,omitempty"` + + // SetValues are key-value pairs. + // If present, Skaffold will send `--set` flag to Helm CLI and append all pairs after the flag. + SetValues util.FlatMap `yaml:"setValues,omitempty"` + + // SetValueTemplates are key-value pairs. + // If present, Skaffold will try to parse the value part of each key-value pair using + // environment variables in the system, then send `--set` flag to Helm CLI and append + // all parsed pairs after the flag. + SetValueTemplates util.FlatMap `yaml:"setValueTemplates,omitempty"` + + // SetFiles are key-value pairs. + // If present, Skaffold will send `--set-file` flag to Helm CLI and append all pairs after the flag. + SetFiles map[string]string `yaml:"setFiles,omitempty" skaffold:"filepath"` + + // CreateNamespace if `true`, Skaffold will send `--create-namespace` flag to Helm CLI. + // `--create-namespace` flag is available in Helm since version 3.2. + // Defaults is `false`. + CreateNamespace *bool `yaml:"createNamespace,omitempty"` + + // Wait if `true`, Skaffold will send `--wait` flag to Helm CLI. + // Defaults to `false`. + Wait bool `yaml:"wait,omitempty"` + + // RecreatePods if `true`, Skaffold will send `--recreate-pods` flag to Helm CLI + // when upgrading a new version of a chart in subsequent dev loop deploy. + // Defaults to `false`. + RecreatePods bool `yaml:"recreatePods,omitempty"` + + // SkipBuildDependencies should build dependencies be skipped. + // Ignored for `remoteChart`. + SkipBuildDependencies bool `yaml:"skipBuildDependencies,omitempty"` + + // UseHelmSecrets instructs skaffold to use secrets plugin on deployment. + UseHelmSecrets bool `yaml:"useHelmSecrets,omitempty"` + + // Repo specifies the helm repository for remote charts. + // If present, Skaffold will send `--repo` Helm CLI flag or flags. + Repo string `yaml:"repo,omitempty"` + + // UpgradeOnChange specifies whether to upgrade helm chart on code changes. + // Default is `true` when helm chart is local (has `chartPath`). + // Default is `false` when helm chart is remote (has `remoteChart`). + UpgradeOnChange *bool `yaml:"upgradeOnChange,omitempty"` + + // Overrides are key-value pairs. + // If present, Skaffold will build a Helm `values` file that overrides + // the original and use it to call Helm CLI (`--f` flag). + Overrides util.HelmOverrides `yaml:"overrides,omitempty"` + + // Packaged parameters for packaging helm chart (`helm package`). + Packaged *HelmPackaged `yaml:"packaged,omitempty"` + + // ImageStrategy controls how an `ArtifactOverrides` entry is + // turned into `--set-string` Helm CLI flag or flags. + ImageStrategy HelmImageStrategy `yaml:"imageStrategy,omitempty"` +} + +// HelmPackaged parameters for packaging helm chart (`helm package`). +type HelmPackaged struct { + // Version sets the `version` on the chart to this semver version. + Version string `yaml:"version,omitempty"` + + // AppVersion sets the `appVersion` on the chart to this version. + AppVersion string `yaml:"appVersion,omitempty"` +} + +// HelmImageStrategy adds image configurations to the Helm `values` file. +type HelmImageStrategy struct { + HelmImageConfig `yaml:",inline"` +} + +// HelmImageConfig describes an image configuration. +type HelmImageConfig struct { + // HelmFQNConfig is the image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`. + HelmFQNConfig *HelmFQNConfig `yaml:"fqn,omitempty" yamltags:"oneOf=helmImageStrategy"` + + // HelmConventionConfig is the image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`. + HelmConventionConfig *HelmConventionConfig `yaml:"helm,omitempty" yamltags:"oneOf=helmImageStrategy"` +} + +// HelmFQNConfig is the image config to use the FullyQualifiedImageName as param to set. +type HelmFQNConfig struct { + // Property defines the image config. + Property string `yaml:"property,omitempty"` +} + +// HelmConventionConfig is the image config in the syntax of image.repository and image.tag. +type HelmConventionConfig struct { + // ExplicitRegistry separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`. + ExplicitRegistry bool `yaml:"explicitRegistry,omitempty"` +} + +// LogsConfig configures how container logs are printed as a result of a deployment. +type LogsConfig struct { + // Prefix defines the prefix shown on each log line. Valid values are + // `container`: prefix logs lines with the name of the container. + // `podAndContainer`: prefix logs lines with the names of the pod and of the container. + // `auto`: same as `podAndContainer` except that the pod name is skipped if it's the same as the container name. + // `none`: don't add a prefix. + // Defaults to `auto`. + Prefix string `yaml:"prefix,omitempty"` +} + +// Artifact are the items that need to be built, along with the context in which +// they should be built. +type Artifact struct { + // ImageName is the name of the image to be built. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image,omitempty" yamltags:"required"` + + // Workspace is the directory containing the artifact's sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // Sync *beta* lists local files synced to pods instead + // of triggering an image build when modified. + // If no files are listed, sync all the files and infer the destination. + // Defaults to `infer: ["**/*"]`. + Sync *Sync `yaml:"sync,omitempty"` + + // ArtifactType describes how to build an artifact. + ArtifactType `yaml:",inline"` + + // Dependencies describes build artifacts that this artifact depends on. + Dependencies []*ArtifactDependency `yaml:"requires,omitempty"` +} + +// Sync *beta* specifies what files to sync into the container. +// This is a list of sync rules indicating the intent to sync for source files. +// If no files are listed, sync all the files and infer the destination. +// Defaults to `infer: ["**/*"]`. +type Sync struct { + // Manual lists manual sync rules indicating the source and destination. + Manual []*SyncRule `yaml:"manual,omitempty" yamltags:"oneOf=sync"` + + // Infer lists file patterns which may be synced into the container + // The container destination is inferred by the builder + // based on the instructions of a Dockerfile. + // Available for docker and kaniko artifacts and custom + // artifacts that declare dependencies on a dockerfile. + Infer []string `yaml:"infer,omitempty" yamltags:"oneOf=sync"` + + // Auto delegates discovery of sync rules to the build system. + // Only available for jib and buildpacks. + Auto *bool `yaml:"auto,omitempty" yamltags:"oneOf=sync"` +} + +// SyncRule specifies which local files to sync to remote folders. +type SyncRule struct { + // Src is a glob pattern to match local paths against. + // Directories should be delimited by `/` on all platforms. + // For example: `"css/**/*.css"`. + Src string `yaml:"src,omitempty" yamltags:"required"` + + // Dest is the destination path in the container where the files should be synced to. + // For example: `"app/"` + Dest string `yaml:"dest,omitempty" yamltags:"required"` + + // Strip specifies the path prefix to remove from the source path when + // transplanting the files into the destination folder. + // For example: `"css/"` + Strip string `yaml:"strip,omitempty"` +} + +// Profile is used to override any `build`, `test` or `deploy` configuration. +type Profile struct { + // Name is a unique profile name. + // For example: `profile-prod`. + Name string `yaml:"name,omitempty" yamltags:"required"` + + // Activation criteria by which a profile can be auto-activated. + // The profile is auto-activated if any one of the activations are triggered. + // An activation is triggered if all of the criteria (env, kubeContext, command) are triggered. + Activation []Activation `yaml:"activation,omitempty"` + + // Patches lists patches applied to the configuration. + // Patches use the JSON patch notation. + Patches []JSONPatch `yaml:"patches,omitempty"` + + // Pipeline contains the definitions to replace the default skaffold pipeline. + Pipeline `yaml:",inline"` +} + +// JSONPatch patch to be applied by a profile. +type JSONPatch struct { + // Op is the operation carried by the patch: `add`, `remove`, `replace`, `move`, `copy` or `test`. + // Defaults to `replace`. + Op string `yaml:"op,omitempty"` + + // Path is the position in the yaml where the operation takes place. + // For example, this targets the `dockerfile` of the first artifact built. + // For example: `/build/artifacts/0/docker/dockerfile`. + Path string `yaml:"path,omitempty" yamltags:"required"` + + // From is the source position in the yaml, used for `copy` or `move` operations. + From string `yaml:"from,omitempty"` + + // Value is the value to apply. Can be any portion of yaml. + Value *util.YamlpatchNode `yaml:"value,omitempty"` +} + +// Activation criteria by which a profile is auto-activated. +type Activation struct { + // Env is a `key=pattern` pair. The profile is auto-activated if an Environment + // Variable `key` matches the pattern. If the pattern starts with `!`, activation + // happens if the remaining pattern is _not_ matched. The pattern matches if the + // Environment Variable value is exactly `pattern`, or the regex `pattern` is + // found in it. An empty `pattern` (e.g. `env: "key="`) always only matches if + // the Environment Variable is undefined or empty. + // For example: `ENV=production` + Env string `yaml:"env,omitempty"` + + // KubeContext is a Kubernetes context for which the profile is auto-activated. + // For example: `minikube`. + KubeContext string `yaml:"kubeContext,omitempty"` + + // Command is a Skaffold command for which the profile is auto-activated. + // For example: `dev`. + Command string `yaml:"command,omitempty"` +} + +// ArtifactType describes how to build an artifact. +type ArtifactType struct { + // DockerArtifact *beta* describes an artifact built from a Dockerfile. + DockerArtifact *DockerArtifact `yaml:"docker,omitempty" yamltags:"oneOf=artifact"` + + // BazelArtifact *beta* requires bazel CLI to be installed and the sources to + // contain [Bazel](https://bazel.build/) configuration files. + BazelArtifact *BazelArtifact `yaml:"bazel,omitempty" yamltags:"oneOf=artifact"` + + // JibArtifact builds images using the + // [Jib plugins for Maven or Gradle](https://github.com/GoogleContainerTools/jib/). + JibArtifact *JibArtifact `yaml:"jib,omitempty" yamltags:"oneOf=artifact"` + + // KanikoArtifact builds images using [kaniko](https://github.com/GoogleContainerTools/kaniko). + KanikoArtifact *KanikoArtifact `yaml:"kaniko,omitempty" yamltags:"oneOf=artifact"` + + // BuildpackArtifact builds images using [Cloud Native Buildpacks](https://buildpacks.io/). + BuildpackArtifact *BuildpackArtifact `yaml:"buildpacks,omitempty" yamltags:"oneOf=artifact"` + + // CustomArtifact *beta* builds images using a custom build script written by the user. + CustomArtifact *CustomArtifact `yaml:"custom,omitempty" yamltags:"oneOf=artifact"` +} + +// ArtifactDependency describes a specific build dependency for an artifact. +type ArtifactDependency struct { + // ImageName is a reference to an artifact's image name. + ImageName string `yaml:"image" yamltags:"required"` + // Alias is a token that is replaced with the image reference in the builder definition files. + // For example, the `docker` builder will use the alias as a build-arg key. + // Defaults to the value of `image`. + Alias string `yaml:"alias,omitempty"` +} + +// BuildpackArtifact *alpha* describes an artifact built using [Cloud Native Buildpacks](https://buildpacks.io/). +// It can be used to build images out of project's sources without any additional configuration. +type BuildpackArtifact struct { + // Builder is the builder image used. + Builder string `yaml:"builder" yamltags:"required"` + + // RunImage overrides the stack's default run image. + RunImage string `yaml:"runImage,omitempty"` + + // Env are environment variables, in the `key=value` form, passed to the build. + // Values can use the go template syntax. + // For example: `["key1=value1", "key2=value2", "key3={{.ENV_VARIABLE}}"]`. + Env []string `yaml:"env,omitempty"` + + // Buildpacks is a list of strings, where each string is a specific buildpack to use with the builder. + // If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. + // Order matters. + Buildpacks []string `yaml:"buildpacks,omitempty"` + + // TrustBuilder indicates that the builder should be trusted. + TrustBuilder bool `yaml:"trustBuilder,omitempty"` + + // ProjectDescriptor is the path to the project descriptor file. + // Defaults to `project.toml` if it exists. + ProjectDescriptor string `yaml:"projectDescriptor,omitempty"` + + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *BuildpackDependencies `yaml:"dependencies,omitempty"` + + // Volumes support mounting host volumes into the container. + Volumes *[]BuildpackVolume `yaml:"volumes,omitempty"` +} + +// BuildpackDependencies *alpha* is used to specify dependencies for an artifact built by buildpacks. +type BuildpackDependencies struct { + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// BuildpackVolume *alpha* is used to mount host volumes or directories in the build container. +type BuildpackVolume struct { + // Host is the local volume or absolute directory of the path to mount. + Host string `yaml:"host" skaffold:"filepath" yamltags:"required"` + + // Target is the path where the file or directory is available in the container. + // It is strongly recommended to not specify locations under `/cnb` or `/layers`. + Target string `yaml:"target" yamltags:"required"` + + // Options specify a list of comma-separated mount options. + // Valid options are: + // `ro` (default): volume contents are read-only. + // `rw`: volume contents are readable and writable. + // `volume-opt==`: can be specified more than once, takes a key-value pair. + Options string `yaml:"options,omitempty"` +} + +// CustomArtifact *beta* describes an artifact built from a custom build script +// written by the user. It can be used to build images with builders that aren't directly integrated with skaffold. +type CustomArtifact struct { + // BuildCommand is the command executed to build the image. + BuildCommand string `yaml:"buildCommand,omitempty"` + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *CustomDependencies `yaml:"dependencies,omitempty"` +} + +// CustomDependencies *beta* is used to specify dependencies for an artifact built by a custom build script. +// Either `dockerfile` or `paths` should be specified for file watching to work as expected. +type CustomDependencies struct { + // Dockerfile should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies. + Dockerfile *DockerfileDependency `yaml:"dockerfile,omitempty" yamltags:"oneOf=dependency"` + + // Command represents a custom command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// CustomTest describes the custom test command provided by the user. +// Custom tests are run after an image build whenever build or test dependencies are changed. +type CustomTest struct { + // Command is the custom command to be executed. If the command exits with a non-zero return + // code, the test will be considered to have failed. + Command string `yaml:"command" yamltags:"required"` + + // TimeoutSeconds sets the wait time for skaffold for the command to complete. + // If unset or 0, Skaffold will wait until the command completes. + TimeoutSeconds int `yaml:"timeoutSeconds,omitempty"` + + // Dependencies are additional test-specific file dependencies; changes to these files will re-run this test. + Dependencies *CustomTestDependencies `yaml:"dependencies,omitempty"` +} + +// CustomTestDependencies is used to specify dependencies for custom test command. +// `paths` should be specified for file watching to work as expected. +type CustomTestDependencies struct { + // Command represents a command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths locates the file dependencies for the command relative to workspace. + // Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization. + // For example: `["src/test/**"]` + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both retest and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// DockerfileDependency *beta* is used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile. +type DockerfileDependency struct { + // Path locates the Dockerfile relative to workspace. + Path string `yaml:"path,omitempty"` + + // BuildArgs are key/value pairs used to resolve values of `ARG` instructions in a Dockerfile. + // Values can be constants or environment variables via the go template syntax. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` +} + +// KanikoArtifact describes an artifact built from a Dockerfile, +// with kaniko. +type KanikoArtifact struct { + + // Cleanup to clean the filesystem at the end of the build. + Cleanup bool `yaml:"cleanup,omitempty"` + + // Insecure if you want to push images to a plain HTTP registry. + Insecure bool `yaml:"insecure,omitempty"` + + // InsecurePull if you want to pull images from a plain HTTP registry. + InsecurePull bool `yaml:"insecurePull,omitempty"` + + // NoPush if you only want to build the image, without pushing to a registry. + NoPush bool `yaml:"noPush,omitempty"` + + // Force building outside of a container. + Force bool `yaml:"force,omitempty"` + + // LogTimestamp to add timestamps to log format. + LogTimestamp bool `yaml:"logTimestamp,omitempty"` + + // Reproducible is used to strip timestamps out of the built image. + Reproducible bool `yaml:"reproducible,omitempty"` + + // SingleSnapshot is takes a single snapshot of the filesystem at the end of the build. + // So only one layer will be appended to the base image. + SingleSnapshot bool `yaml:"singleSnapshot,omitempty"` + + // SkipTLS skips TLS certificate validation when pushing to a registry. + SkipTLS bool `yaml:"skipTLS,omitempty"` + + // SkipTLSVerifyPull skips TLS certificate validation when pulling from a registry. + SkipTLSVerifyPull bool `yaml:"skipTLSVerifyPull,omitempty"` + + // SkipUnusedStages builds only used stages if defined to true. + // Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile. + SkipUnusedStages bool `yaml:"skipUnusedStages,omitempty"` + + // UseNewRun to Use the experimental run implementation for detecting changes without requiring file system snapshots. + // In some cases, this may improve build performance by 75%. + UseNewRun bool `yaml:"useNewRun,omitempty"` + + // WhitelistVarRun is used to ignore `/var/run` when taking image snapshot. + // Set it to false to preserve /var/run/* in destination image. + WhitelistVarRun bool `yaml:"whitelistVarRun,omitempty"` + + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is to indicate which build stage is the target build stage. + Target string `yaml:"target,omitempty"` + + // InitImage is the image used to run init container which mounts kaniko context. + InitImage string `yaml:"initImage,omitempty"` + + // Image is the Docker image used by the Kaniko pod. + // Defaults to the latest released version of `gcr.io/kaniko-project/executor`. + Image string `yaml:"image,omitempty"` + + // DigestFile to specify a file in the container. This file will receive the digest of a built image. + // This can be used to automatically track the exact image built by kaniko. + DigestFile string `yaml:"digestFile,omitempty"` + + // ImageNameWithDigestFile specify a file to save the image name with digest of the built image to. + ImageNameWithDigestFile string `yaml:"imageNameWithDigestFile,omitempty"` + + // LogFormat to set the log format. + LogFormat string `yaml:"logFormat,omitempty"` + + // OCILayoutPath is to specify a directory in the container where the OCI image layout of a built image will be placed. + // This can be used to automatically track the exact image built by kaniko. + OCILayoutPath string `yaml:"ociLayoutPath,omitempty"` + + // RegistryMirror if you want to use a registry mirror instead of default `index.docker.io`. + RegistryMirror string `yaml:"registryMirror,omitempty"` + + // SnapshotMode is how Kaniko will snapshot the filesystem. + SnapshotMode string `yaml:"snapshotMode,omitempty"` + + // TarPath is path to save the image as a tarball at path instead of pushing the image. + TarPath string `yaml:"tarPath,omitempty"` + + // Verbosity to set the logging level. + Verbosity string `yaml:"verbosity,omitempty"` + + // InsecureRegistry is to use plain HTTP requests when accessing a registry. + InsecureRegistry []string `yaml:"insecureRegistry,omitempty"` + + // SkipTLSVerifyRegistry skips TLS certificate validation when accessing a registry. + SkipTLSVerifyRegistry []string `yaml:"skipTLSVerifyRegistry,omitempty"` + + // Env are environment variables passed to the kaniko pod. + // It also accepts environment variables via the go template syntax. + // For example: `[{"name": "key1", "value": "value1"}, {"name": "key2", "value": "value2"}, {"name": "key3", "value": "'{{.ENV_VARIABLE}}'"}]`. + Env []v1.EnvVar `yaml:"env,omitempty"` + + // Cache configures Kaniko caching. If a cache is specified, Kaniko will + // use a remote cache which will speed up builds. + Cache *KanikoCache `yaml:"cache,omitempty"` + + // RegistryCertificate is to provide a certificate for TLS communication with a given registry. + // my.registry.url: /path/to/the/certificate.cert is the expected format. + RegistryCertificate map[string]*string `yaml:"registryCertificate,omitempty"` + + // Label key: value to set some metadata to the final image. + // This is equivalent as using the LABEL within the Dockerfile. + Label map[string]*string `yaml:"label,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // It also accepts environment variables and generated values via the go template syntax. + // Exposed generated values: IMAGE_REPO, IMAGE_NAME, IMAGE_TAG. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // VolumeMounts are volume mounts passed to kaniko pod. + VolumeMounts []v1.VolumeMount `yaml:"volumeMounts,omitempty"` +} + +// DockerArtifact describes an artifact built from a Dockerfile, +// usually using `docker build`. +type DockerArtifact struct { + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is the Dockerfile target name to build. + Target string `yaml:"target,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // For example: `{"key1": "value1", "key2": "{{ .ENV_VAR }}"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // NetworkMode is passed through to docker and overrides the + // network configuration of docker builder. If unset, use whatever + // is configured in the underlying docker daemon. Valid modes are + // `host`: use the host's networking stack. + // `bridge`: use the bridged network configuration. + // `container:`: reuse another container's network stack. + // `none`: no networking in the container. + NetworkMode string `yaml:"network,omitempty"` + + // AddHost lists add host. + // For example: `["host1:ip1", "host2:ip2"]`. + AddHost []string `yaml:"addHost,omitempty"` + + // CacheFrom lists the Docker images used as cache sources. + // For example: `["golang:1.10.1-alpine3.7", "alpine:3.7"]`. + CacheFrom []string `yaml:"cacheFrom,omitempty"` + + // NoCache used to pass in --no-cache to docker build to prevent caching. + NoCache bool `yaml:"noCache,omitempty"` + + // Squash is used to pass in --squash to docker build to squash docker image layers into single layer. + Squash bool `yaml:"squash,omitempty"` + + // Secret contains information about a local secret passed to `docker build`, + // along with optional destination information. + Secret *DockerSecret `yaml:"secret,omitempty"` + + // SSH is used to pass in --ssh to docker build to use SSH agent. Format is "default|[=|[,]]". + SSH string `yaml:"ssh,omitempty"` +} + +// DockerSecret contains information about a local secret passed to `docker build`, +// along with optional destination information. +type DockerSecret struct { + // ID is the id of the secret. + ID string `yaml:"id,omitempty" yamltags:"required"` + + // Source is the path to the secret on the host machine. + Source string `yaml:"src,omitempty"` +} + +// BazelArtifact describes an artifact built with [Bazel](https://bazel.build/). +type BazelArtifact struct { + // BuildTarget is the `bazel build` target to run. + // For example: `//:skaffold_example.tar`. + BuildTarget string `yaml:"target,omitempty" yamltags:"required"` + + // BuildArgs are additional args to pass to `bazel build`. + // For example: `["-flag", "--otherflag"]`. + BuildArgs []string `yaml:"args,omitempty"` +} + +// JibArtifact builds images using the +// [Jib plugins for Maven and Gradle](https://github.com/GoogleContainerTools/jib/). +type JibArtifact struct { + // Project selects which sub-project to build for multi-module builds. + Project string `yaml:"project,omitempty"` + + // Flags are additional build flags passed to the builder. + // For example: `["--no-build-cache"]`. + Flags []string `yaml:"args,omitempty"` + + // Type the Jib builder type; normally determined automatically. Valid types are + // `maven`: for Maven. + // `gradle`: for Gradle. + Type string `yaml:"type,omitempty"` + + // BaseImage overrides the configured jib base image. + BaseImage string `yaml:"fromImage,omitempty"` +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type ClusterDetailsForUnmarshaling ClusterDetails + + volumes, remaining, err := util.UnmarshalClusterVolumes(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*ClusterDetailsForUnmarshaling)(clusterDetails) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + clusterDetails.Volumes = volumes + return nil +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type KanikoArtifactForUnmarshaling KanikoArtifact + + mounts, remaining, err := util.UnmarshalKanikoArtifact(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*KanikoArtifactForUnmarshaling)(ka) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + ka.VolumeMounts = mounts + return nil +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshall all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type ClusterDetailsForUnmarshaling ClusterDetails + + // Marshal volumes to a list. Use json because the Kubernetes resources have json annotations. + volumes := clusterDetails.Volumes + + j, err := json.Marshal(volumes) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of clusterDetails because we need to zero out volumes and we don't want to modify the + // current object. + aux := &ClusterDetailsForUnmarshaling{} + + b, err := json.Marshal(clusterDetails) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + + aux.Volumes = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumes"] = vList + } + return m, err +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type KanikoArtifactForUnmarshaling KanikoArtifact + + // Marshal volumes to a map. User json because the Kubernetes resources have json annotations. + volumeMounts := ka.VolumeMounts + + j, err := json.Marshal(volumeMounts) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of kanikoArtifact because we need to zero out volumeMounts and we don't want to modify the + // current object. + aux := &KanikoArtifactForUnmarshaling{} + + b, err := json.Marshal(ka) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + aux.VolumeMounts = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumeMounts"] = vList + } + return m, err +} diff --git a/pkg/skaffold/schema/v2beta18/upgrade.go b/pkg/skaffold/schema/v2beta18/upgrade.go new file mode 100755 index 00000000000..5fe85b41d4a --- /dev/null +++ b/pkg/skaffold/schema/v2beta18/upgrade.go @@ -0,0 +1,38 @@ +/* +Copyright 2020 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2beta18 + +import ( + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" + pkgutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +// Upgrade upgrades a configuration to the next version. +// Config changes from v2beta18 to v2beta19 +func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { + var newConfig next.SkaffoldConfig + pkgutil.CloneThroughJSON(c, &newConfig) + newConfig.APIVersion = next.Version + + err := util.UpgradePipelines(c, &newConfig, upgradeOnePipeline) + return &newConfig, err +} + +func upgradeOnePipeline(oldPipeline, newPipeline interface{}) error { + return nil +} diff --git a/pkg/skaffold/schema/v2beta18/upgrade_test.go b/pkg/skaffold/schema/v2beta18/upgrade_test.go new file mode 100755 index 00000000000..4f27c41f56a --- /dev/null +++ b/pkg/skaffold/schema/v2beta18/upgrade_test.go @@ -0,0 +1,201 @@ +/* +Copyright 2020 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2beta18 + +import ( + "testing" + + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestUpgrade(t *testing.T) { + yaml := `apiVersion: skaffold/v2beta18 +kind: Config +build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + secret: + id: id + src: /file.txt + - image: gcr.io/k8s-skaffold/bazel + bazel: + target: //mytarget + - image: gcr.io/k8s-skaffold/jib-maven + jib: + args: ['-v', '--activate-profiles', 'prof'] + project: dir + - image: gcr.io/k8s-skaffold/jib-gradle + jib: + args: ['-v'] + - image: gcr.io/k8s-skaffold/buildpacks + buildpacks: + builder: gcr.io/buildpacks/builder:v1 + sync: + auto: true + googleCloudBuild: + projectId: test-project +test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* +deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-main +portForward: + - resourceType: deployment + resourceName: leeroy-app + port: 8080 + localPort: 9001 +profiles: + - name: test profile + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + kaniko: + cache: {} + cluster: + pullSecretName: e2esecret + pullSecretPath: secret.json + namespace: default + test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* + deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-test + - name: test local + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + local: + push: false + deploy: + kubectl: + manifests: + - k8s-* + kustomize: {} +` + expected := `apiVersion: skaffold/v2beta19 +kind: Config +build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + secret: + id: id + src: /file.txt + - image: gcr.io/k8s-skaffold/bazel + bazel: + target: //mytarget + - image: gcr.io/k8s-skaffold/jib-maven + jib: + args: ['-v', '--activate-profiles', 'prof'] + project: dir + - image: gcr.io/k8s-skaffold/jib-gradle + jib: + args: ['-v'] + - image: gcr.io/k8s-skaffold/buildpacks + buildpacks: + builder: gcr.io/buildpacks/builder:v1 + sync: + auto: true + googleCloudBuild: + projectId: test-project +test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* +deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-main +portForward: + - resourceType: deployment + resourceName: leeroy-app + port: 8080 + localPort: 9001 +profiles: + - name: test profile + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + kaniko: + cache: {} + cluster: + pullSecretName: e2esecret + pullSecretPath: secret.json + namespace: default + test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* + deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-test + - name: test local + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + local: + push: false + deploy: + kubectl: + manifests: + - k8s-* + kustomize: {} +` + verifyUpgrade(t, yaml, expected) +} + +func verifyUpgrade(t *testing.T, input, output string) { + config := NewSkaffoldConfig() + err := yaml.UnmarshalStrict([]byte(input), config) + testutil.CheckErrorAndDeepEqual(t, false, err, Version, config.GetVersion()) + + upgraded, err := config.Upgrade() + testutil.CheckError(t, false, err) + + expected := next.NewSkaffoldConfig() + err = yaml.UnmarshalStrict([]byte(output), expected) + + testutil.CheckErrorAndDeepEqual(t, false, err, expected, upgraded) +} diff --git a/pkg/skaffold/schema/versions.go b/pkg/skaffold/schema/versions.go index 8c8628becb9..cbc4f279408 100644 --- a/pkg/skaffold/schema/versions.go +++ b/pkg/skaffold/schema/versions.go @@ -69,6 +69,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta15" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta16" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta17" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta18" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta3" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta4" @@ -138,6 +139,7 @@ var SchemaVersionsV1 = Versions{ {v2beta15.Version, v2beta15.NewSkaffoldConfig}, {v2beta16.Version, v2beta16.NewSkaffoldConfig}, {v2beta17.Version, v2beta17.NewSkaffoldConfig}, + {v2beta18.Version, v2beta18.NewSkaffoldConfig}, {latestV1.Version, latestV1.NewSkaffoldConfig}, } From 32789184f7bea269e40ec53684181a914c100a46 Mon Sep 17 00:00:00 2001 From: Hidenori Sugiyama Date: Thu, 1 Jul 2021 15:00:36 +0900 Subject: [PATCH 036/103] Fix couldn't start notify trigger in multi-config projects (#6114) --- pkg/skaffold/trigger/fsnotify/trigger.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/skaffold/trigger/fsnotify/trigger.go b/pkg/skaffold/trigger/fsnotify/trigger.go index f7a6a5b4c3d..36500d5fa1d 100644 --- a/pkg/skaffold/trigger/fsnotify/trigger.go +++ b/pkg/skaffold/trigger/fsnotify/trigger.go @@ -91,7 +91,15 @@ func (t *Trigger) Start(ctx context.Context) (<-chan bool, error) { continue } - if err := t.watchFunc(filepath.Join(wd, w, "..."), c, notify.All); err != nil { + // Workspace paths may already have been converted to absolute paths (e.g. in a multi-config project). + var path string + if filepath.IsAbs(w) { + path = w + } else { + path = filepath.Join(wd, w) + } + + if err := t.watchFunc(filepath.Join(path, "..."), c, notify.All); err != nil { return nil, err } } From fe12a8a2ed014bd7281ac4f0acaa51782c44d933 Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Thu, 1 Jul 2021 22:56:26 +0530 Subject: [PATCH 037/103] Fix 5774: Allow iterative status checks (#6115) * feature: iterative status checker * add docs --- cmd/skaffold/app/cmd/flags.go | 9 +++++ .../docs/pipeline-stages/deployers/_index.md | 1 + docs/content/en/docs/references/cli/_index.md | 10 +++++ docs/content/en/docs/workflows/ci-cd.md | 10 +++-- pkg/skaffold/config/options.go | 5 ++- pkg/skaffold/deploy/deploy_mux.go | 39 +++++++++++++------ pkg/skaffold/deploy/deploy_mux_test.go | 16 ++++---- pkg/skaffold/runner/deployer.go | 4 +- pkg/skaffold/runner/deployer_test.go | 24 ++++++------ pkg/skaffold/runner/runcontext/context.go | 1 + pkg/skaffold/runner/v1/deploy.go | 8 +++- pkg/skaffold/runner/v1/runner_test.go | 4 +- 12 files changed, 88 insertions(+), 43 deletions(-) diff --git a/cmd/skaffold/app/cmd/flags.go b/cmd/skaffold/app/cmd/flags.go index 4a40230c4d2..bfd60c4d798 100644 --- a/cmd/skaffold/app/cmd/flags.go +++ b/cmd/skaffold/app/cmd/flags.go @@ -293,6 +293,15 @@ var flagRegistry = []Flag{ IsEnum: true, NoOptDefVal: "true", }, + { + Name: "iterative-status-check", + Usage: "Run `status-check` iteratively after each deploy step, instead of all-together at the end of all deploys (default).", + Value: &opts.IterativeStatusCheck, + DefValue: false, + FlagAddMethod: "BoolVar", + DefinedOn: []string{"dev", "debug", "deploy", "run", "apply"}, + IsEnum: true, + }, { Name: "render-only", Usage: "Print rendered Kubernetes manifests instead of deploying them", diff --git a/docs/content/en/docs/pipeline-stages/deployers/_index.md b/docs/content/en/docs/pipeline-stages/deployers/_index.md index f91a01d7b4d..f2f6c102940 100644 --- a/docs/content/en/docs/pipeline-stages/deployers/_index.md +++ b/docs/content/en/docs/pipeline-stages/deployers/_index.md @@ -12,6 +12,7 @@ When Skaffold deploys your application, it goes through these steps: * the Skaffold deployer _renders_ the final Kubernetes manifests: Skaffold replaces untagged image names in the Kubernetes manifests with the final tagged image names. It also might go through the extra intermediate step of expanding templates (for helm) or calculating overlays (for kustomize). * the Skaffold deployer _deploys_ the final Kubernetes manifests to the cluster +* the Skaffold deployer waits for the deployed resources to stabilize. See [healthchecks]({{< relref "/docs/workflows/ci-cd.md#waiting-for-skaffold-deployments-using-healthcheck" >}}). ### Supported deployers diff --git a/docs/content/en/docs/references/cli/_index.md b/docs/content/en/docs/references/cli/_index.md index 0cc9b66c79c..e5f97fb8a65 100644 --- a/docs/content/en/docs/references/cli/_index.md +++ b/docs/content/en/docs/references/cli/_index.md @@ -124,6 +124,7 @@ Options: --enable-rpc=false: Enable gRPC for exposing Skaffold events -f, --filename='skaffold.yaml': Path or URL to the Skaffold config file --force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! + --iterative-status-check=false: Run `status-check` iteratively after each deploy step, instead of all-together at the end of all deploys (default). --kube-context='': Deploy to this Kubernetes context --kubeconfig='': Path to the kubeconfig file to use for CLI requests. -m, --module=[]: Filter Skaffold configs to only the provided named modules @@ -147,6 +148,7 @@ Env vars: * `SKAFFOLD_ENABLE_RPC` (same as `--enable-rpc`) * `SKAFFOLD_FILENAME` (same as `--filename`) * `SKAFFOLD_FORCE` (same as `--force`) +* `SKAFFOLD_ITERATIVE_STATUS_CHECK` (same as `--iterative-status-check`) * `SKAFFOLD_KUBE_CONTEXT` (same as `--kube-context`) * `SKAFFOLD_KUBECONFIG` (same as `--kubeconfig`) * `SKAFFOLD_MODULE` (same as `--module`) @@ -423,6 +425,7 @@ Options: -f, --filename='skaffold.yaml': Path or URL to the Skaffold config file --force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! --insecure-registry=[]: Target registries for built images which are not secure + --iterative-status-check=false: Run `status-check` iteratively after each deploy step, instead of all-together at the end of all deploys (default). --kube-context='': Deploy to this Kubernetes context --kubeconfig='': Path to the kubeconfig file to use for CLI requests. -l, --label=[]: Add custom labels to deployed objects. Set multiple times for multiple labels @@ -477,6 +480,7 @@ Env vars: * `SKAFFOLD_FILENAME` (same as `--filename`) * `SKAFFOLD_FORCE` (same as `--force`) * `SKAFFOLD_INSECURE_REGISTRY` (same as `--insecure-registry`) +* `SKAFFOLD_ITERATIVE_STATUS_CHECK` (same as `--iterative-status-check`) * `SKAFFOLD_KUBE_CONTEXT` (same as `--kube-context`) * `SKAFFOLD_KUBECONFIG` (same as `--kubeconfig`) * `SKAFFOLD_LABEL` (same as `--label`) @@ -579,6 +583,7 @@ Options: -f, --filename='skaffold.yaml': Path or URL to the Skaffold config file --force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! -i, --images=: A list of pre-built images to deploy + --iterative-status-check=false: Run `status-check` iteratively after each deploy step, instead of all-together at the end of all deploys (default). --kube-context='': Deploy to this Kubernetes context --kubeconfig='': Path to the kubeconfig file to use for CLI requests. -l, --label=[]: Add custom labels to deployed objects. Set multiple times for multiple labels @@ -620,6 +625,7 @@ Env vars: * `SKAFFOLD_FILENAME` (same as `--filename`) * `SKAFFOLD_FORCE` (same as `--force`) * `SKAFFOLD_IMAGES` (same as `--images`) +* `SKAFFOLD_ITERATIVE_STATUS_CHECK` (same as `--iterative-status-check`) * `SKAFFOLD_KUBE_CONTEXT` (same as `--kube-context`) * `SKAFFOLD_KUBECONFIG` (same as `--kubeconfig`) * `SKAFFOLD_LABEL` (same as `--label`) @@ -668,6 +674,7 @@ Options: -f, --filename='skaffold.yaml': Path or URL to the Skaffold config file --force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! --insecure-registry=[]: Target registries for built images which are not secure + --iterative-status-check=false: Run `status-check` iteratively after each deploy step, instead of all-together at the end of all deploys (default). --kube-context='': Deploy to this Kubernetes context --kubeconfig='': Path to the kubeconfig file to use for CLI requests. -l, --label=[]: Add custom labels to deployed objects. Set multiple times for multiple labels @@ -722,6 +729,7 @@ Env vars: * `SKAFFOLD_FILENAME` (same as `--filename`) * `SKAFFOLD_FORCE` (same as `--force`) * `SKAFFOLD_INSECURE_REGISTRY` (same as `--insecure-registry`) +* `SKAFFOLD_ITERATIVE_STATUS_CHECK` (same as `--iterative-status-check`) * `SKAFFOLD_KUBE_CONTEXT` (same as `--kube-context`) * `SKAFFOLD_KUBECONFIG` (same as `--kubeconfig`) * `SKAFFOLD_LABEL` (same as `--label`) @@ -971,6 +979,7 @@ Options: -f, --filename='skaffold.yaml': Path or URL to the Skaffold config file --force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! --insecure-registry=[]: Target registries for built images which are not secure + --iterative-status-check=false: Run `status-check` iteratively after each deploy step, instead of all-together at the end of all deploys (default). --kube-context='': Deploy to this Kubernetes context --kubeconfig='': Path to the kubeconfig file to use for CLI requests. -l, --label=[]: Add custom labels to deployed objects. Set multiple times for multiple labels @@ -1020,6 +1029,7 @@ Env vars: * `SKAFFOLD_FILENAME` (same as `--filename`) * `SKAFFOLD_FORCE` (same as `--force`) * `SKAFFOLD_INSECURE_REGISTRY` (same as `--insecure-registry`) +* `SKAFFOLD_ITERATIVE_STATUS_CHECK` (same as `--iterative-status-check`) * `SKAFFOLD_KUBE_CONTEXT` (same as `--kube-context`) * `SKAFFOLD_KUBECONFIG` (same as `--kubeconfig`) * `SKAFFOLD_LABEL` (same as `--label`) diff --git a/docs/content/en/docs/workflows/ci-cd.md b/docs/content/en/docs/workflows/ci-cd.md index 584080f8d00..3ef30c0b0a0 100644 --- a/docs/content/en/docs/workflows/ci-cd.md +++ b/docs/content/en/docs/workflows/ci-cd.md @@ -37,9 +37,7 @@ healthy before proceeding with the next steps in the pipeline. flag, or by setting the `statusCheck` field of the deployment config stanza in the `skaffold.yaml` to false. -If the `skaffold.yaml` contains multiple pipelines, it is invalid for one to -have `statusCheck` explicitly set to `true` and a second to have `statusCheck` -explicitly set to `false`. +If there are multiple skaffold `modules` active, then setting `statusCheck` field of the deployment config stanza will only disable healthcheck for that config. However using the `--status-check=false` flag will disable it for all modules. {{}} To determine if a `Deployment` resource is up and running, Skaffold relies on `kubectl rollout status` to obtain its status. @@ -117,6 +115,12 @@ Waiting for deployments to stabilize FATA[0006] 1/1 deployment(s) failed ``` +**Configuring `healthcheck` for multiple deployers or multiple modules** + +If you define multiple deployers, say `kubectl`, `helm` and `kustomize`, all in the same skaffold config, or compose a multi-config project by importing other configs as dependencies, then the `healthcheck` can be run in one of two ways: +- _Single status check after all deployers are run_. This is the default and it runs a single `healthcheck` at the end for resources deployed from all deployers across all skaffold configs. +- _Per-deployer status check_. This can be enabled by using the `--iterative-status-check=true` flag. This will run a `healthcheck` iteratively after every individual deployer runs. This can be especially useful when there are startup dependencies between services, or you need to strictly enforce the time and order in which resources are deployed. + ## Traditional continuous delivery: `skaffold build | skaffold deploy` `skaffold build` will build your project's artifacts, and push the build images to the specified registry. If your project is already configured to run with Skaffold, `skaffold build` can be a very lightweight way of setting up builds for your CI pipeline. Passing the `--file-output` flag to Skaffold build will also write out your built artifacts in JSON format to a file on disk, which can then by passed to `skaffold deploy` later on. This is a great way of "committing" your artifacts when they have reached a state that you're comfortable with, especially for projects with multiple artifacts for multiple services. diff --git a/pkg/skaffold/config/options.go b/pkg/skaffold/config/options.go index 3cf2407c507..8af5cd22216 100644 --- a/pkg/skaffold/config/options.go +++ b/pkg/skaffold/config/options.go @@ -69,8 +69,9 @@ type SkaffoldOptions struct { AddSkaffoldLabels bool DetectMinikube bool // Experimental is the entrypoint to run skaffold v3 before it's fully implemented. - Experimental bool - StatusCheck BoolOrUndefined + Experimental bool + StatusCheck BoolOrUndefined + IterativeStatusCheck bool PortForward PortForwardOptions CustomTag string diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go index 814a102ab27..a75afb20cdd 100644 --- a/pkg/skaffold/deploy/deploy_mux.go +++ b/pkg/skaffold/deploy/deploy_mux.go @@ -40,11 +40,22 @@ import ( // 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. -type DeployerMux []Deployer +type DeployerMux struct { + iterativeStatusCheck bool + deployers []Deployer +} + +func NewDeployerMux(deployers []Deployer, iterativeStatusCheck bool) Deployer { + return DeployerMux{deployers: deployers, iterativeStatusCheck: iterativeStatusCheck} +} + +func (m DeployerMux) GetDeployers() []Deployer { + return m.deployers +} func (m DeployerMux) GetAccessor() access.Accessor { var accessors access.AccessorMux - for _, deployer := range m { + for _, deployer := range m.deployers { accessors = append(accessors, deployer.GetAccessor()) } return accessors @@ -52,7 +63,7 @@ func (m DeployerMux) GetAccessor() access.Accessor { func (m DeployerMux) GetDebugger() debug.Debugger { var debuggers debug.DebuggerMux - for _, deployer := range m { + for _, deployer := range m.deployers { debuggers = append(debuggers, deployer.GetDebugger()) } return debuggers @@ -60,7 +71,7 @@ func (m DeployerMux) GetDebugger() debug.Debugger { func (m DeployerMux) GetLogger() log.Logger { var loggers log.LoggerMux - for _, deployer := range m { + for _, deployer := range m.deployers { loggers = append(loggers, deployer.GetLogger()) } return loggers @@ -68,7 +79,7 @@ func (m DeployerMux) GetLogger() log.Logger { func (m DeployerMux) GetStatusMonitor() status.Monitor { var monitors status.MonitorMux - for _, deployer := range m { + for _, deployer := range m.deployers { monitors = append(monitors, deployer.GetStatusMonitor()) } return monitors @@ -76,7 +87,7 @@ func (m DeployerMux) GetStatusMonitor() status.Monitor { func (m DeployerMux) GetSyncer() sync.Syncer { var syncers sync.SyncerMux - for _, deployer := range m { + for _, deployer := range m.deployers { syncers = append(syncers, deployer.GetSyncer()) } return syncers @@ -85,7 +96,7 @@ func (m DeployerMux) GetSyncer() sync.Syncer { func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) ([]string, error) { seenNamespaces := util.NewStringSet() - for i, deployer := range m { + for i, deployer := range m.deployers { eventV2.DeployInProgress(i) w = output.WithEventContext(w, constants.Deploy, strconv.Itoa(i), "skaffold") ctx, endTrace := instrumentation.StartTrace(ctx, "Deploy") @@ -97,7 +108,13 @@ func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifac return nil, err } seenNamespaces.Insert(namespaces...) - + if m.iterativeStatusCheck { + if err = deployer.GetStatusMonitor().Check(ctx, w); err != nil { + eventV2.DeployFailed(i, err) + endTrace(instrumentation.TraceEndError(err)) + return nil, err + } + } eventV2.DeploySucceeded(i) endTrace() } @@ -107,7 +124,7 @@ func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifac func (m DeployerMux) Dependencies() ([]string, error) { deps := util.NewStringSet() - for _, deployer := range m { + for _, deployer := range m.deployers { result, err := deployer.Dependencies() if err != nil { return nil, err @@ -118,7 +135,7 @@ func (m DeployerMux) Dependencies() ([]string, error) { } func (m DeployerMux) Cleanup(ctx context.Context, w io.Writer) error { - for _, deployer := range m { + for _, deployer := range m.deployers { ctx, endTrace := instrumentation.StartTrace(ctx, "Cleanup") if err := deployer.Cleanup(ctx, w); err != nil { return err @@ -130,7 +147,7 @@ func (m DeployerMux) Cleanup(ctx context.Context, w io.Writer) error { func (m DeployerMux) Render(ctx context.Context, w io.Writer, as []graph.Artifact, offline bool, filepath string) error { resources, buf := []string{}, &bytes.Buffer{} - for _, deployer := range m { + for _, deployer := range m.deployers { ctx, endTrace := instrumentation.StartTrace(ctx, "Render") buf.Reset() if err := deployer.Render(ctx, buf, as, offline, "" /* never write to files */); err != nil { diff --git a/pkg/skaffold/deploy/deploy_mux_test.go b/pkg/skaffold/deploy/deploy_mux_test.go index f13a295bf5d..c7a3e158cca 100644 --- a/pkg/skaffold/deploy/deploy_mux_test.go +++ b/pkg/skaffold/deploy/deploy_mux_test.go @@ -178,10 +178,10 @@ func TestDeployerMux_Deploy(t *testing.T) { }, }}}) - deployerMux := DeployerMux([]Deployer{ + deployerMux := NewDeployerMux([]Deployer{ NewMockDeployer().WithDeployNamespaces(test.namespaces1).WithDeployErr(test.err1), NewMockDeployer().WithDeployNamespaces(test.namespaces2).WithDeployErr(test.err2), - }) + }, false) namespaces, err := deployerMux.Deploy(context.Background(), nil, nil) @@ -230,10 +230,10 @@ func TestDeployerMux_Dependencies(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - deployerMux := DeployerMux([]Deployer{ + deployerMux := NewDeployerMux([]Deployer{ NewMockDeployer().WithDependencies(test.deps1).WithDependenciesErr(test.err1), NewMockDeployer().WithDependencies(test.deps2).WithDependenciesErr(test.err2), - }) + }, false) dependencies, err := deployerMux.Dependencies() testutil.CheckErrorAndDeepEqual(t, test.shouldErr, err, test.expectedDeps, dependencies) @@ -275,10 +275,10 @@ func TestDeployerMux_Render(t *testing.T) { for _, test := range tests { t.Run("output to writer "+test.name, func(t *testing.T) { - deployerMux := DeployerMux([]Deployer{ + deployerMux := NewDeployerMux([]Deployer{ NewMockDeployer().WithRenderResult(test.render1).WithRenderErr(test.err1), NewMockDeployer().WithRenderResult(test.render2).WithRenderErr(test.err2), - }) + }, false) buf := &bytes.Buffer{} err := deployerMux.Render(context.Background(), buf, nil, true, "") @@ -292,10 +292,10 @@ func TestDeployerMux_Render(t *testing.T) { tmpDir := testutil.NewTempDir(t) - deployerMux := DeployerMux([]Deployer{ + deployerMux := NewDeployerMux([]Deployer{ NewMockDeployer().WithRenderResult(test.render1).WithRenderErr(test.err1), NewMockDeployer().WithRenderResult(test.render2).WithRenderErr(test.err2), - }) + }, false) err := deployerMux.Render(context.Background(), nil, nil, true, tmpDir.Path("render")) testutil.CheckError(t, false, err) diff --git a/pkg/skaffold/runner/deployer.go b/pkg/skaffold/runner/deployer.go index 256d3cce38d..7c3c67f0135 100644 --- a/pkg/skaffold/runner/deployer.go +++ b/pkg/skaffold/runner/deployer.go @@ -62,7 +62,7 @@ func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvide deployerCfg := runCtx.Deployers() - var deployers deploy.DeployerMux + var deployers []deploy.Deployer for _, d := range deployerCfg { dCtx := &deployerCtx{runCtx, d} if d.HelmDeploy != nil { @@ -95,7 +95,7 @@ func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvide } } - return deployers, nil + return deploy.NewDeployerMux(deployers, runCtx.IterativeStatusCheck()), nil } /* diff --git a/pkg/skaffold/runner/deployer_test.go b/pkg/skaffold/runner/deployer_test.go index 9a7ca5d4453..e0769a6f2fc 100644 --- a/pkg/skaffold/runner/deployer_test.go +++ b/pkg/skaffold/runner/deployer_test.go @@ -50,9 +50,7 @@ func TestGetDeployer(tOuter *testing.T) { description: "helm deployer with 3.0.0 version", cfg: latestV1.DeployType{HelmDeploy: &latestV1.HelmDeploy{}}, helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, - expected: deploy.DeployerMux{ - &helm.Deployer{}, - }, + expected: deploy.NewDeployerMux([]deploy.Deployer{&helm.Deployer{}}, false), }, { description: "helm deployer with less than 3.0.0 version", @@ -63,31 +61,31 @@ func TestGetDeployer(tOuter *testing.T) { { description: "kubectl deployer", cfg: latestV1.DeployType{KubectlDeploy: &latestV1.KubectlDeploy{}}, - expected: deploy.DeployerMux{ + expected: deploy.NewDeployerMux([]deploy.Deployer{ t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{}, })).(deploy.Deployer), - }, + }, false), }, { description: "kustomize deployer", cfg: latestV1.DeployType{KustomizeDeploy: &latestV1.KustomizeDeploy{}}, - expected: deploy.DeployerMux{ + expected: deploy.NewDeployerMux([]deploy.Deployer{ t.RequireNonNilResult(kustomize.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), }, nil, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{ Flags: latestV1.KubectlFlags{}, })).(deploy.Deployer), - }, + }, false), }, { description: "kpt deployer", cfg: latestV1.DeployType{KptDeploy: &latestV1.KptDeploy{}}, - expected: deploy.DeployerMux{ + expected: deploy.NewDeployerMux([]deploy.Deployer{ &kpt.Deployer{}, - }, + }, false), }, { description: "apply forces creation of kubectl deployer with kpt config", @@ -117,10 +115,10 @@ func TestGetDeployer(tOuter *testing.T) { KptDeploy: &latestV1.KptDeploy{}, }, helmVersion: `version.BuildInfo{Version:"v3.0.0"}`, - expected: deploy.DeployerMux{ + expected: deploy.NewDeployerMux([]deploy.Deployer{ &helm.Deployer{}, &kpt.Deployer{}, - }, + }, false), }, } for _, test := range tests { @@ -147,8 +145,8 @@ func TestGetDeployer(tOuter *testing.T) { t.CheckTypeEquality(test.expected, deployer) if reflect.TypeOf(test.expected) == reflect.TypeOf(deploy.DeployerMux{}) { - expected := test.expected.(deploy.DeployerMux) - deployers := deployer.(deploy.DeployerMux) + expected := test.expected.(deploy.DeployerMux).GetDeployers() + deployers := deployer.(deploy.DeployerMux).GetDeployers() t.CheckDeepEqual(len(expected), len(deployers)) for i, v := range expected { t.CheckTypeEquality(v, deployers[i]) diff --git a/pkg/skaffold/runner/runcontext/context.go b/pkg/skaffold/runner/runcontext/context.go index 135479d3670..c64a621b0fa 100644 --- a/pkg/skaffold/runner/runcontext/context.go +++ b/pkg/skaffold/runner/runcontext/context.go @@ -189,6 +189,7 @@ func (rc *RunContext) RenderOutput() string { return rc func (rc *RunContext) SkipRender() bool { return rc.Opts.SkipRender } func (rc *RunContext) SkipTests() bool { return rc.Opts.SkipTests } func (rc *RunContext) StatusCheck() *bool { return rc.Opts.StatusCheck.Value() } +func (rc *RunContext) IterativeStatusCheck() bool { return rc.Opts.IterativeStatusCheck } func (rc *RunContext) Tail() bool { return rc.Opts.Tail } func (rc *RunContext) Trigger() string { return rc.Opts.Trigger } func (rc *RunContext) WaitForDeletions() config.WaitForDeletions { return rc.Opts.WaitForDeletions } diff --git a/pkg/skaffold/runner/v1/deploy.go b/pkg/skaffold/runner/v1/deploy.go index 61cb71c2374..ef00fccf1b4 100644 --- a/pkg/skaffold/runner/v1/deploy.go +++ b/pkg/skaffold/runner/v1/deploy.go @@ -71,6 +71,7 @@ func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts [] if r.runCtx.RenderOnly() { return r.Render(ctx, out, artifacts, false, r.runCtx.RenderOutput()) } + defer r.deployer.GetStatusMonitor().Reset() out = output.WithEventContext(out, constants.Deploy, eventV2.SubtaskIDNone, "skaffold") @@ -141,8 +142,11 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) event.DeployComplete() eventV2.TaskSucceeded(constants.Deploy) r.runCtx.UpdateNamespaces(namespaces) - sErr := r.deployer.GetStatusMonitor().Check(ctx, statusCheckOut) - return sErr + if !r.runCtx.Opts.IterativeStatusCheck { + // run final aggregated status check only if iterative status check is turned off. + return r.deployer.GetStatusMonitor().Check(ctx, statusCheckOut) + } + return nil } func (r *SkaffoldRunner) loadImagesIntoCluster(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error { diff --git a/pkg/skaffold/runner/v1/runner_test.go b/pkg/skaffold/runner/v1/runner_test.go index 50d3dd67922..e716a4bb41d 100644 --- a/pkg/skaffold/runner/v1/runner_test.go +++ b/pkg/skaffold/runner/v1/runner_test.go @@ -431,11 +431,11 @@ func TestNewForConfig(t *testing.T) { }, }, expectedTester: &test.FullTester{}, - expectedDeployer: deploy.DeployerMux([]deploy.Deployer{ + expectedDeployer: deploy.NewDeployerMux([]deploy.Deployer{ &helm.Deployer{}, &kubectl.Deployer{}, &kustomize.Deployer{}, - }), + }, false), }, } for _, test := range tests { From 076295b997b3a4e329b776dfb6b53633878b8899 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jul 2021 12:51:34 -0700 Subject: [PATCH 038/103] Bump puma from 4.3.5 to 4.3.8 in /examples/ruby/backend (#6110) Bumps [puma](https://github.com/puma/puma) from 4.3.5 to 4.3.8. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v4.3.5...v4.3.8) --- updated-dependencies: - dependency-name: puma dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- examples/ruby/backend/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ruby/backend/Gemfile.lock b/examples/ruby/backend/Gemfile.lock index a5a6ab0c273..823faa57d4d 100644 --- a/examples/ruby/backend/Gemfile.lock +++ b/examples/ruby/backend/Gemfile.lock @@ -1,8 +1,8 @@ GEM remote: https://rubygems.org/ specs: - nio4r (2.5.2) - puma (4.3.5) + nio4r (2.5.7) + puma (4.3.8) nio4r (~> 2.0) rack (2.1.4) rack-unreloader (1.7.0) From a904d76af3a2d403d9091c8631532dcd842d7eae Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Thu, 1 Jul 2021 12:51:53 -0700 Subject: [PATCH 039/103] associate StatusCheckSubtaskEvents with Deploy phase (#6118) --- pkg/skaffold/event/v2/status_check.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/skaffold/event/v2/status_check.go b/pkg/skaffold/event/v2/status_check.go index eef7b08d430..1256982f15a 100644 --- a/pkg/skaffold/event/v2/status_check.go +++ b/pkg/skaffold/event/v2/status_check.go @@ -34,7 +34,7 @@ func ResourceStatusCheckEventCompleted(r string, ae proto.ActionableErr) { func resourceStatusCheckEventSucceeded(r string) { handler.handleStatusCheckSubtaskEvent(&proto.StatusCheckSubtaskEvent{ Id: r, - TaskId: fmt.Sprintf("%s-%d", constants.StatusCheck, handler.iteration), + TaskId: fmt.Sprintf("%s-%d", constants.Deploy, handler.iteration), Resource: r, Status: Succeeded, Message: Succeeded, @@ -45,7 +45,7 @@ func resourceStatusCheckEventSucceeded(r string) { func resourceStatusCheckEventFailed(r string, ae proto.ActionableErr) { handler.handleStatusCheckSubtaskEvent(&proto.StatusCheckSubtaskEvent{ Id: r, - TaskId: fmt.Sprintf("%s-%d", constants.StatusCheck, handler.iteration), + TaskId: fmt.Sprintf("%s-%d", constants.Deploy, handler.iteration), Resource: r, Status: Failed, StatusCode: ae.ErrCode, @@ -56,7 +56,7 @@ func resourceStatusCheckEventFailed(r string, ae proto.ActionableErr) { func ResourceStatusCheckEventUpdated(r string, ae proto.ActionableErr) { handler.handleStatusCheckSubtaskEvent(&proto.StatusCheckSubtaskEvent{ Id: r, - TaskId: fmt.Sprintf("%s-%d", constants.StatusCheck, handler.iteration), + TaskId: fmt.Sprintf("%s-%d", constants.Deploy, handler.iteration), Resource: r, Status: InProgress, Message: ae.Message, From 5bc26fbdd095ba94465b0d49148187e8e7ad2a0c Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Thu, 1 Jul 2021 15:29:46 -0700 Subject: [PATCH 040/103] Move log stream utility out of pkg/skaffold/kubernetes (#6121) --- pkg/skaffold/kubernetes/logger/log.go | 39 +------------ pkg/skaffold/kubernetes/logger/log_test.go | 32 ---------- pkg/skaffold/log/stream/stream.go | 68 ++++++++++++++++++++++ pkg/skaffold/log/stream/stream_test.go | 57 ++++++++++++++++++ 4 files changed, 127 insertions(+), 69 deletions(-) create mode 100644 pkg/skaffold/log/stream/stream.go create mode 100644 pkg/skaffold/log/stream/stream_test.go diff --git a/pkg/skaffold/kubernetes/logger/log.go b/pkg/skaffold/kubernetes/logger/log.go index 5ea33bd1f0f..f3afd023ad6 100644 --- a/pkg/skaffold/kubernetes/logger/log.go +++ b/pkg/skaffold/kubernetes/logger/log.go @@ -17,7 +17,6 @@ limitations under the License. package logger import ( - "bufio" "context" "fmt" "io" @@ -28,10 +27,10 @@ import ( "github.com/sirupsen/logrus" v1 "k8s.io/api/core/v1" - eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log/stream" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" @@ -184,21 +183,11 @@ func (a *LogAggregator) streamContainerLogs(ctx context.Context, pod *v1.Pod, co headerColor := a.colorPicker.Pick(pod) prefix := a.prefix(pod, container) - if err := a.streamRequest(ctx, headerColor, prefix, pod.Name, container.Name, tr); err != nil { + if err := stream.StreamRequest(ctx, a.output, headerColor, prefix, pod.Name, container.Name, make(chan bool), &a.outputLock, a.IsMuted, tr); err != nil { logrus.Errorf("streaming request %s", err) } } -func (a *LogAggregator) printLogLine(text string) { - if !a.IsMuted() { - a.outputLock.Lock() - - fmt.Fprint(a.output, text) - - a.outputLock.Unlock() - } -} - func (a *LogAggregator) prefix(pod *v1.Pod, container v1.ContainerStatus) string { var c latestV1.Pipeline var present bool @@ -242,30 +231,6 @@ func podAndContainerPrefix(pod *v1.Pod, container v1.ContainerStatus) string { return fmt.Sprintf("[%s %s]", pod.Name, container.Name) } -func (a *LogAggregator) streamRequest(ctx context.Context, headerColor output.Color, prefix, podName, containerName string, rc io.Reader) error { - r := bufio.NewReader(rc) - for { - select { - case <-ctx.Done(): - logrus.Infof("%s interrupted", prefix) - return nil - default: - // Read up to newline - line, err := r.ReadString('\n') - if err == io.EOF { - return nil - } - if err != nil { - return fmt.Errorf("reading bytes from log stream: %w", err) - } - - formattedLine := headerColor.Sprintf("%s ", prefix) + line - a.printLogLine(formattedLine) - eventV2.ApplicationLog(podName, containerName, line, formattedLine) - } - } -} - // Mute mutes the logs. func (a *LogAggregator) Mute() { if a == nil { diff --git a/pkg/skaffold/kubernetes/logger/log_test.go b/pkg/skaffold/kubernetes/logger/log_test.go index a0765e2a7a0..68fe4549d8b 100644 --- a/pkg/skaffold/kubernetes/logger/log_test.go +++ b/pkg/skaffold/kubernetes/logger/log_test.go @@ -17,11 +17,8 @@ limitations under the License. package logger import ( - "bytes" "context" "io/ioutil" - "strings" - "sync" "testing" "time" @@ -29,7 +26,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -98,34 +94,6 @@ func TestSelect(t *testing.T) { } } -func TestPrintLogLine(t *testing.T) { - testutil.Run(t, "verify lines are not intermixed", func(t *testutil.T) { - var buf bytes.Buffer - - logger := &LogAggregator{ - output: &buf, - } - - var wg sync.WaitGroup - for i := 0; i < 5; i++ { - wg.Add(1) - - go func() { - for i := 0; i < 100; i++ { - logger.printLogLine(output.Default.Sprintf("%s ", "PREFIX") + "TEXT\n") - } - wg.Done() - }() - } - wg.Wait() - - lines := strings.Split(buf.String(), "\n") - for i := 0; i < 5*100; i++ { - t.CheckDeepEqual("PREFIX TEXT", lines[i]) - } - }) -} - func TestLogAggregatorZeroValue(t *testing.T) { var m *LogAggregator diff --git a/pkg/skaffold/log/stream/stream.go b/pkg/skaffold/log/stream/stream.go new file mode 100644 index 00000000000..683ee513e2d --- /dev/null +++ b/pkg/skaffold/log/stream/stream.go @@ -0,0 +1,68 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package stream + +import ( + "bufio" + "context" + "fmt" + "io" + "sync" + + "github.com/sirupsen/logrus" + + eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" +) + +//nolint:golint +func StreamRequest(ctx context.Context, out io.Writer, headerColor output.Color, prefix, podName, containerName string, stopper chan bool, lock sync.Locker, isMuted func() bool, rc io.Reader) error { + r := bufio.NewReader(rc) + for { + select { + case <-ctx.Done(): + logrus.Infof("%s interrupted", prefix) + return nil + case <-stopper: + return nil + default: + // Read up to newline + line, err := r.ReadString('\n') + if err == io.EOF { + return nil + } + if err != nil { + return fmt.Errorf("reading bytes from log stream: %w", err) + } + + formattedLine := headerColor.Sprintf("%s ", prefix) + line + printLogLine(headerColor, out, isMuted, lock, prefix, line) + eventV2.ApplicationLog(podName, containerName, line, formattedLine) + } + } +} + +func printLogLine(headerColor output.Color, out io.Writer, isMuted func() bool, lock sync.Locker, prefix, text string) { + if !isMuted() { + lock.Lock() + + headerColor.Fprintf(out, "%s ", prefix) + fmt.Fprint(out, text) + + lock.Unlock() + } +} diff --git a/pkg/skaffold/log/stream/stream_test.go b/pkg/skaffold/log/stream/stream_test.go new file mode 100644 index 00000000000..adb60f3b2c1 --- /dev/null +++ b/pkg/skaffold/log/stream/stream_test.go @@ -0,0 +1,57 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package stream + +import ( + "bytes" + "strings" + "sync" + "testing" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestPrintLogLine(t *testing.T) { + testutil.Run(t, "verify lines are not intermixed", func(t *testutil.T) { + var ( + buf bytes.Buffer + wg sync.WaitGroup + lock sync.Mutex + + linesPerGroup = 100 + groups = 5 + ) + + for i := 0; i < groups; i++ { + wg.Add(1) + + go func() { + for i := 0; i < linesPerGroup; i++ { + printLogLine(output.Default, &buf, func() bool { return false }, &lock, "PREFIX", "TEXT\n") + } + wg.Done() + }() + } + wg.Wait() + + lines := strings.Split(buf.String(), "\n") + for i := 0; i < groups*linesPerGroup; i++ { + t.CheckDeepEqual("PREFIX TEXT", lines[i]) + } + }) +} From 823896bdd7464d79886664b32f56948957ea5f65 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Fri, 2 Jul 2021 13:07:25 -0700 Subject: [PATCH 041/103] Revert "change proto v1 package name (#6112)" (#6127) This reverts commit 83168c83be72a419a3d3e527465e79c13056fb64. --- cmd/skaffold/app/cmd/runner.go | 2 +- docs/content/en/api/skaffold.swagger.json | 260 ++++++------ docs/content/en/docs/references/api/grpc.md | 226 +++++------ hack/generate-proto.sh | 6 +- integration/cache_test.go | 2 +- integration/debug_test.go | 2 +- integration/dev_test.go | 2 +- integration/rpc_test.go | 2 +- integration/sync_test.go | 2 +- integration/test_events_test.go | 2 +- pkg/diag/recommender/container_errors.go | 2 +- pkg/diag/validator/pod.go | 2 +- pkg/diag/validator/pod_test.go | 2 +- pkg/diag/validator/recommender.go | 2 +- pkg/diag/validator/resource.go | 2 +- pkg/diag/validator/resource_test.go | 2 +- pkg/skaffold/build/build_problems.go | 2 +- pkg/skaffold/build/build_problems_test.go | 2 +- pkg/skaffold/build/cache/lookup_test.go | 2 +- pkg/skaffold/build/docker/docker_test.go | 2 +- pkg/skaffold/build/docker/errors.go | 2 +- pkg/skaffold/build/jib/errors.go | 2 +- pkg/skaffold/deploy/deploy_problems.go | 2 +- pkg/skaffold/deploy/deploy_problems_test.go | 2 +- pkg/skaffold/deploy/error/errors.go | 2 +- pkg/skaffold/deploy/error/errors_test.go | 2 +- pkg/skaffold/deploy/helm/errors.go | 2 +- pkg/skaffold/deploy/kubectl/errors.go | 2 +- pkg/skaffold/deploy/kustomize/errors.go | 2 +- pkg/skaffold/deploy/resource/deployment.go | 2 +- .../deploy/resource/deployment_test.go | 2 +- pkg/skaffold/deploy/resource/status.go | 2 +- pkg/skaffold/deploy/resource/status_test.go | 2 +- pkg/skaffold/docker/errors.go | 2 +- pkg/skaffold/docker/image_test.go | 2 +- pkg/skaffold/docker/parse.go | 2 +- pkg/skaffold/errors/err_def.go | 2 +- pkg/skaffold/errors/errors.go | 2 +- pkg/skaffold/errors/errors_test.go | 2 +- pkg/skaffold/errors/problem.go | 2 +- pkg/skaffold/event/event.go | 2 +- pkg/skaffold/event/event_test.go | 2 +- pkg/skaffold/event/util.go | 2 +- pkg/skaffold/event/util_test.go | 2 +- pkg/skaffold/initializer/init_problems.go | 2 +- .../initializer/init_problems_test.go | 2 +- .../inspect/buildEnv/modify_gcb_test.go | 2 +- pkg/skaffold/inspect/errors.go | 2 +- pkg/skaffold/inspect/output.go | 2 +- pkg/skaffold/instrumentation/export.go | 2 +- pkg/skaffold/instrumentation/export_test.go | 2 +- pkg/skaffold/instrumentation/meter.go | 2 +- pkg/skaffold/instrumentation/types.go | 2 +- pkg/skaffold/kubernetes/manifest/errors.go | 2 +- .../kubernetes/status/status_check.go | 2 +- .../kubernetes/status/status_check_test.go | 2 +- pkg/skaffold/parser/config_test.go | 2 +- pkg/skaffold/render/renderer/renderer.go | 2 +- pkg/skaffold/render/transform/transform.go | 2 +- pkg/skaffold/render/validate/validate.go | 2 +- pkg/skaffold/runner/v1/dev.go | 2 +- pkg/skaffold/schema/errors/errors.go | 2 +- pkg/skaffold/schema/errors/errors_test.go | 2 +- pkg/skaffold/schema/validation/validation.go | 2 +- pkg/skaffold/server/endpoints.go | 2 +- pkg/skaffold/server/server.go | 2 +- pkg/skaffold/server/server_test.go | 2 +- pkg/skaffold/test/custom/error.go | 2 +- pkg/skaffold/test/structure/error.go | 2 +- proto/v1/skaffold.pb.go | 380 +++++++++--------- proto/v1/skaffold.pb.gw.go | 4 +- proto/v1/skaffold.proto | 4 +- 72 files changed, 503 insertions(+), 509 deletions(-) diff --git a/cmd/skaffold/app/cmd/runner.go b/cmd/skaffold/app/cmd/runner.go index d68937c2648..4a2ca503391 100644 --- a/cmd/skaffold/app/cmd/runner.go +++ b/cmd/skaffold/app/cmd/runner.go @@ -39,7 +39,7 @@ import ( latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/validation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/update" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) // For tests diff --git a/docs/content/en/api/skaffold.swagger.json b/docs/content/en/api/skaffold.swagger.json index 94b22c75204..54452dab5f7 100644 --- a/docs/content/en/api/skaffold.swagger.json +++ b/docs/content/en/api/skaffold.swagger.json @@ -35,7 +35,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1TriggerState" + "$ref": "#/definitions/protoTriggerState" } } ], @@ -68,7 +68,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1TriggerState" + "$ref": "#/definitions/protoTriggerState" } } ], @@ -88,13 +88,13 @@ "type": "object", "properties": { "result": { - "$ref": "#/definitions/v1LogEntry" + "$ref": "#/definitions/protoLogEntry" }, "error": { "$ref": "#/definitions/runtimeStreamError" } }, - "description": "Stream result of v1LogEntry" + "description": "Stream result of protoLogEntry" } }, "default": { @@ -2519,13 +2519,13 @@ "type": "object", "properties": { "result": { - "$ref": "#/definitions/v1LogEntry" + "$ref": "#/definitions/protoLogEntry" }, "error": { "$ref": "#/definitions/runtimeStreamError" } }, - "description": "Stream result of v1LogEntry" + "description": "Stream result of protoLogEntry" } }, "default": { @@ -2564,7 +2564,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1Event" + "$ref": "#/definitions/protoEvent" } } ], @@ -2597,7 +2597,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1Intent" + "$ref": "#/definitions/protoIntent" } } ], @@ -2614,7 +2614,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1State" + "$ref": "#/definitions/protoState" } }, "default": { @@ -2653,7 +2653,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1TriggerState" + "$ref": "#/definitions/protoTriggerState" } } ], @@ -2984,65 +2984,7 @@ "default": "UNKNOWN_TEST_TYPE", "description": "Enum indicating test tools used\n- UNKNOWN_TEST_TYPE: Could not determine Test Type\n - UNIT: Unit tests\n - CONTAINER_STRUCTURE_TEST: Container Structure tests" }, - "protobufAny": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "runtimeStreamError": { - "type": "object", - "properties": { - "grpc_code": { - "type": "integer", - "format": "int32" - }, - "http_code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "http_status": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1ActionableErr": { + "protoActionableErr": { "type": "object", "properties": { "errCode": { @@ -3054,13 +2996,13 @@ "suggestions": { "type": "array", "items": { - "$ref": "#/definitions/v1Suggestion" + "$ref": "#/definitions/protoSuggestion" } } }, "description": "`ActionableErr` defines an error that occurred along with an optional list of suggestions" }, - "v1BuildEvent": { + "protoBuildEvent": { "type": "object", "properties": { "artifact": { @@ -3076,12 +3018,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "`BuildEvent` describes the build status per artifact, and will be emitted by Skaffold anytime a build starts or finishes, successfully or not.\nIf the build fails, an error will be attached to the event." }, - "v1BuildMetadata": { + "protoBuildMetadata": { "type": "object", "properties": { "numberOfArtifacts": { @@ -3106,7 +3048,7 @@ } } }, - "v1BuildState": { + "protoBuildState": { "type": "object", "properties": { "artifacts": { @@ -3125,7 +3067,7 @@ }, "description": "`BuildState` maps Skaffold artifacts to their current build states" }, - "v1DebuggingContainerEvent": { + "protoDebuggingContainerEvent": { "type": "object", "properties": { "status": { @@ -3159,7 +3101,7 @@ }, "description": "DebuggingContainerEvent is raised when a debugging container is started or terminated" }, - "v1DeployEvent": { + "protoDeployEvent": { "type": "object", "properties": { "status": { @@ -3172,12 +3114,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "`DeployEvent` represents the status of a deployment, and is emitted by Skaffold\nanytime a deployment starts or completes, successfully or not." }, - "v1DeployMetadata": { + "protoDeployMetadata": { "type": "object", "properties": { "deployers": { @@ -3191,7 +3133,7 @@ } } }, - "v1DeployState": { + "protoDeployState": { "type": "object", "properties": { "status": { @@ -3206,7 +3148,7 @@ }, "description": "`DeployState` describes the status of the current deploy" }, - "v1DevLoopEvent": { + "protoDevLoopEvent": { "type": "object", "properties": { "iteration": { @@ -3217,51 +3159,51 @@ "type": "string" }, "err": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "`DevLoopEvent` marks the start and end of a dev loop." }, - "v1Event": { + "protoEvent": { "type": "object", "properties": { "metaEvent": { - "$ref": "#/definitions/v1MetaEvent" + "$ref": "#/definitions/protoMetaEvent" }, "buildEvent": { - "$ref": "#/definitions/v1BuildEvent" + "$ref": "#/definitions/protoBuildEvent" }, "deployEvent": { - "$ref": "#/definitions/v1DeployEvent" + "$ref": "#/definitions/protoDeployEvent" }, "portEvent": { - "$ref": "#/definitions/v1PortEvent" + "$ref": "#/definitions/protoPortEvent" }, "statusCheckEvent": { - "$ref": "#/definitions/v1StatusCheckEvent" + "$ref": "#/definitions/protoStatusCheckEvent" }, "resourceStatusCheckEvent": { - "$ref": "#/definitions/v1ResourceStatusCheckEvent" + "$ref": "#/definitions/protoResourceStatusCheckEvent" }, "fileSyncEvent": { - "$ref": "#/definitions/v1FileSyncEvent" + "$ref": "#/definitions/protoFileSyncEvent" }, "debuggingContainerEvent": { - "$ref": "#/definitions/v1DebuggingContainerEvent" + "$ref": "#/definitions/protoDebuggingContainerEvent" }, "devLoopEvent": { - "$ref": "#/definitions/v1DevLoopEvent" + "$ref": "#/definitions/protoDevLoopEvent" }, "terminationEvent": { - "$ref": "#/definitions/v1TerminationEvent" + "$ref": "#/definitions/protoTerminationEvent" }, "TestEvent": { - "$ref": "#/definitions/v1TestEvent" + "$ref": "#/definitions/protoTestEvent" } }, "description": "`Event` describes an event in the Skaffold process.\nIt is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusCheckEvent, ResourceStatusCheckEvent, FileSyncEvent, or DebuggingContainerEvent." }, - "v1FileSyncEvent": { + "protoFileSyncEvent": { "type": "object", "properties": { "fileCount": { @@ -3281,12 +3223,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "FileSyncEvent describes the sync status." }, - "v1FileSyncState": { + "protoFileSyncState": { "type": "object", "properties": { "status": { @@ -3298,7 +3240,7 @@ }, "description": "`FileSyncState` contains the status of the current file sync" }, - "v1IntOrString": { + "protoIntOrString": { "type": "object", "properties": { "type": { @@ -3315,7 +3257,7 @@ }, "description": "IntOrString is a type that can hold an int32 or a string." }, - "v1Intent": { + "protoIntent": { "type": "object", "properties": { "build": { @@ -3330,7 +3272,7 @@ }, "description": "Intent represents user intents for a given phase." }, - "v1LogEntry": { + "protoLogEntry": { "type": "object", "properties": { "timestamp": { @@ -3338,7 +3280,7 @@ "format": "date-time" }, "event": { - "$ref": "#/definitions/v1Event" + "$ref": "#/definitions/protoEvent" }, "entry": { "type": "string" @@ -3346,7 +3288,7 @@ }, "description": "LogEntry describes an event and a string description of the event." }, - "v1MetaEvent": { + "protoMetaEvent": { "type": "object", "properties": { "entry": { @@ -3354,23 +3296,23 @@ "description": "entry, for example: `\"Starting Skaffold: {Version:v0.39.0-16-g5bb7c9e0 ConfigVersion:skaffold/v1 GitVersion: GitCommit:5bb7c9e078e4d522a5ffc42a2f1274fd17d75902 GitTreeState:dirty BuildDate01:29Z GoVersion:go1.13rc1 Compiler:gc Platform:linux/amd64}\"`" }, "metadata": { - "$ref": "#/definitions/v1Metadata", + "$ref": "#/definitions/protoMetadata", "description": "Metadata describing skaffold pipeline" } }, "description": "`MetaEvent` provides general information regarding Skaffold" }, - "v1Metadata": { + "protoMetadata": { "type": "object", "properties": { "build": { - "$ref": "#/definitions/v1BuildMetadata" + "$ref": "#/definitions/protoBuildMetadata" }, "deploy": { - "$ref": "#/definitions/v1DeployMetadata" + "$ref": "#/definitions/protoDeployMetadata" }, "test": { - "$ref": "#/definitions/v1TestMetadata" + "$ref": "#/definitions/protoTestMetadata" }, "additional": { "type": "object", @@ -3381,7 +3323,7 @@ } } }, - "v1PortEvent": { + "protoPortEvent": { "type": "object", "properties": { "localPort": { @@ -3414,12 +3356,12 @@ "type": "string" }, "targetPort": { - "$ref": "#/definitions/v1IntOrString" + "$ref": "#/definitions/protoIntOrString" } }, "description": "PortEvent Event describes each port forwarding event." }, - "v1ResourceStatusCheckEvent": { + "protoResourceStatusCheckEvent": { "type": "object", "properties": { "resource": { @@ -3438,48 +3380,48 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "A Resource StatusCheck Event, indicates progress for each kubernetes deployment.\nFor every resource, there will be exactly one event with `status` *Succeeded* or *Failed* event.\nThere can be multiple events with `status` *Pending*.\nSkaffold polls for resource status every 0.5 second. If the resource status changes, an event with `status` “Pending”, “Complete” and “Failed”\nwill be sent with the new status." }, - "v1State": { + "protoState": { "type": "object", "properties": { "buildState": { - "$ref": "#/definitions/v1BuildState" + "$ref": "#/definitions/protoBuildState" }, "deployState": { - "$ref": "#/definitions/v1DeployState" + "$ref": "#/definitions/protoDeployState" }, "forwardedPorts": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/v1PortEvent" + "$ref": "#/definitions/protoPortEvent" } }, "statusCheckState": { - "$ref": "#/definitions/v1StatusCheckState" + "$ref": "#/definitions/protoStatusCheckState" }, "fileSyncState": { - "$ref": "#/definitions/v1FileSyncState" + "$ref": "#/definitions/protoFileSyncState" }, "debuggingContainers": { "type": "array", "items": { - "$ref": "#/definitions/v1DebuggingContainerEvent" + "$ref": "#/definitions/protoDebuggingContainerEvent" } }, "metadata": { - "$ref": "#/definitions/v1Metadata" + "$ref": "#/definitions/protoMetadata" }, "testState": { - "$ref": "#/definitions/v1TestState" + "$ref": "#/definitions/protoTestState" } }, "description": "`State` represents the current state of the Skaffold components" }, - "v1StatusCheckEvent": { + "protoStatusCheckEvent": { "type": "object", "properties": { "status": { @@ -3495,12 +3437,12 @@ "$ref": "#/definitions/enumsStatusCode" }, "actionableErr": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "`StatusCheckEvent` describes if the status check for kubernetes rollout has started, is in progress, has succeeded or failed." }, - "v1StatusCheckState": { + "protoStatusCheckState": { "type": "object", "properties": { "status": { @@ -3520,7 +3462,7 @@ }, "description": "`StatusCheckState` describes the state of status check of current deployed resources." }, - "v1Suggestion": { + "protoSuggestion": { "type": "object", "properties": { "suggestionCode": { @@ -3532,31 +3474,31 @@ }, "description": "Suggestion defines the action a user needs to recover from an error." }, - "v1TerminationEvent": { + "protoTerminationEvent": { "type": "object", "properties": { "status": { "type": "string" }, "err": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "`TerminationEvent` marks the end of the skaffold session" }, - "v1TestEvent": { + "protoTestEvent": { "type": "object", "properties": { "status": { "type": "string" }, "actionableErr": { - "$ref": "#/definitions/v1ActionableErr" + "$ref": "#/definitions/protoActionableErr" } }, "description": "`TestEvent` represents the status of a test, and is emitted by Skaffold\nanytime a test starts or completes, successfully or not." }, - "v1TestMetadata": { + "protoTestMetadata": { "type": "object", "properties": { "Testers": { @@ -3568,7 +3510,7 @@ }, "description": "TestMetadata describes the test pipeline" }, - "v1TestState": { + "protoTestState": { "type": "object", "properties": { "status": { @@ -3582,7 +3524,7 @@ }, "description": "`TestState` describes the current state of the test" }, - "v1TriggerState": { + "protoTriggerState": { "type": "object", "properties": { "enabled": { @@ -3590,6 +3532,64 @@ } }, "description": "TriggerState represents trigger state for a given phase." + }, + "protobufAny": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "runtimeError": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "runtimeStreamError": { + "type": "object", + "properties": { + "grpc_code": { + "type": "integer", + "format": "int32" + }, + "http_code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "http_status": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } } } } diff --git a/docs/content/en/docs/references/api/grpc.md b/docs/content/en/docs/references/api/grpc.md index f4994528f3b..d115afab20e 100644 --- a/docs/content/en/docs/references/api/grpc.md +++ b/docs/content/en/docs/references/api/grpc.md @@ -29,21 +29,21 @@ You can find the source for v1/skaffold.proto [on Github](https://github.com/Goo ### Services - + #### SkaffoldService Describes all the methods for the Skaffold API | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| GetState | [.google.protobuf.Empty](#google.protobuf.Empty) | [State](#proto.v1.State) | Returns the state of the current Skaffold execution | -| EventLog | [LogEntry](#proto.v1.LogEntry) stream | [LogEntry](#proto.v1.LogEntry) stream | DEPRECATED. Events should be used instead. TODO remove (https://github.com/GoogleContainerTools/skaffold/issues/3168) | -| Events | [.google.protobuf.Empty](#google.protobuf.Empty) | [LogEntry](#proto.v1.LogEntry) stream | Returns all the events of the current Skaffold execution from the start | -| Execute | [UserIntentRequest](#proto.v1.UserIntentRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. | -| AutoBuild | [TriggerRequest](#proto.v1.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic build trigger | -| AutoSync | [TriggerRequest](#proto.v1.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic sync trigger | -| AutoDeploy | [TriggerRequest](#proto.v1.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic deploy trigger | -| Handle | [Event](#proto.v1.Event) | [.google.protobuf.Empty](#google.protobuf.Empty) | EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. | +| GetState | [.google.protobuf.Empty](#google.protobuf.Empty) | [State](#proto.State) | Returns the state of the current Skaffold execution | +| EventLog | [LogEntry](#proto.LogEntry) stream | [LogEntry](#proto.LogEntry) stream | DEPRECATED. Events should be used instead. TODO remove (https://github.com/GoogleContainerTools/skaffold/issues/3168) | +| Events | [.google.protobuf.Empty](#google.protobuf.Empty) | [LogEntry](#proto.LogEntry) stream | Returns all the events of the current Skaffold execution from the start | +| Execute | [UserIntentRequest](#proto.UserIntentRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for a single execution of some or all of the phases (build, sync, deploy) in case autoBuild, autoDeploy or autoSync are disabled. | +| AutoBuild | [TriggerRequest](#proto.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic build trigger | +| AutoSync | [TriggerRequest](#proto.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic sync trigger | +| AutoDeploy | [TriggerRequest](#proto.TriggerRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | Allows for enabling or disabling automatic deploy trigger | +| Handle | [Event](#proto.Event) | [.google.protobuf.Empty](#google.protobuf.Empty) | EXPERIMENTAL. It allows for custom events to be implemented in custom builders for example. | @@ -52,16 +52,16 @@ Describes all the methods for the Skaffold API - + #### ActionableErr `ActionableErr` defines an error that occurred along with an optional list of suggestions | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | error code representing the error | +| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | error code representing the error | | message | [string](#string) | | message describing the error. | -| suggestions | [Suggestion](#proto.v1.Suggestion) | repeated | list of suggestions | +| suggestions | [Suggestion](#proto.Suggestion) | repeated | list of suggestions | @@ -69,7 +69,7 @@ Describes all the methods for the Skaffold API - + #### BuildEvent `BuildEvent` describes the build status per artifact, and will be emitted by Skaffold anytime a build starts or finishes, successfully or not. If the build fails, an error will be attached to the event. @@ -80,8 +80,8 @@ If the build fails, an error will be attached to the event. | artifact | [string](#string) | | artifact name | | status | [string](#string) | | artifact build status oneof: InProgress, Completed, Failed | | err | [string](#string) | | Deprecated. Use actionableErr.message. error when build status is Failed. | -| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -89,7 +89,7 @@ If the build fails, an error will be attached to the event. - + #### BuildMetadata @@ -97,9 +97,9 @@ If the build fails, an error will be attached to the event. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | numberOfArtifacts | [int32](#int32) | | | -| builders | [BuildMetadata.ImageBuilder](#proto.v1.BuildMetadata.ImageBuilder) | repeated | | -| type | [proto.enums.BuildType](#proto.enums.BuildType) | | | -| additional | [BuildMetadata.AdditionalEntry](#proto.v1.BuildMetadata.AdditionalEntry) | repeated | Additional key value pairs to describe the deploy pipeline | +| builders | [BuildMetadata.ImageBuilder](#proto.BuildMetadata.ImageBuilder) | repeated | | +| type | [enums.BuildType](#proto.enums.BuildType) | | | +| additional | [BuildMetadata.AdditionalEntry](#proto.BuildMetadata.AdditionalEntry) | repeated | Additional key value pairs to describe the deploy pipeline | @@ -107,7 +107,7 @@ If the build fails, an error will be attached to the event. - + #### BuildMetadata.AdditionalEntry @@ -123,14 +123,14 @@ If the build fails, an error will be attached to the event. - + #### BuildMetadata.ImageBuilder | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [proto.enums.BuilderType](#proto.enums.BuilderType) | | | +| type | [enums.BuilderType](#proto.enums.BuilderType) | | | | count | [int32](#int32) | | | @@ -139,16 +139,16 @@ If the build fails, an error will be attached to the event. - + #### BuildState `BuildState` maps Skaffold artifacts to their current build states | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| artifacts | [BuildState.ArtifactsEntry](#proto.v1.BuildState.ArtifactsEntry) | repeated | A map of `artifact name -> build-state`. Artifact name is defined in the `skaffold.yaml`. The `build-state` can be:
- `"Not started"`: not yet started
- `"In progress"`: build started
- `"Complete"`: build succeeded
- `"Failed"`: build failed | +| artifacts | [BuildState.ArtifactsEntry](#proto.BuildState.ArtifactsEntry) | repeated | A map of `artifact name -> build-state`. Artifact name is defined in the `skaffold.yaml`. The `build-state` can be:
- `"Not started"`: not yet started
- `"In progress"`: build started
- `"Complete"`: build succeeded
- `"Failed"`: build failed | | autoTrigger | [bool](#bool) | | | -| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | | +| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | | @@ -156,7 +156,7 @@ If the build fails, an error will be attached to the event. - + #### BuildState.ArtifactsEntry @@ -172,7 +172,7 @@ If the build fails, an error will be attached to the event. - + #### DebuggingContainerEvent DebuggingContainerEvent is raised when a debugging container is started or terminated @@ -186,7 +186,7 @@ DebuggingContainerEvent is raised when a debugging container is started or termi | artifact | [string](#string) | | the corresponding artifact's image name | | runtime | [string](#string) | | the detected language runtime | | workingDir | [string](#string) | | the working directory in the container image | -| debugPorts | [DebuggingContainerEvent.DebugPortsEntry](#proto.v1.DebuggingContainerEvent.DebugPortsEntry) | repeated | the exposed debugging-related ports | +| debugPorts | [DebuggingContainerEvent.DebugPortsEntry](#proto.DebuggingContainerEvent.DebugPortsEntry) | repeated | the exposed debugging-related ports | @@ -194,7 +194,7 @@ DebuggingContainerEvent is raised when a debugging container is started or termi - + #### DebuggingContainerEvent.DebugPortsEntry @@ -210,7 +210,7 @@ DebuggingContainerEvent is raised when a debugging container is started or termi - + #### DeployEvent `DeployEvent` represents the status of a deployment, and is emitted by Skaffold anytime a deployment starts or completes, successfully or not. @@ -220,8 +220,8 @@ anytime a deployment starts or completes, successfully or not. | ----- | ---- | ----- | ----------- | | status | [string](#string) | | deployment status oneof: InProgress, Completed, Failed | | err | [string](#string) | | Deprecated. Use actionableErr.message. error when status is Failed | -| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -229,15 +229,15 @@ anytime a deployment starts or completes, successfully or not. - + #### DeployMetadata | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| deployers | [DeployMetadata.Deployer](#proto.v1.DeployMetadata.Deployer) | repeated | | -| cluster | [proto.enums.ClusterType](#proto.enums.ClusterType) | | | +| deployers | [DeployMetadata.Deployer](#proto.DeployMetadata.Deployer) | repeated | | +| cluster | [enums.ClusterType](#proto.enums.ClusterType) | | | @@ -245,14 +245,14 @@ anytime a deployment starts or completes, successfully or not. - + #### DeployMetadata.Deployer | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [proto.enums.DeployerType](#proto.enums.DeployerType) | | | +| type | [enums.DeployerType](#proto.enums.DeployerType) | | | | count | [int32](#int32) | | | @@ -261,7 +261,7 @@ anytime a deployment starts or completes, successfully or not. - + #### DeployState `DeployState` describes the status of the current deploy @@ -270,7 +270,7 @@ anytime a deployment starts or completes, successfully or not. | ----- | ---- | ----- | ----------- | | status | [string](#string) | | | | autoTrigger | [bool](#bool) | | | -| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | | +| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | | @@ -278,7 +278,7 @@ anytime a deployment starts or completes, successfully or not. - + #### DevLoopEvent `DevLoopEvent` marks the start and end of a dev loop. @@ -287,7 +287,7 @@ anytime a deployment starts or completes, successfully or not. | ----- | ---- | ----- | ----------- | | iteration | [int32](#int32) | | dev loop iteration. 0 represents initialization loop. | | status | [string](#string) | | dev loop status oneof: In Progress, Completed, Failed | -| err | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| err | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -295,7 +295,7 @@ anytime a deployment starts or completes, successfully or not. - + #### Event `Event` describes an event in the Skaffold process. It is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusCheckEvent, ResourceStatusCheckEvent, FileSyncEvent, or DebuggingContainerEvent. @@ -303,17 +303,17 @@ It is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusChe | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| metaEvent | [MetaEvent](#proto.v1.MetaEvent) | | contains general information regarding Skaffold like version info | -| buildEvent | [BuildEvent](#proto.v1.BuildEvent) | | describes if the build status per artifact. Status could be one of "InProgress", "Completed" or "Failed". | -| deployEvent | [DeployEvent](#proto.v1.DeployEvent) | | describes if the deployment has started, is in progress or is complete. | -| portEvent | [PortEvent](#proto.v1.PortEvent) | | describes each port forwarding event. | -| statusCheckEvent | [StatusCheckEvent](#proto.v1.StatusCheckEvent) | | describes if the Status check has started, is in progress, has succeeded or failed. | -| resourceStatusCheckEvent | [ResourceStatusCheckEvent](#proto.v1.ResourceStatusCheckEvent) | | indicates progress for each kubernetes deployment. | -| fileSyncEvent | [FileSyncEvent](#proto.v1.FileSyncEvent) | | describes the sync status. | -| debuggingContainerEvent | [DebuggingContainerEvent](#proto.v1.DebuggingContainerEvent) | | describes the appearance or disappearance of a debugging container | -| devLoopEvent | [DevLoopEvent](#proto.v1.DevLoopEvent) | | describes a start and end of a dev loop. | -| terminationEvent | [TerminationEvent](#proto.v1.TerminationEvent) | | describes a skaffold termination event | -| TestEvent | [TestEvent](#proto.v1.TestEvent) | | describes if the test has started, is in progress or is complete. | +| metaEvent | [MetaEvent](#proto.MetaEvent) | | contains general information regarding Skaffold like version info | +| buildEvent | [BuildEvent](#proto.BuildEvent) | | describes if the build status per artifact. Status could be one of "InProgress", "Completed" or "Failed". | +| deployEvent | [DeployEvent](#proto.DeployEvent) | | describes if the deployment has started, is in progress or is complete. | +| portEvent | [PortEvent](#proto.PortEvent) | | describes each port forwarding event. | +| statusCheckEvent | [StatusCheckEvent](#proto.StatusCheckEvent) | | describes if the Status check has started, is in progress, has succeeded or failed. | +| resourceStatusCheckEvent | [ResourceStatusCheckEvent](#proto.ResourceStatusCheckEvent) | | indicates progress for each kubernetes deployment. | +| fileSyncEvent | [FileSyncEvent](#proto.FileSyncEvent) | | describes the sync status. | +| debuggingContainerEvent | [DebuggingContainerEvent](#proto.DebuggingContainerEvent) | | describes the appearance or disappearance of a debugging container | +| devLoopEvent | [DevLoopEvent](#proto.DevLoopEvent) | | describes a start and end of a dev loop. | +| terminationEvent | [TerminationEvent](#proto.TerminationEvent) | | describes a skaffold termination event | +| TestEvent | [TestEvent](#proto.TestEvent) | | describes if the test has started, is in progress or is complete. | @@ -321,7 +321,7 @@ It is one of MetaEvent, BuildEvent, TestEvent, DeployEvent, PortEvent, StatusChe - + #### FileSyncEvent FileSyncEvent describes the sync status. @@ -332,8 +332,8 @@ FileSyncEvent describes the sync status. | image | [string](#string) | | the container image to which files are sycned. | | status | [string](#string) | | status of file sync. one of: Not Started, In progress, Succeeded, Failed. | | err | [string](#string) | | Deprecated. Use actionableErr.message. error in case of status failed. | -| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -341,7 +341,7 @@ FileSyncEvent describes the sync status. - + #### FileSyncState `FileSyncState` contains the status of the current file sync @@ -357,7 +357,7 @@ FileSyncEvent describes the sync status. - + #### IntOrString IntOrString is a type that can hold an int32 or a string. @@ -374,7 +374,7 @@ IntOrString is a type that can hold an int32 or a string. - + #### Intent Intent represents user intents for a given phase. @@ -391,7 +391,7 @@ Intent represents user intents for a given phase. - + #### LogEntry LogEntry describes an event and a string description of the event. @@ -399,7 +399,7 @@ LogEntry describes an event and a string description of the event. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | timestamp | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp of the event. | -| event | [Event](#proto.v1.Event) | | the actual event that is one of | +| event | [Event](#proto.Event) | | the actual event that is one of | | entry | [string](#string) | | description of the event. | @@ -408,7 +408,7 @@ LogEntry describes an event and a string description of the event. - + #### MetaEvent `MetaEvent` provides general information regarding Skaffold @@ -416,7 +416,7 @@ LogEntry describes an event and a string description of the event. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | entry | [string](#string) | | entry, for example: `"Starting Skaffold: {Version:v0.39.0-16-g5bb7c9e0 ConfigVersion:skaffold/v1 GitVersion: GitCommit:5bb7c9e078e4d522a5ffc42a2f1274fd17d75902 GitTreeState:dirty BuildDate01:29Z GoVersion:go1.13rc1 Compiler:gc Platform:linux/amd64}"` | -| metadata | [Metadata](#proto.v1.Metadata) | | Metadata describing skaffold pipeline | +| metadata | [Metadata](#proto.Metadata) | | Metadata describing skaffold pipeline | @@ -424,17 +424,17 @@ LogEntry describes an event and a string description of the event. - + #### Metadata | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| build | [BuildMetadata](#proto.v1.BuildMetadata) | | | -| deploy | [DeployMetadata](#proto.v1.DeployMetadata) | | | -| test | [TestMetadata](#proto.v1.TestMetadata) | | | -| additional | [Metadata.AdditionalEntry](#proto.v1.Metadata.AdditionalEntry) | repeated | Additional key value pairs to describe the build pipeline | +| build | [BuildMetadata](#proto.BuildMetadata) | | | +| deploy | [DeployMetadata](#proto.DeployMetadata) | | | +| test | [TestMetadata](#proto.TestMetadata) | | | +| additional | [Metadata.AdditionalEntry](#proto.Metadata.AdditionalEntry) | repeated | Additional key value pairs to describe the build pipeline | @@ -442,7 +442,7 @@ LogEntry describes an event and a string description of the event. - + #### Metadata.AdditionalEntry @@ -458,7 +458,7 @@ LogEntry describes an event and a string description of the event. - + #### PortEvent PortEvent Event describes each port forwarding event. @@ -474,7 +474,7 @@ PortEvent Event describes each port forwarding event. | resourceType | [string](#string) | | resource type e.g. "pod", "service". | | resourceName | [string](#string) | | name of the resource to forward. | | address | [string](#string) | | address on which to bind | -| targetPort | [IntOrString](#proto.v1.IntOrString) | | target port is the resource port that will be forwarded. | +| targetPort | [IntOrString](#proto.IntOrString) | | target port is the resource port that will be forwarded. | @@ -482,7 +482,7 @@ PortEvent Event describes each port forwarding event. - + #### Request @@ -497,7 +497,7 @@ PortEvent Event describes each port forwarding event. - + #### ResourceStatusCheckEvent A Resource StatusCheck Event, indicates progress for each kubernetes deployment. For every resource, there will be exactly one event with `status` *Succeeded* or *Failed* event. @@ -512,8 +512,8 @@ will be sent with the new status. | status | [string](#string) | | | | message | [string](#string) | | | | err | [string](#string) | | Deprecated. Use actionableErr.message. | -| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | | -| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | | +| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -521,7 +521,7 @@ will be sent with the new status. - + #### Response @@ -536,21 +536,21 @@ will be sent with the new status. - + #### State `State` represents the current state of the Skaffold components | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| buildState | [BuildState](#proto.v1.BuildState) | | | -| deployState | [DeployState](#proto.v1.DeployState) | | | -| forwardedPorts | [State.ForwardedPortsEntry](#proto.v1.State.ForwardedPortsEntry) | repeated | | -| statusCheckState | [StatusCheckState](#proto.v1.StatusCheckState) | | | -| fileSyncState | [FileSyncState](#proto.v1.FileSyncState) | | | -| debuggingContainers | [DebuggingContainerEvent](#proto.v1.DebuggingContainerEvent) | repeated | | -| metadata | [Metadata](#proto.v1.Metadata) | | | -| testState | [TestState](#proto.v1.TestState) | | | +| buildState | [BuildState](#proto.BuildState) | | | +| deployState | [DeployState](#proto.DeployState) | | | +| forwardedPorts | [State.ForwardedPortsEntry](#proto.State.ForwardedPortsEntry) | repeated | | +| statusCheckState | [StatusCheckState](#proto.StatusCheckState) | | | +| fileSyncState | [FileSyncState](#proto.FileSyncState) | | | +| debuggingContainers | [DebuggingContainerEvent](#proto.DebuggingContainerEvent) | repeated | | +| metadata | [Metadata](#proto.Metadata) | | | +| testState | [TestState](#proto.TestState) | | | @@ -558,7 +558,7 @@ will be sent with the new status. - + #### State.ForwardedPortsEntry @@ -566,7 +566,7 @@ will be sent with the new status. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | key | [int32](#int32) | | | -| value | [PortEvent](#proto.v1.PortEvent) | | | +| value | [PortEvent](#proto.PortEvent) | | | @@ -574,14 +574,14 @@ will be sent with the new status. - + #### StateResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| state | [State](#proto.v1.State) | | | +| state | [State](#proto.State) | | | @@ -589,7 +589,7 @@ will be sent with the new status. - + #### StatusCheckEvent `StatusCheckEvent` describes if the status check for kubernetes rollout has started, is in progress, has succeeded or failed. @@ -599,8 +599,8 @@ will be sent with the new status. | status | [string](#string) | | | | message | [string](#string) | | | | err | [string](#string) | | Deprecated. Use actionableErr.message. | -| errCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | -| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| errCode | [enums.StatusCode](#proto.enums.StatusCode) | | Deprecated. Use actionableErr.errCode. status code representing success or failure | +| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -608,7 +608,7 @@ will be sent with the new status. - + #### StatusCheckState `StatusCheckState` describes the state of status check of current deployed resources. @@ -616,8 +616,8 @@ will be sent with the new status. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | | -| resources | [StatusCheckState.ResourcesEntry](#proto.v1.StatusCheckState.ResourcesEntry) | repeated | A map of `resource name -> status-check-state`. Where `resource-name` is the kubernetes resource name. The `status-check-state` can be
- `"Not started"`: indicates that `status-check` has just started.
- `"In progress"`: InProgress is sent after every resource check is complete.
- `"Succeeded"`: - `"Failed"`: | -| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | StatusCheck statusCode | +| resources | [StatusCheckState.ResourcesEntry](#proto.StatusCheckState.ResourcesEntry) | repeated | A map of `resource name -> status-check-state`. Where `resource-name` is the kubernetes resource name. The `status-check-state` can be
- `"Not started"`: indicates that `status-check` has just started.
- `"In progress"`: InProgress is sent after every resource check is complete.
- `"Succeeded"`: - `"Failed"`: | +| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | StatusCheck statusCode | @@ -625,7 +625,7 @@ will be sent with the new status. - + #### StatusCheckState.ResourcesEntry @@ -641,14 +641,14 @@ will be sent with the new status. - + #### Suggestion Suggestion defines the action a user needs to recover from an error. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| suggestionCode | [proto.enums.SuggestionCode](#proto.enums.SuggestionCode) | | code representing a suggestion | +| suggestionCode | [enums.SuggestionCode](#proto.enums.SuggestionCode) | | code representing a suggestion | | action | [string](#string) | | action represents the suggestion action | @@ -657,7 +657,7 @@ Suggestion defines the action a user needs to recover from an error. - + #### TerminationEvent `TerminationEvent` marks the end of the skaffold session @@ -665,7 +665,7 @@ Suggestion defines the action a user needs to recover from an error. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | status oneof: Completed or Failed | -| err | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| err | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -673,7 +673,7 @@ Suggestion defines the action a user needs to recover from an error. - + #### TestEvent `TestEvent` represents the status of a test, and is emitted by Skaffold anytime a test starts or completes, successfully or not. @@ -682,7 +682,7 @@ anytime a test starts or completes, successfully or not. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | test status oneof: InProgress, Completed, Failed | -| actionableErr | [ActionableErr](#proto.v1.ActionableErr) | | actionable error message | +| actionableErr | [ActionableErr](#proto.ActionableErr) | | actionable error message | @@ -690,14 +690,14 @@ anytime a test starts or completes, successfully or not. - + #### TestMetadata TestMetadata describes the test pipeline | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| Testers | [TestMetadata.Tester](#proto.v1.TestMetadata.Tester) | repeated | | +| Testers | [TestMetadata.Tester](#proto.TestMetadata.Tester) | repeated | | @@ -705,14 +705,14 @@ TestMetadata describes the test pipeline - + #### TestMetadata.Tester | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [proto.enums.TesterType](#proto.enums.TesterType) | | | +| type | [enums.TesterType](#proto.enums.TesterType) | | | | count | [int32](#int32) | | | @@ -721,7 +721,7 @@ TestMetadata describes the test pipeline - + #### TestState `TestState` describes the current state of the test @@ -729,7 +729,7 @@ TestMetadata describes the test pipeline | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | status | [string](#string) | | Status of the current test | -| statusCode | [proto.enums.StatusCode](#proto.enums.StatusCode) | | Teststate status code | +| statusCode | [enums.StatusCode](#proto.enums.StatusCode) | | Teststate status code | @@ -737,14 +737,14 @@ TestMetadata describes the test pipeline - + #### TriggerRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| state | [TriggerState](#proto.v1.TriggerState) | | | +| state | [TriggerState](#proto.TriggerState) | | | @@ -752,7 +752,7 @@ TestMetadata describes the test pipeline - + #### TriggerState TriggerState represents trigger state for a given phase. @@ -767,14 +767,14 @@ TriggerState represents trigger state for a given phase. - + #### UserIntentRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| intent | [Intent](#proto.v1.Intent) | | | +| intent | [Intent](#proto.Intent) | | | diff --git a/hack/generate-proto.sh b/hack/generate-proto.sh index f8b23775495..7b9cd56792b 100755 --- a/hack/generate-proto.sh +++ b/hack/generate-proto.sh @@ -20,10 +20,8 @@ docker build -t gen-proto -f hack/proto/Dockerfile --target generate-files proto docker run --rm gen-proto cat enums/github.com/GoogleContainerTools/skaffold/proto/enums/enums.pb.go > proto/enums/enums.pb.go # Copy v1 files -#docker run --rm gen-proto cat v1/skaffold.pb.go > proto/v1/skaffold.pb.go -#docker run --rm gen-proto cat v1/skaffold.pb.gw.go > proto/v1/skaffold.pb.gw.go -docker run --rm gen-proto cat /proto/github.com/GoogleContainerTools/skaffold/proto/v1/skaffold.pb.go > proto/v1/skaffold.pb.go -docker run --rm gen-proto cat /proto/github.com/GoogleContainerTools/skaffold/proto/v1/skaffold.pb.gw.go > proto/v1/skaffold.pb.gw.go +docker run --rm gen-proto cat v1/skaffold.pb.go > proto/v1/skaffold.pb.go +docker run --rm gen-proto cat v1/skaffold.pb.gw.go > proto/v1/skaffold.pb.gw.go # Copy v2 files docker run --rm gen-proto cat /proto/github.com/GoogleContainerTools/skaffold/proto/v2/skaffold.pb.go > proto/v2/skaffold.pb.go diff --git a/integration/cache_test.go b/integration/cache_test.go index 539a2cda8f5..c050028871b 100644 --- a/integration/cache_test.go +++ b/integration/cache_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "github.com/GoogleContainerTools/skaffold/integration/skaffold" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func TestCacheAPITriggers(t *testing.T) { diff --git a/integration/debug_test.go b/integration/debug_test.go index 417338d3ca4..cc61fbe07c2 100644 --- a/integration/debug_test.go +++ b/integration/debug_test.go @@ -24,7 +24,7 @@ import ( "github.com/GoogleContainerTools/skaffold/integration/skaffold" debugannotations "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug/annotations" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/integration/dev_test.go b/integration/dev_test.go index a5567001e73..b26f6981faa 100644 --- a/integration/dev_test.go +++ b/integration/dev_test.go @@ -36,7 +36,7 @@ import ( "github.com/GoogleContainerTools/skaffold/integration/skaffold" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/integration/rpc_test.go b/integration/rpc_test.go index e9ad597e1fb..b0220d5f1ff 100644 --- a/integration/rpc_test.go +++ b/integration/rpc_test.go @@ -34,7 +34,7 @@ import ( "github.com/GoogleContainerTools/skaffold/integration/skaffold" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/integration/sync_test.go b/integration/sync_test.go index 1951200b705..f6a462709a6 100644 --- a/integration/sync_test.go +++ b/integration/sync_test.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "github.com/GoogleContainerTools/skaffold/integration/skaffold" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func TestDevSync(t *testing.T) { diff --git a/integration/test_events_test.go b/integration/test_events_test.go index 6ccab0dc432..6c5377e5b2f 100644 --- a/integration/test_events_test.go +++ b/integration/test_events_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "github.com/GoogleContainerTools/skaffold/integration/skaffold" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func TestTestEvents(t *testing.T) { diff --git a/pkg/diag/recommender/container_errors.go b/pkg/diag/recommender/container_errors.go index 7d58884f3a5..b7bfd050af8 100644 --- a/pkg/diag/recommender/container_errors.go +++ b/pkg/diag/recommender/container_errors.go @@ -17,7 +17,7 @@ limitations under the License. package recommender import ( - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) type ContainerError struct { diff --git a/pkg/diag/validator/pod.go b/pkg/diag/validator/pod.go index 18a77bfb5ab..0f2644e38bb 100644 --- a/pkg/diag/validator/pod.go +++ b/pkg/diag/validator/pod.go @@ -31,7 +31,7 @@ import ( corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "github.com/GoogleContainerTools/skaffold/pkg/diag/recommender" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/diag/validator/pod_test.go b/pkg/diag/validator/pod_test.go index 3212ac15b2b..ba15af272e4 100644 --- a/pkg/diag/validator/pod_test.go +++ b/pkg/diag/validator/pod_test.go @@ -31,7 +31,7 @@ import ( fakekubeclientset "k8s.io/client-go/kubernetes/fake" "github.com/GoogleContainerTools/skaffold/pkg/diag/recommender" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/diag/validator/recommender.go b/pkg/diag/validator/recommender.go index 3ca9423de13..e2fcd2d1c25 100644 --- a/pkg/diag/validator/recommender.go +++ b/pkg/diag/validator/recommender.go @@ -17,7 +17,7 @@ limitations under the License. package validator import ( - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) // Recommender makes recommendations based on err in the actionable error diff --git a/pkg/diag/validator/resource.go b/pkg/diag/validator/resource.go index e5a13269352..0d6ab809d87 100644 --- a/pkg/diag/validator/resource.go +++ b/pkg/diag/validator/resource.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Resource struct { diff --git a/pkg/diag/validator/resource_test.go b/pkg/diag/validator/resource_test.go index 6572e2696cd..523fe7c9665 100644 --- a/pkg/diag/validator/resource_test.go +++ b/pkg/diag/validator/resource_test.go @@ -23,7 +23,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/build_problems.go b/pkg/skaffold/build/build_problems.go index 1d9fa1aec06..465b0cc1828 100644 --- a/pkg/skaffold/build/build_problems.go +++ b/pkg/skaffold/build/build_problems.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/build/build_problems_test.go b/pkg/skaffold/build/build_problems_test.go index bbb5d3f0324..9d6fd724c35 100644 --- a/pkg/skaffold/build/build_problems_test.go +++ b/pkg/skaffold/build/build_problems_test.go @@ -23,7 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/cache/lookup_test.go b/pkg/skaffold/build/cache/lookup_test.go index 24d1f30c7fe..2b6c80c1f7e 100644 --- a/pkg/skaffold/build/cache/lookup_test.go +++ b/pkg/skaffold/build/cache/lookup_test.go @@ -30,7 +30,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/docker/docker_test.go b/pkg/skaffold/build/docker/docker_test.go index 14d6c094a11..26acc12e969 100644 --- a/pkg/skaffold/build/docker/docker_test.go +++ b/pkg/skaffold/build/docker/docker_test.go @@ -31,7 +31,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/build/docker/errors.go b/pkg/skaffold/build/docker/errors.go index 07f7dc9986d..28305aaa106 100644 --- a/pkg/skaffold/build/docker/errors.go +++ b/pkg/skaffold/build/docker/errors.go @@ -27,7 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/build/jib/errors.go b/pkg/skaffold/build/jib/errors.go index 849bfc958a7..e9522498b60 100644 --- a/pkg/skaffold/build/jib/errors.go +++ b/pkg/skaffold/build/jib/errors.go @@ -22,7 +22,7 @@ import ( "github.com/sirupsen/logrus" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func unknownPluginType(ws string) error { diff --git a/pkg/skaffold/deploy/deploy_problems.go b/pkg/skaffold/deploy/deploy_problems.go index 2d3c21e0698..d2a9c19d53a 100644 --- a/pkg/skaffold/deploy/deploy_problems.go +++ b/pkg/skaffold/deploy/deploy_problems.go @@ -24,7 +24,7 @@ import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/types" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/deploy/deploy_problems_test.go b/pkg/skaffold/deploy/deploy_problems_test.go index f1bc6594f60..b43d58f5b64 100644 --- a/pkg/skaffold/deploy/deploy_problems_test.go +++ b/pkg/skaffold/deploy/deploy_problems_test.go @@ -24,7 +24,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/deploy/error/errors.go b/pkg/skaffold/deploy/error/errors.go index adb1c120393..16493c2de77 100644 --- a/pkg/skaffold/deploy/error/errors.go +++ b/pkg/skaffold/deploy/error/errors.go @@ -24,7 +24,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/types" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/error/errors_test.go b/pkg/skaffold/deploy/error/errors_test.go index b2922b0dfcd..662e6c580ae 100644 --- a/pkg/skaffold/deploy/error/errors_test.go +++ b/pkg/skaffold/deploy/error/errors_test.go @@ -21,7 +21,7 @@ import ( "testing" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/deploy/helm/errors.go b/pkg/skaffold/deploy/helm/errors.go index bfbb5d408cf..7d63cd93e93 100644 --- a/pkg/skaffold/deploy/helm/errors.go +++ b/pkg/skaffold/deploy/helm/errors.go @@ -23,7 +23,7 @@ import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/kubectl/errors.go b/pkg/skaffold/deploy/kubectl/errors.go index cdec8ed42da..1a9450bc94d 100644 --- a/pkg/skaffold/deploy/kubectl/errors.go +++ b/pkg/skaffold/deploy/kubectl/errors.go @@ -21,7 +21,7 @@ import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/kustomize/errors.go b/pkg/skaffold/deploy/kustomize/errors.go index 1653906b854..1abd9227a86 100644 --- a/pkg/skaffold/deploy/kustomize/errors.go +++ b/pkg/skaffold/deploy/kustomize/errors.go @@ -18,7 +18,7 @@ package kustomize import ( deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func userErr(err error) error { diff --git a/pkg/skaffold/deploy/resource/deployment.go b/pkg/skaffold/deploy/resource/deployment.go index e7aebda1be7..d571df7e70e 100644 --- a/pkg/skaffold/deploy/resource/deployment.go +++ b/pkg/skaffold/deploy/resource/deployment.go @@ -30,7 +30,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/deploy/resource/deployment_test.go b/pkg/skaffold/deploy/resource/deployment_test.go index 0779c55d820..03e112c2f16 100644 --- a/pkg/skaffold/deploy/resource/deployment_test.go +++ b/pkg/skaffold/deploy/resource/deployment_test.go @@ -27,7 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/diag/validator" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/deploy/resource/status.go b/pkg/skaffold/deploy/resource/status.go index 3d3e3d7c081..ed488468c46 100644 --- a/pkg/skaffold/deploy/resource/status.go +++ b/pkg/skaffold/deploy/resource/status.go @@ -19,7 +19,7 @@ package resource import ( "fmt" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Status struct { diff --git a/pkg/skaffold/deploy/resource/status_test.go b/pkg/skaffold/deploy/resource/status_test.go index 8d8d62e75d0..7ae20b10940 100644 --- a/pkg/skaffold/deploy/resource/status_test.go +++ b/pkg/skaffold/deploy/resource/status_test.go @@ -19,7 +19,7 @@ package resource import ( "testing" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/docker/errors.go b/pkg/skaffold/docker/errors.go index 78d3c7806bc..b7f75e33637 100644 --- a/pkg/skaffold/docker/errors.go +++ b/pkg/skaffold/docker/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func remoteDigestGetErr(err error) error { diff --git a/pkg/skaffold/docker/image_test.go b/pkg/skaffold/docker/image_test.go index 736c0801485..36b07512435 100644 --- a/pkg/skaffold/docker/image_test.go +++ b/pkg/skaffold/docker/image_test.go @@ -30,7 +30,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/docker/parse.go b/pkg/skaffold/docker/parse.go index da70fdb1310..c883e29c487 100644 --- a/pkg/skaffold/docker/parse.go +++ b/pkg/skaffold/docker/parse.go @@ -39,7 +39,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) type from struct { diff --git a/pkg/skaffold/errors/err_def.go b/pkg/skaffold/errors/err_def.go index 3c489be31e0..da8592e5f3d 100644 --- a/pkg/skaffold/errors/err_def.go +++ b/pkg/skaffold/errors/err_def.go @@ -19,7 +19,7 @@ package errors import ( "fmt" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Error interface { diff --git a/pkg/skaffold/errors/errors.go b/pkg/skaffold/errors/errors.go index e4008d03afb..6cc8a82892d 100644 --- a/pkg/skaffold/errors/errors.go +++ b/pkg/skaffold/errors/errors.go @@ -22,7 +22,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" protoV2 "github.com/GoogleContainerTools/skaffold/proto/v2" ) diff --git a/pkg/skaffold/errors/errors_test.go b/pkg/skaffold/errors/errors_test.go index 63d0dde4c6e..da21b0308b6 100644 --- a/pkg/skaffold/errors/errors_test.go +++ b/pkg/skaffold/errors/errors_test.go @@ -23,7 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/errors/problem.go b/pkg/skaffold/errors/problem.go index b64a3632d82..3136ec66620 100644 --- a/pkg/skaffold/errors/problem.go +++ b/pkg/skaffold/errors/problem.go @@ -23,7 +23,7 @@ import ( "sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/event/event.go b/pkg/skaffold/event/event.go index c8923a7f6d7..e7bf7c941e3 100644 --- a/pkg/skaffold/event/event.go +++ b/pkg/skaffold/event/event.go @@ -33,7 +33,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/version" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/event/event_test.go b/pkg/skaffold/event/event_test.go index dd7767efd36..7ee55bcc4e1 100644 --- a/pkg/skaffold/event/event_test.go +++ b/pkg/skaffold/event/event_test.go @@ -34,7 +34,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" schemautil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/event/util.go b/pkg/skaffold/event/util.go index 35a11961b13..d88237767cc 100644 --- a/pkg/skaffold/event/util.go +++ b/pkg/skaffold/event/util.go @@ -20,7 +20,7 @@ import ( "strings" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func initializeMetadata(pipelines []latestV1.Pipeline, kubeContext string) *proto.Metadata { diff --git a/pkg/skaffold/event/util_test.go b/pkg/skaffold/event/util_test.go index 5ce335943f3..6d3263e5f61 100644 --- a/pkg/skaffold/event/util_test.go +++ b/pkg/skaffold/event/util_test.go @@ -21,7 +21,7 @@ import ( "testing" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/initializer/init_problems.go b/pkg/skaffold/initializer/init_problems.go index c809e68a083..cc01d9d9bb9 100644 --- a/pkg/skaffold/initializer/init_problems.go +++ b/pkg/skaffold/initializer/init_problems.go @@ -21,7 +21,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/initializer/init_problems_test.go b/pkg/skaffold/initializer/init_problems_test.go index a19e1fbdb1e..d6e03af264a 100644 --- a/pkg/skaffold/initializer/init_problems_test.go +++ b/pkg/skaffold/initializer/init_problems_test.go @@ -23,7 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go b/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go index 5473614ca39..4032f90d3cd 100644 --- a/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go +++ b/pkg/skaffold/inspect/buildEnv/modify_gcb_test.go @@ -27,7 +27,7 @@ import ( v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/inspect/errors.go b/pkg/skaffold/inspect/errors.go index 892767c6301..12b101309b8 100644 --- a/pkg/skaffold/inspect/errors.go +++ b/pkg/skaffold/inspect/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) // BuildEnvAlreadyExists specifies that there's an existing build environment definition for the same type. diff --git a/pkg/skaffold/inspect/output.go b/pkg/skaffold/inspect/output.go index bb5e7757b94..1609d1f5aeb 100644 --- a/pkg/skaffold/inspect/output.go +++ b/pkg/skaffold/inspect/output.go @@ -22,7 +22,7 @@ import ( "io" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) type Formatter interface { diff --git a/pkg/skaffold/instrumentation/export.go b/pkg/skaffold/instrumentation/export.go index 624d7a42a65..433ccf7e59a 100644 --- a/pkg/skaffold/instrumentation/export.go +++ b/pkg/skaffold/instrumentation/export.go @@ -48,7 +48,7 @@ import ( "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/cmd/statik" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func ExportMetrics(exitCode int) error { diff --git a/pkg/skaffold/instrumentation/export_test.go b/pkg/skaffold/instrumentation/export_test.go index 7df55d2a87a..264b51d04b9 100644 --- a/pkg/skaffold/instrumentation/export_test.go +++ b/pkg/skaffold/instrumentation/export_test.go @@ -31,7 +31,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/controller/basic" "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/cmd/statik" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/instrumentation/meter.go b/pkg/skaffold/instrumentation/meter.go index bd3e6ad6c38..946de67f9ca 100644 --- a/pkg/skaffold/instrumentation/meter.go +++ b/pkg/skaffold/instrumentation/meter.go @@ -28,7 +28,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/version" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yamltags" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/instrumentation/types.go b/pkg/skaffold/instrumentation/types.go index 77245dd67bb..67e329adda8 100644 --- a/pkg/skaffold/instrumentation/types.go +++ b/pkg/skaffold/instrumentation/types.go @@ -21,7 +21,7 @@ import ( "github.com/sirupsen/logrus" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) // skaffoldMeter describes the data used to determine operational metrics. diff --git a/pkg/skaffold/kubernetes/manifest/errors.go b/pkg/skaffold/kubernetes/manifest/errors.go index 2ac1ae2ae5b..6443b265af1 100644 --- a/pkg/skaffold/kubernetes/manifest/errors.go +++ b/pkg/skaffold/kubernetes/manifest/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func replaceImageErr(err error) error { diff --git a/pkg/skaffold/kubernetes/status/status_check.go b/pkg/skaffold/kubernetes/status/status_check.go index 4dd460c73f7..81acb612716 100644 --- a/pkg/skaffold/kubernetes/status/status_check.go +++ b/pkg/skaffold/kubernetes/status/status_check.go @@ -44,7 +44,7 @@ import ( kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/kubernetes/status/status_check_test.go b/pkg/skaffold/kubernetes/status/status_check_test.go index a9574a9540e..b508cd5c12e 100644 --- a/pkg/skaffold/kubernetes/status/status_check_test.go +++ b/pkg/skaffold/kubernetes/status/status_check_test.go @@ -38,7 +38,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" testEvent "github.com/GoogleContainerTools/skaffold/testutil/event" ) diff --git a/pkg/skaffold/parser/config_test.go b/pkg/skaffold/parser/config_test.go index ff0643565d2..62e4d76942e 100644 --- a/pkg/skaffold/parser/config_test.go +++ b/pkg/skaffold/parser/config_test.go @@ -28,7 +28,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/git" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/render/renderer/renderer.go b/pkg/skaffold/render/renderer/renderer.go index ab6f5d25bba..36b6ee98f45 100644 --- a/pkg/skaffold/render/renderer/renderer.go +++ b/pkg/skaffold/render/renderer/renderer.go @@ -36,7 +36,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/validate" latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) const ( diff --git a/pkg/skaffold/render/transform/transform.go b/pkg/skaffold/render/transform/transform.go index e1f69572ac0..4848a202feb 100644 --- a/pkg/skaffold/render/transform/transform.go +++ b/pkg/skaffold/render/transform/transform.go @@ -22,7 +22,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/kptfile" latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/render/validate/validate.go b/pkg/skaffold/render/validate/validate.go index fc312031eaf..1467c81aa76 100644 --- a/pkg/skaffold/render/validate/validate.go +++ b/pkg/skaffold/render/validate/validate.go @@ -21,7 +21,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/render/kptfile" latestV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v2" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/runner/v1/dev.go b/pkg/skaffold/runner/v1/dev.go index 38d06754637..7c1ae4024e1 100644 --- a/pkg/skaffold/runner/v1/dev.go +++ b/pkg/skaffold/runner/v1/dev.go @@ -36,7 +36,7 @@ import ( latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/schema/errors/errors.go b/pkg/skaffold/schema/errors/errors.go index 87ac53c2d61..e3355b0aea0 100644 --- a/pkg/skaffold/schema/errors/errors.go +++ b/pkg/skaffold/schema/errors/errors.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) // ConfigParsingError returns a generic config parsing error diff --git a/pkg/skaffold/schema/errors/errors_test.go b/pkg/skaffold/schema/errors/errors_test.go index 7284b088792..e6eab4381aa 100644 --- a/pkg/skaffold/schema/errors/errors_test.go +++ b/pkg/skaffold/schema/errors/errors_test.go @@ -23,7 +23,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/proto/enums" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/schema/validation/validation.go b/pkg/skaffold/schema/validation/validation.go index dfa4dc70f24..63dba9e410b 100644 --- a/pkg/skaffold/schema/validation/validation.go +++ b/pkg/skaffold/schema/validation/validation.go @@ -37,7 +37,7 @@ import ( latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yamltags" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) var ( diff --git a/pkg/skaffold/server/endpoints.go b/pkg/skaffold/server/endpoints.go index e5f8c305448..33a5c79aac7 100644 --- a/pkg/skaffold/server/endpoints.go +++ b/pkg/skaffold/server/endpoints.go @@ -24,7 +24,7 @@ import ( "google.golang.org/grpc/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func (s *server) GetState(context.Context, *empty.Empty) (*proto.State, error) { diff --git a/pkg/skaffold/server/server.go b/pkg/skaffold/server/server.go index 9ef0dcf2158..920155d5a19 100644 --- a/pkg/skaffold/server/server.go +++ b/pkg/skaffold/server/server.go @@ -34,7 +34,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" v2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/server/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" protoV2 "github.com/GoogleContainerTools/skaffold/proto/v2" ) diff --git a/pkg/skaffold/server/server_test.go b/pkg/skaffold/server/server_test.go index a783f0141c5..064db0e90b3 100644 --- a/pkg/skaffold/server/server_test.go +++ b/pkg/skaffold/server/server_test.go @@ -24,7 +24,7 @@ import ( "google.golang.org/grpc" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/test/custom/error.go b/pkg/skaffold/test/custom/error.go index 945f109af82..119e7e70075 100644 --- a/pkg/skaffold/test/custom/error.go +++ b/pkg/skaffold/test/custom/error.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func cmdRunRetrieveErr(command string, imageName string, err error) error { diff --git a/pkg/skaffold/test/structure/error.go b/pkg/skaffold/test/structure/error.go index 265987c9ca1..50dafd07d96 100644 --- a/pkg/skaffold/test/structure/error.go +++ b/pkg/skaffold/test/structure/error.go @@ -20,7 +20,7 @@ import ( "fmt" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - proto "github.com/GoogleContainerTools/skaffold/proto/v1" + "github.com/GoogleContainerTools/skaffold/proto/v1" ) func containerStructureTestErr(err error) error { diff --git a/proto/v1/skaffold.pb.go b/proto/v1/skaffold.pb.go index 7abe7c740e3..a21b5c14c45 100644 --- a/proto/v1/skaffold.pb.go +++ b/proto/v1/skaffold.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: v1/skaffold.proto -package v1 +package proto import ( context "context" @@ -2593,186 +2593,184 @@ func (m *IntOrString) GetStrVal() string { } func init() { - proto.RegisterType((*StateResponse)(nil), "proto.v1.StateResponse") - proto.RegisterType((*Response)(nil), "proto.v1.Response") - proto.RegisterType((*Request)(nil), "proto.v1.Request") - proto.RegisterType((*State)(nil), "proto.v1.State") - proto.RegisterMapType((map[int32]*PortEvent)(nil), "proto.v1.State.ForwardedPortsEntry") - proto.RegisterType((*Metadata)(nil), "proto.v1.Metadata") - proto.RegisterMapType((map[string]string)(nil), "proto.v1.Metadata.AdditionalEntry") - proto.RegisterType((*BuildMetadata)(nil), "proto.v1.BuildMetadata") - proto.RegisterMapType((map[string]string)(nil), "proto.v1.BuildMetadata.AdditionalEntry") - proto.RegisterType((*BuildMetadata_ImageBuilder)(nil), "proto.v1.BuildMetadata.ImageBuilder") - proto.RegisterType((*TestMetadata)(nil), "proto.v1.TestMetadata") - proto.RegisterType((*TestMetadata_Tester)(nil), "proto.v1.TestMetadata.Tester") - proto.RegisterType((*DeployMetadata)(nil), "proto.v1.DeployMetadata") - proto.RegisterType((*DeployMetadata_Deployer)(nil), "proto.v1.DeployMetadata.Deployer") - proto.RegisterType((*BuildState)(nil), "proto.v1.BuildState") - proto.RegisterMapType((map[string]string)(nil), "proto.v1.BuildState.ArtifactsEntry") - proto.RegisterType((*TestState)(nil), "proto.v1.TestState") - proto.RegisterType((*DeployState)(nil), "proto.v1.DeployState") - proto.RegisterType((*StatusCheckState)(nil), "proto.v1.StatusCheckState") - proto.RegisterMapType((map[string]string)(nil), "proto.v1.StatusCheckState.ResourcesEntry") - proto.RegisterType((*FileSyncState)(nil), "proto.v1.FileSyncState") - proto.RegisterType((*Event)(nil), "proto.v1.Event") - proto.RegisterType((*TerminationEvent)(nil), "proto.v1.TerminationEvent") - proto.RegisterType((*DevLoopEvent)(nil), "proto.v1.DevLoopEvent") - proto.RegisterType((*ActionableErr)(nil), "proto.v1.ActionableErr") - proto.RegisterType((*MetaEvent)(nil), "proto.v1.MetaEvent") - proto.RegisterType((*BuildEvent)(nil), "proto.v1.BuildEvent") - proto.RegisterType((*TestEvent)(nil), "proto.v1.TestEvent") - proto.RegisterType((*DeployEvent)(nil), "proto.v1.DeployEvent") - proto.RegisterType((*StatusCheckEvent)(nil), "proto.v1.StatusCheckEvent") - proto.RegisterType((*ResourceStatusCheckEvent)(nil), "proto.v1.ResourceStatusCheckEvent") - proto.RegisterType((*PortEvent)(nil), "proto.v1.PortEvent") - proto.RegisterType((*FileSyncEvent)(nil), "proto.v1.FileSyncEvent") - proto.RegisterType((*DebuggingContainerEvent)(nil), "proto.v1.DebuggingContainerEvent") - proto.RegisterMapType((map[string]uint32)(nil), "proto.v1.DebuggingContainerEvent.DebugPortsEntry") - proto.RegisterType((*LogEntry)(nil), "proto.v1.LogEntry") - proto.RegisterType((*UserIntentRequest)(nil), "proto.v1.UserIntentRequest") - proto.RegisterType((*TriggerRequest)(nil), "proto.v1.TriggerRequest") - proto.RegisterType((*TriggerState)(nil), "proto.v1.TriggerState") - proto.RegisterType((*Intent)(nil), "proto.v1.Intent") - proto.RegisterType((*Suggestion)(nil), "proto.v1.Suggestion") - proto.RegisterType((*IntOrString)(nil), "proto.v1.IntOrString") + proto.RegisterType((*StateResponse)(nil), "proto.StateResponse") + proto.RegisterType((*Response)(nil), "proto.Response") + proto.RegisterType((*Request)(nil), "proto.Request") + proto.RegisterType((*State)(nil), "proto.State") + proto.RegisterMapType((map[int32]*PortEvent)(nil), "proto.State.ForwardedPortsEntry") + proto.RegisterType((*Metadata)(nil), "proto.Metadata") + proto.RegisterMapType((map[string]string)(nil), "proto.Metadata.AdditionalEntry") + proto.RegisterType((*BuildMetadata)(nil), "proto.BuildMetadata") + proto.RegisterMapType((map[string]string)(nil), "proto.BuildMetadata.AdditionalEntry") + proto.RegisterType((*BuildMetadata_ImageBuilder)(nil), "proto.BuildMetadata.ImageBuilder") + proto.RegisterType((*TestMetadata)(nil), "proto.TestMetadata") + proto.RegisterType((*TestMetadata_Tester)(nil), "proto.TestMetadata.Tester") + proto.RegisterType((*DeployMetadata)(nil), "proto.DeployMetadata") + proto.RegisterType((*DeployMetadata_Deployer)(nil), "proto.DeployMetadata.Deployer") + proto.RegisterType((*BuildState)(nil), "proto.BuildState") + proto.RegisterMapType((map[string]string)(nil), "proto.BuildState.ArtifactsEntry") + proto.RegisterType((*TestState)(nil), "proto.TestState") + proto.RegisterType((*DeployState)(nil), "proto.DeployState") + proto.RegisterType((*StatusCheckState)(nil), "proto.StatusCheckState") + proto.RegisterMapType((map[string]string)(nil), "proto.StatusCheckState.ResourcesEntry") + proto.RegisterType((*FileSyncState)(nil), "proto.FileSyncState") + proto.RegisterType((*Event)(nil), "proto.Event") + proto.RegisterType((*TerminationEvent)(nil), "proto.TerminationEvent") + proto.RegisterType((*DevLoopEvent)(nil), "proto.DevLoopEvent") + proto.RegisterType((*ActionableErr)(nil), "proto.ActionableErr") + proto.RegisterType((*MetaEvent)(nil), "proto.MetaEvent") + proto.RegisterType((*BuildEvent)(nil), "proto.BuildEvent") + proto.RegisterType((*TestEvent)(nil), "proto.TestEvent") + proto.RegisterType((*DeployEvent)(nil), "proto.DeployEvent") + proto.RegisterType((*StatusCheckEvent)(nil), "proto.StatusCheckEvent") + proto.RegisterType((*ResourceStatusCheckEvent)(nil), "proto.ResourceStatusCheckEvent") + proto.RegisterType((*PortEvent)(nil), "proto.PortEvent") + proto.RegisterType((*FileSyncEvent)(nil), "proto.FileSyncEvent") + proto.RegisterType((*DebuggingContainerEvent)(nil), "proto.DebuggingContainerEvent") + proto.RegisterMapType((map[string]uint32)(nil), "proto.DebuggingContainerEvent.DebugPortsEntry") + proto.RegisterType((*LogEntry)(nil), "proto.LogEntry") + proto.RegisterType((*UserIntentRequest)(nil), "proto.UserIntentRequest") + proto.RegisterType((*TriggerRequest)(nil), "proto.TriggerRequest") + proto.RegisterType((*TriggerState)(nil), "proto.TriggerState") + proto.RegisterType((*Intent)(nil), "proto.Intent") + proto.RegisterType((*Suggestion)(nil), "proto.Suggestion") + proto.RegisterType((*IntOrString)(nil), "proto.IntOrString") } func init() { proto.RegisterFile("v1/skaffold.proto", fileDescriptor_9ef8072bea85606e) } var fileDescriptor_9ef8072bea85606e = []byte{ - // 2111 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x93, 0xdb, 0x48, - 0x15, 0x1f, 0xf9, 0x53, 0x7a, 0x9e, 0xcf, 0x4e, 0x32, 0x63, 0x94, 0xec, 0x6e, 0x56, 0x24, 0x90, - 0x2c, 0x59, 0x3b, 0x4e, 0x20, 0x59, 0x52, 0x3b, 0x2c, 0x33, 0x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4, - 0x71, 0x63, 0xc8, 0x27, 0xa0, 0x63, 0xf4, 0x3c, 0x0b, 0x5c, 0xa2, 0xf4, 0x85, 0x32, 0x5c, 0xcd, - 0x05, 0x73, 0xd6, 0x25, 0x64, 0xb3, 0x41, 0xd6, 0x18, 0x1b, 0xde, 0xeb, 0x0f, 0x03, 0xf7, 0x86, - 0x76, 0x5b, 0x23, 0x4f, 0xa1, 0x86, 0xec, 0xa2, 0x42, 0xa5, 0x16, 0x31, 0x24, 0xc8, 0x70, 0x95, - 0x40, 0xc2, 0x30, 0xba, 0xad, 0x91, 0x1f, 0x41, 0xfd, 0xf0, 0xe7, 0xb4, 0x3f, 0x89, 0x29, 0xb9, - 0x9c, 0x12, 0xcd, 0x45, 0xb1, 0x59, 0x20, 0xc9, 0xba, 0x8c, 0x5c, 0x2f, 0x59, 0x0d, 0xe4, 0xca, - 0x39, 0x3d, 0x10, 0x01, 0x4d, 0x06, 0x60, 0xec, 0x4d, 0xe2, 0x00, 0x1b, 0x5d, 0xd2, 0x9c, 0x0b, - 0xde, 0x65, 0xbc, 0xaf, 0x23, 0xef, 0x77, 0xcc, 0x6d, 0xc6, 0x1b, 0xe3, 0xb1, 0xcd, 0xee, 0xfc, - 0x5f, 0x48, 0x31, 0x3c, 0xec, 0x49, 0x0f, 0x74, 0x26, 0x85, 0x15, 0x95, 0x73, 0x08, 0xb9, 0x86, - 0x42, 0xde, 0x36, 0x2f, 0xe1, 0x76, 0xcd, 0xfc, 0xfe, 0x42, 0x19, 0x27, 0x00, 0x4c, 0x06, 0xef, - 0x43, 0xcf, 0x21, 0xe5, 0x1b, 0x28, 0xe5, 0xaa, 0xb9, 0xc3, 0xa4, 0xf0, 0xf3, 0xb2, 0x50, 0xce, - 0x73, 0xa8, 0x1d, 0x39, 0xfe, 0x60, 0x48, 0x49, 0x3e, 0xf3, 0x14, 0xb2, 0xbe, 0x82, 0xac, 0xb7, - 0xad, 0xad, 0x74, 0x5f, 0xdb, 0x2f, 0x91, 0xc7, 0x03, 0xed, 0xbd, 0xfd, 0xbb, 0x3f, 0xec, 0xb8, - 0x5e, 0xfc, 0x72, 0xd2, 0x6b, 0xf5, 0x83, 0x51, 0xfb, 0x31, 0x72, 0x48, 0x92, 0xf2, 0x71, 0x10, - 0x0c, 0xa3, 0xe4, 0x67, 0x3b, 0xfe, 0xfb, 0x5a, 0x7b, 0xda, 0xf9, 0xb4, 0xdc, 0xab, 0xe1, 0xf7, - 0xdd, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x26, 0x79, 0x74, 0xd7, 0x1b, 0x00, 0x00, + // 2066 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x4f, 0x73, 0x1b, 0x49, + 0x15, 0xf7, 0x48, 0x1a, 0x49, 0xf3, 0x24, 0xd9, 0x72, 0x27, 0xb6, 0xc5, 0x24, 0x24, 0x66, 0x2a, + 0x1b, 0x42, 0x76, 0x57, 0x8a, 0x9d, 0x2d, 0x58, 0x4c, 0x02, 0x95, 0xd8, 0xde, 0x38, 0x4b, 0x48, + 0x42, 0xcb, 0x50, 0x14, 0x05, 0x95, 0x1a, 0x4b, 0xed, 0xd9, 0x29, 0x4b, 0x33, 0x62, 0x66, 0xe4, + 0x45, 0x17, 0x0a, 0xf8, 0x00, 0x54, 0x6d, 0xf1, 0x1d, 0xf8, 0x0e, 0x1c, 0x39, 0xec, 0x27, 0xd8, + 0x13, 0x14, 0x47, 0x28, 0x8e, 0x5c, 0xf8, 0x00, 0x54, 0xff, 0x9b, 0xe9, 0x96, 0x66, 0x2c, 0x3b, + 0x29, 0x8a, 0x4b, 0xa2, 0x7e, 0xfd, 0x7b, 0x7f, 0xfb, 0xf5, 0x7b, 0x6f, 0xda, 0xb0, 0x7e, 0xbe, + 0xd3, 0x8b, 0xcf, 0xdc, 0xd3, 0xd3, 0x70, 0x34, 0xec, 0x4e, 0xa2, 0x30,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 0x07, 0x93, 0x65, 0x89, 0xc8, 0xa2, 0xeb, + 0x6a, 0x16, 0xa5, 0x6e, 0x70, 0x08, 0xfa, 0x10, 0xaa, 0x3c, 0x39, 0x84, 0xae, 0x0d, 0x2d, 0x7d, + 0x52, 0xb4, 0x00, 0xa1, 0x6f, 0x42, 0x85, 0xfa, 0xd3, 0x29, 0x33, 0xf0, 0x35, 0xc5, 0xdb, 0x14, + 0xca, 0x00, 0xe8, 0x07, 0x00, 0xee, 0x70, 0xe8, 0xd3, 0xeb, 0xea, 0x8e, 0x3a, 0x03, 0x76, 0x22, + 0xb7, 0xe7, 0x42, 0xd9, 0x7d, 0x92, 0x22, 0x78, 0x82, 0x29, 0x2c, 0xf6, 0x63, 0x58, 0x9b, 0xdb, + 0x56, 0x03, 0x65, 0xf1, 0x40, 0x5d, 0x57, 0x03, 0x65, 0x29, 0x61, 0x71, 0x7e, 0x57, 0x86, 0x96, + 0xe6, 0x30, 0xfa, 0x00, 0xd6, 0x83, 0xe9, 0xf8, 0x84, 0x44, 0xaf, 0x4e, 0x9f, 0x44, 0x89, 0x7f, + 0xea, 0x0e, 0x92, 0x58, 0x04, 0x7d, 0x71, 0x03, 0x3d, 0x86, 0x3a, 0x0b, 0x10, 0xcd, 0xa7, 0x12, + 0xb3, 0xfe, 0x1b, 0x79, 0x61, 0xec, 0x3e, 0x1f, 0xbb, 0x1e, 0x79, 0xca, 0x91, 0x38, 0x65, 0x41, + 0xf7, 0xa1, 0x92, 0xcc, 0x26, 0x84, 0xc5, 0x69, 0x75, 0x77, 0x53, 0xb0, 0xf2, 0x5a, 0xc3, 0xd0, + 0xc7, 0xb3, 0x09, 0xc1, 0x0c, 0x83, 0x0e, 0x72, 0x42, 0x75, 0x27, 0x57, 0xd9, 0x45, 0xf1, 0xc2, + 0xd0, 0x54, 0x6d, 0x41, 0x1f, 0x08, 0x0b, 0x0c, 0x66, 0x41, 0x67, 0xd1, 0x02, 0x12, 0x29, 0x36, + 0x5c, 0x07, 0x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, 0x53, 0x75, 0x99, 0xe0, 0xf7, 0x98, 0xe0, 0xdb, 0xf6, 0x26, 0x15, 0xcc, 0xb2, 0xaf, + 0x47, 0x3f, 0xc9, 0xdf, 0x48, 0x1d, 0x3c, 0xc9, 0xd1, 0x1b, 0xa8, 0x53, 0x15, 0xb4, 0x65, 0x5c, + 0x55, 0xc3, 0x1d, 0xa6, 0xe1, 0x96, 0xbd, 0xc1, 0x0e, 0x67, 0x16, 0x0c, 0x72, 0x15, 0x0c, 0x00, + 0xa8, 0x02, 0x3e, 0x56, 0x5e, 0x55, 0xc5, 0x5d, 0xa6, 0x62, 0xdb, 0xde, 0xa2, 0x2a, 0xf8, 0xbd, + 0xc8, 0x55, 0xf2, 0x02, 0xaa, 0x47, 0x6e, 0x30, 0x1c, 0x11, 0xa4, 0x15, 0x96, 0x42, 0xb9, 0x37, + 0x99, 0xdc, 0x4d, 0x67, 0x3d, 0x3b, 0xc8, 0xde, 0x67, 0x4c, 0xc0, 0x9e, 0x71, 0xff, 0x75, 0xf9, + 0xa4, 0xca, 0xf0, 0x0f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x04, 0x2e, 0xed, 0x6c, 0xf9, 0x1a, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2816,7 +2814,7 @@ func NewSkaffoldServiceClient(cc grpc.ClientConnInterface) SkaffoldServiceClient func (c *skaffoldServiceClient) GetState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*State, error) { out := new(State) - err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/GetState", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.SkaffoldService/GetState", in, out, opts...) if err != nil { return nil, err } @@ -2824,7 +2822,7 @@ func (c *skaffoldServiceClient) GetState(ctx context.Context, in *emptypb.Empty, } func (c *skaffoldServiceClient) EventLog(ctx context.Context, opts ...grpc.CallOption) (SkaffoldService_EventLogClient, error) { - stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[0], "/proto.v1.SkaffoldService/EventLog", opts...) + stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[0], "/proto.SkaffoldService/EventLog", opts...) if err != nil { return nil, err } @@ -2855,7 +2853,7 @@ func (x *skaffoldServiceEventLogClient) Recv() (*LogEntry, error) { } func (c *skaffoldServiceClient) Events(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (SkaffoldService_EventsClient, error) { - stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[1], "/proto.v1.SkaffoldService/Events", opts...) + stream, err := c.cc.NewStream(ctx, &_SkaffoldService_serviceDesc.Streams[1], "/proto.SkaffoldService/Events", opts...) if err != nil { return nil, err } @@ -2888,7 +2886,7 @@ func (x *skaffoldServiceEventsClient) Recv() (*LogEntry, error) { func (c *skaffoldServiceClient) Execute(ctx context.Context, in *UserIntentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/Execute", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.SkaffoldService/Execute", in, out, opts...) if err != nil { return nil, err } @@ -2897,7 +2895,7 @@ func (c *skaffoldServiceClient) Execute(ctx context.Context, in *UserIntentReque func (c *skaffoldServiceClient) AutoBuild(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/AutoBuild", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoBuild", in, out, opts...) if err != nil { return nil, err } @@ -2906,7 +2904,7 @@ func (c *skaffoldServiceClient) AutoBuild(ctx context.Context, in *TriggerReques func (c *skaffoldServiceClient) AutoSync(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/AutoSync", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoSync", in, out, opts...) if err != nil { return nil, err } @@ -2915,7 +2913,7 @@ func (c *skaffoldServiceClient) AutoSync(ctx context.Context, in *TriggerRequest func (c *skaffoldServiceClient) AutoDeploy(ctx context.Context, in *TriggerRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/AutoDeploy", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.SkaffoldService/AutoDeploy", in, out, opts...) if err != nil { return nil, err } @@ -2924,7 +2922,7 @@ func (c *skaffoldServiceClient) AutoDeploy(ctx context.Context, in *TriggerReque func (c *skaffoldServiceClient) Handle(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/proto.v1.SkaffoldService/Handle", in, out, opts...) + err := c.cc.Invoke(ctx, "/proto.SkaffoldService/Handle", in, out, opts...) if err != nil { return nil, err } @@ -2995,7 +2993,7 @@ func _SkaffoldService_GetState_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.v1.SkaffoldService/GetState", + FullMethod: "/proto.SkaffoldService/GetState", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).GetState(ctx, req.(*emptypb.Empty)) @@ -3060,7 +3058,7 @@ func _SkaffoldService_Execute_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.v1.SkaffoldService/Execute", + FullMethod: "/proto.SkaffoldService/Execute", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).Execute(ctx, req.(*UserIntentRequest)) @@ -3078,7 +3076,7 @@ func _SkaffoldService_AutoBuild_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.v1.SkaffoldService/AutoBuild", + FullMethod: "/proto.SkaffoldService/AutoBuild", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).AutoBuild(ctx, req.(*TriggerRequest)) @@ -3096,7 +3094,7 @@ func _SkaffoldService_AutoSync_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.v1.SkaffoldService/AutoSync", + FullMethod: "/proto.SkaffoldService/AutoSync", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).AutoSync(ctx, req.(*TriggerRequest)) @@ -3114,7 +3112,7 @@ func _SkaffoldService_AutoDeploy_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.v1.SkaffoldService/AutoDeploy", + FullMethod: "/proto.SkaffoldService/AutoDeploy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).AutoDeploy(ctx, req.(*TriggerRequest)) @@ -3132,7 +3130,7 @@ func _SkaffoldService_Handle_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/proto.v1.SkaffoldService/Handle", + FullMethod: "/proto.SkaffoldService/Handle", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SkaffoldServiceServer).Handle(ctx, req.(*Event)) @@ -3141,7 +3139,7 @@ func _SkaffoldService_Handle_Handler(srv interface{}, ctx context.Context, dec f } var _SkaffoldService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "proto.v1.SkaffoldService", + ServiceName: "proto.SkaffoldService", HandlerType: (*SkaffoldServiceServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/proto/v1/skaffold.pb.gw.go b/proto/v1/skaffold.pb.gw.go index 3fbb0d761b8..3f4d86c5f93 100644 --- a/proto/v1/skaffold.pb.gw.go +++ b/proto/v1/skaffold.pb.gw.go @@ -2,11 +2,11 @@ // source: v1/skaffold.proto /* -Package v1 is a reverse proxy. +Package proto is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1 +package proto import ( "context" diff --git a/proto/v1/skaffold.proto b/proto/v1/skaffold.proto index 335efc7894d..642205aa28a 100644 --- a/proto/v1/skaffold.proto +++ b/proto/v1/skaffold.proto @@ -1,7 +1,5 @@ syntax = "proto3"; -package proto.v1; - -option go_package = "github.com/GoogleContainerTools/skaffold/proto/v1"; +package proto; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; From 92dc3abb8f14deb55e0a7dfb98ff53934e974d3d Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Wed, 7 Jul 2021 11:16:41 -0700 Subject: [PATCH 042/103] Move cluster image loading logic into Deployer (#6124) * Move cluster image loading logic into Deployer * Load the correct set of images for each deployer * Pass loader.Config as parameter to loader instead of provider * add comments for tracked image vars --- pkg/skaffold/deploy/deploy.go | 26 ++- pkg/skaffold/deploy/deploy_mux.go | 6 + pkg/skaffold/deploy/deploy_mux_test.go | 2 + pkg/skaffold/deploy/helm/deploy.go | 19 +- pkg/skaffold/deploy/kpt/kpt.go | 20 +- pkg/skaffold/deploy/kubectl/cli.go | 2 + pkg/skaffold/deploy/kubectl/kubectl.go | 32 ++- pkg/skaffold/deploy/kustomize/kustomize.go | 17 +- pkg/skaffold/kubernetes/loader/load.go | 188 ++++++++++++++++++ .../loader/load_test.go} | 121 ++++++----- pkg/skaffold/loader/loader.go | 38 ++++ pkg/skaffold/loader/loader_mux.go | 35 ++++ pkg/skaffold/loader/provider.go | 55 +++++ pkg/skaffold/runner/runcontext/context.go | 1 + pkg/skaffold/runner/v1/apply.go | 13 +- pkg/skaffold/runner/v1/deploy.go | 69 ++----- pkg/skaffold/runner/v1/load_images.go | 111 ----------- pkg/skaffold/runner/v1/new.go | 12 +- pkg/skaffold/runner/v1/runner_test.go | 1 + 19 files changed, 518 insertions(+), 250 deletions(-) create mode 100644 pkg/skaffold/kubernetes/loader/load.go rename pkg/skaffold/{runner/v1/load_images_test.go => kubernetes/loader/load_test.go} (65%) create mode 100644 pkg/skaffold/loader/loader.go create mode 100644 pkg/skaffold/loader/loader_mux.go create mode 100644 pkg/skaffold/loader/provider.go delete mode 100644 pkg/skaffold/runner/v1/load_images.go diff --git a/pkg/skaffold/deploy/deploy.go b/pkg/skaffold/deploy/deploy.go index 351eb918ebd..56cda4434e8 100644 --- a/pkg/skaffold/deploy/deploy.go +++ b/pkg/skaffold/deploy/deploy.go @@ -23,6 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" @@ -30,11 +31,12 @@ import ( // NoopComponentProvider is for tests var NoopComponentProvider = ComponentProvider{ - Accessor: &access.NoopProvider{}, - Debugger: &debug.NoopProvider{}, - Logger: &log.NoopProvider{}, - Monitor: &status.NoopProvider{}, - Syncer: &sync.NoopProvider{}, + Accessor: &access.NoopProvider{}, + Debugger: &debug.NoopProvider{}, + ImageLoader: &loader.NoopProvider{}, + Logger: &log.NoopProvider{}, + Monitor: &status.NoopProvider{}, + Syncer: &sync.NoopProvider{}, } // Deployer is the Deploy API of skaffold and responsible for deploying @@ -70,6 +72,9 @@ type Deployer interface { // TrackBuildArtifacts registers build artifacts to be tracked by a Deployer TrackBuildArtifacts([]graph.Artifact) + // RegisterLocalImages tracks all local images to be loaded by the Deployer + RegisterLocalImages([]graph.Artifact) + // GetStatusMonitor returns a Deployer's implementation of a StatusMonitor GetStatusMonitor() status.Monitor } @@ -77,9 +82,10 @@ type Deployer interface { // ComponentProvider serves as a clean way to send three providers // as params to the Deployer constructors type ComponentProvider struct { - Accessor access.Provider - Debugger debug.Provider - Logger log.Provider - Monitor status.Provider - Syncer sync.Provider + Accessor access.Provider + Debugger debug.Provider + ImageLoader loader.Provider + Logger log.Provider + Monitor status.Provider + Syncer sync.Provider } diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go index a75afb20cdd..a5e011bc92d 100644 --- a/pkg/skaffold/deploy/deploy_mux.go +++ b/pkg/skaffold/deploy/deploy_mux.go @@ -93,6 +93,12 @@ func (m DeployerMux) GetSyncer() sync.Syncer { return syncers } +func (m DeployerMux) RegisterLocalImages(images []graph.Artifact) { + for _, deployer := range m.deployers { + deployer.RegisterLocalImages(images) + } +} + func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) ([]string, error) { seenNamespaces := util.NewStringSet() diff --git a/pkg/skaffold/deploy/deploy_mux_test.go b/pkg/skaffold/deploy/deploy_mux_test.go index c7a3e158cca..a224ed9acb6 100644 --- a/pkg/skaffold/deploy/deploy_mux_test.go +++ b/pkg/skaffold/deploy/deploy_mux_test.go @@ -69,6 +69,8 @@ func (m *MockDeployer) GetSyncer() sync.Syncer { return &sync.NoopSyncer{} } +func (m *MockDeployer) RegisterLocalImages(_ []graph.Artifact) {} + func (m *MockDeployer) TrackBuildArtifacts(_ []graph.Artifact) {} func (m *MockDeployer) Dependencies() ([]string, error) { diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index ee3bff77515..5b078c0bfa5 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -48,9 +48,11 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + kloader "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -86,12 +88,14 @@ type Deployer struct { accessor access.Accessor debugger debug.Debugger + imageLoader loader.ImageLoader logger log.Logger statusMonitor status.Monitor syncer sync.Syncer podSelector *kubernetes.ImageList - originalImages []graph.Artifact + originalImages []graph.Artifact // the set of images defined in ArtifactOverrides + localImages []graph.Artifact // the set of images marked as "local" by the Runner kubeContext string kubeConfig string @@ -113,6 +117,7 @@ type Deployer struct { type Config interface { kubectl.Config kstatus.Config + kloader.Config portforward.Config IsMultiConfig() bool } @@ -144,6 +149,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component podSelector: podSelector, accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), + imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), @@ -180,6 +186,10 @@ func (h *Deployer) GetSyncer() sync.Syncer { return h.syncer } +func (h *Deployer) RegisterLocalImages(images []graph.Artifact) { + h.localImages = images +} + func (h *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, h.originalImages, h.podSelector) h.logger.RegisterArtifacts(artifacts) @@ -192,6 +202,13 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art }) defer endTrace() + childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_LoadImages") + if err := h.imageLoader.LoadImages(childCtx, out, h.localImages, h.originalImages, builds); err != nil { + endTrace(instrumentation.TraceEndError(err)) + return nil, err + } + endTrace() + logrus.Infof("Deploying with helm v%s ...", h.bV) var dRes []types.Artifact diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 90ffdd38017..842877ad6e8 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -43,9 +43,11 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + kloader "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -77,11 +79,13 @@ type Deployer struct { accessor access.Accessor logger log.Logger debugger debug.Debugger + imageLoader loader.ImageLoader statusMonitor status.Monitor syncer sync.Syncer podSelector *kubernetes.ImageList - originalImages []graph.Artifact + originalImages []graph.Artifact // the set of images parsed from the Deployer's manifest set + localImages []graph.Artifact // the set of images marked as "local" by the Runner insecureRegistries map[string]bool labels map[string]string @@ -96,6 +100,7 @@ type Config interface { kubectl.Config kstatus.Config portforward.Config + kloader.Config } // NewDeployer generates a new Deployer object contains the kptDeploy schema. @@ -106,6 +111,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component podSelector: podSelector, accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), + imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), @@ -139,6 +145,10 @@ func (k *Deployer) GetSyncer() sync.Syncer { return k.syncer } +func (k *Deployer) RegisterLocalImages(images []graph.Artifact) { + k.localImages = images +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) @@ -210,7 +220,13 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art } endTrace() - childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_renderManifests") + childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_loadImages") + if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil { + endTrace(instrumentation.TraceEndError(err)) + return nil, err + } + + _, endTrace = instrumentation.StartTrace(ctx, "Deploy_renderManifests") manifests, err := k.renderManifests(childCtx, builds) if err != nil { endTrace(instrumentation.TraceEndError(err)) diff --git a/pkg/skaffold/deploy/kubectl/cli.go b/pkg/skaffold/deploy/kubectl/cli.go index 84e31d8b021..3c9b3eee6f0 100644 --- a/pkg/skaffold/deploy/kubectl/cli.go +++ b/pkg/skaffold/deploy/kubectl/cli.go @@ -31,6 +31,7 @@ import ( deploy "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/types" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + kloader "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" kstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" @@ -50,6 +51,7 @@ type CLI struct { type Config interface { kubectl.Config kstatus.Config + kloader.Config portforward.Config deploy.Config ForceDeploy() bool diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index 7e1bdb6c995..db17f6010d9 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -27,6 +27,7 @@ import ( "github.com/segmentio/textio" "github.com/sirupsen/logrus" + "go.opentelemetry.io/otel/trace" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" @@ -39,6 +40,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -52,12 +54,14 @@ type Deployer struct { *latestV1.KubectlDeploy accessor access.Accessor + imageLoader loader.ImageLoader logger log.Logger debugger debug.Debugger statusMonitor status.Monitor syncer sync.Syncer - originalImages []graph.Artifact + originalImages []graph.Artifact // the set of images marked as "local" by the Runner + localImages []graph.Artifact // the set of images parsed from the Deployer's manifest set podSelector *kubernetes.ImageList hydratedManifests []string workingDir string @@ -89,6 +93,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component podSelector: podSelector, accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), + imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), @@ -123,6 +128,10 @@ func (k *Deployer) GetSyncer() sync.Syncer { return k.syncer } +func (k *Deployer) RegisterLocalImages(images []graph.Artifact) { + k.localImages = images +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) @@ -134,6 +143,8 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art var ( manifests manifest.ManifestList err error + childCtx context.Context + endTrace func(...trace.SpanOption) ) instrumentation.AddAttributesToCurrentSpanFromContext(ctx, map[string]string{ "DeployerType": "kubectl", @@ -143,7 +154,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art // also, manually set the labels to ensure the runID is added switch { case len(k.hydratedManifests) > 0: - _, endTrace := instrumentation.StartTrace(ctx, "Deploy_createManifestList") + _, endTrace = instrumentation.StartTrace(ctx, "Deploy_createManifestList") manifests, err = createManifestList(k.hydratedManifests) if err != nil { endTrace(instrumentation.TraceEndError(err)) @@ -152,11 +163,11 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art manifests, err = manifests.SetLabels(k.labels) endTrace() case k.skipRender: - childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_readManifests") + childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_readManifests") manifests, err = k.readManifests(childCtx, false) endTrace() default: - childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_renderManifests") + childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_renderManifests") manifests, err = k.renderManifests(childCtx, out, builds, false) endTrace() } @@ -168,7 +179,16 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art if len(manifests) == 0 { return nil, nil } - _, endTrace := instrumentation.StartTrace(ctx, "Deploy_CollectNamespaces") + endTrace() + + _, endTrace = instrumentation.StartTrace(ctx, "Deploy_LoadImages") + if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil { + endTrace(instrumentation.TraceEndError(err)) + return nil, err + } + endTrace() + + _, endTrace = instrumentation.StartTrace(ctx, "Deploy_CollectNamespaces") namespaces, err := manifests.CollectNamespaces() if err != nil { event.DeployInfoEvent(fmt.Errorf("could not fetch deployed resource namespace. "+ @@ -176,7 +196,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art } endTrace() - childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_WaitForDeletions") + childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_WaitForDeletions") if err := k.kubectl.WaitForDeletions(childCtx, textio.NewPrefixWriter(out, " - "), manifests); err != nil { endTrace(instrumentation.TraceEndError(err)) return nil, err diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index 1235a4e8dd5..b4b9cceacc5 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -39,6 +39,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -104,12 +105,14 @@ type Deployer struct { accessor access.Accessor logger log.Logger + imageLoader loader.ImageLoader debugger debug.Debugger statusMonitor status.Monitor syncer sync.Syncer podSelector *kubernetes.ImageList - originalImages []graph.Artifact + originalImages []graph.Artifact // the set of images parsed from the Deployer's manifest set + localImages []graph.Artifact // the set of images marked as "local" by the Runner kubectl kubectl.CLI insecureRegistries map[string]bool @@ -138,6 +141,7 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C podSelector: podSelector, accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), + imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), logger: provider.Logger.GetKubernetesLogger(podSelector), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), syncer: provider.Syncer.GetKubernetesSyncer(podSelector), @@ -169,6 +173,10 @@ func (k *Deployer) GetSyncer() sync.Syncer { return k.syncer } +func (k *Deployer) RegisterLocalImages(images []graph.Artifact) { + k.localImages = images +} + func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { deployutil.AddTagsToPodSelector(artifacts, k.originalImages, k.podSelector) k.logger.RegisterArtifacts(artifacts) @@ -210,6 +218,13 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art } endTrace() + childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_LoadImages") + if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil { + endTrace(instrumentation.TraceEndError(err)) + return nil, err + } + endTrace() + _, endTrace = instrumentation.StartTrace(ctx, "Deploy_CollectNamespaces") namespaces, err := manifests.CollectNamespaces() if err != nil { diff --git a/pkg/skaffold/kubernetes/loader/load.go b/pkg/skaffold/kubernetes/loader/load.go new file mode 100644 index 00000000000..ce9dd49b5a4 --- /dev/null +++ b/pkg/skaffold/kubernetes/loader/load.go @@ -0,0 +1,188 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "context" + "fmt" + "io" + "os/exec" + "strings" + "time" + + "github.com/docker/distribution/reference" + "k8s.io/client-go/tools/clientcmd/api" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +type ImageLoader struct { + kubeContext string + cli *kubectl.CLI +} + +type Config interface { + kubectl.Config + + GetKubeContext() string + LoadImages() bool +} + +func NewImageLoader(kubeContext string, cli *kubectl.CLI) *ImageLoader { + return &ImageLoader{ + kubeContext: kubeContext, + cli: cli, + } +} + +// We only load images that +// 1) Were identified as local images by the Runner, and +// 2) Are part of the set of images being deployed by a given Deployer, so we don't duplicate effort +func imagesToLoad(localImages, deployerImages, images []graph.Artifact) []graph.Artifact { + local := map[string]bool{} + for _, image := range localImages { + local[image.ImageName] = true + } + + tracked := map[string]bool{} + for _, image := range deployerImages { + if local[image.ImageName] { + tracked[image.ImageName] = true + } + } + + var res []graph.Artifact + for _, image := range images { + if tracked[image.ImageName] { + res = append(res, image) + } + } + return res +} + +// LoadImages loads images into a local cluster. +// imagesToLoad is used to determine the set of images we should load, based on images that are +// marked as local by the Runner, and part of the calling Deployer's set of manifests +func (i *ImageLoader) LoadImages(ctx context.Context, out io.Writer, localImages, deployerImages, images []graph.Artifact) error { + currentContext, err := i.getCurrentContext() + if err != nil { + return err + } + + artifacts := imagesToLoad(localImages, deployerImages, images) + + if config.IsKindCluster(i.kubeContext) { + kindCluster := config.KindClusterName(currentContext.Cluster) + + // With `kind`, docker images have to be loaded with the `kind` CLI. + if err := i.loadImagesInKindNodes(ctx, out, kindCluster, artifacts); err != nil { + return fmt.Errorf("loading images into kind nodes: %w", err) + } + } + + if config.IsK3dCluster(i.kubeContext) { + k3dCluster := config.K3dClusterName(currentContext.Cluster) + + // With `k3d`, docker images have to be loaded with the `k3d` CLI. + if err := i.loadImagesInK3dNodes(ctx, out, k3dCluster, artifacts); err != nil { + return fmt.Errorf("loading images into k3d nodes: %w", err) + } + } + + return nil +} + +// loadImagesInKindNodes loads artifact images into every node of a kind cluster. +func (i *ImageLoader) loadImagesInKindNodes(ctx context.Context, out io.Writer, kindCluster string, artifacts []graph.Artifact) error { + output.Default.Fprintln(out, "Loading images into kind cluster nodes...") + return i.loadImages(ctx, out, artifacts, func(tag string) *exec.Cmd { + return exec.CommandContext(ctx, "kind", "load", "docker-image", "--name", kindCluster, tag) + }) +} + +// loadImagesInK3dNodes loads artifact images into every node of a k3s cluster. +func (i *ImageLoader) loadImagesInK3dNodes(ctx context.Context, out io.Writer, k3dCluster string, artifacts []graph.Artifact) error { + output.Default.Fprintln(out, "Loading images into k3d cluster nodes...") + return i.loadImages(ctx, out, artifacts, func(tag string) *exec.Cmd { + return exec.CommandContext(ctx, "k3d", "image", "import", "--cluster", k3dCluster, tag) + }) +} + +func (i *ImageLoader) loadImages(ctx context.Context, out io.Writer, artifacts []graph.Artifact, createCmd func(tag string) *exec.Cmd) error { + start := time.Now() + + var knownImages []string + + for _, artifact := range artifacts { + output.Default.Fprintf(out, " - %s -> ", artifact.Tag) + + // Only load images that are unknown to the node + if knownImages == nil { + var err error + if knownImages, err = findKnownImages(ctx, i.cli); err != nil { + return fmt.Errorf("unable to retrieve node's images: %w", err) + } + } + normalizedImageRef, err := reference.ParseNormalizedNamed(artifact.Tag) + if err != nil { + return err + } + if util.StrSliceContains(knownImages, normalizedImageRef.String()) { + output.Green.Fprintln(out, "Found") + continue + } + + cmd := createCmd(artifact.Tag) + if cmdOut, err := util.RunCmdOut(cmd); err != nil { + output.Red.Fprintln(out, "Failed") + return fmt.Errorf("unable to load image %q into cluster: %w, %s", artifact.Tag, err, cmdOut) + } + + output.Green.Fprintln(out, "Loaded") + } + + output.Default.Fprintln(out, "Images loaded in", util.ShowHumanizeTime(time.Since(start))) + return nil +} + +func findKnownImages(ctx context.Context, cli *kubectl.CLI) ([]string, error) { + nodeGetOut, err := cli.RunOut(ctx, "get", "nodes", `-ojsonpath='{@.items[*].status.images[*].names[*]}'`) + if err != nil { + return nil, fmt.Errorf("unable to inspect the nodes: %w", err) + } + + knownImages := strings.Split(string(nodeGetOut), " ") + return knownImages, nil +} + +func (i *ImageLoader) getCurrentContext() (*api.Context, error) { + currentCfg, err := kubectx.CurrentConfig() + if err != nil { + return nil, fmt.Errorf("unable to get kubernetes config: %w", err) + } + + currentContext, present := currentCfg.Contexts[i.kubeContext] + if !present { + return nil, fmt.Errorf("unable to get current kubernetes context: %w", err) + } + return currentContext, nil +} diff --git a/pkg/skaffold/runner/v1/load_images_test.go b/pkg/skaffold/kubernetes/loader/load_test.go similarity index 65% rename from pkg/skaffold/runner/v1/load_images_test.go rename to pkg/skaffold/kubernetes/loader/load_test.go index 9c84bd411a3..2129da832a9 100644 --- a/pkg/skaffold/runner/v1/load_images_test.go +++ b/pkg/skaffold/kubernetes/loader/load_test.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Skaffold Authors +Copyright 2021 The Skaffold Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1 +package loader import ( "context" @@ -25,7 +25,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" @@ -34,7 +33,6 @@ import ( type ImageLoadingTest = struct { description string cluster string - built []graph.Artifact deployed []graph.Artifact commands util.Command shouldErr bool @@ -46,7 +44,6 @@ func TestLoadImagesInKindNodes(t *testing.T) { { description: "load image", cluster: "kind", - built: []graph.Artifact{{Tag: "tag1"}}, deployed: []graph.Artifact{{Tag: "tag1"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", ""). @@ -55,7 +52,6 @@ func TestLoadImagesInKindNodes(t *testing.T) { { description: "load missing image", cluster: "other-kind", - built: []graph.Artifact{{Tag: "tag1"}, {Tag: "tag2"}}, deployed: []graph.Artifact{{Tag: "tag1"}, {Tag: "tag2"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", "docker.io/library/tag1"). @@ -64,14 +60,12 @@ func TestLoadImagesInKindNodes(t *testing.T) { { description: "no new images", cluster: "kind", - built: []graph.Artifact{{Tag: "tag0"}, {Tag: "docker.io/library/tag1"}, {Tag: "docker.io/tag2"}, {Tag: "gcr.io/test/tag3"}, {Tag: "someregistry.com/tag4"}}, deployed: []graph.Artifact{{Tag: "tag0"}, {Tag: "docker.io/library/tag1"}, {Tag: "docker.io/tag2"}, {Tag: "gcr.io/test/tag3"}, {Tag: "someregistry.com/tag4"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", "docker.io/library/tag0 docker.io/library/tag1 docker.io/library/tag2 gcr.io/test/tag3 someregistry.com/tag4"), }, { description: "inspect error", - built: []graph.Artifact{{Tag: "tag"}}, deployed: []graph.Artifact{{Tag: "tag"}}, commands: testutil. CmdRunOutErr("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", "", errors.New("BUG")), @@ -81,7 +75,6 @@ func TestLoadImagesInKindNodes(t *testing.T) { { description: "load error", cluster: "kind", - built: []graph.Artifact{{Tag: "tag"}}, deployed: []graph.Artifact{{Tag: "tag"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", ""). @@ -89,28 +82,14 @@ func TestLoadImagesInKindNodes(t *testing.T) { shouldErr: true, expectedError: "output: error!", }, - { - description: "ignore image that's not built", - cluster: "kind", - built: []graph.Artifact{{Tag: "built"}}, - deployed: []graph.Artifact{{Tag: "built"}, {Tag: "busybox"}}, - commands: testutil. - CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", ""). - AndRunOut("kind load docker-image --name kind built", ""), - }, { description: "no artifact", deployed: []graph.Artifact{}, }, - { - description: "no built artifact", - built: []graph.Artifact{}, - deployed: []graph.Artifact{{Tag: "busybox"}}, - }, } - runImageLoadingTests(t, tests, func(r *SkaffoldRunner, test ImageLoadingTest) error { - return r.loadImagesInKindNodes(context.Background(), ioutil.Discard, test.cluster, test.deployed) + runImageLoadingTests(t, tests, func(i *ImageLoader, test ImageLoadingTest) error { + return i.loadImagesInKindNodes(context.Background(), ioutil.Discard, test.cluster, test.deployed) }) } @@ -119,7 +98,6 @@ func TestLoadImagesInK3dNodes(t *testing.T) { { description: "load image", cluster: "k3d", - built: []graph.Artifact{{Tag: "tag1"}}, deployed: []graph.Artifact{{Tag: "tag1"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", ""). @@ -128,7 +106,6 @@ func TestLoadImagesInK3dNodes(t *testing.T) { { description: "load missing image", cluster: "other-k3d", - built: []graph.Artifact{{Tag: "tag1"}, {Tag: "tag2"}}, deployed: []graph.Artifact{{Tag: "tag1"}, {Tag: "tag2"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", "docker.io/library/tag1"). @@ -137,14 +114,12 @@ func TestLoadImagesInK3dNodes(t *testing.T) { { description: "no new images", cluster: "k3d", - built: []graph.Artifact{{Tag: "tag0"}, {Tag: "docker.io/library/tag1"}, {Tag: "docker.io/tag2"}, {Tag: "gcr.io/test/tag3"}, {Tag: "someregistry.com/tag4"}}, deployed: []graph.Artifact{{Tag: "tag0"}, {Tag: "docker.io/library/tag1"}, {Tag: "docker.io/tag2"}, {Tag: "gcr.io/test/tag3"}, {Tag: "someregistry.com/tag4"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", "docker.io/library/tag0 docker.io/library/tag1 docker.io/library/tag2 gcr.io/test/tag3 someregistry.com/tag4"), }, { description: "inspect error", - built: []graph.Artifact{{Tag: "tag"}}, deployed: []graph.Artifact{{Tag: "tag"}}, commands: testutil. CmdRunOutErr("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", "", errors.New("BUG")), @@ -154,7 +129,6 @@ func TestLoadImagesInK3dNodes(t *testing.T) { { description: "load error", cluster: "k3d", - built: []graph.Artifact{{Tag: "tag"}}, deployed: []graph.Artifact{{Tag: "tag"}}, commands: testutil. CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", ""). @@ -162,32 +136,18 @@ func TestLoadImagesInK3dNodes(t *testing.T) { shouldErr: true, expectedError: "output: error!", }, - { - description: "ignore image that's not built", - cluster: "k3d", - built: []graph.Artifact{{Tag: "built"}}, - deployed: []graph.Artifact{{Tag: "built"}, {Tag: "busybox"}}, - commands: testutil. - CmdRunOut("kubectl --context kubecontext --namespace namespace get nodes -ojsonpath='{@.items[*].status.images[*].names[*]}'", ""). - AndRunOut("k3d image import --cluster k3d built", ""), - }, { description: "no artifact", deployed: []graph.Artifact{}, }, - { - description: "no built artifact", - built: []graph.Artifact{}, - deployed: []graph.Artifact{{Tag: "busybox"}}, - }, } - runImageLoadingTests(t, tests, func(r *SkaffoldRunner, test ImageLoadingTest) error { - return r.loadImagesInK3dNodes(context.Background(), ioutil.Discard, test.cluster, test.deployed) + runImageLoadingTests(t, tests, func(i *ImageLoader, test ImageLoadingTest) error { + return i.loadImagesInK3dNodes(context.Background(), ioutil.Discard, test.cluster, test.deployed) }) } -func runImageLoadingTests(t *testing.T, tests []ImageLoadingTest, loadingFunc func(r *SkaffoldRunner, test ImageLoadingTest) error) { +func runImageLoadingTests(t *testing.T, tests []ImageLoadingTest, loadingFunc func(i *ImageLoader, test ImageLoadingTest) error) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { t.Override(&util.DefaultExecCommand, test.commands) @@ -199,12 +159,8 @@ func runImageLoadingTests(t *testing.T, tests []ImageLoadingTest, loadingFunc fu KubeContext: "kubecontext", } - r := &SkaffoldRunner{ - runCtx: runCtx, - kubectlCLI: kubectl.NewCLI(runCtx, ""), - Builder: runner.Builder{Builds: test.built}, - } - err := loadingFunc(r, test) + i := NewImageLoader(runCtx.KubeContext, kubectl.NewCLI(runCtx, "")) + err := loadingFunc(i, test) if test.shouldErr { t.CheckErrorContains(test.expectedError, err) @@ -214,3 +170,62 @@ func runImageLoadingTests(t *testing.T, tests []ImageLoadingTest, loadingFunc fu }) } } + +func TestImagesToLoad(t *testing.T) { + tests := []struct { + name string + localImages []graph.Artifact + deployerImages []graph.Artifact + builtImages []graph.Artifact + expectedImages []graph.Artifact + }{ + { + name: "single image marked as local", + localImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + deployerImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + builtImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + expectedImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + }, + { + name: "single image, but not marked as local", + localImages: []graph.Artifact{}, + deployerImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + builtImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + expectedImages: nil, + }, + { + name: "single image, marked as local but not found in deployer's manifests", + localImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + deployerImages: []graph.Artifact{}, + builtImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}}, + expectedImages: nil, + }, + { + name: "two images marked as local", + localImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + deployerImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + builtImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + expectedImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + }, + { + name: "two images, one marked as local and one not", + localImages: []graph.Artifact{{ImageName: "image2", Tag: "bar"}}, + deployerImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + builtImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + expectedImages: []graph.Artifact{{ImageName: "image2", Tag: "bar"}}, + }, + { + name: "two images, marked as local but only one found from the deployer's manifests", + localImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + deployerImages: []graph.Artifact{{ImageName: "image2", Tag: "bar"}}, + builtImages: []graph.Artifact{{ImageName: "image1", Tag: "foo"}, {ImageName: "image2", Tag: "bar"}}, + expectedImages: []graph.Artifact{{ImageName: "image2", Tag: "bar"}}, + }, + } + + for _, test := range tests { + testutil.Run(t, test.name, func(t *testutil.T) { + t.CheckDeepEqual(test.expectedImages, imagesToLoad(test.localImages, test.deployerImages, test.builtImages)) + }) + } +} diff --git a/pkg/skaffold/loader/loader.go b/pkg/skaffold/loader/loader.go new file mode 100644 index 00000000000..3adb60e6bc5 --- /dev/null +++ b/pkg/skaffold/loader/loader.go @@ -0,0 +1,38 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "context" + "io" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" +) + +// ImageLoader defines the behavior for loading images into a cluster. +type ImageLoader interface { + // LoadImages loads the images into the cluster. + LoadImages(context.Context, io.Writer, []graph.Artifact, []graph.Artifact, []graph.Artifact) error +} + +type NoopImageLoader struct{} + +func (n *NoopImageLoader) LoadImages(context.Context, io.Writer, []graph.Artifact, []graph.Artifact, []graph.Artifact) error { + return nil +} + +func (n *NoopImageLoader) TrackBuildArtifacts([]graph.Artifact, []graph.Artifact) {} diff --git a/pkg/skaffold/loader/loader_mux.go b/pkg/skaffold/loader/loader_mux.go new file mode 100644 index 00000000000..d4890cdd76f --- /dev/null +++ b/pkg/skaffold/loader/loader_mux.go @@ -0,0 +1,35 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "context" + "io" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" +) + +type ImageLoaderMux []ImageLoader + +func (i ImageLoaderMux) LoadImages(ctx context.Context, out io.Writer, localImages, originalImages, images []graph.Artifact) error { + for _, loader := range i { + if err := loader.LoadImages(ctx, out, localImages, originalImages, images); err != nil { + return err + } + } + return nil +} diff --git a/pkg/skaffold/loader/provider.go b/pkg/skaffold/loader/provider.go new file mode 100644 index 00000000000..51924179a27 --- /dev/null +++ b/pkg/skaffold/loader/provider.go @@ -0,0 +1,55 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" +) + +type Provider interface { + GetKubernetesImageLoader(loader.Config) ImageLoader + GetNoopImageLoader() ImageLoader +} + +type fullProvider struct{} + +func NewImageLoaderProvider() Provider { + return &fullProvider{} +} + +func (p *fullProvider) GetKubernetesImageLoader(config loader.Config) ImageLoader { + if config.LoadImages() { + return loader.NewImageLoader(config.GetKubeContext(), kubectl.NewCLI(config, "")) + } + return &NoopImageLoader{} +} + +func (p *fullProvider) GetNoopImageLoader() ImageLoader { + return &NoopImageLoader{} +} + +// NoopProvider is used in tests +type NoopProvider struct{} + +func (p *NoopProvider) GetKubernetesImageLoader(loader.Config) ImageLoader { + return &NoopImageLoader{} +} + +func (p *NoopProvider) GetNoopImageLoader() ImageLoader { + return &NoopImageLoader{} +} diff --git a/pkg/skaffold/runner/runcontext/context.go b/pkg/skaffold/runner/runcontext/context.go index c64a621b0fa..8784989e532 100644 --- a/pkg/skaffold/runner/runcontext/context.go +++ b/pkg/skaffold/runner/runcontext/context.go @@ -177,6 +177,7 @@ func (rc *RunContext) GetKubeConfig() string { return rc func (rc *RunContext) GetKubeNamespace() string { return rc.Opts.Namespace } func (rc *RunContext) GlobalConfig() string { return rc.Opts.GlobalConfig } func (rc *RunContext) HydratedManifests() []string { return rc.Opts.HydratedManifests } +func (rc *RunContext) LoadImages() bool { return rc.Cluster.LoadImages } func (rc *RunContext) MinikubeProfile() string { return rc.Opts.MinikubeProfile } func (rc *RunContext) Muted() config.Muted { return rc.Opts.Muted } func (rc *RunContext) NoPruneChildren() bool { return rc.Opts.NoPruneChildren } diff --git a/pkg/skaffold/runner/v1/apply.go b/pkg/skaffold/runner/v1/apply.go index 3c4e426a1d7..069c1ff205d 100644 --- a/pkg/skaffold/runner/v1/apply.go +++ b/pkg/skaffold/runner/v1/apply.go @@ -51,24 +51,15 @@ func (r *SkaffoldRunner) applyResources(ctx context.Context, out io.Writer, arti return fmt.Errorf("unable to connect to Kubernetes: %w", err) } - ctx, endTrace := instrumentation.StartTrace(ctx, "applyResources_LoadImagesIntoCluster") - if len(localImages) > 0 && r.runCtx.Cluster.LoadImages { - err := r.loadImagesIntoCluster(ctx, out, localImages) - if err != nil { - endTrace(instrumentation.TraceEndError(err)) - return err - } - } - endTrace() - deployOut, postDeployFn, err := deployutil.WithLogFile(time.Now().Format(deployutil.TimeFormat)+".log", out, r.runCtx.Muted()) if err != nil { return err } event.DeployInProgress() - ctx, endTrace = instrumentation.StartTrace(ctx, "applyResources_Deploying") + ctx, endTrace := instrumentation.StartTrace(ctx, "applyResources_Deploying") defer endTrace() + r.deployer.RegisterLocalImages(localImages) namespaces, err := r.deployer.Deploy(ctx, deployOut, artifacts) postDeployFn() if err != nil { diff --git a/pkg/skaffold/runner/v1/deploy.go b/pkg/skaffold/runner/v1/deploy.go index ef00fccf1b4..3b5026be052 100644 --- a/pkg/skaffold/runner/v1/deploy.go +++ b/pkg/skaffold/runner/v1/deploy.go @@ -23,9 +23,7 @@ import ( "time" "github.com/sirupsen/logrus" - "k8s.io/client-go/tools/clientcmd/api" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" @@ -33,7 +31,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" - kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" ) @@ -104,13 +101,6 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) return fmt.Errorf("unable to connect to Kubernetes: %w", err) } - if len(localImages) > 0 && r.runCtx.Cluster.LoadImages { - err := r.loadImagesIntoCluster(ctx, out, localImages) - if err != nil { - return err - } - } - deployOut, postDeployFn, err := deployutil.WithLogFile(time.Now().Format(deployutil.TimeFormat)+".log", out, r.runCtx.Muted()) if err != nil { return err @@ -121,6 +111,15 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) ctx, endTrace := instrumentation.StartTrace(ctx, "Deploy_Deploying") defer endTrace() + // we only want to register images that are local AND were built by this runner + var localAndBuiltImages []graph.Artifact + for _, image := range localImages { + if r.wasBuilt(image.Tag) { + localAndBuiltImages = append(localAndBuiltImages, image) + } + } + + r.deployer.RegisterLocalImages(localAndBuiltImages) namespaces, err := r.deployer.Deploy(ctx, deployOut, artifacts) postDeployFn() if err != nil { @@ -149,46 +148,6 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) return nil } -func (r *SkaffoldRunner) loadImagesIntoCluster(ctx context.Context, out io.Writer, artifacts []graph.Artifact) error { - currentContext, err := r.getCurrentContext() - if err != nil { - return err - } - - if config.IsKindCluster(r.runCtx.GetKubeContext()) { - kindCluster := config.KindClusterName(currentContext.Cluster) - - // With `kind`, docker images have to be loaded with the `kind` CLI. - if err := r.loadImagesInKindNodes(ctx, out, kindCluster, artifacts); err != nil { - return fmt.Errorf("loading images into kind nodes: %w", err) - } - } - - if config.IsK3dCluster(r.runCtx.GetKubeContext()) { - k3dCluster := config.K3dClusterName(currentContext.Cluster) - - // With `k3d`, docker images have to be loaded with the `k3d` CLI. - if err := r.loadImagesInK3dNodes(ctx, out, k3dCluster, artifacts); err != nil { - return fmt.Errorf("loading images into k3d nodes: %w", err) - } - } - - return nil -} - -func (r *SkaffoldRunner) getCurrentContext() (*api.Context, error) { - currentCfg, err := kubectx.CurrentConfig() - if err != nil { - return nil, fmt.Errorf("unable to get kubernetes config: %w", err) - } - - currentContext, present := currentCfg.Contexts[r.runCtx.GetKubeContext()] - if !present { - return nil, fmt.Errorf("unable to get current kubernetes context: %w", err) - } - return currentContext, nil -} - // failIfClusterIsNotReachable checks that Kubernetes is reachable. // This gives a clear early error when the cluster can't be reached. func failIfClusterIsNotReachable() error { @@ -200,3 +159,13 @@ func failIfClusterIsNotReachable() error { _, err = client.Discovery().ServerVersion() return err } + +func (r *SkaffoldRunner) wasBuilt(tag string) bool { + for _, built := range r.Builds { + if built.Tag == tag { + return true + } + } + + return false +} diff --git a/pkg/skaffold/runner/v1/load_images.go b/pkg/skaffold/runner/v1/load_images.go deleted file mode 100644 index 2f04f47254d..00000000000 --- a/pkg/skaffold/runner/v1/load_images.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 2019 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - "context" - "fmt" - "io" - "os/exec" - "strings" - "time" - - "github.com/docker/distribution/reference" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" -) - -// loadImagesInKindNodes loads artifact images into every node of a kind cluster. -func (r *SkaffoldRunner) loadImagesInKindNodes(ctx context.Context, out io.Writer, kindCluster string, artifacts []graph.Artifact) error { - output.Default.Fprintln(out, "Loading images into kind cluster nodes...") - return r.loadImages(ctx, out, artifacts, func(tag string) *exec.Cmd { - return exec.CommandContext(ctx, "kind", "load", "docker-image", "--name", kindCluster, tag) - }) -} - -// loadImagesInK3dNodes loads artifact images into every node of a k3s cluster. -func (r *SkaffoldRunner) loadImagesInK3dNodes(ctx context.Context, out io.Writer, k3dCluster string, artifacts []graph.Artifact) error { - output.Default.Fprintln(out, "Loading images into k3d cluster nodes...") - return r.loadImages(ctx, out, artifacts, func(tag string) *exec.Cmd { - return exec.CommandContext(ctx, "k3d", "image", "import", "--cluster", k3dCluster, tag) - }) -} - -func (r *SkaffoldRunner) loadImages(ctx context.Context, out io.Writer, artifacts []graph.Artifact, createCmd func(tag string) *exec.Cmd) error { - start := time.Now() - - var knownImages []string - - for _, artifact := range artifacts { - // Only load images that this runner built - if !r.wasBuilt(artifact.Tag) { - continue - } - - output.Default.Fprintf(out, " - %s -> ", artifact.Tag) - - // Only load images that are unknown to the node - if knownImages == nil { - var err error - if knownImages, err = findKnownImages(ctx, r.kubectlCLI); err != nil { - return fmt.Errorf("unable to retrieve node's images: %w", err) - } - } - normalizedImageRef, err := reference.ParseNormalizedNamed(artifact.Tag) - if err != nil { - return err - } - if util.StrSliceContains(knownImages, normalizedImageRef.String()) { - output.Green.Fprintln(out, "Found") - continue - } - - cmd := createCmd(artifact.Tag) - if cmdOut, err := util.RunCmdOut(cmd); err != nil { - output.Red.Fprintln(out, "Failed") - return fmt.Errorf("unable to load image %q into cluster: %w, %s", artifact.Tag, err, cmdOut) - } - - output.Green.Fprintln(out, "Loaded") - } - - output.Default.Fprintln(out, "Images loaded in", util.ShowHumanizeTime(time.Since(start))) - return nil -} - -func findKnownImages(ctx context.Context, cli *kubectl.CLI) ([]string, error) { - nodeGetOut, err := cli.RunOut(ctx, "get", "nodes", `-ojsonpath='{@.items[*].status.images[*].names[*]}'`) - if err != nil { - return nil, fmt.Errorf("unable to inspect the nodes: %w", err) - } - - knownImages := strings.Split(string(nodeGetOut), " ") - return knownImages, nil -} - -func (r *SkaffoldRunner) wasBuilt(tag string) bool { - for _, built := range r.Builds { - if built.Tag == tag { - return true - } - } - - return false -} diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index 9bb3c6a5577..f8b34aec9f5 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -34,6 +34,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" @@ -86,11 +87,12 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { var deployer deploy.Deployer provider := deploy.ComponentProvider{ - Accessor: access.NewAccessorProvider(labeller), - Debugger: debug.NewDebugProvider(runCtx), - Logger: log.NewLogProvider(runCtx, kubectlCLI), - Monitor: status.NewMonitorProvider(labeller), - Syncer: sync.NewSyncProvider(runCtx, kubectlCLI), + Accessor: access.NewAccessorProvider(labeller), + Debugger: debug.NewDebugProvider(runCtx), + ImageLoader: loader.NewImageLoaderProvider(), + Logger: log.NewLogProvider(runCtx, kubectlCLI), + Monitor: status.NewMonitorProvider(labeller), + Syncer: sync.NewSyncProvider(runCtx, kubectlCLI), } deployer, err = runner.GetDeployer(runCtx, provider, labeller.Labels()) diff --git a/pkg/skaffold/runner/v1/runner_test.go b/pkg/skaffold/runner/v1/runner_test.go index e716a4bb41d..bcff563c5c2 100644 --- a/pkg/skaffold/runner/v1/runner_test.go +++ b/pkg/skaffold/runner/v1/runner_test.go @@ -125,6 +125,7 @@ func (t *TestBench) GetSyncer() sync.Syncer { return t } +func (t *TestBench) RegisterLocalImages(_ []graph.Artifact) {} func (t *TestBench) TrackBuildArtifacts(_ []graph.Artifact) {} func (t *TestBench) TestDependencies(*latestV1.Artifact) ([]string, error) { return nil, nil } From 4760e31b7f6e56da6ccbf1e950b54e516ed27c63 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Wed, 7 Jul 2021 15:56:26 -0400 Subject: [PATCH 043/103] Create SECURITY.md (#6140) --- README.md | 6 +++++- SECURITY.md | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 SECURITY.md diff --git a/README.md b/README.md index c14ff5376e3..44f362edf3b 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ We welcome any contributions from the community with open arms - Skaffold wouldn **Office Hours** -We hold open office hours every other Wednesday at 9:30 AM Pacific Time. This is an open forum for anyone to show up and bring ideas, concerns, or just in general come hang out with the team! This is also a great time to get direct feedback on contributions, or give us feedback on ways you think we can improve the project. Come show us how you're using Skaffold! +We hold open office hours on the last Wednesday of the month at 9:30 AM Pacific Time. This is an open forum for anyone to show up and bring ideas, concerns, or just in general come hang out with the team! This is also a great time to get direct feedback on contributions, or give us feedback on ways you think we can improve the project. Come show us how you're using Skaffold! Join the [skaffold-users mailing list](https://groups.google.com/forum/#!forum/skaffold-users) to get the calendar invite directly on your calendar. You can access the hangouts invite directly from this calendar invite. @@ -71,3 +71,7 @@ Survey Link - https://forms.gle/BMTbGQXLWSdn7vEs6 Skaffold is generally available and considered production ready. Detailed feature maturity information and how we deprecate features are described in our [Deprecation Policy](https://skaffold.dev/docs/references/deprecation). + +## Security Disclosures + +Please see our [security disclosure process](SECURITY.md). All [security advisories](https://github.com/GoogleContainerTools/skaffold/security/advisories) are managed on Github. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000000..3fdb797c999 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,8 @@ +# Reporting Security Issues + +To report a security issue, please use http://g.co/vulnz. We use +http://g.co/vulnz for our intake, and do coordination and disclosure here on +GitHub (including using [GitHub Security Advisory]). The Google Security Team will +respond within 5 working days of your report on g.co/vulnz. + +[GitHub Security Advisory]: https://github.com/GoogleContainerTools/skaffold/security/advisories From 4615ccd2298894172d4e8bb3662d8becd845c2ae Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Wed, 7 Jul 2021 15:58:09 -0400 Subject: [PATCH 044/103] Bump puma from 4.3.5 to 4.3.8 in integration/examples/ruby/backend (#6130) --- integration/examples/ruby/backend/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/examples/ruby/backend/Gemfile.lock b/integration/examples/ruby/backend/Gemfile.lock index a5a6ab0c273..823faa57d4d 100644 --- a/integration/examples/ruby/backend/Gemfile.lock +++ b/integration/examples/ruby/backend/Gemfile.lock @@ -1,8 +1,8 @@ GEM remote: https://rubygems.org/ specs: - nio4r (2.5.2) - puma (4.3.5) + nio4r (2.5.7) + puma (4.3.8) nio4r (~> 2.0) rack (2.1.4) rack-unreloader (1.7.0) From eabcd1383a34503028d493c8d1375b30a3759020 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Wed, 7 Jul 2021 15:59:49 -0400 Subject: [PATCH 045/103] Configure dependabot to monitor skaffold go.mod and github-actions (#6131) --- .github/dependabot.yml | 44 ++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 90d77d3265c..416c3c93f3a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,58 +1,74 @@ version: 2 +# dependabot ignores can be configured here or via `@dependabot ignore` rules +# in PRs. See those list by searching: +# https://github.com/GoogleContainerTools/skaffold/search?q=%22%40dependabot+ignore%22+in%3Acomments updates: - - directory: "/examples" + # check Skaffold dependencies + - directory: "/" + package-ecosystem: "gomod" + schedule: + interval: "daily" + + # check for updates to github actions + - directory: "/" + package-ecosystem: "github-actions" + schedule: + interval: "daily" + + - directory: "/integration/examples" package-ecosystem: "npm" schedule: interval: "daily" - - directory: "/examples" + - directory: "/integration/examples" package-ecosystem: "bundler" schedule: interval: "daily" - - directory: "/examples" + - directory: "/integration/examples" package-ecosystem: "composer" schedule: interval: "daily" - - directory: "/examples" + - directory: "/integration/examples" package-ecosystem: "pip" schedule: interval: "daily" - - directory: "/examples" + - directory: "/integration/examples" package-ecosystem: "maven" schedule: interval: "daily" - - directory: "/examples" + - directory: "/integration/examples" package-ecosystem: "gradle" schedule: interval: "daily" - - directory: "/examples" + - directory: "/integration/examples" package-ecosystem: "gomod" schedule: interval: "daily" - - directory: "/integration/examples" + + - directory: "/examples" package-ecosystem: "npm" schedule: interval: "daily" - - directory: "/integration/examples" + - directory: "/examples" package-ecosystem: "bundler" schedule: interval: "daily" - - directory: "/integration/examples" + - directory: "/examples" package-ecosystem: "composer" schedule: interval: "daily" - - directory: "/integration/examples" + - directory: "/examples" package-ecosystem: "pip" schedule: interval: "daily" - - directory: "/integration/examples" + - directory: "/examples" package-ecosystem: "maven" schedule: interval: "daily" - - directory: "/integration/examples" + - directory: "/examples" package-ecosystem: "gradle" schedule: interval: "daily" - - directory: "/integration/examples" + - directory: "/examples" package-ecosystem: "gomod" schedule: interval: "daily" From 0aee0cdd1a68d49921ef23d996e2ed3e1c683e96 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Wed, 7 Jul 2021 16:24:59 -0400 Subject: [PATCH 046/103] Set specific permissions for workflows (#6139) --- .github/workflows/draft-release.yml | 17 +++++++++++------ .github/workflows/integration-darwin.yml | 2 ++ .github/workflows/integration-linux.yml | 4 +++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 2951aa27d26..e95b9483428 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -4,6 +4,9 @@ on: push: branches: - master + +permissions: read-all + jobs: check: name: Check if release commit @@ -17,13 +20,15 @@ jobs: str='${{ github.event.head_commit.message }}' regex="^release\s*:\s*(v[0-9]+\.[0-9]+\.[0-9]+|[0-9]+\.[0-9]+\.[0-9]+)" if [[ "$str" =~ $regex ]]; then - echo "::set-output name=applicable::true" - echo This is a release commit. + echo "::set-output name=applicable::true" + echo This is a release commit. fi release: needs: check if: needs.check.outputs.applicable == 'true' + permissions: + contents: write name: Create Tag and Draft Release runs-on: ubuntu-latest steps: @@ -62,9 +67,9 @@ jobs: found=0 while [ $found -lt 10 -a $retries -gt 0 ] do - sleep 3m - found=$(gsutil du gs://skaffold/releases/${{ env.TAG_NAME }}/ | wc -l) - retries=$((retries-1)) + sleep 3m + found=$(gsutil du gs://skaffold/releases/${{ env.TAG_NAME }}/ | wc -l) + retries=$((retries-1)) done gsutil -m cp -r gs://skaffold/releases/${{ env.TAG_NAME }}/ $HOME @@ -75,7 +80,7 @@ jobs: body=$(git log -p --follow -1 CHANGELOG.md | grep '^\+' | cut -c 2- | tail -n +2) assets=() for asset in $HOME/${{ env.TAG_NAME }}/*; do - assets+=("-a" "$asset") + assets+=("-a" "$asset") done bin/hub release create "${assets[@]}" -m "${{ env.RELEASE_NAME }}" -m "$body" --draft ${{ env.TAG_NAME }} env: diff --git a/.github/workflows/integration-darwin.yml b/.github/workflows/integration-darwin.yml index 753ca9791ec..09b1d4cecc7 100644 --- a/.github/workflows/integration-darwin.yml +++ b/.github/workflows/integration-darwin.yml @@ -3,6 +3,8 @@ name: per-pr (darwin) # Triggers the workflow on push or pull request events on: [push, pull_request] +permissions: read-all + jobs: build: diff --git a/.github/workflows/integration-linux.yml b/.github/workflows/integration-linux.yml index 9d6b6db0df8..0085259707e 100644 --- a/.github/workflows/integration-linux.yml +++ b/.github/workflows/integration-linux.yml @@ -1,8 +1,10 @@ -name: PR (linux) +name: per-pr (linux) # Triggers the workflow on push or pull request events on: [push, pull_request] +permissions: read-all + jobs: build: From 2d766a17373b9f4ae9843d013e5ccf60e9fee508 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Wed, 7 Jul 2021 17:03:42 -0400 Subject: [PATCH 047/103] Make completion work again (#6138) --- cmd/skaffold/app/cmd/cmd.go | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/cmd/skaffold/app/cmd/cmd.go b/cmd/skaffold/app/cmd/cmd.go index c06297f998a..de9ef723895 100644 --- a/cmd/skaffold/app/cmd/cmd.go +++ b/cmd/skaffold/app/cmd/cmd.go @@ -78,22 +78,26 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { PersistentPreRunE: func(cmd *cobra.Command, args []string) error { cmd.Root().SilenceUsage = true - opts.Command = cmd.Use - instrumentation.SetCommand(cmd.Use) - out := output.GetWriter(out, defaultColor, forceColors) - if timestamps { - l := logrus.New() - l.SetOutput(out) - l.SetFormatter(&logrus.TextFormatter{ - DisableTimestamp: false, - }) - out = l.Writer() - } - cmd.Root().SetOutput(out) + opts.Command = cmd.Name() + // Don't redirect output for Cobra internal `__complete` and `__completeNoDesc` commands. + // These are used for command completion and send debug messages on stderr. + if cmd.Name() != cobra.ShellCompRequestCmd && cmd.Name() != cobra.ShellCompNoDescRequestCmd { + instrumentation.SetCommand(cmd.Name()) + out := output.GetWriter(out, defaultColor, forceColors) + if timestamps { + l := logrus.New() + l.SetOutput(out) + l.SetFormatter(&logrus.TextFormatter{ + DisableTimestamp: false, + }) + out = l.Writer() + } + cmd.Root().SetOutput(out) - // Setup logs - if err := setUpLogs(errOut, v, timestamps); err != nil { - return err + // Setup logs + if err := setUpLogs(errOut, v, timestamps); err != nil { + return err + } } // Setup kubeContext and kubeConfig From 5d7aaff89d7329fba26e59d660896f09097271e5 Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Wed, 7 Jul 2021 15:23:41 -0700 Subject: [PATCH 048/103] Move cluster availability check into Deployers (#6125) * Move cluster availability check into Deployers * override client config in deploy tests --- pkg/skaffold/deploy/helm/deploy.go | 9 +++++++- pkg/skaffold/deploy/helm/helm_test.go | 4 ++++ pkg/skaffold/deploy/kpt/kpt.go | 7 +++++++ pkg/skaffold/deploy/kpt/kpt_test.go | 4 ++++ pkg/skaffold/deploy/kubectl/kubectl.go | 7 +++++++ pkg/skaffold/deploy/kubectl/kubectl_test.go | 7 +++++++ pkg/skaffold/deploy/kustomize/kustomize.go | 7 +++++++ .../deploy/kustomize/kustomize_test.go | 3 +++ pkg/skaffold/deploy/util/util.go | 7 +++++++ pkg/skaffold/kubernetes/util.go | 13 ++++++++++++ pkg/skaffold/runner/v1/apply.go | 8 ------- pkg/skaffold/runner/v1/deploy.go | 21 ------------------- 12 files changed, 67 insertions(+), 30 deletions(-) diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index 5b078c0bfa5..4a5f7e1b9de 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -197,11 +197,18 @@ func (h *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { // Deploy deploys the build results to the Kubernetes cluster func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) ([]string, error) { - ctx, endTrace := instrumentation.StartTrace(ctx, "Render", map[string]string{ + ctx, endTrace := instrumentation.StartTrace(ctx, "Deploy", map[string]string{ "DeployerType": "helm", }) defer endTrace() + // Check that the cluster is reachable. + // This gives a better error message when the cluster can't + // be reached. + if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { + return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + } + childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_LoadImages") if err := h.imageLoader.LoadImages(childCtx, out, h.localImages, h.originalImages, builds); err != nil { endTrace(instrumentation.TraceEndError(err)) diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index 74d54ccc822..072071abc52 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -28,7 +28,9 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" schemautil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" @@ -994,8 +996,10 @@ func TestHelmDeploy(t *testing.T) { expectedNamespaces: []string{"testReleaseNamespace"}, }, } + for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&client.Client, deployutil.MockK8sClient) fakeWarner := &warnings.Collect{} env := test.env if env == nil { diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 842877ad6e8..659d1dcdedb 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -213,6 +213,13 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art "DeployerType": "kpt", }) + // Check that the cluster is reachable. + // This gives a better error message when the cluster can't + // be reached. + if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { + return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + } + _, endTrace := instrumentation.StartTrace(ctx, "Deploy_sanityCheck") if err := sanityCheck(k.Dir, out); err != nil { endTrace(instrumentation.TraceEndError(err)) diff --git a/pkg/skaffold/deploy/kpt/kpt_test.go b/pkg/skaffold/deploy/kpt/kpt_test.go index 3d2302a9b1b..f7453b9b81f 100644 --- a/pkg/skaffold/deploy/kpt/kpt_test.go +++ b/pkg/skaffold/deploy/kpt/kpt_test.go @@ -29,7 +29,9 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -229,6 +231,7 @@ func TestKpt_Deploy(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { t.Override(&util.DefaultExecCommand, test.commands) + t.Override(&client.Client, deployutil.MockK8sClient) t.NewTempDir().Chdir() k := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, &test.kpt) @@ -1169,6 +1172,7 @@ func TestNonEmptyKubeconfig(t *testing.T) { testutil.Run(t, "", func(t *testutil.T) { t.Override(&util.DefaultExecCommand, commands) + t.Override(&client.Client, deployutil.MockK8sClient) k := NewDeployer(&kptConfig{config: "testConfigPath"}, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ Dir: ".", Live: latestV1.KptLive{ diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index db17f6010d9..474efe40767 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -150,6 +150,13 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art "DeployerType": "kubectl", }) + // Check that the cluster is reachable. + // This gives a better error message when the cluster can't + // be reached. + if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { + return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + } + // if any hydrated manifests are passed to `skaffold apply`, only deploy these // also, manually set the labels to ensure the runID is added switch { diff --git a/pkg/skaffold/deploy/kubectl/kubectl_test.go b/pkg/skaffold/deploy/kubectl/kubectl_test.go index 8747d91c05a..d9bda052086 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl_test.go +++ b/pkg/skaffold/deploy/kubectl/kubectl_test.go @@ -29,7 +29,9 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -222,6 +224,7 @@ func TestKubectlDeploy(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { t.SetEnvs(test.envs) t.Override(&util.DefaultExecCommand, test.commands) + t.Override(&client.Client, deployutil.MockK8sClient) t.NewTempDir(). Write("deployment.yaml", DeploymentWebYAML). Touch("empty.ignored"). @@ -375,6 +378,7 @@ func TestKubectlDeployerRemoteCleanup(t *testing.T) { func TestKubectlRedeploy(t *testing.T) { testutil.Run(t, "", func(t *testutil.T) { + t.Override(&client.Client, deployutil.MockK8sClient) tmpDir := t.NewTempDir(). Write("deployment-web.yaml", DeploymentWebYAML). Write("deployment-app.yaml", DeploymentAppYAML) @@ -425,6 +429,7 @@ func TestKubectlRedeploy(t *testing.T) { func TestKubectlWaitForDeletions(t *testing.T) { testutil.Run(t, "", func(t *testutil.T) { + t.Override(&client.Client, deployutil.MockK8sClient) tmpDir := t.NewTempDir().Write("deployment-web.yaml", DeploymentWebYAML) t.Override(&util.DefaultExecCommand, testutil. @@ -480,6 +485,7 @@ func TestKubectlWaitForDeletionsFails(t *testing.T) { testutil.Run(t, "", func(t *testutil.T) { tmpDir := t.NewTempDir().Write("deployment-web.yaml", DeploymentWebYAML) + t.Override(&client.Client, deployutil.MockK8sClient) t.Override(&util.DefaultExecCommand, testutil. CmdRunOut("kubectl version --client -ojson", KubectlVersion112). AndRunOut("kubectl --context kubecontext create --dry-run -oyaml -f "+tmpDir.Path("deployment-web.yaml"), DeploymentWebYAML). @@ -709,6 +715,7 @@ func TestGCSManifests(t *testing.T) { }} for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&client.Client, deployutil.MockK8sClient) t.Override(&util.DefaultExecCommand, test.commands) if err := os.MkdirAll(manifest.ManifestTmpDir, os.ModePerm); err != nil { t.Fatal(err) diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index b4b9cceacc5..d5f874180d6 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -205,6 +205,13 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art "DeployerType": "kustomize", }) + // Check that the cluster is reachable. + // This gives a better error message when the cluster can't + // be reached. + if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { + return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + } + childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_renderManifests") manifests, err := k.renderManifests(childCtx, out, builds) if err != nil { diff --git a/pkg/skaffold/deploy/kustomize/kustomize_test.go b/pkg/skaffold/deploy/kustomize/kustomize_test.go index 81df97be3e2..e5e2d4cecf7 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize_test.go +++ b/pkg/skaffold/deploy/kustomize/kustomize_test.go @@ -28,7 +28,9 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" @@ -168,6 +170,7 @@ func TestKustomizeDeploy(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { t.SetEnvs(test.envs) t.Override(&util.DefaultExecCommand, test.commands) + t.Override(&client.Client, deployutil.MockK8sClient) t.Override(&KustomizeBinaryCheck, func() bool { return test.kustomizeCmdPresent }) t.NewTempDir(). Chdir() diff --git a/pkg/skaffold/deploy/util/util.go b/pkg/skaffold/deploy/util/util.go index 66f3c11b5ab..8aae0078671 100644 --- a/pkg/skaffold/deploy/util/util.go +++ b/pkg/skaffold/deploy/util/util.go @@ -19,6 +19,9 @@ package util import ( "fmt" + k8s "k8s.io/client-go/kubernetes" + fakekubeclientset "k8s.io/client-go/kubernetes/fake" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" @@ -52,3 +55,7 @@ func AddTagsToPodSelector(artifacts []graph.Artifact, deployerArtifacts []graph. } } } + +func MockK8sClient() (k8s.Interface, error) { + return fakekubeclientset.NewSimpleClientset(), nil +} diff --git a/pkg/skaffold/kubernetes/util.go b/pkg/skaffold/kubernetes/util.go index ee4e76fc868..778c1fdbc30 100644 --- a/pkg/skaffold/kubernetes/util.go +++ b/pkg/skaffold/kubernetes/util.go @@ -27,6 +27,7 @@ import ( "github.com/sirupsen/logrus" k8syaml "k8s.io/apimachinery/pkg/util/yaml" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" ) @@ -151,3 +152,15 @@ func parseImagesFromYaml(obj interface{}) []string { return images } + +// FailIfClusterIsNotReachable checks that Kubernetes is reachable. +// This gives a clear early error when the cluster can't be reached. +func FailIfClusterIsNotReachable() error { + c, err := client.Client() + if err != nil { + return err + } + + _, err = c.Discovery().ServerVersion() + return err +} diff --git a/pkg/skaffold/runner/v1/apply.go b/pkg/skaffold/runner/v1/apply.go index 069c1ff205d..43bfc6ec5c9 100644 --- a/pkg/skaffold/runner/v1/apply.go +++ b/pkg/skaffold/runner/v1/apply.go @@ -18,7 +18,6 @@ package v1 import ( "context" - "fmt" "io" "time" @@ -44,13 +43,6 @@ func (r *SkaffoldRunner) Apply(ctx context.Context, out io.Writer) error { } func (r *SkaffoldRunner) applyResources(ctx context.Context, out io.Writer, artifacts, localImages []graph.Artifact) error { - // Check that the cluster is reachable. - // This gives a better error message when the cluster can't - // be reached. - if err := failIfClusterIsNotReachable(); err != nil { - return fmt.Errorf("unable to connect to Kubernetes: %w", err) - } - deployOut, postDeployFn, err := deployutil.WithLogFile(time.Now().Format(deployutil.TimeFormat)+".log", out, r.runCtx.Muted()) if err != nil { return err diff --git a/pkg/skaffold/runner/v1/deploy.go b/pkg/skaffold/runner/v1/deploy.go index 3b5026be052..f11b0dc1c97 100644 --- a/pkg/skaffold/runner/v1/deploy.go +++ b/pkg/skaffold/runner/v1/deploy.go @@ -30,7 +30,6 @@ import ( eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" - kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" ) @@ -94,13 +93,6 @@ They are tagged and referenced by a unique, local only, tag instead. See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) } - // Check that the cluster is reachable. - // This gives a better error message when the cluster can't - // be reached. - if err := failIfClusterIsNotReachable(); err != nil { - return fmt.Errorf("unable to connect to Kubernetes: %w", err) - } - deployOut, postDeployFn, err := deployutil.WithLogFile(time.Now().Format(deployutil.TimeFormat)+".log", out, r.runCtx.Muted()) if err != nil { return err @@ -148,24 +140,11 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) return nil } -// failIfClusterIsNotReachable checks that Kubernetes is reachable. -// This gives a clear early error when the cluster can't be reached. -func failIfClusterIsNotReachable() error { - client, err := kubernetesclient.Client() - if err != nil { - return err - } - - _, err = client.Discovery().ServerVersion() - return err -} - func (r *SkaffoldRunner) wasBuilt(tag string) bool { for _, built := range r.Builds { if built.Tag == tag { return true } } - return false } From 1a5fdc7e66e925c6546a3c0c58f9cc3fe9f41506 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Wed, 7 Jul 2021 18:25:19 -0400 Subject: [PATCH 049/103] Fetch namespaces at time of sync (#6135) --- pkg/skaffold/sync/provider.go | 4 ++-- pkg/skaffold/sync/sync.go | 4 ++-- pkg/skaffold/sync/types.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/skaffold/sync/provider.go b/pkg/skaffold/sync/provider.go index 99ed98f11ab..97399d77f68 100644 --- a/pkg/skaffold/sync/provider.go +++ b/pkg/skaffold/sync/provider.go @@ -43,8 +43,8 @@ func NewSyncProvider(config Config, cli *kubectl.CLI) Provider { provider = &fullProvider{ kubernetesSyncer: func(podSelector *kubernetes.ImageList) Syncer { return &podSyncer{ - kubectl: cli, - namespaces: config.GetNamespaces(), + kubectl: cli, + config: config, } }, noopSyncer: func() Syncer { diff --git a/pkg/skaffold/sync/sync.go b/pkg/skaffold/sync/sync.go index 1096fa93124..31bb796a784 100644 --- a/pkg/skaffold/sync/sync.go +++ b/pkg/skaffold/sync/sync.go @@ -256,7 +256,7 @@ func (s *podSyncer) Sync(ctx context.Context, item *Item) error { if len(item.Copy) > 0 { logrus.Infoln("Copying files:", item.Copy, "to", item.Image) - if err := Perform(ctx, item.Image, item.Copy, s.copyFileFn, s.namespaces); err != nil { + if err := Perform(ctx, item.Image, item.Copy, s.copyFileFn, s.config.GetNamespaces()); err != nil { return fmt.Errorf("copying files: %w", err) } } @@ -264,7 +264,7 @@ func (s *podSyncer) Sync(ctx context.Context, item *Item) error { if len(item.Delete) > 0 { logrus.Infoln("Deleting files:", item.Delete, "from", item.Image) - if err := Perform(ctx, item.Image, item.Delete, s.deleteFileFn, s.namespaces); err != nil { + if err := Perform(ctx, item.Image, item.Delete, s.deleteFileFn, s.config.GetNamespaces()); err != nil { return fmt.Errorf("deleting files: %w", err) } } diff --git a/pkg/skaffold/sync/types.go b/pkg/skaffold/sync/types.go index 6453f4d1246..99c190b8380 100644 --- a/pkg/skaffold/sync/types.go +++ b/pkg/skaffold/sync/types.go @@ -35,8 +35,8 @@ type Syncer interface { } type podSyncer struct { - kubectl *pkgkubectl.CLI - namespaces []string + kubectl *pkgkubectl.CLI + config Config } type Config interface { From 0b13fa006c893dd27047f98f988eccce2afc9e28 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Wed, 7 Jul 2021 19:07:26 -0400 Subject: [PATCH 050/103] Update Skaffold dependencies (#6155) * update deps * update deploy/skaffold/Dockerfile --- deploy/skaffold/Dockerfile | 2 +- deploy/skaffold/Dockerfile.deps | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/deploy/skaffold/Dockerfile b/deploy/skaffold/Dockerfile index 36ff5712768..c5280781de9 100644 --- a/deploy/skaffold/Dockerfile +++ b/deploy/skaffold/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. # This base image has to be updated manually after running `make build_deps` -FROM gcr.io/k8s-skaffold/build_deps:45b0b2b2c59e1b381f5386d6c960dd87c3a3c9d8 as build +FROM gcr.io/k8s-skaffold/build_deps:6477c2b624b633dee1d4c66bdd02821d25ce3f86 as build WORKDIR /skaffold FROM build as builder diff --git a/deploy/skaffold/Dockerfile.deps b/deploy/skaffold/Dockerfile.deps index b3970551d1b..0a36fd65458 100644 --- a/deploy/skaffold/Dockerfile.deps +++ b/deploy/skaffold/Dockerfile.deps @@ -14,29 +14,30 @@ # Download kubectl FROM alpine:3.10 as download-kubectl -# Track default version installed by Google Cloud SDK: 335.0.0 moved to 1.17(.17) -ENV KUBECTL_VERSION v1.17.17 +# Track default version installed by Google Cloud SDK: 341.0.0 moved to 1.18(.18) +# https://cloud.google.com/sdk/docs/release-notes +ENV KUBECTL_VERSION v1.18.18 ENV KUBECTL_URL https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl RUN wget -O kubectl "${KUBECTL_URL}" RUN chmod +x kubectl # Download helm (see https://github.com/helm/helm/releases/latest) FROM alpine:3.10 as download-helm -ENV HELM_VERSION v3.5.4 +ENV HELM_VERSION v3.6.2 ENV HELM_URL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz RUN wget -O helm.tar.gz "${HELM_URL}" RUN tar -xvf helm.tar.gz --strip-components 1 # Download kustomize FROM alpine:3.10 as download-kustomize -ENV KUSTOMIZE_VERSION 4.1.2 +ENV KUSTOMIZE_VERSION 4.2.0 ENV KUSTOMIZE_URL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz RUN wget -O kustomize.tar.gz "${KUSTOMIZE_URL}" RUN tar -xvf kustomize.tar.gz # Download kpt FROM alpine:3.10 as download-kpt -ENV KPT_VERSION 1.0.0-alpha.2 +ENV KPT_VERSION 1.0.0-beta.1 ENV KPT_URL https://github.com/GoogleContainerTools/kpt/releases/download/v${KPT_VERSION}/kpt_linux_amd64 RUN wget -O kpt "${KPT_URL}" RUN chmod +x kpt @@ -57,28 +58,28 @@ RUN chmod +x container-structure-test # Download kind FROM alpine:3.10 as download-kind -ENV KIND_VERSION v0.10.0 +ENV KIND_VERSION v0.11.1 ENV KIND_URL https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64 RUN wget -O kind "${KIND_URL}" RUN chmod +x kind # Download k3d FROM alpine:3.10 as download-k3d -ENV K3D_VERSION v4.4.2 +ENV K3D_VERSION v4.4.6 ENV K3D_URL https://github.com/rancher/k3d/releases/download/${K3D_VERSION}/k3d-linux-amd64 RUN wget -O k3d "${K3D_URL}" RUN chmod +x k3d # Download gcloud FROM alpine:3.10 as download-gcloud -ENV GCLOUD_VERSION 335.0.0 +ENV GCLOUD_VERSION 347.0.0 ENV GCLOUD_URL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz RUN wget -O gcloud.tar.gz "${GCLOUD_URL}" RUN tar -zxf gcloud.tar.gz # Download bazel FROM alpine:3.10 as download-bazel -ENV BAZEL_VERSION 4.0.0 +ENV BAZEL_VERSION 4.1.0 ENV BAZEL_URL https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-x86_64 RUN wget -O bazel "${BAZEL_URL}" RUN chmod +x bazel From dc504a1a3ebf10361464f062f871fafea229fefd Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Thu, 8 Jul 2021 21:41:14 +0530 Subject: [PATCH 051/103] feat: add hooks schema, some interface refactor (#6159) --- docs/content/en/schemas/v2beta19.json | 197 ++++++++++++++++++++++++ pkg/skaffold/build/build.go | 3 + pkg/skaffold/build/builder_mux_test.go | 2 + pkg/skaffold/build/cluster/types.go | 2 + pkg/skaffold/build/gcb/types.go | 4 + pkg/skaffold/build/local/local.go | 4 + pkg/skaffold/schema/latest/v1/config.go | 82 ++++++++++ 7 files changed, 294 insertions(+) diff --git a/docs/content/en/schemas/v2beta19.json b/docs/content/en/schemas/v2beta19.json index e13efebe141..06a810c17e2 100755 --- a/docs/content/en/schemas/v2beta19.json +++ b/docs/content/en/schemas/v2beta19.json @@ -576,6 +576,34 @@ "description": "contains all the configuration for the build steps.", "x-intellij-html-description": "contains all the configuration for the build steps." }, + "BuildHooks": { + "properties": { + "after": { + "items": { + "$ref": "#/definitions/HostHook" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *after* each artifact build step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute after each artifact build step." + }, + "before": { + "items": { + "$ref": "#/definitions/HostHook" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *before* each artifact build step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before each artifact build step." + } + }, + "preferredOrder": [ + "before", + "after" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the list of lifecycle hooks to execute before and after each artifact build step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before and after each artifact build step." + }, "BuildpackArtifact": { "required": [ "builder" @@ -1135,6 +1163,56 @@ "description": "contains all the configuration needed by the deploy steps.", "x-intellij-html-description": "contains all the configuration needed by the deploy steps." }, + "DeployHookItem": { + "properties": { + "container": { + "$ref": "#/definitions/NamedContainerHook", + "description": "describes a single lifecycle hook to run on a container.", + "x-intellij-html-description": "describes a single lifecycle hook to run on a container." + }, + "host": { + "$ref": "#/definitions/HostHook", + "description": "describes a single lifecycle hook to run on the host machine.", + "x-intellij-html-description": "describes a single lifecycle hook to run on the host machine." + } + }, + "preferredOrder": [ + "host", + "container" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a single lifecycle hook to execute before or after each deployer step.", + "x-intellij-html-description": "describes a single lifecycle hook to execute before or after each deployer step." + }, + "DeployHooks": { + "properties": { + "after": { + "items": { + "$ref": "#/definitions/DeployHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *after* each deployer step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute after each deployer step." + }, + "before": { + "items": { + "$ref": "#/definitions/DeployHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *before* each deployer step. Container hooks will only run if the container exists from a previous deployment step (for instance the successive iterations of a dev-loop during `skaffold dev`).", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before each deployer step. Container hooks will only run if the container exists from a previous deployment step (for instance the successive iterations of a dev-loop during skaffold dev)." + } + }, + "preferredOrder": [ + "before", + "after" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the list of lifecycle hooks to execute before and after each deployer step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before and after each deployer step." + }, "DockerArtifact": { "properties": { "addHost": { @@ -1793,6 +1871,39 @@ "description": "describes a helm release to be deployed.", "x-intellij-html-description": "describes a helm release to be deployed." }, + "HostHook": { + "required": [ + "command" + ], + "properties": { + "command": { + "items": { + "type": "string" + }, + "type": "array", + "description": "command to execute.", + "x-intellij-html-description": "command to execute.", + "default": "[]" + }, + "os": { + "items": { + "type": "string" + }, + "type": "array", + "description": "an optional slice of operating system names. If the host machine OS is different, then it skips execution.", + "x-intellij-html-description": "an optional slice of operating system names. If the host machine OS is different, then it skips execution.", + "default": "[]" + } + }, + "preferredOrder": [ + "command", + "os" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a lifecycle hook definition to execute on the host machine.", + "x-intellij-html-description": "describes a lifecycle hook definition to execute on the host machine." + }, "InputDigest": { "type": "object", "description": "*beta* tags hashes the image content.", @@ -2550,6 +2661,42 @@ "description": "holds an optional name of the project.", "x-intellij-html-description": "holds an optional name of the project." }, + "NamedContainerHook": { + "required": [ + "podName", + "command" + ], + "properties": { + "command": { + "items": { + "type": "string" + }, + "type": "array", + "description": "command to execute.", + "x-intellij-html-description": "command to execute.", + "default": "[]" + }, + "containerName": { + "type": "string", + "description": "name of the container to execute the command in.", + "x-intellij-html-description": "name of the container to execute the command in." + }, + "podName": { + "type": "string", + "description": "name of the pod to execute the command in.", + "x-intellij-html-description": "name of the pod to execute the command in." + } + }, + "preferredOrder": [ + "command", + "podName", + "containerName" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a lifecycle hook definition to execute on a named container.", + "x-intellij-html-description": "describes a lifecycle hook definition to execute on a named container." + }, "PortForwardResource": { "properties": { "address": { @@ -2897,6 +3044,56 @@ "x-intellij-html-description": "beta specifies what files to sync into the container. This is a list of sync rules indicating the intent to sync for source files. If no files are listed, sync all the files and infer the destination.", "default": "infer: [\"**/*\"]" }, + "SyncHookItem": { + "properties": { + "container": { + "$ref": "#/definitions/ContainerHook", + "description": "describes a single lifecycle hook to run on a container.", + "x-intellij-html-description": "describes a single lifecycle hook to run on a container." + }, + "host": { + "$ref": "#/definitions/HostHook", + "description": "describes a single lifecycle hook to run on the host machine.", + "x-intellij-html-description": "describes a single lifecycle hook to run on the host machine." + } + }, + "preferredOrder": [ + "host", + "container" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a single lifecycle hook to execute before or after each artifact sync step.", + "x-intellij-html-description": "describes a single lifecycle hook to execute before or after each artifact sync step." + }, + "SyncHooks": { + "properties": { + "after": { + "items": { + "$ref": "#/definitions/SyncHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *after* each artifact sync step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute after each artifact sync step." + }, + "before": { + "items": { + "$ref": "#/definitions/SyncHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *before* each artifact sync step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before each artifact sync step." + } + }, + "preferredOrder": [ + "before", + "after" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the list of lifecycle hooks to execute before and after each artifact sync step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before and after each artifact sync step." + }, "SyncRule": { "required": [ "src", diff --git a/pkg/skaffold/build/build.go b/pkg/skaffold/build/build.go index e623ecf4fd3..660eba034e6 100644 --- a/pkg/skaffold/build/build.go +++ b/pkg/skaffold/build/build.go @@ -54,6 +54,9 @@ type PipelineBuilder interface { // Prune removes images built in this pipeline Prune(context.Context, io.Writer) error + + // PushImages specifies if the built image needs to be explicitly pushed to an image registry. + PushImages() bool } type ErrSyncMapNotSupported struct{} diff --git a/pkg/skaffold/build/builder_mux_test.go b/pkg/skaffold/build/builder_mux_test.go index 9c8f184f074..862987629b1 100644 --- a/pkg/skaffold/build/builder_mux_test.go +++ b/pkg/skaffold/build/builder_mux_test.go @@ -123,6 +123,8 @@ func (m *mockPipelineBuilder) Concurrency() int { return m.concurrency } func (m *mockPipelineBuilder) Prune(context.Context, io.Writer) error { return nil } +func (m *mockPipelineBuilder) PushImages() bool { return false } + func newMockPipelineBuilder(p latestV1.Pipeline) (PipelineBuilder, error) { switch { case p.Build.BuildType.LocalBuild != nil: diff --git a/pkg/skaffold/build/cluster/types.go b/pkg/skaffold/build/cluster/types.go index 3802952b5c1..79c70bbcfb7 100644 --- a/pkg/skaffold/build/cluster/types.go +++ b/pkg/skaffold/build/cluster/types.go @@ -75,3 +75,5 @@ func NewBuilder(bCtx BuilderContext, buildCfg *latestV1.ClusterDetails) (*Builde func (b *Builder) Prune(ctx context.Context, out io.Writer) error { return nil } + +func (b *Builder) PushImages() bool { return true } diff --git a/pkg/skaffold/build/gcb/types.go b/pkg/skaffold/build/gcb/types.go index 1f7387d62c3..f0fea71c094 100644 --- a/pkg/skaffold/build/gcb/types.go +++ b/pkg/skaffold/build/gcb/types.go @@ -116,3 +116,7 @@ func NewBuilder(bCtx BuilderContext, buildCfg *latestV1.GoogleCloudBuild) *Build func (b *Builder) Prune(ctx context.Context, out io.Writer) error { return nil // noop } + +func (b *Builder) PushImages() bool { + return true +} diff --git a/pkg/skaffold/build/local/local.go b/pkg/skaffold/build/local/local.go index 363b12a83da..9cab058515c 100644 --- a/pkg/skaffold/build/local/local.go +++ b/pkg/skaffold/build/local/local.go @@ -64,6 +64,10 @@ func (b *Builder) Concurrency() int { return *b.local.Concurrency } +func (b *Builder) PushImages() bool { + return b.pushImages +} + func (b *Builder) buildArtifact(ctx context.Context, out io.Writer, a *latestV1.Artifact, tag string) (string, error) { digestOrImageID, err := b.runBuildForArtifact(ctx, out, a, tag) if err != nil { diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index 369a74e7aab..c67002d3685 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -551,6 +551,9 @@ type KubectlDeploy struct { // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` } // KubectlFlags are additional flags passed on the command @@ -579,6 +582,9 @@ type HelmDeploy struct { // Flags are additional option flags that are passed on the command // line to `helm`. Flags HelmDeployFlags `yaml:"flags,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` } // HelmDeployFlags are additional option flags that are passed on the command @@ -608,6 +614,9 @@ type KustomizeDeploy struct { // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` } // KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. @@ -623,6 +632,9 @@ type KptDeploy struct { // Live adds additional configurations for `kpt live`. Live KptLive `yaml:"live,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` } // KptFn adds additional configurations used when calling `kpt fn`. @@ -844,6 +856,9 @@ type Artifact struct { // Dependencies describes build artifacts that this artifact depends on. Dependencies []*ArtifactDependency `yaml:"requires,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after each build of the target artifact. + LifecycleHooks BuildHooks `yaml:"-"` } // Sync *beta* specifies what files to sync into the container. @@ -864,6 +879,9 @@ type Sync struct { // Auto delegates discovery of sync rules to the build system. // Only available for jib and buildpacks. Auto *bool `yaml:"auto,omitempty" yamltags:"oneOf=sync"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after each file sync action on the target artifact's containers. + LifecycleHooks SyncHooks `yaml:"-"` } // SyncRule specifies which local files to sync to remote folders. @@ -1306,6 +1324,70 @@ type JibArtifact struct { BaseImage string `yaml:"fromImage,omitempty"` } +// BuildHooks describes the list of lifecycle hooks to execute before and after each artifact build step. +type BuildHooks struct { + // PreHooks describes the list of lifecycle hooks to execute *before* each artifact build step. + PreHooks []HostHook `yaml:"before,omitempty"` + // PostHooks describes the list of lifecycle hooks to execute *after* each artifact build step. + PostHooks []HostHook `yaml:"after,omitempty"` +} + +// SyncHookItem describes a single lifecycle hook to execute before or after each artifact sync step. +type SyncHookItem struct { + // HostHook describes a single lifecycle hook to run on the host machine. + HostHook *HostHook `yaml:"host,omitempty" yamltags:"oneOf=sync_hook"` + // ContainerHook describes a single lifecycle hook to run on a container. + ContainerHook *ContainerHook `yaml:"container,omitempty" yamltags:"oneOf=sync_hook"` +} + +// SyncHooks describes the list of lifecycle hooks to execute before and after each artifact sync step. +type SyncHooks struct { + // PreHooks describes the list of lifecycle hooks to execute *before* each artifact sync step. + PreHooks []SyncHookItem `yaml:"before,omitempty"` + // PostHooks describes the list of lifecycle hooks to execute *after* each artifact sync step. + PostHooks []SyncHookItem `yaml:"after,omitempty"` +} + +// DeployHookItem describes a single lifecycle hook to execute before or after each deployer step. +type DeployHookItem struct { + // HostHook describes a single lifecycle hook to run on the host machine. + HostHook *HostHook `yaml:"host,omitempty" yamltags:"oneOf=deploy_hook"` + // ContainerHook describes a single lifecycle hook to run on a container. + ContainerHook *NamedContainerHook `yaml:"container,omitempty" yamltags:"oneOf=deploy_hook"` +} + +// DeployHooks describes the list of lifecycle hooks to execute before and after each deployer step. +type DeployHooks struct { + // PreHooks describes the list of lifecycle hooks to execute *before* each deployer step. Container hooks will only run if the container exists from a previous deployment step (for instance the successive iterations of a dev-loop during `skaffold dev`). + PreHooks []DeployHookItem `yaml:"before,omitempty"` + // PostHooks describes the list of lifecycle hooks to execute *after* each deployer step. + PostHooks []DeployHookItem `yaml:"after,omitempty"` +} + +// HostHook describes a lifecycle hook definition to execute on the host machine. +type HostHook struct { + // Command is the command to execute. + Command []string `yaml:"command" yamltags:"required"` + // OS is an optional slice of operating system names. If the host machine OS is different, then it skips execution. + OS []string `yaml:"os,omitempty"` +} + +// ContainerHook describes a lifecycle hook definition to execute on a container. The container name is inferred from the scope in which this hook is defined. +type ContainerHook struct { + // Command is the command to execute. + Command []string `yaml:"command" yamltags:"required"` +} + +// NamedContainerHook describes a lifecycle hook definition to execute on a named container. +type NamedContainerHook struct { + // ContainerHook describes a lifecycle hook definition to execute on a container. + ContainerHook `yaml:",inline"` + // PodName is the name of the pod to execute the command in. + PodName string `yaml:"podName" yamltags:"required"` + // ContainerName is the name of the container to execute the command in. + ContainerName string `yaml:"containerName,omitempty"` +} + // UnmarshalYAML provides a custom unmarshaller to deal with // https://github.com/GoogleContainerTools/skaffold/issues/4175 func (clusterDetails *ClusterDetails) UnmarshalYAML(value *yaml.Node) error { From 7d96504bc4ed75e811b195b66548cb0b190155e9 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Thu, 8 Jul 2021 09:49:16 -0700 Subject: [PATCH 052/103] [v2] Remove the latest/v2 schema dependencies. (#6085) latest/v2 used to depend on latest/v1 for build, tag, test. This is aimed at making sure the v1 changes on these steps can be backportting to v2. This requires engineers to update the v2 reference (e.g. bumps the latestV1 reference to a newer release) and sometimes change the v2 pipeline as well. Since v2 is not released yet, this work are not officialized and v2 always fells behind the v1 changes. This change makes latest/v2 no longe relies on v1 schema. --- pkg/skaffold/schema/latest/v2/config.go | 1394 ++++++++++++++++++++++- pkg/skaffold/schema/v3alpha1/config.go | 1394 ++++++++++++++++++++++- 2 files changed, 2758 insertions(+), 30 deletions(-) diff --git a/pkg/skaffold/schema/latest/v2/config.go b/pkg/skaffold/schema/latest/v2/config.go index 132f5393f6e..c2730241221 100644 --- a/pkg/skaffold/schema/latest/v2/config.go +++ b/pkg/skaffold/schema/latest/v2/config.go @@ -17,7 +17,11 @@ limitations under the License. package v2 import ( - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "encoding/json" + + v1 "k8s.io/api/core/v1" + "sigs.k8s.io/kustomize/kyaml/yaml" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) @@ -45,7 +49,7 @@ type SkaffoldConfig struct { Metadata Metadata `yaml:"metadata,omitempty"` // Dependencies describes a list of other required configs for the current config. - Dependencies []latestV1.ConfigDependency `yaml:"requires,omitempty"` + Dependencies []ConfigDependency `yaml:"requires,omitempty"` // Pipeline defines the Build/Test/Deploy phases. Pipeline `yaml:",inline"` @@ -63,10 +67,10 @@ type Metadata struct { // Pipeline describes a Skaffold pipeline. type Pipeline struct { // Build describes how images are built. - Build latestV1.BuildConfig `yaml:"build,omitempty"` + Build BuildConfig `yaml:"build,omitempty"` // Test describes how images are tested. - Test []*latestV1.TestCase `yaml:"test,omitempty"` + Test []*TestCase `yaml:"test,omitempty"` // Render describes how the original manifests are hydrated, validated and transformed. Render RenderConfig `yaml:"manifests,omitempty"` @@ -75,7 +79,425 @@ type Pipeline struct { Deploy DeployConfig `yaml:"deploy,omitempty"` // PortForward describes user defined resources to port-forward. - PortForward []*latestV1.PortForwardResource `yaml:"portForward,omitempty"` + PortForward []*PortForwardResource `yaml:"portForward,omitempty"` +} + +// GitInfo contains information on the origin of skaffold configurations cloned from a git repository. +type GitInfo struct { + // Repo is the git repository the package should be cloned from. e.g. `https://github.com/GoogleContainerTools/skaffold.git`. + Repo string `yaml:"repo" yamltags:"required"` + + // Path is the relative path from the repo root to the skaffold configuration file. eg. `getting-started/skaffold.yaml`. + Path string `yaml:"path,omitempty"` + + // Ref is the git ref the package should be cloned from. eg. `master` or `main`. + Ref string `yaml:"ref,omitempty"` + + // Sync when set to `true` will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to `false`. + Sync *bool `yaml:"sync,omitempty"` +} + +// ConfigDependency describes a dependency on another skaffold configuration. +type ConfigDependency struct { + // Names includes specific named configs within the file path. If empty, then all configs in the file are included. + Names []string `yaml:"configs,omitempty"` + + // Path describes the path to the file containing the required configs. + Path string `yaml:"path,omitempty" skaffold:"filepath" yamltags:"oneOf=paths"` + + // GitRepo describes a remote git repository containing the required configs. + GitRepo *GitInfo `yaml:"git,omitempty" yamltags:"oneOf=paths"` + + // ActiveProfiles describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config. + ActiveProfiles []ProfileDependency `yaml:"activeProfiles,omitempty"` +} + +// ProfileDependency describes a mapping from referenced config profiles to the current config profiles. +// If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles. +type ProfileDependency struct { + // Name describes name of the profile to activate in the dependency config. It should exist in the dependency config. + Name string `yaml:"name" yamltags:"required"` + + // ActivatedBy describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated. + ActivatedBy []string `yaml:"activatedBy,omitempty"` +} + +// ResourceType describes the Kubernetes resource types used for port forwarding. +type ResourceType string + +// PortForwardResource describes a resource to port forward. +type PortForwardResource struct { + // Type is the Kubernetes type that should be port forwarded. + // Acceptable resource types include: `Service`, `Pod` and Controller resource type that has a pod spec: `ReplicaSet`, `ReplicationController`, `Deployment`, `StatefulSet`, `DaemonSet`, `Job`, `CronJob`. + Type ResourceType `yaml:"resourceType,omitempty"` + + // Name is the name of the Kubernetes resource to port forward. + Name string `yaml:"resourceName,omitempty"` + + // Namespace is the namespace of the resource to port forward. + Namespace string `yaml:"namespace,omitempty"` + + // Port is the resource port that will be forwarded. + Port util.IntOrString `yaml:"port,omitempty"` + + // Address is the local address to bind to. Defaults to the loopback address 127.0.0.1. + Address string `yaml:"address,omitempty"` + + // LocalPort is the local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. *Optional*. + LocalPort int `yaml:"localPort,omitempty"` +} + +// BuildConfig contains all the configuration for the build steps. +type BuildConfig struct { + // Artifacts lists the images you're going to be building. + Artifacts []*Artifact `yaml:"artifacts,omitempty"` + + // InsecureRegistries is a list of registries declared by the user to be insecure. + // These registries will be connected to via HTTP instead of HTTPS. + InsecureRegistries []string `yaml:"insecureRegistries,omitempty"` + + // TagPolicy *beta* determines how images are tagged. + // A few strategies are provided here, although you most likely won't need to care! + // If not specified, it defaults to `gitCommit: {variant: Tags}`. + TagPolicy TagPolicy `yaml:"tagPolicy,omitempty"` + + BuildType `yaml:",inline"` +} + +// TagPolicy contains all the configuration for the tagging step. +type TagPolicy struct { + // GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. + GitTagger *GitTagger `yaml:"gitCommit,omitempty" yamltags:"oneOf=tag"` + + // ShaTagger *beta* tags images with their sha256 digest. + ShaTagger *ShaTagger `yaml:"sha256,omitempty" yamltags:"oneOf=tag"` + + // EnvTemplateTagger *beta* tags images with a configurable template string. + EnvTemplateTagger *EnvTemplateTagger `yaml:"envTemplate,omitempty" yamltags:"oneOf=tag"` + + // DateTimeTagger *beta* tags images with the build timestamp. + DateTimeTagger *DateTimeTagger `yaml:"dateTime,omitempty" yamltags:"oneOf=tag"` + + // CustomTemplateTagger *beta* tags images with a configurable template string *composed of other taggers*. + CustomTemplateTagger *CustomTemplateTagger `yaml:"customTemplate,omitempty" yamltags:"oneOf=tag"` + + // InputDigest *beta* tags images with their sha256 digest of their content. + InputDigest *InputDigest `yaml:"inputDigest,omitempty" yamltags:"oneOf=tag"` +} + +// ShaTagger *beta* tags images with their sha256 digest. +type ShaTagger struct{} + +// InputDigest *beta* tags hashes the image content. +type InputDigest struct{} + +// GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. +type GitTagger struct { + // Variant determines the behavior of the git tagger. Valid variants are: + // `Tags` (default): use git tags or fall back to abbreviated commit hash. + // `CommitSha`: use the full git commit sha. + // `AbbrevCommitSha`: use the abbreviated git commit sha. + // `TreeSha`: use the full tree hash of the artifact workingdir. + // `AbbrevTreeSha`: use the abbreviated tree hash of the artifact workingdir. + Variant string `yaml:"variant,omitempty"` + + // Prefix adds a fixed prefix to the tag. + Prefix string `yaml:"prefix,omitempty"` + + // IgnoreChanges specifies whether to omit the `-dirty` postfix if there are uncommitted changes. + IgnoreChanges bool `yaml:"ignoreChanges,omitempty"` +} + +// EnvTemplateTagger *beta* tags images with a configurable template string. +type EnvTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the current environment, + // with those variables injected. + // For example: `{{.RELEASE}}`. + Template string `yaml:"template,omitempty" yamltags:"required"` +} + +// DateTimeTagger *beta* tags images with the build timestamp. +type DateTimeTagger struct { + // Format formats the date and time. + // See [#Time.Format](https://golang.org/pkg/time/#Time.Format). + // Defaults to `2006-01-02_15-04-05.999_MST`. + Format string `yaml:"format,omitempty"` + + // TimeZone sets the timezone for the date and time. + // See [Time.LoadLocation](https://golang.org/pkg/time/#Time.LoadLocation). + // Defaults to the local timezone. + TimeZone string `yaml:"timezone,omitempty"` +} + +// CustomTemplateTagger *beta* tags images with a configurable template string. +type CustomTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the provided components with those variables injected. + // For example: `{{.DATE}}` where DATE references a TaggerComponent. + Template string `yaml:"template,omitempty" yamltags:"required"` + + // Components lists TaggerComponents that the template (see field above) can be executed against. + Components []TaggerComponent `yaml:"components,omitempty"` +} + +// TaggerComponent *beta* is a component of CustomTemplateTagger. +type TaggerComponent struct { + // Name is an identifier for the component. + Name string `yaml:"name,omitempty"` + + // Component is a tagging strategy to be used in CustomTemplateTagger. + Component TagPolicy `yaml:",inline" yamltags:"skipTrim"` +} + +// BuildType contains the specific implementation and parameters needed +// for the build step. Only one field should be populated. +type BuildType struct { + // LocalBuild *beta* describes how to do a build on the local docker daemon + // and optionally push to a repository. + LocalBuild *LocalBuild `yaml:"local,omitempty" yamltags:"oneOf=build"` + + // GoogleCloudBuild *beta* describes how to do a remote build on + // [Google Cloud Build](https://cloud.google.com/cloud-build/). + GoogleCloudBuild *GoogleCloudBuild `yaml:"googleCloudBuild,omitempty" yamltags:"oneOf=build"` + + // Cluster *beta* describes how to do an on-cluster build. + Cluster *ClusterDetails `yaml:"cluster,omitempty" yamltags:"oneOf=build"` +} + +// LocalBuild *beta* describes how to do a build on the local docker daemon +// and optionally push to a repository. +type LocalBuild struct { + // Push should images be pushed to a registry. + // If not specified, images are pushed only if the current Kubernetes context + // connects to a remote cluster. + Push *bool `yaml:"push,omitempty"` + + // TryImportMissing whether to attempt to import artifacts from + // Docker (either a local or remote registry) if not in the cache. + TryImportMissing bool `yaml:"tryImportMissing,omitempty"` + + // UseDockerCLI use `docker` command-line interface instead of Docker Engine APIs. + UseDockerCLI bool `yaml:"useDockerCLI,omitempty"` + + // UseBuildkit use BuildKit to build Docker images. + UseBuildkit bool `yaml:"useBuildkit,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `1`. + Concurrency *int `yaml:"concurrency,omitempty"` +} + +// GoogleCloudBuild *beta* describes how to do a remote build on +// [Google Cloud Build](https://cloud.google.com/cloud-build/docs/). +// Docker and Jib artifacts can be built on Cloud Build. The `projectId` needs +// to be provided and the currently logged in user should be given permissions to trigger +// new builds. +type GoogleCloudBuild struct { + // ProjectID is the ID of your Cloud Platform Project. + // If it is not provided, Skaffold will guess it from the image name. + // For example, given the artifact image name `gcr.io/myproject/image`, Skaffold + // will use the `myproject` GCP project. + ProjectID string `yaml:"projectId,omitempty"` + + // DiskSizeGb is the disk size of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + DiskSizeGb int64 `yaml:"diskSizeGb,omitempty"` + + // MachineType is the type of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + MachineType string `yaml:"machineType,omitempty"` + + // Timeout is the amount of time (in seconds) that this build should be allowed to run. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build). + Timeout string `yaml:"timeout,omitempty"` + + // Logging specifies the logging mode. + // Valid modes are: + // `LOGGING_UNSPECIFIED`: The service determines the logging mode. + // `LEGACY`: Stackdriver logging and Cloud Storage logging are enabled (default). + // `GCS_ONLY`: Only Cloud Storage logging is enabled. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#loggingmode). + Logging string `yaml:"logging,omitempty"` + + // LogStreamingOption specifies the behavior when writing build logs to Google Cloud Storage. + // Valid options are: + // `STREAM_DEFAULT`: Service may automatically determine build log streaming behavior. + // `STREAM_ON`: Build logs should be streamed to Google Cloud Storage. + // `STREAM_OFF`: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#logstreamingoption). + LogStreamingOption string `yaml:"logStreamingOption,omitempty"` + + // DockerImage is the image that runs a Docker build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/docker`. + DockerImage string `yaml:"dockerImage,omitempty"` + + // KanikoImage is the image that runs a Kaniko build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/kaniko-project/executor`. + KanikoImage string `yaml:"kanikoImage,omitempty"` + + // MavenImage is the image that runs a Maven build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/mvn`. + MavenImage string `yaml:"mavenImage,omitempty"` + + // GradleImage is the image that runs a Gradle build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/gradle`. + GradleImage string `yaml:"gradleImage,omitempty"` + + // PackImage is the image that runs a Cloud Native Buildpacks build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/k8s-skaffold/pack`. + PackImage string `yaml:"packImage,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // WorkerPool configures a pool of workers to run the build. + WorkerPool string `yaml:"workerPool,omitempty"` +} + +// KanikoCache configures Kaniko caching. If a cache is specified, Kaniko will +// use a remote cache which will speed up builds. +type KanikoCache struct { + // Repo is a remote repository to store cached layers. If none is specified, one will be + // inferred from the image name. See [Kaniko Caching](https://github.com/GoogleContainerTools/kaniko#caching). + Repo string `yaml:"repo,omitempty"` + // HostPath specifies a path on the host that is mounted to each pod as read only cache volume containing base images. + // If set, must exist on each node and prepopulated with kaniko-warmer. + HostPath string `yaml:"hostPath,omitempty"` + // TTL Cache timeout in hours. + TTL string `yaml:"ttl,omitempty"` +} + +// ClusterDetails *beta* describes how to do an on-cluster build. +type ClusterDetails struct { + // HTTPProxy for kaniko pod. + HTTPProxy string `yaml:"HTTP_PROXY,omitempty"` + + // HTTPSProxy for kaniko pod. + HTTPSProxy string `yaml:"HTTPS_PROXY,omitempty"` + + // PullSecretPath is the path to the Google Cloud service account secret key file. + PullSecretPath string `yaml:"pullSecretPath,omitempty"` + + // PullSecretName is the name of the Kubernetes secret for pulling base images + // and pushing the final image. If given, the secret needs to contain the Google Cloud + // service account secret key under the key `kaniko-secret`. + // Defaults to `kaniko-secret`. + PullSecretName string `yaml:"pullSecretName,omitempty"` + + // PullSecretMountPath is the path the pull secret will be mounted at within the running container. + PullSecretMountPath string `yaml:"pullSecretMountPath,omitempty"` + + // Namespace is the Kubernetes namespace. + // Defaults to current namespace in Kubernetes configuration. + Namespace string `yaml:"namespace,omitempty"` + + // Timeout is the amount of time (in seconds) that this build is allowed to run. + // Defaults to 20 minutes (`20m`). + Timeout string `yaml:"timeout,omitempty"` + + // DockerConfig describes how to mount the local Docker configuration into a pod. + DockerConfig *DockerConfig `yaml:"dockerConfig,omitempty"` + + // ServiceAccountName describes the Kubernetes service account to use for the pod. + // Defaults to 'default'. + ServiceAccountName string `yaml:"serviceAccount,omitempty"` + + // Tolerations describes the Kubernetes tolerations for the pod. + Tolerations []v1.Toleration `yaml:"tolerations,omitempty"` + + // Annotations describes the Kubernetes annotations for the pod. + Annotations map[string]string `yaml:"annotations,omitempty"` + + // RunAsUser defines the UID to request for running the container. + // If omitted, no SecurityContext will be specified for the pod and will therefore be inherited + // from the service account. + RunAsUser *int64 `yaml:"runAsUser,omitempty"` + + // Resources define the resource requirements for the kaniko pod. + Resources *ResourceRequirements `yaml:"resources,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // Volumes defines container mounts for ConfigMap and Secret resources. + Volumes []v1.Volume `yaml:"volumes,omitempty"` + + // RandomPullSecret adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomPullSecret bool `yaml:"randomPullSecret,omitempty"` + + // RandomDockerConfigSecret adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomDockerConfigSecret bool `yaml:"randomDockerConfigSecret,omitempty"` +} + +// DockerConfig contains information about the docker `config.json` to mount. +type DockerConfig struct { + // Path is the path to the docker `config.json`. + Path string `yaml:"path,omitempty"` + + // SecretName is the Kubernetes secret that contains the `config.json` Docker configuration. + // Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'. + SecretName string `yaml:"secretName,omitempty"` +} + +// ResourceRequirements describes the resource requirements for the kaniko pod. +type ResourceRequirements struct { + // Requests [resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Requests *ResourceRequirement `yaml:"requests,omitempty"` + + // Limits [resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Limits *ResourceRequirement `yaml:"limits,omitempty"` +} + +// ResourceRequirement stores the CPU/Memory requirements for the pod. +type ResourceRequirement struct { + // CPU the number cores to be used. + // For example: `2`, `2.0` or `200m`. + CPU string `yaml:"cpu,omitempty"` + + // Memory the amount of memory to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + Memory string `yaml:"memory,omitempty"` + + // EphemeralStorage the amount of Ephemeral storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + EphemeralStorage string `yaml:"ephemeralStorage,omitempty"` + + // ResourceStorage the amount of resource storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + ResourceStorage string `yaml:"resourceStorage,omitempty"` +} + +// TestCase is a list of tests to run on images that Skaffold builds. +type TestCase struct { + // ImageName is the artifact on which to run those tests. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image" yamltags:"required"` + + // Workspace is the directory containing the test sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // CustomTests lists the set of custom tests to run after an artifact is built. + CustomTests []CustomTest `yaml:"custom,omitempty"` + + // StructureTests lists the [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) + // to run on that artifact. + // For example: `["./test/*"]`. + StructureTests []string `yaml:"structureTests,omitempty" skaffold:"filepath"` + + // StructureTestArgs lists additional configuration arguments passed to `container-structure-test` binary. + // For example: `["--driver=tar", "--no-color", "-q"]`. + StructureTestArgs []string `yaml:"structureTestsArgs,omitempty"` } // RenderConfig contains all the configuration needed by the render steps. @@ -119,8 +541,8 @@ type Validator struct { ConfigMapData []string `yaml:"configMapData,omitempty"` } -// DeployConfig contains all the configuration needed by the deploy steps. -type DeployConfig struct { +// KptV2Deploy contains all the configuration needed by the deploy steps. +type KptV2Deploy struct { // Dir is equivalent to the dir in `kpt live apply `. If not provided, skaffold renders the raw manifests // and store them to a a hidden directory `.kpt-hydrated`, and deploys the hidden directory. @@ -132,16 +554,21 @@ type DeployConfig struct { // InventoryNamespace *alpha* sets the inventory namespace. InventoryNamespace string `yaml:"inventoryNamespace,omitempty"` - // StatusCheckDeadlineSeconds sets for the polling period for resource statuses. Default to 2s. Values can be "2s", "1min", "3h", etc - StatusCheckDeadlineSeconds string `statusCheckDeadlineSeconds:"pollPeriod,omitempty"` - // PrunePropagationPolicy sets the propagation policy for pruning. - // Possible settings are Background, Foreground, Orphan. - // Default to "Background". - PrunePropagationPolicy string `yaml:"prunePropagationPolicy,omitempty"` // PruneTimeout sets the time threshold to wait for all pruned resources to be deleted. PruneTimeout string `yaml:"pruneTimeout,omitempty"` // ReconcileTimeout sets the time threshold to wait for all resources to reach the current status. ReconcileTimeout string `yaml:"reconcileTimeout,omitempty"` +} + +// DeployConfig contains all the configuration needed by the deploy steps. +type DeployConfig struct { + DeployType `yaml:",inline"` + + // StatusCheck *beta* enables waiting for deployments to stabilize. + StatusCheck *bool `yaml:"statusCheck,omitempty"` + + // StatusCheckDeadlineSeconds *beta* is the deadline for deployments to stabilize in seconds. + StatusCheckDeadlineSeconds int `yaml:"statusCheckDeadlineSeconds,omitempty"` // KubeContext is the Kubernetes context that Skaffold should deploy to. // For example: `minikube`. @@ -151,6 +578,143 @@ type DeployConfig struct { Logs LogsConfig `yaml:"logs,omitempty"` } +// DeployType contains the specific implementation and parameters needed +// for the deploy step. All three deployer types can be used at the same +// time for hybrid workflows. +type DeployType struct { + // HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. + HelmDeploy *HelmDeploy `yaml:"helm,omitempty"` + + // KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. + KptDeploy *KptDeploy `yaml:"kpt,omitempty"` + + KptV2Deploy *KptV2Deploy `yaml:"kptV2,omitempty"` + + // KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. + // You'll need a `kubectl` CLI version installed that's compatible with your cluster. + KubectlDeploy *KubectlDeploy `yaml:"kubectl,omitempty"` + + // KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. + KustomizeDeploy *KustomizeDeploy `yaml:"kustomize,omitempty"` +} + +// KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. +// You'll need a `kubectl` CLI version installed that's compatible with your cluster. +type KubectlDeploy struct { + // Manifests lists the Kubernetes yaml or json manifests. + // Defaults to `["k8s/*.yaml"]`. + Manifests []string `yaml:"manifests,omitempty" skaffold:"filepath"` + + // RemoteManifests lists Kubernetes manifests in remote clusters. + RemoteManifests []string `yaml:"remoteManifests,omitempty"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` +} + +// KubectlFlags are additional flags passed on the command +// line to kubectl either on every command (Global), on creations (Apply) +// or deletions (Delete). +type KubectlFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Apply are additional flags passed on creations (`kubectl apply`). + Apply []string `yaml:"apply,omitempty"` + + // Delete are additional flags passed on deletions (`kubectl delete`). + Delete []string `yaml:"delete,omitempty"` + + // DisableValidation passes the `--validate=false` flag to supported + // `kubectl` commands when enabled. + DisableValidation bool `yaml:"disableValidation,omitempty"` +} + +// KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. +type KptDeploy struct { + // Dir is the path to the config directory (Required). + // By default, the Dir contains the application configurations, + // [kustomize config files](https://kubectl.docs.kubernetes.io/pages/examples/kustomize.html) + // and [declarative kpt functions](https://googlecontainertools.github.io/kpt/guides/consumer/function/#declarative-run). + Dir string `yaml:"dir" yamltags:"required" skaffold:"filepath"` + + // Fn adds additional configurations for `kpt fn`. + Fn KptFn `yaml:"fn,omitempty"` + + // Live adds additional configurations for `kpt live`. + Live KptLive `yaml:"live,omitempty"` +} + +// KptFn adds additional configurations used when calling `kpt fn`. +type KptFn struct { + // FnPath is the directory to discover the declarative kpt functions. + // If not provided, kpt deployer uses `kpt.Dir`. + FnPath string `yaml:"fnPath,omitempty" skaffold:"filepath"` + + // Image is a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath + // will be ignored. + Image string `yaml:"image,omitempty"` + + // NetworkName is the docker network name to run the kpt function containers (default "bridge"). + NetworkName string `yaml:"networkName,omitempty"` + + // GlobalScope sets the global scope for the kpt functions. see `kpt help fn run`. + GlobalScope bool `yaml:"globalScope,omitempty"` + + // Network enables network access for the kpt function containers. + Network bool `yaml:"network,omitempty"` + + // Mount is a list of storage options to mount to the fn image. + Mount []string `yaml:"mount,omitempty"` + + // SinkDir is the directory to where the manipulated resource output is stored. + SinkDir string `yaml:"sinkDir,omitempty" skaffold:"filepath"` +} + +// KptLive adds additional configurations used when calling `kpt live`. +type KptLive struct { + // Apply sets the kpt inventory directory. + Apply KptApplyInventory `yaml:"apply,omitempty"` + + // Options adds additional configurations for `kpt live apply` commands. + Options KptApplyOptions `yaml:"options,omitempty"` +} + +// KptApplyInventory sets the kpt inventory directory. +type KptApplyInventory struct { + // Dir is equivalent to the dir in `kpt live apply `. If not provided, + // kpt deployer will create a hidden directory `.kpt-hydrated` to store the manipulated + // resource output and the kpt inventory-template.yaml file. + Dir string `yaml:"dir,omitempty"` + + // InventoryID *alpha* is the identifier for a group of applied resources. + // This value is only needed when the `kpt live` is working on a pre-applied cluster resources. + InventoryID string `yaml:"inventoryID,omitempty"` + + // InventoryNamespace *alpha* sets the inventory namespace. + InventoryNamespace string `yaml:"inventoryNamespace,omitempty"` +} + +// KptApplyOptions adds additional configurations used when calling `kpt live apply`. +type KptApplyOptions struct { + // PollPeriod sets for the polling period for resource statuses. Default to 2s. + PollPeriod string `yaml:"pollPeriod,omitempty"` + + // PrunePropagationPolicy sets the propagation policy for pruning. + // Possible settings are Background, Foreground, Orphan. + // Default to "Background". + PrunePropagationPolicy string `yaml:"prunePropagationPolicy,omitempty"` + + // PruneTimeout sets the time threshold to wait for all pruned resources to be deleted. + PruneTimeout string `yaml:"pruneTimeout,omitempty"` + + // ReconcileTimeout sets the time threshold to wait for all resources to reach the current status. + ReconcileTimeout string `yaml:"reconcileTimeout,omitempty"` +} + // LogsConfig configures how container logs are printed as a result of a deployment. type LogsConfig struct { // Prefix defines the prefix shown on each log line. Valid values are @@ -162,6 +726,67 @@ type LogsConfig struct { Prefix string `yaml:"prefix,omitempty"` } +// Artifact are the items that need to be built, along with the context in which +// they should be built. +type Artifact struct { + // ImageName is the name of the image to be built. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image,omitempty" yamltags:"required"` + + // Workspace is the directory containing the artifact's sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // Sync *beta* lists local files synced to pods instead + // of triggering an image build when modified. + // If no files are listed, sync all the files and infer the destination. + // Defaults to `infer: ["**/*"]`. + Sync *Sync `yaml:"sync,omitempty"` + + // ArtifactType describes how to build an artifact. + ArtifactType `yaml:",inline"` + + // Dependencies describes build artifacts that this artifact depends on. + Dependencies []*ArtifactDependency `yaml:"requires,omitempty"` +} + +// Sync *beta* specifies what files to sync into the container. +// This is a list of sync rules indicating the intent to sync for source files. +// If no files are listed, sync all the files and infer the destination. +// Defaults to `infer: ["**/*"]`. +type Sync struct { + // Manual lists manual sync rules indicating the source and destination. + Manual []*SyncRule `yaml:"manual,omitempty" yamltags:"oneOf=sync"` + + // Infer lists file patterns which may be synced into the container + // The container destination is inferred by the builder + // based on the instructions of a Dockerfile. + // Available for docker and kaniko artifacts and custom + // artifacts that declare dependencies on a dockerfile. + Infer []string `yaml:"infer,omitempty" yamltags:"oneOf=sync"` + + // Auto delegates discovery of sync rules to the build system. + // Only available for jib and buildpacks. + Auto *bool `yaml:"auto,omitempty" yamltags:"oneOf=sync"` +} + +// SyncRule specifies which local files to sync to remote folders. +type SyncRule struct { + // Src is a glob pattern to match local paths against. + // Directories should be delimited by `/` on all platforms. + // For example: `"css/**/*.css"`. + Src string `yaml:"src,omitempty" yamltags:"required"` + + // Dest is the destination path in the container where the files should be synced to. + // For example: `"app/"` + Dest string `yaml:"dest,omitempty" yamltags:"required"` + + // Strip specifies the path prefix to remove from the source path when + // transplanting the files into the destination folder. + // For example: `"css/"` + Strip string `yaml:"strip,omitempty"` +} + // Profile is used to override any `build`, `test` or `deploy` configuration. type Profile struct { // Name is a unique profile name. @@ -171,12 +796,751 @@ type Profile struct { // Activation criteria by which a profile can be auto-activated. // The profile is auto-activated if any one of the activations are triggered. // An activation is triggered if all of the criteria (env, kubeContext, command) are triggered. - Activation []latestV1.Activation `yaml:"activation,omitempty"` + Activation []Activation `yaml:"activation,omitempty"` // Patches lists patches applied to the configuration. // Patches use the JSON patch notation. - Patches []latestV1.JSONPatch `yaml:"patches,omitempty"` + Patches []JSONPatch `yaml:"patches,omitempty"` // Pipeline contains the definitions to replace the default skaffold pipeline. Pipeline `yaml:",inline"` } + +// JSONPatch patch to be applied by a profile. +type JSONPatch struct { + // Op is the operation carried by the patch: `add`, `remove`, `replace`, `move`, `copy` or `test`. + // Defaults to `replace`. + Op string `yaml:"op,omitempty"` + + // Path is the position in the yaml where the operation takes place. + // For example, this targets the `dockerfile` of the first artifact built. + // For example: `/build/artifacts/0/docker/dockerfile`. + Path string `yaml:"path,omitempty" yamltags:"required"` + + // From is the source position in the yaml, used for `copy` or `move` operations. + From string `yaml:"from,omitempty"` + + // Value is the value to apply. Can be any portion of yaml. + Value *util.YamlpatchNode `yaml:"value,omitempty"` +} + +// Activation criteria by which a profile is auto-activated. +type Activation struct { + // Env is a `key=pattern` pair. The profile is auto-activated if an Environment + // Variable `key` matches the pattern. If the pattern starts with `!`, activation + // happens if the remaining pattern is _not_ matched. The pattern matches if the + // Environment Variable value is exactly `pattern`, or the regex `pattern` is + // found in it. An empty `pattern` (e.g. `env: "key="`) always only matches if + // the Environment Variable is undefined or empty. + // For example: `ENV=production` + Env string `yaml:"env,omitempty"` + + // KubeContext is a Kubernetes context for which the profile is auto-activated. + // For example: `minikube`. + KubeContext string `yaml:"kubeContext,omitempty"` + + // Command is a Skaffold command for which the profile is auto-activated. + // For example: `dev`. + Command string `yaml:"command,omitempty"` +} + +// ArtifactType describes how to build an artifact. +type ArtifactType struct { + // DockerArtifact *beta* describes an artifact built from a Dockerfile. + DockerArtifact *DockerArtifact `yaml:"docker,omitempty" yamltags:"oneOf=artifact"` + + // BazelArtifact *beta* requires bazel CLI to be installed and the sources to + // contain [Bazel](https://bazel.build/) configuration files. + BazelArtifact *BazelArtifact `yaml:"bazel,omitempty" yamltags:"oneOf=artifact"` + + // JibArtifact builds images using the + // [Jib plugins for Maven or Gradle](https://github.com/GoogleContainerTools/jib/). + JibArtifact *JibArtifact `yaml:"jib,omitempty" yamltags:"oneOf=artifact"` + + // KanikoArtifact builds images using [kaniko](https://github.com/GoogleContainerTools/kaniko). + KanikoArtifact *KanikoArtifact `yaml:"kaniko,omitempty" yamltags:"oneOf=artifact"` + + // BuildpackArtifact builds images using [Cloud Native Buildpacks](https://buildpacks.io/). + BuildpackArtifact *BuildpackArtifact `yaml:"buildpacks,omitempty" yamltags:"oneOf=artifact"` + + // CustomArtifact *beta* builds images using a custom build script written by the user. + CustomArtifact *CustomArtifact `yaml:"custom,omitempty" yamltags:"oneOf=artifact"` +} + +// ArtifactDependency describes a specific build dependency for an artifact. +type ArtifactDependency struct { + // ImageName is a reference to an artifact's image name. + ImageName string `yaml:"image" yamltags:"required"` + // Alias is a token that is replaced with the image reference in the builder definition files. + // For example, the `docker` builder will use the alias as a build-arg key. + // Defaults to the value of `image`. + Alias string `yaml:"alias,omitempty"` +} + +// BuildpackArtifact *alpha* describes an artifact built using [Cloud Native Buildpacks](https://buildpacks.io/). +// It can be used to build images out of project's sources without any additional configuration. +type BuildpackArtifact struct { + // Builder is the builder image used. + Builder string `yaml:"builder" yamltags:"required"` + + // RunImage overrides the stack's default run image. + RunImage string `yaml:"runImage,omitempty"` + + // Env are environment variables, in the `key=value` form, passed to the build. + // Values can use the go template syntax. + // For example: `["key1=value1", "key2=value2", "key3={{.ENV_VARIABLE}}"]`. + Env []string `yaml:"env,omitempty"` + + // Buildpacks is a list of strings, where each string is a specific buildpack to use with the builder. + // If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. + // Order matters. + Buildpacks []string `yaml:"buildpacks,omitempty"` + + // TrustBuilder indicates that the builder should be trusted. + TrustBuilder bool `yaml:"trustBuilder,omitempty"` + + // ProjectDescriptor is the path to the project descriptor file. + // Defaults to `project.toml` if it exists. + ProjectDescriptor string `yaml:"projectDescriptor,omitempty"` + + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *BuildpackDependencies `yaml:"dependencies,omitempty"` + + // Volumes support mounting host volumes into the container. + Volumes *[]BuildpackVolume `yaml:"volumes,omitempty"` +} + +// BuildpackDependencies *alpha* is used to specify dependencies for an artifact built by buildpacks. +type BuildpackDependencies struct { + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// BuildpackVolume *alpha* is used to mount host volumes or directories in the build container. +type BuildpackVolume struct { + // Host is the local volume or absolute directory of the path to mount. + Host string `yaml:"host" skaffold:"filepath" yamltags:"required"` + + // Target is the path where the file or directory is available in the container. + // It is strongly recommended to not specify locations under `/cnb` or `/layers`. + Target string `yaml:"target" yamltags:"required"` + + // Options specify a list of comma-separated mount options. + // Valid options are: + // `ro` (default): volume contents are read-only. + // `rw`: volume contents are readable and writable. + // `volume-opt==`: can be specified more than once, takes a key-value pair. + Options string `yaml:"options,omitempty"` +} + +// CustomArtifact *beta* describes an artifact built from a custom build script +// written by the user. It can be used to build images with builders that aren't directly integrated with skaffold. +type CustomArtifact struct { + // BuildCommand is the command executed to build the image. + BuildCommand string `yaml:"buildCommand,omitempty"` + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *CustomDependencies `yaml:"dependencies,omitempty"` +} + +// CustomDependencies *beta* is used to specify dependencies for an artifact built by a custom build script. +// Either `dockerfile` or `paths` should be specified for file watching to work as expected. +type CustomDependencies struct { + // Dockerfile should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies. + Dockerfile *DockerfileDependency `yaml:"dockerfile,omitempty" yamltags:"oneOf=dependency"` + + // Command represents a custom command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// CustomTest describes the custom test command provided by the user. +// Custom tests are run after an image build whenever build or test dependencies are changed. +type CustomTest struct { + // Command is the custom command to be executed. If the command exits with a non-zero return + // code, the test will be considered to have failed. + Command string `yaml:"command" yamltags:"required"` + + // TimeoutSeconds sets the wait time for skaffold for the command to complete. + // If unset or 0, Skaffold will wait until the command completes. + TimeoutSeconds int `yaml:"timeoutSeconds,omitempty"` + + // Dependencies are additional test-specific file dependencies; changes to these files will re-run this test. + Dependencies *CustomTestDependencies `yaml:"dependencies,omitempty"` +} + +// CustomTestDependencies is used to specify dependencies for custom test command. +// `paths` should be specified for file watching to work as expected. +type CustomTestDependencies struct { + // Command represents a command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths locates the file dependencies for the command relative to workspace. + // Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization. + // For example: `["src/test/**"]` + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both retest and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// DockerfileDependency *beta* is used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile. +type DockerfileDependency struct { + // Path locates the Dockerfile relative to workspace. + Path string `yaml:"path,omitempty"` + + // BuildArgs are key/value pairs used to resolve values of `ARG` instructions in a Dockerfile. + // Values can be constants or environment variables via the go template syntax. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` +} + +// KanikoArtifact describes an artifact built from a Dockerfile, +// with kaniko. +type KanikoArtifact struct { + + // Cleanup to clean the filesystem at the end of the build. + Cleanup bool `yaml:"cleanup,omitempty"` + + // Insecure if you want to push images to a plain HTTP registry. + Insecure bool `yaml:"insecure,omitempty"` + + // InsecurePull if you want to pull images from a plain HTTP registry. + InsecurePull bool `yaml:"insecurePull,omitempty"` + + // NoPush if you only want to build the image, without pushing to a registry. + NoPush bool `yaml:"noPush,omitempty"` + + // Force building outside of a container. + Force bool `yaml:"force,omitempty"` + + // LogTimestamp to add timestamps to log format. + LogTimestamp bool `yaml:"logTimestamp,omitempty"` + + // Reproducible is used to strip timestamps out of the built image. + Reproducible bool `yaml:"reproducible,omitempty"` + + // SingleSnapshot is takes a single snapshot of the filesystem at the end of the build. + // So only one layer will be appended to the base image. + SingleSnapshot bool `yaml:"singleSnapshot,omitempty"` + + // SkipTLS skips TLS certificate validation when pushing to a registry. + SkipTLS bool `yaml:"skipTLS,omitempty"` + + // SkipTLSVerifyPull skips TLS certificate validation when pulling from a registry. + SkipTLSVerifyPull bool `yaml:"skipTLSVerifyPull,omitempty"` + + // SkipUnusedStages builds only used stages if defined to true. + // Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile. + SkipUnusedStages bool `yaml:"skipUnusedStages,omitempty"` + + // UseNewRun to Use the experimental run implementation for detecting changes without requiring file system snapshots. + // In some cases, this may improve build performance by 75%. + UseNewRun bool `yaml:"useNewRun,omitempty"` + + // WhitelistVarRun is used to ignore `/var/run` when taking image snapshot. + // Set it to false to preserve /var/run/* in destination image. + WhitelistVarRun bool `yaml:"whitelistVarRun,omitempty"` + + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is to indicate which build stage is the target build stage. + Target string `yaml:"target,omitempty"` + + // InitImage is the image used to run init container which mounts kaniko context. + InitImage string `yaml:"initImage,omitempty"` + + // Image is the Docker image used by the Kaniko pod. + // Defaults to the latest released version of `gcr.io/kaniko-project/executor`. + Image string `yaml:"image,omitempty"` + + // DigestFile to specify a file in the container. This file will receive the digest of a built image. + // This can be used to automatically track the exact image built by kaniko. + DigestFile string `yaml:"digestFile,omitempty"` + + // ImageNameWithDigestFile specify a file to save the image name with digest of the built image to. + ImageNameWithDigestFile string `yaml:"imageNameWithDigestFile,omitempty"` + + // LogFormat to set the log format. + LogFormat string `yaml:"logFormat,omitempty"` + + // OCILayoutPath is to specify a directory in the container where the OCI image layout of a built image will be placed. + // This can be used to automatically track the exact image built by kaniko. + OCILayoutPath string `yaml:"ociLayoutPath,omitempty"` + + // RegistryMirror if you want to use a registry mirror instead of default `index.docker.io`. + RegistryMirror string `yaml:"registryMirror,omitempty"` + + // SnapshotMode is how Kaniko will snapshot the filesystem. + SnapshotMode string `yaml:"snapshotMode,omitempty"` + + // TarPath is path to save the image as a tarball at path instead of pushing the image. + TarPath string `yaml:"tarPath,omitempty"` + + // Verbosity to set the logging level. + Verbosity string `yaml:"verbosity,omitempty"` + + // InsecureRegistry is to use plain HTTP requests when accessing a registry. + InsecureRegistry []string `yaml:"insecureRegistry,omitempty"` + + // SkipTLSVerifyRegistry skips TLS certificate validation when accessing a registry. + SkipTLSVerifyRegistry []string `yaml:"skipTLSVerifyRegistry,omitempty"` + + // Env are environment variables passed to the kaniko pod. + // It also accepts environment variables via the go template syntax. + // For example: `[{"name": "key1", "value": "value1"}, {"name": "key2", "value": "value2"}, {"name": "key3", "value": "'{{.ENV_VARIABLE}}'"}]`. + Env []v1.EnvVar `yaml:"env,omitempty"` + + // Cache configures Kaniko caching. If a cache is specified, Kaniko will + // use a remote cache which will speed up builds. + Cache *KanikoCache `yaml:"cache,omitempty"` + + // RegistryCertificate is to provide a certificate for TLS communication with a given registry. + // my.registry.url: /path/to/the/certificate.cert is the expected format. + RegistryCertificate map[string]*string `yaml:"registryCertificate,omitempty"` + + // Label key: value to set some metadata to the final image. + // This is equivalent as using the LABEL within the Dockerfile. + Label map[string]*string `yaml:"label,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // It also accepts environment variables and generated values via the go template syntax. + // Exposed generated values: IMAGE_REPO, IMAGE_NAME, IMAGE_TAG. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // VolumeMounts are volume mounts passed to kaniko pod. + VolumeMounts []v1.VolumeMount `yaml:"volumeMounts,omitempty"` +} + +// DockerArtifact describes an artifact built from a Dockerfile, +// usually using `docker build`. +type DockerArtifact struct { + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is the Dockerfile target name to build. + Target string `yaml:"target,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // For example: `{"key1": "value1", "key2": "{{ .ENV_VAR }}"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // NetworkMode is passed through to docker and overrides the + // network configuration of docker builder. If unset, use whatever + // is configured in the underlying docker daemon. Valid modes are + // `host`: use the host's networking stack. + // `bridge`: use the bridged network configuration. + // `container:`: reuse another container's network stack. + // `none`: no networking in the container. + NetworkMode string `yaml:"network,omitempty"` + + // AddHost lists add host. + // For example: `["host1:ip1", "host2:ip2"]`. + AddHost []string `yaml:"addHost,omitempty"` + + // CacheFrom lists the Docker images used as cache sources. + // For example: `["golang:1.10.1-alpine3.7", "alpine:3.7"]`. + CacheFrom []string `yaml:"cacheFrom,omitempty"` + + // NoCache used to pass in --no-cache to docker build to prevent caching. + NoCache bool `yaml:"noCache,omitempty"` + + // Squash is used to pass in --squash to docker build to squash docker image layers into single layer. + Squash bool `yaml:"squash,omitempty"` + + // Secret contains information about a local secret passed to `docker build`, + // along with optional destination information. + Secret *DockerSecret `yaml:"secret,omitempty"` + + // SSH is used to pass in --ssh to docker build to use SSH agent. Format is "default|[=|[,]]". + SSH string `yaml:"ssh,omitempty"` +} + +// DockerSecret contains information about a local secret passed to `docker build`, +// along with optional destination information. +type DockerSecret struct { + // ID is the id of the secret. + ID string `yaml:"id,omitempty" yamltags:"required"` + + // Source is the path to the secret on the host machine. + Source string `yaml:"src,omitempty"` +} + +// BazelArtifact describes an artifact built with [Bazel](https://bazel.build/). +type BazelArtifact struct { + // BuildTarget is the `bazel build` target to run. + // For example: `//:skaffold_example.tar`. + BuildTarget string `yaml:"target,omitempty" yamltags:"required"` + + // BuildArgs are additional args to pass to `bazel build`. + // For example: `["-flag", "--otherflag"]`. + BuildArgs []string `yaml:"args,omitempty"` +} + +// JibArtifact builds images using the +// [Jib plugins for Maven and Gradle](https://github.com/GoogleContainerTools/jib/). +type JibArtifact struct { + // Project selects which sub-project to build for multi-module builds. + Project string `yaml:"project,omitempty"` + + // Flags are additional build flags passed to the builder. + // For example: `["--no-build-cache"]`. + Flags []string `yaml:"args,omitempty"` + + // Type the Jib builder type; normally determined automatically. Valid types are + // `maven`: for Maven. + // `gradle`: for Gradle. + Type string `yaml:"type,omitempty"` + + // BaseImage overrides the configured jib base image. + BaseImage string `yaml:"fromImage,omitempty"` +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type ClusterDetailsForUnmarshaling ClusterDetails + + volumes, remaining, err := util.UnmarshalClusterVolumes(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*ClusterDetailsForUnmarshaling)(clusterDetails) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + clusterDetails.Volumes = volumes + return nil +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type KanikoArtifactForUnmarshaling KanikoArtifact + + mounts, remaining, err := util.UnmarshalKanikoArtifact(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*KanikoArtifactForUnmarshaling)(ka) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + ka.VolumeMounts = mounts + return nil +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshall all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type ClusterDetailsForUnmarshaling ClusterDetails + + // Marshal volumes to a list. Use json because the Kubernetes resources have json annotations. + volumes := clusterDetails.Volumes + + j, err := json.Marshal(volumes) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of clusterDetails because we need to zero out volumes and we don't want to modify the + // current object. + aux := &ClusterDetailsForUnmarshaling{} + + b, err := json.Marshal(clusterDetails) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + + aux.Volumes = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumes"] = vList + } + return m, err +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type KanikoArtifactForUnmarshaling KanikoArtifact + + // Marshal volumes to a map. User json because the Kubernetes resources have json annotations. + volumeMounts := ka.VolumeMounts + + j, err := json.Marshal(volumeMounts) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of kanikoArtifact because we need to zero out volumeMounts and we don't want to modify the + // current object. + aux := &KanikoArtifactForUnmarshaling{} + + b, err := json.Marshal(ka) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + aux.VolumeMounts = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumeMounts"] = vList + } + return m, err +} + +// TODO (yuwenma): HelmDeploy and KustomizeDeploy shall be deprecated. + +// HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. +type HelmDeploy struct { + // Releases is a list of Helm releases. + Releases []HelmRelease `yaml:"releases,omitempty" yamltags:"required"` + + // Flags are additional option flags that are passed on the command + // line to `helm`. + Flags HelmDeployFlags `yaml:"flags,omitempty"` +} + +// HelmDeployFlags are additional option flags that are passed on the command +// line to `helm`. +type HelmDeployFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Install are additional flags passed to (`helm install`). + Install []string `yaml:"install,omitempty"` + + // Upgrade are additional flags passed to (`helm upgrade`). + Upgrade []string `yaml:"upgrade,omitempty"` +} + +// KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. +type KustomizeDeploy struct { + // KustomizePaths is the path to Kustomization files. + // Defaults to `["."]`. + KustomizePaths []string `yaml:"paths,omitempty" skaffold:"filepath"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // BuildArgs are additional args passed to `kustomize build`. + BuildArgs []string `yaml:"buildArgs,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` +} + +// HelmRelease describes a helm release to be deployed. +type HelmRelease struct { + // Name is the name of the Helm release. + // It accepts environment variables via the go template syntax. + Name string `yaml:"name,omitempty" yamltags:"required"` + + // ChartPath is the local path to a packaged Helm chart or an unpacked Helm chart directory. + ChartPath string `yaml:"chartPath,omitempty" yamltags:"oneOf=chartSource" skaffold:"filepath"` + + // RemoteChart refers to a remote Helm chart reference or URL. + RemoteChart string `yaml:"remoteChart,omitempty" yamltags:"oneOf=chartSource"` + + // ValuesFiles are the paths to the Helm `values` files. + ValuesFiles []string `yaml:"valuesFiles,omitempty" skaffold:"filepath"` + + // ArtifactOverrides are key value pairs where the + // key represents the parameter used in the `--set-string` Helm CLI flag to define a container + // image and the value corresponds to artifact i.e. `ImageName` defined in `Build.Artifacts` section. + // The resulting command-line is controlled by `ImageStrategy`. + ArtifactOverrides util.FlatMap `yaml:"artifactOverrides,omitempty"` + + // Namespace is the Kubernetes namespace. + Namespace string `yaml:"namespace,omitempty"` + + // Version is the version of the chart. + Version string `yaml:"version,omitempty"` + + // SetValues are key-value pairs. + // If present, Skaffold will send `--set` flag to Helm CLI and append all pairs after the flag. + SetValues util.FlatMap `yaml:"setValues,omitempty"` + + // SetValueTemplates are key-value pairs. + // If present, Skaffold will try to parse the value part of each key-value pair using + // environment variables in the system, then send `--set` flag to Helm CLI and append + // all parsed pairs after the flag. + SetValueTemplates util.FlatMap `yaml:"setValueTemplates,omitempty"` + + // SetFiles are key-value pairs. + // If present, Skaffold will send `--set-file` flag to Helm CLI and append all pairs after the flag. + SetFiles map[string]string `yaml:"setFiles,omitempty" skaffold:"filepath"` + + // CreateNamespace if `true`, Skaffold will send `--create-namespace` flag to Helm CLI. + // `--create-namespace` flag is available in Helm since version 3.2. + // Defaults is `false`. + CreateNamespace *bool `yaml:"createNamespace,omitempty"` + + // Wait if `true`, Skaffold will send `--wait` flag to Helm CLI. + // Defaults to `false`. + Wait bool `yaml:"wait,omitempty"` + + // RecreatePods if `true`, Skaffold will send `--recreate-pods` flag to Helm CLI + // when upgrading a new version of a chart in subsequent dev loop deploy. + // Defaults to `false`. + RecreatePods bool `yaml:"recreatePods,omitempty"` + + // SkipBuildDependencies should build dependencies be skipped. + // Ignored for `remoteChart`. + SkipBuildDependencies bool `yaml:"skipBuildDependencies,omitempty"` + + // UseHelmSecrets instructs skaffold to use secrets plugin on deployment. + UseHelmSecrets bool `yaml:"useHelmSecrets,omitempty"` + + // Repo specifies the helm repository for remote charts. + // If present, Skaffold will send `--repo` Helm CLI flag or flags. + Repo string `yaml:"repo,omitempty"` + + // UpgradeOnChange specifies whether to upgrade helm chart on code changes. + // Default is `true` when helm chart is local (has `chartPath`). + // Default is `false` when helm chart is remote (has `remoteChart`). + UpgradeOnChange *bool `yaml:"upgradeOnChange,omitempty"` + + // Overrides are key-value pairs. + // If present, Skaffold will build a Helm `values` file that overrides + // the original and use it to call Helm CLI (`--f` flag). + Overrides util.HelmOverrides `yaml:"overrides,omitempty"` + + // Packaged parameters for packaging helm chart (`helm package`). + Packaged *HelmPackaged `yaml:"packaged,omitempty"` + + // ImageStrategy controls how an `ArtifactOverrides` entry is + // turned into `--set-string` Helm CLI flag or flags. + ImageStrategy HelmImageStrategy `yaml:"imageStrategy,omitempty"` +} + +// HelmPackaged parameters for packaging helm chart (`helm package`). +type HelmPackaged struct { + // Version sets the `version` on the chart to this semver version. + Version string `yaml:"version,omitempty"` + + // AppVersion sets the `appVersion` on the chart to this version. + AppVersion string `yaml:"appVersion,omitempty"` +} + +// HelmImageStrategy adds image configurations to the Helm `values` file. +type HelmImageStrategy struct { + HelmImageConfig `yaml:",inline"` +} + +// HelmImageConfig describes an image configuration. +type HelmImageConfig struct { + // HelmFQNConfig is the image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`. + HelmFQNConfig *HelmFQNConfig `yaml:"fqn,omitempty" yamltags:"oneOf=helmImageStrategy"` + + // HelmConventionConfig is the image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`. + HelmConventionConfig *HelmConventionConfig `yaml:"helm,omitempty" yamltags:"oneOf=helmImageStrategy"` +} + +// HelmFQNConfig is the image config to use the FullyQualifiedImageName as param to set. +type HelmFQNConfig struct { + // Property defines the image config. + Property string `yaml:"property,omitempty"` +} + +// HelmConventionConfig is the image config in the syntax of image.repository and image.tag. +type HelmConventionConfig struct { + // ExplicitRegistry separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`. + ExplicitRegistry bool `yaml:"explicitRegistry,omitempty"` +} diff --git a/pkg/skaffold/schema/v3alpha1/config.go b/pkg/skaffold/schema/v3alpha1/config.go index 190ff702d58..4909b9b0743 100644 --- a/pkg/skaffold/schema/v3alpha1/config.go +++ b/pkg/skaffold/schema/v3alpha1/config.go @@ -17,7 +17,11 @@ limitations under the License. package v3alpha1 import ( - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "encoding/json" + + v1 "k8s.io/api/core/v1" + "sigs.k8s.io/kustomize/kyaml/yaml" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) @@ -44,7 +48,7 @@ type SkaffoldConfig struct { Metadata Metadata `yaml:"metadata,omitempty"` // Dependencies describes a list of other required configs for the current config. - Dependencies []latestV1.ConfigDependency `yaml:"requires,omitempty"` + Dependencies []ConfigDependency `yaml:"requires,omitempty"` // Pipeline defines the Build/Test/Deploy phases. Pipeline `yaml:",inline"` @@ -62,10 +66,10 @@ type Metadata struct { // Pipeline describes a Skaffold pipeline. type Pipeline struct { // Build describes how images are built. - Build latestV1.BuildConfig `yaml:"build,omitempty"` + Build BuildConfig `yaml:"build,omitempty"` // Test describes how images are tested. - Test []*latestV1.TestCase `yaml:"test,omitempty"` + Test []*TestCase `yaml:"test,omitempty"` // Render describes how the original manifests are hydrated, validated and transformed. Render RenderConfig `yaml:"manifests,omitempty"` @@ -74,7 +78,425 @@ type Pipeline struct { Deploy DeployConfig `yaml:"deploy,omitempty"` // PortForward describes user defined resources to port-forward. - PortForward []*latestV1.PortForwardResource `yaml:"portForward,omitempty"` + PortForward []*PortForwardResource `yaml:"portForward,omitempty"` +} + +// GitInfo contains information on the origin of skaffold configurations cloned from a git repository. +type GitInfo struct { + // Repo is the git repository the package should be cloned from. e.g. `https://github.com/GoogleContainerTools/skaffold.git`. + Repo string `yaml:"repo" yamltags:"required"` + + // Path is the relative path from the repo root to the skaffold configuration file. eg. `getting-started/skaffold.yaml`. + Path string `yaml:"path,omitempty"` + + // Ref is the git ref the package should be cloned from. eg. `master` or `main`. + Ref string `yaml:"ref,omitempty"` + + // Sync when set to `true` will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to `false`. + Sync *bool `yaml:"sync,omitempty"` +} + +// ConfigDependency describes a dependency on another skaffold configuration. +type ConfigDependency struct { + // Names includes specific named configs within the file path. If empty, then all configs in the file are included. + Names []string `yaml:"configs,omitempty"` + + // Path describes the path to the file containing the required configs. + Path string `yaml:"path,omitempty" skaffold:"filepath" yamltags:"oneOf=paths"` + + // GitRepo describes a remote git repository containing the required configs. + GitRepo *GitInfo `yaml:"git,omitempty" yamltags:"oneOf=paths"` + + // ActiveProfiles describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config. + ActiveProfiles []ProfileDependency `yaml:"activeProfiles,omitempty"` +} + +// ProfileDependency describes a mapping from referenced config profiles to the current config profiles. +// If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles. +type ProfileDependency struct { + // Name describes name of the profile to activate in the dependency config. It should exist in the dependency config. + Name string `yaml:"name" yamltags:"required"` + + // ActivatedBy describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated. + ActivatedBy []string `yaml:"activatedBy,omitempty"` +} + +// ResourceType describes the Kubernetes resource types used for port forwarding. +type ResourceType string + +// PortForwardResource describes a resource to port forward. +type PortForwardResource struct { + // Type is the Kubernetes type that should be port forwarded. + // Acceptable resource types include: `Service`, `Pod` and Controller resource type that has a pod spec: `ReplicaSet`, `ReplicationController`, `Deployment`, `StatefulSet`, `DaemonSet`, `Job`, `CronJob`. + Type ResourceType `yaml:"resourceType,omitempty"` + + // Name is the name of the Kubernetes resource to port forward. + Name string `yaml:"resourceName,omitempty"` + + // Namespace is the namespace of the resource to port forward. + Namespace string `yaml:"namespace,omitempty"` + + // Port is the resource port that will be forwarded. + Port util.IntOrString `yaml:"port,omitempty"` + + // Address is the local address to bind to. Defaults to the loopback address 127.0.0.1. + Address string `yaml:"address,omitempty"` + + // LocalPort is the local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. *Optional*. + LocalPort int `yaml:"localPort,omitempty"` +} + +// BuildConfig contains all the configuration for the build steps. +type BuildConfig struct { + // Artifacts lists the images you're going to be building. + Artifacts []*Artifact `yaml:"artifacts,omitempty"` + + // InsecureRegistries is a list of registries declared by the user to be insecure. + // These registries will be connected to via HTTP instead of HTTPS. + InsecureRegistries []string `yaml:"insecureRegistries,omitempty"` + + // TagPolicy *beta* determines how images are tagged. + // A few strategies are provided here, although you most likely won't need to care! + // If not specified, it defaults to `gitCommit: {variant: Tags}`. + TagPolicy TagPolicy `yaml:"tagPolicy,omitempty"` + + BuildType `yaml:",inline"` +} + +// TagPolicy contains all the configuration for the tagging step. +type TagPolicy struct { + // GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. + GitTagger *GitTagger `yaml:"gitCommit,omitempty" yamltags:"oneOf=tag"` + + // ShaTagger *beta* tags images with their sha256 digest. + ShaTagger *ShaTagger `yaml:"sha256,omitempty" yamltags:"oneOf=tag"` + + // EnvTemplateTagger *beta* tags images with a configurable template string. + EnvTemplateTagger *EnvTemplateTagger `yaml:"envTemplate,omitempty" yamltags:"oneOf=tag"` + + // DateTimeTagger *beta* tags images with the build timestamp. + DateTimeTagger *DateTimeTagger `yaml:"dateTime,omitempty" yamltags:"oneOf=tag"` + + // CustomTemplateTagger *beta* tags images with a configurable template string *composed of other taggers*. + CustomTemplateTagger *CustomTemplateTagger `yaml:"customTemplate,omitempty" yamltags:"oneOf=tag"` + + // InputDigest *beta* tags images with their sha256 digest of their content. + InputDigest *InputDigest `yaml:"inputDigest,omitempty" yamltags:"oneOf=tag"` +} + +// ShaTagger *beta* tags images with their sha256 digest. +type ShaTagger struct{} + +// InputDigest *beta* tags hashes the image content. +type InputDigest struct{} + +// GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. +type GitTagger struct { + // Variant determines the behavior of the git tagger. Valid variants are: + // `Tags` (default): use git tags or fall back to abbreviated commit hash. + // `CommitSha`: use the full git commit sha. + // `AbbrevCommitSha`: use the abbreviated git commit sha. + // `TreeSha`: use the full tree hash of the artifact workingdir. + // `AbbrevTreeSha`: use the abbreviated tree hash of the artifact workingdir. + Variant string `yaml:"variant,omitempty"` + + // Prefix adds a fixed prefix to the tag. + Prefix string `yaml:"prefix,omitempty"` + + // IgnoreChanges specifies whether to omit the `-dirty` postfix if there are uncommitted changes. + IgnoreChanges bool `yaml:"ignoreChanges,omitempty"` +} + +// EnvTemplateTagger *beta* tags images with a configurable template string. +type EnvTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the current environment, + // with those variables injected. + // For example: `{{.RELEASE}}`. + Template string `yaml:"template,omitempty" yamltags:"required"` +} + +// DateTimeTagger *beta* tags images with the build timestamp. +type DateTimeTagger struct { + // Format formats the date and time. + // See [#Time.Format](https://golang.org/pkg/time/#Time.Format). + // Defaults to `2006-01-02_15-04-05.999_MST`. + Format string `yaml:"format,omitempty"` + + // TimeZone sets the timezone for the date and time. + // See [Time.LoadLocation](https://golang.org/pkg/time/#Time.LoadLocation). + // Defaults to the local timezone. + TimeZone string `yaml:"timezone,omitempty"` +} + +// CustomTemplateTagger *beta* tags images with a configurable template string. +type CustomTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the provided components with those variables injected. + // For example: `{{.DATE}}` where DATE references a TaggerComponent. + Template string `yaml:"template,omitempty" yamltags:"required"` + + // Components lists TaggerComponents that the template (see field above) can be executed against. + Components []TaggerComponent `yaml:"components,omitempty"` +} + +// TaggerComponent *beta* is a component of CustomTemplateTagger. +type TaggerComponent struct { + // Name is an identifier for the component. + Name string `yaml:"name,omitempty"` + + // Component is a tagging strategy to be used in CustomTemplateTagger. + Component TagPolicy `yaml:",inline" yamltags:"skipTrim"` +} + +// BuildType contains the specific implementation and parameters needed +// for the build step. Only one field should be populated. +type BuildType struct { + // LocalBuild *beta* describes how to do a build on the local docker daemon + // and optionally push to a repository. + LocalBuild *LocalBuild `yaml:"local,omitempty" yamltags:"oneOf=build"` + + // GoogleCloudBuild *beta* describes how to do a remote build on + // [Google Cloud Build](https://cloud.google.com/cloud-build/). + GoogleCloudBuild *GoogleCloudBuild `yaml:"googleCloudBuild,omitempty" yamltags:"oneOf=build"` + + // Cluster *beta* describes how to do an on-cluster build. + Cluster *ClusterDetails `yaml:"cluster,omitempty" yamltags:"oneOf=build"` +} + +// LocalBuild *beta* describes how to do a build on the local docker daemon +// and optionally push to a repository. +type LocalBuild struct { + // Push should images be pushed to a registry. + // If not specified, images are pushed only if the current Kubernetes context + // connects to a remote cluster. + Push *bool `yaml:"push,omitempty"` + + // TryImportMissing whether to attempt to import artifacts from + // Docker (either a local or remote registry) if not in the cache. + TryImportMissing bool `yaml:"tryImportMissing,omitempty"` + + // UseDockerCLI use `docker` command-line interface instead of Docker Engine APIs. + UseDockerCLI bool `yaml:"useDockerCLI,omitempty"` + + // UseBuildkit use BuildKit to build Docker images. + UseBuildkit bool `yaml:"useBuildkit,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `1`. + Concurrency *int `yaml:"concurrency,omitempty"` +} + +// GoogleCloudBuild *beta* describes how to do a remote build on +// [Google Cloud Build](https://cloud.google.com/cloud-build/docs/). +// Docker and Jib artifacts can be built on Cloud Build. The `projectId` needs +// to be provided and the currently logged in user should be given permissions to trigger +// new builds. +type GoogleCloudBuild struct { + // ProjectID is the ID of your Cloud Platform Project. + // If it is not provided, Skaffold will guess it from the image name. + // For example, given the artifact image name `gcr.io/myproject/image`, Skaffold + // will use the `myproject` GCP project. + ProjectID string `yaml:"projectId,omitempty"` + + // DiskSizeGb is the disk size of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + DiskSizeGb int64 `yaml:"diskSizeGb,omitempty"` + + // MachineType is the type of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + MachineType string `yaml:"machineType,omitempty"` + + // Timeout is the amount of time (in seconds) that this build should be allowed to run. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build). + Timeout string `yaml:"timeout,omitempty"` + + // Logging specifies the logging mode. + // Valid modes are: + // `LOGGING_UNSPECIFIED`: The service determines the logging mode. + // `LEGACY`: Stackdriver logging and Cloud Storage logging are enabled (default). + // `GCS_ONLY`: Only Cloud Storage logging is enabled. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#loggingmode). + Logging string `yaml:"logging,omitempty"` + + // LogStreamingOption specifies the behavior when writing build logs to Google Cloud Storage. + // Valid options are: + // `STREAM_DEFAULT`: Service may automatically determine build log streaming behavior. + // `STREAM_ON`: Build logs should be streamed to Google Cloud Storage. + // `STREAM_OFF`: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#logstreamingoption). + LogStreamingOption string `yaml:"logStreamingOption,omitempty"` + + // DockerImage is the image that runs a Docker build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/docker`. + DockerImage string `yaml:"dockerImage,omitempty"` + + // KanikoImage is the image that runs a Kaniko build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/kaniko-project/executor`. + KanikoImage string `yaml:"kanikoImage,omitempty"` + + // MavenImage is the image that runs a Maven build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/mvn`. + MavenImage string `yaml:"mavenImage,omitempty"` + + // GradleImage is the image that runs a Gradle build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/gradle`. + GradleImage string `yaml:"gradleImage,omitempty"` + + // PackImage is the image that runs a Cloud Native Buildpacks build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/k8s-skaffold/pack`. + PackImage string `yaml:"packImage,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // WorkerPool configures a pool of workers to run the build. + WorkerPool string `yaml:"workerPool,omitempty"` +} + +// KanikoCache configures Kaniko caching. If a cache is specified, Kaniko will +// use a remote cache which will speed up builds. +type KanikoCache struct { + // Repo is a remote repository to store cached layers. If none is specified, one will be + // inferred from the image name. See [Kaniko Caching](https://github.com/GoogleContainerTools/kaniko#caching). + Repo string `yaml:"repo,omitempty"` + // HostPath specifies a path on the host that is mounted to each pod as read only cache volume containing base images. + // If set, must exist on each node and prepopulated with kaniko-warmer. + HostPath string `yaml:"hostPath,omitempty"` + // TTL Cache timeout in hours. + TTL string `yaml:"ttl,omitempty"` +} + +// ClusterDetails *beta* describes how to do an on-cluster build. +type ClusterDetails struct { + // HTTPProxy for kaniko pod. + HTTPProxy string `yaml:"HTTP_PROXY,omitempty"` + + // HTTPSProxy for kaniko pod. + HTTPSProxy string `yaml:"HTTPS_PROXY,omitempty"` + + // PullSecretPath is the path to the Google Cloud service account secret key file. + PullSecretPath string `yaml:"pullSecretPath,omitempty"` + + // PullSecretName is the name of the Kubernetes secret for pulling base images + // and pushing the final image. If given, the secret needs to contain the Google Cloud + // service account secret key under the key `kaniko-secret`. + // Defaults to `kaniko-secret`. + PullSecretName string `yaml:"pullSecretName,omitempty"` + + // PullSecretMountPath is the path the pull secret will be mounted at within the running container. + PullSecretMountPath string `yaml:"pullSecretMountPath,omitempty"` + + // Namespace is the Kubernetes namespace. + // Defaults to current namespace in Kubernetes configuration. + Namespace string `yaml:"namespace,omitempty"` + + // Timeout is the amount of time (in seconds) that this build is allowed to run. + // Defaults to 20 minutes (`20m`). + Timeout string `yaml:"timeout,omitempty"` + + // DockerConfig describes how to mount the local Docker configuration into a pod. + DockerConfig *DockerConfig `yaml:"dockerConfig,omitempty"` + + // ServiceAccountName describes the Kubernetes service account to use for the pod. + // Defaults to 'default'. + ServiceAccountName string `yaml:"serviceAccount,omitempty"` + + // Tolerations describes the Kubernetes tolerations for the pod. + Tolerations []v1.Toleration `yaml:"tolerations,omitempty"` + + // Annotations describes the Kubernetes annotations for the pod. + Annotations map[string]string `yaml:"annotations,omitempty"` + + // RunAsUser defines the UID to request for running the container. + // If omitted, no SecurityContext will be specified for the pod and will therefore be inherited + // from the service account. + RunAsUser *int64 `yaml:"runAsUser,omitempty"` + + // Resources define the resource requirements for the kaniko pod. + Resources *ResourceRequirements `yaml:"resources,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // Volumes defines container mounts for ConfigMap and Secret resources. + Volumes []v1.Volume `yaml:"volumes,omitempty"` + + // RandomPullSecret adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomPullSecret bool `yaml:"randomPullSecret,omitempty"` + + // RandomDockerConfigSecret adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomDockerConfigSecret bool `yaml:"randomDockerConfigSecret,omitempty"` +} + +// DockerConfig contains information about the docker `config.json` to mount. +type DockerConfig struct { + // Path is the path to the docker `config.json`. + Path string `yaml:"path,omitempty"` + + // SecretName is the Kubernetes secret that contains the `config.json` Docker configuration. + // Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'. + SecretName string `yaml:"secretName,omitempty"` +} + +// ResourceRequirements describes the resource requirements for the kaniko pod. +type ResourceRequirements struct { + // Requests [resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Requests *ResourceRequirement `yaml:"requests,omitempty"` + + // Limits [resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Limits *ResourceRequirement `yaml:"limits,omitempty"` +} + +// ResourceRequirement stores the CPU/Memory requirements for the pod. +type ResourceRequirement struct { + // CPU the number cores to be used. + // For example: `2`, `2.0` or `200m`. + CPU string `yaml:"cpu,omitempty"` + + // Memory the amount of memory to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + Memory string `yaml:"memory,omitempty"` + + // EphemeralStorage the amount of Ephemeral storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + EphemeralStorage string `yaml:"ephemeralStorage,omitempty"` + + // ResourceStorage the amount of resource storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + ResourceStorage string `yaml:"resourceStorage,omitempty"` +} + +// TestCase is a list of tests to run on images that Skaffold builds. +type TestCase struct { + // ImageName is the artifact on which to run those tests. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image" yamltags:"required"` + + // Workspace is the directory containing the test sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // CustomTests lists the set of custom tests to run after an artifact is built. + CustomTests []CustomTest `yaml:"custom,omitempty"` + + // StructureTests lists the [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) + // to run on that artifact. + // For example: `["./test/*"]`. + StructureTests []string `yaml:"structureTests,omitempty" skaffold:"filepath"` + + // StructureTestArgs lists additional configuration arguments passed to `container-structure-test` binary. + // For example: `["--driver=tar", "--no-color", "-q"]`. + StructureTestArgs []string `yaml:"structureTestsArgs,omitempty"` } // RenderConfig contains all the configuration needed by the render steps. @@ -118,8 +540,8 @@ type Validator struct { ConfigMapData []string `yaml:"configMapData,omitempty"` } -// DeployConfig contains all the configuration needed by the deploy steps. -type DeployConfig struct { +// KptV2Deploy contains all the configuration needed by the deploy steps. +type KptV2Deploy struct { // Dir is equivalent to the dir in `kpt live apply `. If not provided, skaffold renders the raw manifests // and store them to a a hidden directory `.kpt-hydrated`, and deploys the hidden directory. @@ -131,16 +553,21 @@ type DeployConfig struct { // InventoryNamespace *alpha* sets the inventory namespace. InventoryNamespace string `yaml:"inventoryNamespace,omitempty"` - // StatusCheckDeadlineSeconds sets for the polling period for resource statuses. Default to 2s. Values can be "2s", "1min", "3h", etc - StatusCheckDeadlineSeconds string `statusCheckDeadlineSeconds:"pollPeriod,omitempty"` - // PrunePropagationPolicy sets the propagation policy for pruning. - // Possible settings are Background, Foreground, Orphan. - // Default to "Background". - PrunePropagationPolicy string `yaml:"prunePropagationPolicy,omitempty"` // PruneTimeout sets the time threshold to wait for all pruned resources to be deleted. PruneTimeout string `yaml:"pruneTimeout,omitempty"` // ReconcileTimeout sets the time threshold to wait for all resources to reach the current status. ReconcileTimeout string `yaml:"reconcileTimeout,omitempty"` +} + +// DeployConfig contains all the configuration needed by the deploy steps. +type DeployConfig struct { + DeployType `yaml:",inline"` + + // StatusCheck *beta* enables waiting for deployments to stabilize. + StatusCheck *bool `yaml:"statusCheck,omitempty"` + + // StatusCheckDeadlineSeconds *beta* is the deadline for deployments to stabilize in seconds. + StatusCheckDeadlineSeconds int `yaml:"statusCheckDeadlineSeconds,omitempty"` // KubeContext is the Kubernetes context that Skaffold should deploy to. // For example: `minikube`. @@ -150,6 +577,143 @@ type DeployConfig struct { Logs LogsConfig `yaml:"logs,omitempty"` } +// DeployType contains the specific implementation and parameters needed +// for the deploy step. All three deployer types can be used at the same +// time for hybrid workflows. +type DeployType struct { + // HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. + HelmDeploy *HelmDeploy `yaml:"helm,omitempty"` + + // KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. + KptDeploy *KptDeploy `yaml:"kpt,omitempty"` + + KptV2Deploy *KptV2Deploy `yaml:"kptV2,omitempty"` + + // KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. + // You'll need a `kubectl` CLI version installed that's compatible with your cluster. + KubectlDeploy *KubectlDeploy `yaml:"kubectl,omitempty"` + + // KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. + KustomizeDeploy *KustomizeDeploy `yaml:"kustomize,omitempty"` +} + +// KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. +// You'll need a `kubectl` CLI version installed that's compatible with your cluster. +type KubectlDeploy struct { + // Manifests lists the Kubernetes yaml or json manifests. + // Defaults to `["k8s/*.yaml"]`. + Manifests []string `yaml:"manifests,omitempty" skaffold:"filepath"` + + // RemoteManifests lists Kubernetes manifests in remote clusters. + RemoteManifests []string `yaml:"remoteManifests,omitempty"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` +} + +// KubectlFlags are additional flags passed on the command +// line to kubectl either on every command (Global), on creations (Apply) +// or deletions (Delete). +type KubectlFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Apply are additional flags passed on creations (`kubectl apply`). + Apply []string `yaml:"apply,omitempty"` + + // Delete are additional flags passed on deletions (`kubectl delete`). + Delete []string `yaml:"delete,omitempty"` + + // DisableValidation passes the `--validate=false` flag to supported + // `kubectl` commands when enabled. + DisableValidation bool `yaml:"disableValidation,omitempty"` +} + +// KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. +type KptDeploy struct { + // Dir is the path to the config directory (Required). + // By default, the Dir contains the application configurations, + // [kustomize config files](https://kubectl.docs.kubernetes.io/pages/examples/kustomize.html) + // and [declarative kpt functions](https://googlecontainertools.github.io/kpt/guides/consumer/function/#declarative-run). + Dir string `yaml:"dir" yamltags:"required" skaffold:"filepath"` + + // Fn adds additional configurations for `kpt fn`. + Fn KptFn `yaml:"fn,omitempty"` + + // Live adds additional configurations for `kpt live`. + Live KptLive `yaml:"live,omitempty"` +} + +// KptFn adds additional configurations used when calling `kpt fn`. +type KptFn struct { + // FnPath is the directory to discover the declarative kpt functions. + // If not provided, kpt deployer uses `kpt.Dir`. + FnPath string `yaml:"fnPath,omitempty" skaffold:"filepath"` + + // Image is a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath + // will be ignored. + Image string `yaml:"image,omitempty"` + + // NetworkName is the docker network name to run the kpt function containers (default "bridge"). + NetworkName string `yaml:"networkName,omitempty"` + + // GlobalScope sets the global scope for the kpt functions. see `kpt help fn run`. + GlobalScope bool `yaml:"globalScope,omitempty"` + + // Network enables network access for the kpt function containers. + Network bool `yaml:"network,omitempty"` + + // Mount is a list of storage options to mount to the fn image. + Mount []string `yaml:"mount,omitempty"` + + // SinkDir is the directory to where the manipulated resource output is stored. + SinkDir string `yaml:"sinkDir,omitempty" skaffold:"filepath"` +} + +// KptLive adds additional configurations used when calling `kpt live`. +type KptLive struct { + // Apply sets the kpt inventory directory. + Apply KptApplyInventory `yaml:"apply,omitempty"` + + // Options adds additional configurations for `kpt live apply` commands. + Options KptApplyOptions `yaml:"options,omitempty"` +} + +// KptApplyInventory sets the kpt inventory directory. +type KptApplyInventory struct { + // Dir is equivalent to the dir in `kpt live apply `. If not provided, + // kpt deployer will create a hidden directory `.kpt-hydrated` to store the manipulated + // resource output and the kpt inventory-template.yaml file. + Dir string `yaml:"dir,omitempty"` + + // InventoryID *alpha* is the identifier for a group of applied resources. + // This value is only needed when the `kpt live` is working on a pre-applied cluster resources. + InventoryID string `yaml:"inventoryID,omitempty"` + + // InventoryNamespace *alpha* sets the inventory namespace. + InventoryNamespace string `yaml:"inventoryNamespace,omitempty"` +} + +// KptApplyOptions adds additional configurations used when calling `kpt live apply`. +type KptApplyOptions struct { + // PollPeriod sets for the polling period for resource statuses. Default to 2s. + PollPeriod string `yaml:"pollPeriod,omitempty"` + + // PrunePropagationPolicy sets the propagation policy for pruning. + // Possible settings are Background, Foreground, Orphan. + // Default to "Background". + PrunePropagationPolicy string `yaml:"prunePropagationPolicy,omitempty"` + + // PruneTimeout sets the time threshold to wait for all pruned resources to be deleted. + PruneTimeout string `yaml:"pruneTimeout,omitempty"` + + // ReconcileTimeout sets the time threshold to wait for all resources to reach the current status. + ReconcileTimeout string `yaml:"reconcileTimeout,omitempty"` +} + // LogsConfig configures how container logs are printed as a result of a deployment. type LogsConfig struct { // Prefix defines the prefix shown on each log line. Valid values are @@ -161,6 +725,67 @@ type LogsConfig struct { Prefix string `yaml:"prefix,omitempty"` } +// Artifact are the items that need to be built, along with the context in which +// they should be built. +type Artifact struct { + // ImageName is the name of the image to be built. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image,omitempty" yamltags:"required"` + + // Workspace is the directory containing the artifact's sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // Sync *beta* lists local files synced to pods instead + // of triggering an image build when modified. + // If no files are listed, sync all the files and infer the destination. + // Defaults to `infer: ["**/*"]`. + Sync *Sync `yaml:"sync,omitempty"` + + // ArtifactType describes how to build an artifact. + ArtifactType `yaml:",inline"` + + // Dependencies describes build artifacts that this artifact depends on. + Dependencies []*ArtifactDependency `yaml:"requires,omitempty"` +} + +// Sync *beta* specifies what files to sync into the container. +// This is a list of sync rules indicating the intent to sync for source files. +// If no files are listed, sync all the files and infer the destination. +// Defaults to `infer: ["**/*"]`. +type Sync struct { + // Manual lists manual sync rules indicating the source and destination. + Manual []*SyncRule `yaml:"manual,omitempty" yamltags:"oneOf=sync"` + + // Infer lists file patterns which may be synced into the container + // The container destination is inferred by the builder + // based on the instructions of a Dockerfile. + // Available for docker and kaniko artifacts and custom + // artifacts that declare dependencies on a dockerfile. + Infer []string `yaml:"infer,omitempty" yamltags:"oneOf=sync"` + + // Auto delegates discovery of sync rules to the build system. + // Only available for jib and buildpacks. + Auto *bool `yaml:"auto,omitempty" yamltags:"oneOf=sync"` +} + +// SyncRule specifies which local files to sync to remote folders. +type SyncRule struct { + // Src is a glob pattern to match local paths against. + // Directories should be delimited by `/` on all platforms. + // For example: `"css/**/*.css"`. + Src string `yaml:"src,omitempty" yamltags:"required"` + + // Dest is the destination path in the container where the files should be synced to. + // For example: `"app/"` + Dest string `yaml:"dest,omitempty" yamltags:"required"` + + // Strip specifies the path prefix to remove from the source path when + // transplanting the files into the destination folder. + // For example: `"css/"` + Strip string `yaml:"strip,omitempty"` +} + // Profile is used to override any `build`, `test` or `deploy` configuration. type Profile struct { // Name is a unique profile name. @@ -170,12 +795,751 @@ type Profile struct { // Activation criteria by which a profile can be auto-activated. // The profile is auto-activated if any one of the activations are triggered. // An activation is triggered if all of the criteria (env, kubeContext, command) are triggered. - Activation []latestV1.Activation `yaml:"activation,omitempty"` + Activation []Activation `yaml:"activation,omitempty"` // Patches lists patches applied to the configuration. // Patches use the JSON patch notation. - Patches []latestV1.JSONPatch `yaml:"patches,omitempty"` + Patches []JSONPatch `yaml:"patches,omitempty"` // Pipeline contains the definitions to replace the default skaffold pipeline. Pipeline `yaml:",inline"` } + +// JSONPatch patch to be applied by a profile. +type JSONPatch struct { + // Op is the operation carried by the patch: `add`, `remove`, `replace`, `move`, `copy` or `test`. + // Defaults to `replace`. + Op string `yaml:"op,omitempty"` + + // Path is the position in the yaml where the operation takes place. + // For example, this targets the `dockerfile` of the first artifact built. + // For example: `/build/artifacts/0/docker/dockerfile`. + Path string `yaml:"path,omitempty" yamltags:"required"` + + // From is the source position in the yaml, used for `copy` or `move` operations. + From string `yaml:"from,omitempty"` + + // Value is the value to apply. Can be any portion of yaml. + Value *util.YamlpatchNode `yaml:"value,omitempty"` +} + +// Activation criteria by which a profile is auto-activated. +type Activation struct { + // Env is a `key=pattern` pair. The profile is auto-activated if an Environment + // Variable `key` matches the pattern. If the pattern starts with `!`, activation + // happens if the remaining pattern is _not_ matched. The pattern matches if the + // Environment Variable value is exactly `pattern`, or the regex `pattern` is + // found in it. An empty `pattern` (e.g. `env: "key="`) always only matches if + // the Environment Variable is undefined or empty. + // For example: `ENV=production` + Env string `yaml:"env,omitempty"` + + // KubeContext is a Kubernetes context for which the profile is auto-activated. + // For example: `minikube`. + KubeContext string `yaml:"kubeContext,omitempty"` + + // Command is a Skaffold command for which the profile is auto-activated. + // For example: `dev`. + Command string `yaml:"command,omitempty"` +} + +// ArtifactType describes how to build an artifact. +type ArtifactType struct { + // DockerArtifact *beta* describes an artifact built from a Dockerfile. + DockerArtifact *DockerArtifact `yaml:"docker,omitempty" yamltags:"oneOf=artifact"` + + // BazelArtifact *beta* requires bazel CLI to be installed and the sources to + // contain [Bazel](https://bazel.build/) configuration files. + BazelArtifact *BazelArtifact `yaml:"bazel,omitempty" yamltags:"oneOf=artifact"` + + // JibArtifact builds images using the + // [Jib plugins for Maven or Gradle](https://github.com/GoogleContainerTools/jib/). + JibArtifact *JibArtifact `yaml:"jib,omitempty" yamltags:"oneOf=artifact"` + + // KanikoArtifact builds images using [kaniko](https://github.com/GoogleContainerTools/kaniko). + KanikoArtifact *KanikoArtifact `yaml:"kaniko,omitempty" yamltags:"oneOf=artifact"` + + // BuildpackArtifact builds images using [Cloud Native Buildpacks](https://buildpacks.io/). + BuildpackArtifact *BuildpackArtifact `yaml:"buildpacks,omitempty" yamltags:"oneOf=artifact"` + + // CustomArtifact *beta* builds images using a custom build script written by the user. + CustomArtifact *CustomArtifact `yaml:"custom,omitempty" yamltags:"oneOf=artifact"` +} + +// ArtifactDependency describes a specific build dependency for an artifact. +type ArtifactDependency struct { + // ImageName is a reference to an artifact's image name. + ImageName string `yaml:"image" yamltags:"required"` + // Alias is a token that is replaced with the image reference in the builder definition files. + // For example, the `docker` builder will use the alias as a build-arg key. + // Defaults to the value of `image`. + Alias string `yaml:"alias,omitempty"` +} + +// BuildpackArtifact *alpha* describes an artifact built using [Cloud Native Buildpacks](https://buildpacks.io/). +// It can be used to build images out of project's sources without any additional configuration. +type BuildpackArtifact struct { + // Builder is the builder image used. + Builder string `yaml:"builder" yamltags:"required"` + + // RunImage overrides the stack's default run image. + RunImage string `yaml:"runImage,omitempty"` + + // Env are environment variables, in the `key=value` form, passed to the build. + // Values can use the go template syntax. + // For example: `["key1=value1", "key2=value2", "key3={{.ENV_VARIABLE}}"]`. + Env []string `yaml:"env,omitempty"` + + // Buildpacks is a list of strings, where each string is a specific buildpack to use with the builder. + // If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. + // Order matters. + Buildpacks []string `yaml:"buildpacks,omitempty"` + + // TrustBuilder indicates that the builder should be trusted. + TrustBuilder bool `yaml:"trustBuilder,omitempty"` + + // ProjectDescriptor is the path to the project descriptor file. + // Defaults to `project.toml` if it exists. + ProjectDescriptor string `yaml:"projectDescriptor,omitempty"` + + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *BuildpackDependencies `yaml:"dependencies,omitempty"` + + // Volumes support mounting host volumes into the container. + Volumes *[]BuildpackVolume `yaml:"volumes,omitempty"` +} + +// BuildpackDependencies *alpha* is used to specify dependencies for an artifact built by buildpacks. +type BuildpackDependencies struct { + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// BuildpackVolume *alpha* is used to mount host volumes or directories in the build container. +type BuildpackVolume struct { + // Host is the local volume or absolute directory of the path to mount. + Host string `yaml:"host" skaffold:"filepath" yamltags:"required"` + + // Target is the path where the file or directory is available in the container. + // It is strongly recommended to not specify locations under `/cnb` or `/layers`. + Target string `yaml:"target" yamltags:"required"` + + // Options specify a list of comma-separated mount options. + // Valid options are: + // `ro` (default): volume contents are read-only. + // `rw`: volume contents are readable and writable. + // `volume-opt==`: can be specified more than once, takes a key-value pair. + Options string `yaml:"options,omitempty"` +} + +// CustomArtifact *beta* describes an artifact built from a custom build script +// written by the user. It can be used to build images with builders that aren't directly integrated with skaffold. +type CustomArtifact struct { + // BuildCommand is the command executed to build the image. + BuildCommand string `yaml:"buildCommand,omitempty"` + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *CustomDependencies `yaml:"dependencies,omitempty"` +} + +// CustomDependencies *beta* is used to specify dependencies for an artifact built by a custom build script. +// Either `dockerfile` or `paths` should be specified for file watching to work as expected. +type CustomDependencies struct { + // Dockerfile should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies. + Dockerfile *DockerfileDependency `yaml:"dockerfile,omitempty" yamltags:"oneOf=dependency"` + + // Command represents a custom command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// CustomTest describes the custom test command provided by the user. +// Custom tests are run after an image build whenever build or test dependencies are changed. +type CustomTest struct { + // Command is the custom command to be executed. If the command exits with a non-zero return + // code, the test will be considered to have failed. + Command string `yaml:"command" yamltags:"required"` + + // TimeoutSeconds sets the wait time for skaffold for the command to complete. + // If unset or 0, Skaffold will wait until the command completes. + TimeoutSeconds int `yaml:"timeoutSeconds,omitempty"` + + // Dependencies are additional test-specific file dependencies; changes to these files will re-run this test. + Dependencies *CustomTestDependencies `yaml:"dependencies,omitempty"` +} + +// CustomTestDependencies is used to specify dependencies for custom test command. +// `paths` should be specified for file watching to work as expected. +type CustomTestDependencies struct { + // Command represents a command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths locates the file dependencies for the command relative to workspace. + // Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization. + // For example: `["src/test/**"]` + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both retest and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// DockerfileDependency *beta* is used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile. +type DockerfileDependency struct { + // Path locates the Dockerfile relative to workspace. + Path string `yaml:"path,omitempty"` + + // BuildArgs are key/value pairs used to resolve values of `ARG` instructions in a Dockerfile. + // Values can be constants or environment variables via the go template syntax. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` +} + +// KanikoArtifact describes an artifact built from a Dockerfile, +// with kaniko. +type KanikoArtifact struct { + + // Cleanup to clean the filesystem at the end of the build. + Cleanup bool `yaml:"cleanup,omitempty"` + + // Insecure if you want to push images to a plain HTTP registry. + Insecure bool `yaml:"insecure,omitempty"` + + // InsecurePull if you want to pull images from a plain HTTP registry. + InsecurePull bool `yaml:"insecurePull,omitempty"` + + // NoPush if you only want to build the image, without pushing to a registry. + NoPush bool `yaml:"noPush,omitempty"` + + // Force building outside of a container. + Force bool `yaml:"force,omitempty"` + + // LogTimestamp to add timestamps to log format. + LogTimestamp bool `yaml:"logTimestamp,omitempty"` + + // Reproducible is used to strip timestamps out of the built image. + Reproducible bool `yaml:"reproducible,omitempty"` + + // SingleSnapshot is takes a single snapshot of the filesystem at the end of the build. + // So only one layer will be appended to the base image. + SingleSnapshot bool `yaml:"singleSnapshot,omitempty"` + + // SkipTLS skips TLS certificate validation when pushing to a registry. + SkipTLS bool `yaml:"skipTLS,omitempty"` + + // SkipTLSVerifyPull skips TLS certificate validation when pulling from a registry. + SkipTLSVerifyPull bool `yaml:"skipTLSVerifyPull,omitempty"` + + // SkipUnusedStages builds only used stages if defined to true. + // Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile. + SkipUnusedStages bool `yaml:"skipUnusedStages,omitempty"` + + // UseNewRun to Use the experimental run implementation for detecting changes without requiring file system snapshots. + // In some cases, this may improve build performance by 75%. + UseNewRun bool `yaml:"useNewRun,omitempty"` + + // WhitelistVarRun is used to ignore `/var/run` when taking image snapshot. + // Set it to false to preserve /var/run/* in destination image. + WhitelistVarRun bool `yaml:"whitelistVarRun,omitempty"` + + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is to indicate which build stage is the target build stage. + Target string `yaml:"target,omitempty"` + + // InitImage is the image used to run init container which mounts kaniko context. + InitImage string `yaml:"initImage,omitempty"` + + // Image is the Docker image used by the Kaniko pod. + // Defaults to the latest released version of `gcr.io/kaniko-project/executor`. + Image string `yaml:"image,omitempty"` + + // DigestFile to specify a file in the container. This file will receive the digest of a built image. + // This can be used to automatically track the exact image built by kaniko. + DigestFile string `yaml:"digestFile,omitempty"` + + // ImageNameWithDigestFile specify a file to save the image name with digest of the built image to. + ImageNameWithDigestFile string `yaml:"imageNameWithDigestFile,omitempty"` + + // LogFormat to set the log format. + LogFormat string `yaml:"logFormat,omitempty"` + + // OCILayoutPath is to specify a directory in the container where the OCI image layout of a built image will be placed. + // This can be used to automatically track the exact image built by kaniko. + OCILayoutPath string `yaml:"ociLayoutPath,omitempty"` + + // RegistryMirror if you want to use a registry mirror instead of default `index.docker.io`. + RegistryMirror string `yaml:"registryMirror,omitempty"` + + // SnapshotMode is how Kaniko will snapshot the filesystem. + SnapshotMode string `yaml:"snapshotMode,omitempty"` + + // TarPath is path to save the image as a tarball at path instead of pushing the image. + TarPath string `yaml:"tarPath,omitempty"` + + // Verbosity to set the logging level. + Verbosity string `yaml:"verbosity,omitempty"` + + // InsecureRegistry is to use plain HTTP requests when accessing a registry. + InsecureRegistry []string `yaml:"insecureRegistry,omitempty"` + + // SkipTLSVerifyRegistry skips TLS certificate validation when accessing a registry. + SkipTLSVerifyRegistry []string `yaml:"skipTLSVerifyRegistry,omitempty"` + + // Env are environment variables passed to the kaniko pod. + // It also accepts environment variables via the go template syntax. + // For example: `[{"name": "key1", "value": "value1"}, {"name": "key2", "value": "value2"}, {"name": "key3", "value": "'{{.ENV_VARIABLE}}'"}]`. + Env []v1.EnvVar `yaml:"env,omitempty"` + + // Cache configures Kaniko caching. If a cache is specified, Kaniko will + // use a remote cache which will speed up builds. + Cache *KanikoCache `yaml:"cache,omitempty"` + + // RegistryCertificate is to provide a certificate for TLS communication with a given registry. + // my.registry.url: /path/to/the/certificate.cert is the expected format. + RegistryCertificate map[string]*string `yaml:"registryCertificate,omitempty"` + + // Label key: value to set some metadata to the final image. + // This is equivalent as using the LABEL within the Dockerfile. + Label map[string]*string `yaml:"label,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // It also accepts environment variables and generated values via the go template syntax. + // Exposed generated values: IMAGE_REPO, IMAGE_NAME, IMAGE_TAG. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // VolumeMounts are volume mounts passed to kaniko pod. + VolumeMounts []v1.VolumeMount `yaml:"volumeMounts,omitempty"` +} + +// DockerArtifact describes an artifact built from a Dockerfile, +// usually using `docker build`. +type DockerArtifact struct { + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is the Dockerfile target name to build. + Target string `yaml:"target,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // For example: `{"key1": "value1", "key2": "{{ .ENV_VAR }}"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // NetworkMode is passed through to docker and overrides the + // network configuration of docker builder. If unset, use whatever + // is configured in the underlying docker daemon. Valid modes are + // `host`: use the host's networking stack. + // `bridge`: use the bridged network configuration. + // `container:`: reuse another container's network stack. + // `none`: no networking in the container. + NetworkMode string `yaml:"network,omitempty"` + + // AddHost lists add host. + // For example: `["host1:ip1", "host2:ip2"]`. + AddHost []string `yaml:"addHost,omitempty"` + + // CacheFrom lists the Docker images used as cache sources. + // For example: `["golang:1.10.1-alpine3.7", "alpine:3.7"]`. + CacheFrom []string `yaml:"cacheFrom,omitempty"` + + // NoCache used to pass in --no-cache to docker build to prevent caching. + NoCache bool `yaml:"noCache,omitempty"` + + // Squash is used to pass in --squash to docker build to squash docker image layers into single layer. + Squash bool `yaml:"squash,omitempty"` + + // Secret contains information about a local secret passed to `docker build`, + // along with optional destination information. + Secret *DockerSecret `yaml:"secret,omitempty"` + + // SSH is used to pass in --ssh to docker build to use SSH agent. Format is "default|[=|[,]]". + SSH string `yaml:"ssh,omitempty"` +} + +// DockerSecret contains information about a local secret passed to `docker build`, +// along with optional destination information. +type DockerSecret struct { + // ID is the id of the secret. + ID string `yaml:"id,omitempty" yamltags:"required"` + + // Source is the path to the secret on the host machine. + Source string `yaml:"src,omitempty"` +} + +// BazelArtifact describes an artifact built with [Bazel](https://bazel.build/). +type BazelArtifact struct { + // BuildTarget is the `bazel build` target to run. + // For example: `//:skaffold_example.tar`. + BuildTarget string `yaml:"target,omitempty" yamltags:"required"` + + // BuildArgs are additional args to pass to `bazel build`. + // For example: `["-flag", "--otherflag"]`. + BuildArgs []string `yaml:"args,omitempty"` +} + +// JibArtifact builds images using the +// [Jib plugins for Maven and Gradle](https://github.com/GoogleContainerTools/jib/). +type JibArtifact struct { + // Project selects which sub-project to build for multi-module builds. + Project string `yaml:"project,omitempty"` + + // Flags are additional build flags passed to the builder. + // For example: `["--no-build-cache"]`. + Flags []string `yaml:"args,omitempty"` + + // Type the Jib builder type; normally determined automatically. Valid types are + // `maven`: for Maven. + // `gradle`: for Gradle. + Type string `yaml:"type,omitempty"` + + // BaseImage overrides the configured jib base image. + BaseImage string `yaml:"fromImage,omitempty"` +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type ClusterDetailsForUnmarshaling ClusterDetails + + volumes, remaining, err := util.UnmarshalClusterVolumes(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*ClusterDetailsForUnmarshaling)(clusterDetails) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + clusterDetails.Volumes = volumes + return nil +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type KanikoArtifactForUnmarshaling KanikoArtifact + + mounts, remaining, err := util.UnmarshalKanikoArtifact(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*KanikoArtifactForUnmarshaling)(ka) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + ka.VolumeMounts = mounts + return nil +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshall all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type ClusterDetailsForUnmarshaling ClusterDetails + + // Marshal volumes to a list. Use json because the Kubernetes resources have json annotations. + volumes := clusterDetails.Volumes + + j, err := json.Marshal(volumes) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of clusterDetails because we need to zero out volumes and we don't want to modify the + // current object. + aux := &ClusterDetailsForUnmarshaling{} + + b, err := json.Marshal(clusterDetails) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + + aux.Volumes = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumes"] = vList + } + return m, err +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type KanikoArtifactForUnmarshaling KanikoArtifact + + // Marshal volumes to a map. User json because the Kubernetes resources have json annotations. + volumeMounts := ka.VolumeMounts + + j, err := json.Marshal(volumeMounts) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of kanikoArtifact because we need to zero out volumeMounts and we don't want to modify the + // current object. + aux := &KanikoArtifactForUnmarshaling{} + + b, err := json.Marshal(ka) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + aux.VolumeMounts = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumeMounts"] = vList + } + return m, err +} + +// TODO (yuwenma): HelmDeploy and KustomizeDeploy shall be deprecated. + +// HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. +type HelmDeploy struct { + // Releases is a list of Helm releases. + Releases []HelmRelease `yaml:"releases,omitempty" yamltags:"required"` + + // Flags are additional option flags that are passed on the command + // line to `helm`. + Flags HelmDeployFlags `yaml:"flags,omitempty"` +} + +// HelmDeployFlags are additional option flags that are passed on the command +// line to `helm`. +type HelmDeployFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Install are additional flags passed to (`helm install`). + Install []string `yaml:"install,omitempty"` + + // Upgrade are additional flags passed to (`helm upgrade`). + Upgrade []string `yaml:"upgrade,omitempty"` +} + +// KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. +type KustomizeDeploy struct { + // KustomizePaths is the path to Kustomization files. + // Defaults to `["."]`. + KustomizePaths []string `yaml:"paths,omitempty" skaffold:"filepath"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // BuildArgs are additional args passed to `kustomize build`. + BuildArgs []string `yaml:"buildArgs,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` +} + +// HelmRelease describes a helm release to be deployed. +type HelmRelease struct { + // Name is the name of the Helm release. + // It accepts environment variables via the go template syntax. + Name string `yaml:"name,omitempty" yamltags:"required"` + + // ChartPath is the local path to a packaged Helm chart or an unpacked Helm chart directory. + ChartPath string `yaml:"chartPath,omitempty" yamltags:"oneOf=chartSource" skaffold:"filepath"` + + // RemoteChart refers to a remote Helm chart reference or URL. + RemoteChart string `yaml:"remoteChart,omitempty" yamltags:"oneOf=chartSource"` + + // ValuesFiles are the paths to the Helm `values` files. + ValuesFiles []string `yaml:"valuesFiles,omitempty" skaffold:"filepath"` + + // ArtifactOverrides are key value pairs where the + // key represents the parameter used in the `--set-string` Helm CLI flag to define a container + // image and the value corresponds to artifact i.e. `ImageName` defined in `Build.Artifacts` section. + // The resulting command-line is controlled by `ImageStrategy`. + ArtifactOverrides util.FlatMap `yaml:"artifactOverrides,omitempty"` + + // Namespace is the Kubernetes namespace. + Namespace string `yaml:"namespace,omitempty"` + + // Version is the version of the chart. + Version string `yaml:"version,omitempty"` + + // SetValues are key-value pairs. + // If present, Skaffold will send `--set` flag to Helm CLI and append all pairs after the flag. + SetValues util.FlatMap `yaml:"setValues,omitempty"` + + // SetValueTemplates are key-value pairs. + // If present, Skaffold will try to parse the value part of each key-value pair using + // environment variables in the system, then send `--set` flag to Helm CLI and append + // all parsed pairs after the flag. + SetValueTemplates util.FlatMap `yaml:"setValueTemplates,omitempty"` + + // SetFiles are key-value pairs. + // If present, Skaffold will send `--set-file` flag to Helm CLI and append all pairs after the flag. + SetFiles map[string]string `yaml:"setFiles,omitempty" skaffold:"filepath"` + + // CreateNamespace if `true`, Skaffold will send `--create-namespace` flag to Helm CLI. + // `--create-namespace` flag is available in Helm since version 3.2. + // Defaults is `false`. + CreateNamespace *bool `yaml:"createNamespace,omitempty"` + + // Wait if `true`, Skaffold will send `--wait` flag to Helm CLI. + // Defaults to `false`. + Wait bool `yaml:"wait,omitempty"` + + // RecreatePods if `true`, Skaffold will send `--recreate-pods` flag to Helm CLI + // when upgrading a new version of a chart in subsequent dev loop deploy. + // Defaults to `false`. + RecreatePods bool `yaml:"recreatePods,omitempty"` + + // SkipBuildDependencies should build dependencies be skipped. + // Ignored for `remoteChart`. + SkipBuildDependencies bool `yaml:"skipBuildDependencies,omitempty"` + + // UseHelmSecrets instructs skaffold to use secrets plugin on deployment. + UseHelmSecrets bool `yaml:"useHelmSecrets,omitempty"` + + // Repo specifies the helm repository for remote charts. + // If present, Skaffold will send `--repo` Helm CLI flag or flags. + Repo string `yaml:"repo,omitempty"` + + // UpgradeOnChange specifies whether to upgrade helm chart on code changes. + // Default is `true` when helm chart is local (has `chartPath`). + // Default is `false` when helm chart is remote (has `remoteChart`). + UpgradeOnChange *bool `yaml:"upgradeOnChange,omitempty"` + + // Overrides are key-value pairs. + // If present, Skaffold will build a Helm `values` file that overrides + // the original and use it to call Helm CLI (`--f` flag). + Overrides util.HelmOverrides `yaml:"overrides,omitempty"` + + // Packaged parameters for packaging helm chart (`helm package`). + Packaged *HelmPackaged `yaml:"packaged,omitempty"` + + // ImageStrategy controls how an `ArtifactOverrides` entry is + // turned into `--set-string` Helm CLI flag or flags. + ImageStrategy HelmImageStrategy `yaml:"imageStrategy,omitempty"` +} + +// HelmPackaged parameters for packaging helm chart (`helm package`). +type HelmPackaged struct { + // Version sets the `version` on the chart to this semver version. + Version string `yaml:"version,omitempty"` + + // AppVersion sets the `appVersion` on the chart to this version. + AppVersion string `yaml:"appVersion,omitempty"` +} + +// HelmImageStrategy adds image configurations to the Helm `values` file. +type HelmImageStrategy struct { + HelmImageConfig `yaml:",inline"` +} + +// HelmImageConfig describes an image configuration. +type HelmImageConfig struct { + // HelmFQNConfig is the image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`. + HelmFQNConfig *HelmFQNConfig `yaml:"fqn,omitempty" yamltags:"oneOf=helmImageStrategy"` + + // HelmConventionConfig is the image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`. + HelmConventionConfig *HelmConventionConfig `yaml:"helm,omitempty" yamltags:"oneOf=helmImageStrategy"` +} + +// HelmFQNConfig is the image config to use the FullyQualifiedImageName as param to set. +type HelmFQNConfig struct { + // Property defines the image config. + Property string `yaml:"property,omitempty"` +} + +// HelmConventionConfig is the image config in the syntax of image.repository and image.tag. +type HelmConventionConfig struct { + // ExplicitRegistry separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`. + ExplicitRegistry bool `yaml:"explicitRegistry,omitempty"` +} From 6b451a2b082d6ce5c923f8a17fafe8e298b847ee Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Thu, 8 Jul 2021 09:51:15 -0700 Subject: [PATCH 053/103] [v2] 2. Update v2 with new UX (#6089) * [v2] Remove the latest/v2 schema dependencies. latest/v2 used to depend on latest/v1 for build, tag, test. This is aimed at making sure the v1 changes on these steps can be backportting to v2. This requires engineers to update the v2 reference (e.g. bumps the latestV1 reference to a newer release) and sometimes change the v2 pipeline as well. Since v2 is not released yet, this work are not officialized and v2 always fells behind the v1 changes. This change makes latest/v2 no longe relies on v1 schema. * [v2] Update v2 with new UX --- pkg/skaffold/render/generate/generate.go | 6 +++--- pkg/skaffold/render/generate/generate_test.go | 16 +++++---------- pkg/skaffold/render/renderer/renderer.go | 7 ++++--- pkg/skaffold/render/renderer/renderer_test.go | 20 ++++--------------- pkg/skaffold/schema/latest/v2/config.go | 17 ++++++++++++---- pkg/skaffold/schema/v3alpha1/config.go | 17 ++++++++++++---- 6 files changed, 42 insertions(+), 41 deletions(-) diff --git a/pkg/skaffold/render/generate/generate.go b/pkg/skaffold/render/generate/generate.go index 7e78faf07b6..511e5da498e 100644 --- a/pkg/skaffold/render/generate/generate.go +++ b/pkg/skaffold/render/generate/generate.go @@ -51,7 +51,8 @@ type Generator struct { func (g *Generator) Generate(ctx context.Context) (manifest.ManifestList, error) { // exclude remote url. var paths []string - for _, path := range g.config.Manifests { + // TODO(yuwenma): Apply new UX, kustomize kpt and helm + for _, path := range g.config.RawK8s { switch { case util.IsURL(path): // TODO(yuwenma): remote URL should be changed to use kpt package management approach, via API Schema @@ -62,7 +63,6 @@ func (g *Generator) Generate(ctx context.Context) (manifest.ManifestList, error) paths = append(paths, path) } } - // expend the glob paths. expanded, err := util.ExpandPathsGlob(g.workingDir, paths) if err != nil { @@ -107,7 +107,7 @@ func (g *Generator) Generate(ctx context.Context) (manifest.ManifestList, error) } for _, nkPath := range nonKustomizePaths { if !kubernetes.HasKubernetesFileExtension(nkPath) { - if !util.StrSliceContains(g.config.Manifests, nkPath) { + if !util.StrSliceContains(g.config.RawK8s, nkPath) { logrus.Infof("refusing to deploy/delete non {json, yaml} file %s", nkPath) logrus.Info("If you still wish to deploy this file, please specify it directly, outside a glob pattern.") continue diff --git a/pkg/skaffold/render/generate/generate_test.go b/pkg/skaffold/render/generate/generate_test.go index 5fc6334c807..c6849db6656 100644 --- a/pkg/skaffold/render/generate/generate_test.go +++ b/pkg/skaffold/render/generate/generate_test.go @@ -134,32 +134,26 @@ func TestGenerate(t *testing.T) { { description: "render raw manifests", generateConfig: latestV2.Generate{ - Manifests: []string{"pod.yaml"}, + RawK8s: []string{"pod.yaml"}, }, expected: manifest.ManifestList{[]byte(podYaml)}, }, { description: "render glob raw manifests", generateConfig: latestV2.Generate{ - Manifests: []string{"*.yaml"}, + RawK8s: []string{"*.yaml"}, }, expected: manifest.ManifestList{[]byte(podYaml), []byte(podsYaml)}, }, + /* disabled { description: "render kustomize manifests", generateConfig: latestV2.Generate{ - Manifests: []string{"base"}, + Kustomize: []string{"base"}, }, expected: manifest.ManifestList{[]byte(kustomizePatchedOutput)}, }, - - { - description: "render mixed raw and kustomize manifests", - generateConfig: latestV2.Generate{ - Manifests: []string{"*"}, - }, - expected: manifest.ManifestList{[]byte(kustomizePatchedOutput), []byte(podYaml), []byte(podsYaml)}, - }, + */ } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { diff --git a/pkg/skaffold/render/renderer/renderer.go b/pkg/skaffold/render/renderer/renderer.go index 36b6ee98f45..46e9f41bc2b 100644 --- a/pkg/skaffold/render/renderer/renderer.go +++ b/pkg/skaffold/render/renderer/renderer.go @@ -55,15 +55,16 @@ func NewSkaffoldRenderer(config *latestV2.RenderConfig, workingDir string) (Rend // TODO(yuwenma): The current work directory may not be accurate if users use --filepath flag. hydrationDir := filepath.Join(workingDir, DefaultHydrationDir) - var generator *generate.Generator - if config.Generate == nil { + generator := generate.NewGenerator(workingDir, config.Generate) + /* TODO(yuwenma): Apply new UX + if config.Generate == nil { // If render.generate is not given, default to current working directory. defaultManifests := filepath.Join(workingDir, "*.yaml") generator = generate.NewGenerator(workingDir, latestV2.Generate{Manifests: []string{defaultManifests}}) } else { generator = generate.NewGenerator(workingDir, *config.Generate) } - + */ var validator *validate.Validator if config.Validate != nil { var err error diff --git a/pkg/skaffold/render/renderer/renderer_test.go b/pkg/skaffold/render/renderer/renderer_test.go index 19a10b026d9..a1eb0b21879 100644 --- a/pkg/skaffold/render/renderer/renderer_test.go +++ b/pkg/skaffold/render/renderer/renderer_test.go @@ -68,7 +68,7 @@ func TestRender(t *testing.T) { { description: "single manifests, no hydration rule", renderConfig: &latestV2.RenderConfig{ - Generate: &latestV2.Generate{Manifests: []string{"pod.yaml"}}, + Generate: latestV2.Generate{RawK8s: []string{"pod.yaml"}}, }, originalKptfile: initKptfile, updatedKptfile: `apiVersion: kpt.dev/v1alpha2 @@ -76,24 +76,12 @@ kind: Kptfile metadata: name: skaffold pipeline: {} -`, - }, - - { - description: "manifests not given.", - renderConfig: &latestV2.RenderConfig{}, - originalKptfile: initKptfile, - updatedKptfile: `apiVersion: kpt.dev/v1alpha2 -kind: Kptfile -metadata: - name: skaffold -pipeline: {} `, }, { description: "single manifests with validation rule.", renderConfig: &latestV2.RenderConfig{ - Generate: &latestV2.Generate{Manifests: []string{"pod.yaml"}}, + Generate: latestV2.Generate{RawK8s: []string{"pod.yaml"}}, Validate: &[]latestV2.Validator{{Name: "kubeval"}}, }, originalKptfile: initKptfile, @@ -109,7 +97,7 @@ pipeline: { description: "Validation rule needs to be updated.", renderConfig: &latestV2.RenderConfig{ - Generate: &latestV2.Generate{Manifests: []string{"pod.yaml"}}, + Generate: latestV2.Generate{RawK8s: []string{"pod.yaml"}}, Validate: &[]latestV2.Validator{{Name: "kubeval"}}, }, originalKptfile: `apiVersion: kpt.dev/v1alpha2 @@ -153,7 +141,7 @@ pipeline: func TestRender_UserErr(t *testing.T) { testutil.Run(t, "", func(t *testutil.T) { r, err := NewSkaffoldRenderer(&latestV2.RenderConfig{ - Generate: &latestV2.Generate{Manifests: []string{"pod.yaml"}}, + Generate: latestV2.Generate{RawK8s: []string{"pod.yaml"}}, Validate: &[]latestV2.Validator{{Name: "kubeval"}}, }, "") t.CheckNoError(err) diff --git a/pkg/skaffold/schema/latest/v2/config.go b/pkg/skaffold/schema/latest/v2/config.go index c2730241221..412d2545022 100644 --- a/pkg/skaffold/schema/latest/v2/config.go +++ b/pkg/skaffold/schema/latest/v2/config.go @@ -504,7 +504,7 @@ type TestCase struct { type RenderConfig struct { // Generate defines the dry manifests from a variety of sources. - Generate *Generate `yaml:"generate,omitempty"` + Generate `yaml:",inline"` // Transform defines a set of transformation operations to run in series Transform *[]Transformer `yaml:"transform,omitempty"` @@ -518,11 +518,20 @@ type RenderConfig struct { // Generate defines the dry manifests from a variety of sources. type Generate struct { + RawK8s []string `yaml:"rawYaml/k8s,omitempty"` + Kustomize []string `yaml:"kustomize,omitempty"` + Helm Helm `yaml:"helm,omitempty"` + Kpt []string `yaml:"kpt,omitempty"` +} - // Manifests contains the raw kubernetes manifest paths and kustomize paths. - Manifests []string `yaml:"manifests,omitempty"` +type Helm struct { + Releases *[]HelmRelease `yaml:"releases,omitempty"` +} - // TODO: Implement the "HelmCharts" and "RemoteResoruces" fields. +// DeployType contains the specific implementation and parameters needed +// for the deploy step. All three deployer types can be used at the same +// time for hybrid workflows. +type GenerateType struct { } // Transformer describes the supported kpt transformers. diff --git a/pkg/skaffold/schema/v3alpha1/config.go b/pkg/skaffold/schema/v3alpha1/config.go index 4909b9b0743..47cf78ee8b8 100644 --- a/pkg/skaffold/schema/v3alpha1/config.go +++ b/pkg/skaffold/schema/v3alpha1/config.go @@ -503,7 +503,7 @@ type TestCase struct { type RenderConfig struct { // Generate defines the dry manifests from a variety of sources. - Generate *Generate `yaml:"generate,omitempty"` + Generate `yaml:",inline"` // Transform defines a set of transformation operations to run in series Transform *[]Transformer `yaml:"transform,omitempty"` @@ -517,11 +517,20 @@ type RenderConfig struct { // Generate defines the dry manifests from a variety of sources. type Generate struct { + RawK8s []string `yaml:"rawYaml/k8s,omitempty"` + Kustomize []string `yaml:"kustomize,omitempty"` + Helm Helm `yaml:"helm,omitempty"` + Kpt []string `yaml:"kpt,omitempty"` +} - // Manifests contains the raw kubernetes manifest paths and kustomize paths. - Manifests []string `yaml:"manifests,omitempty"` +type Helm struct { + Releases *[]HelmRelease `yaml:"releases,omitempty"` +} - // TODO: Implement the "HelmCharts" and "RemoteResoruces" fields. +// DeployType contains the specific implementation and parameters needed +// for the deploy step. All three deployer types can be used at the same +// time for hybrid workflows. +type GenerateType struct { } // Transformer describes the supported kpt transformers. From 01bdaaf2b9fdadd5dc451c0da26c80b7ce96d665 Mon Sep 17 00:00:00 2001 From: Aaron Prindle Date: Thu, 8 Jul 2021 11:03:41 -0700 Subject: [PATCH 054/103] change ptypes call to timestamppb to fix linters (#6164) --- pkg/skaffold/event/event.go | 6 +++--- pkg/skaffold/event/v2/event.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/skaffold/event/event.go b/pkg/skaffold/event/event.go index e7bf7c941e3..e95cf0b35e5 100644 --- a/pkg/skaffold/event/event.go +++ b/pkg/skaffold/event/event.go @@ -25,8 +25,8 @@ import ( //nolint:golint,staticcheck "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/timestamp" + "google.golang.org/protobuf/types/known/timestamppb" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" @@ -554,7 +554,7 @@ func (ev *eventHandler) handleFileSyncEvent(e *proto.FileSyncEvent) { func LogMetaEvent() { metadata := handler.state.Metadata handler.logEvent(proto.LogEntry{ - Timestamp: ptypes.TimestampNow(), + Timestamp: timestamppb.Now(), Event: &proto.Event{ EventType: &proto.Event_MetaEvent{ MetaEvent: &proto.MetaEvent{ @@ -569,7 +569,7 @@ func LogMetaEvent() { func (ev *eventHandler) handle(event *proto.Event) { ev.eventChan <- firedEvent{ event: event, - ts: ptypes.TimestampNow(), + ts: timestamppb.Now(), } if _, ok := event.GetEventType().(*proto.Event_TerminationEvent); ok { // close the event channel indicating there are no more events to all the diff --git a/pkg/skaffold/event/v2/event.go b/pkg/skaffold/event/v2/event.go index 371ed9b1683..ef37cb433e8 100644 --- a/pkg/skaffold/event/v2/event.go +++ b/pkg/skaffold/event/v2/event.go @@ -25,7 +25,7 @@ import ( //nolint:golint,staticcheck "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/timestamppb" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" @@ -376,7 +376,7 @@ func (ev *eventHandler) setState(state proto.State) { } func (ev *eventHandler) handle(event *proto.Event) { - event.Timestamp = ptypes.TimestampNow() + event.Timestamp = timestamppb.Now() ev.eventChan <- event if _, ok := event.GetEventType().(*proto.Event_TerminationEvent); ok { // close the event channel indicating there are no more events to all the From a4cf386c69b2f1d00f791bf9aaa8583a170b86d4 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Thu, 8 Jul 2021 12:46:02 -0700 Subject: [PATCH 055/103] simplify timestamps output (#6146) --- cmd/skaffold/app/cmd/cmd.go | 10 +---- cmd/skaffold/skaffold.go | 2 +- pkg/skaffold/build/result.go | 2 +- pkg/skaffold/output/output.go | 26 ++++++++++-- pkg/skaffold/output/output_test.go | 64 +++++++++++++++++++++++++++++- 5 files changed, 88 insertions(+), 16 deletions(-) diff --git a/cmd/skaffold/app/cmd/cmd.go b/cmd/skaffold/app/cmd/cmd.go index de9ef723895..5dc0ef3c87c 100644 --- a/cmd/skaffold/app/cmd/cmd.go +++ b/cmd/skaffold/app/cmd/cmd.go @@ -83,15 +83,7 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { // These are used for command completion and send debug messages on stderr. if cmd.Name() != cobra.ShellCompRequestCmd && cmd.Name() != cobra.ShellCompNoDescRequestCmd { instrumentation.SetCommand(cmd.Name()) - out := output.GetWriter(out, defaultColor, forceColors) - if timestamps { - l := logrus.New() - l.SetOutput(out) - l.SetFormatter(&logrus.TextFormatter{ - DisableTimestamp: false, - }) - out = l.Writer() - } + out := output.GetWriter(out, defaultColor, forceColors, timestamps) cmd.Root().SetOutput(out) // Setup logs diff --git a/cmd/skaffold/skaffold.go b/cmd/skaffold/skaffold.go index 401da0e6f5f..10c70299799 100644 --- a/cmd/skaffold/skaffold.go +++ b/cmd/skaffold/skaffold.go @@ -41,7 +41,7 @@ func main() { // As we allow some color setup using CLI flags for the main run, we can't run SetupColors() // for the entire skaffold run here. It's possible SetupColors() was never called, so call it again // before we print an error to get the right coloring. - errOut := output.GetWriter(os.Stderr, output.DefaultColorCode, false) + errOut := output.GetWriter(os.Stderr, output.DefaultColorCode, false, false) output.Red.Fprintln(errOut, err) code = exitCode(err) } diff --git a/pkg/skaffold/build/result.go b/pkg/skaffold/build/result.go index 82998cde907..cdde1596bba 100644 --- a/pkg/skaffold/build/result.go +++ b/pkg/skaffold/build/result.go @@ -63,7 +63,7 @@ func (l *logAggregatorImpl) GetWriter() (io.Writer, func(), error) { writer := io.Writer(w) if output.IsColorable(l.out) { - writer = output.GetWriter(writer, output.DefaultColorCode, false) + writer = output.GetWriter(writer, output.DefaultColorCode, false, false) } ch := make(chan string, buffSize) l.messages <- ch diff --git a/pkg/skaffold/output/output.go b/pkg/skaffold/output/output.go index 74c41d3c57f..001c96b5cde 100644 --- a/pkg/skaffold/output/output.go +++ b/pkg/skaffold/output/output.go @@ -19,17 +19,32 @@ package output import ( "io" "os" + "time" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" ) +const TimestampFormat = "2006-01-02 15:04:05" + type skaffoldWriter struct { MainWriter io.Writer EventWriter io.Writer + + timestamps bool } func (s skaffoldWriter) Write(p []byte) (int, error) { + written := 0 + if s.timestamps { + t, err := s.MainWriter.Write([]byte(time.Now().Format(TimestampFormat) + " ")) + if err != nil { + return t, err + } + + written += t + } + n, err := s.MainWriter.Write(p) if err != nil { return n, err @@ -38,20 +53,22 @@ func (s skaffoldWriter) Write(p []byte) (int, error) { return n, io.ErrShortWrite } + written += n + s.EventWriter.Write(p) - return len(p), nil + return written, nil } -func GetWriter(out io.Writer, defaultColor int, forceColors bool) io.Writer { +func GetWriter(out io.Writer, defaultColor int, forceColors bool, timestamps bool) io.Writer { if _, isSW := out.(skaffoldWriter); isSW { return out } return skaffoldWriter{ - MainWriter: SetupColors(out, defaultColor, forceColors), - // TODO(marlongamez): Replace this once event writer is implemented + MainWriter: SetupColors(out, defaultColor, forceColors), EventWriter: eventV2.NewLogger(constants.DevLoop, "-1", "skaffold"), + timestamps: timestamps, } } @@ -87,6 +104,7 @@ func WithEventContext(out io.Writer, phase constants.Phase, subtaskID, origin st return skaffoldWriter{ MainWriter: sw.MainWriter, EventWriter: eventV2.NewLogger(phase, subtaskID, origin), + timestamps: sw.timestamps, } } diff --git a/pkg/skaffold/output/output_test.go b/pkg/skaffold/output/output_test.go index eb7d50a5faf..594be95006d 100644 --- a/pkg/skaffold/output/output_test.go +++ b/pkg/skaffold/output/output_test.go @@ -23,6 +23,8 @@ import ( "os" "testing" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" "github.com/GoogleContainerTools/skaffold/testutil" @@ -153,7 +155,67 @@ func TestWithEventContext(t *testing.T) { for _, test := range tests { testutil.Run(t, test.name, func(t *testutil.T) { got := WithEventContext(test.writer, test.phase, test.subtaskID, test.origin) - t.CheckDeepEqual(test.expected, got) + t.CheckDeepEqual(test.expected, got, cmpopts.IgnoreTypes(false)) + }) + } +} + +func TestWriteWithTimeStamps(t *testing.T) { + tests := []struct { + name string + writer func(io.Writer) io.Writer + expectedLen int + }{ + { + name: "skaffold writer with color and timestamps", + writer: func(out io.Writer) io.Writer { + return skaffoldWriter{ + MainWriter: colorableWriter{out}, + EventWriter: ioutil.Discard, + timestamps: true, + } + }, + expectedLen: len(TimestampFormat) + len(" \u001B[32mtesting!\u001B[0m"), + }, + { + name: "skaffold writer with color and no timestamps", + writer: func(out io.Writer) io.Writer { + return skaffoldWriter{ + MainWriter: colorableWriter{out}, + EventWriter: ioutil.Discard, + } + }, + expectedLen: len("\u001B[32mtesting!\u001B[0m"), + }, + { + name: "skaffold writer with timestamps and no color", + writer: func(out io.Writer) io.Writer { + return skaffoldWriter{ + MainWriter: out, + EventWriter: ioutil.Discard, + timestamps: true, + } + }, + expectedLen: len(TimestampFormat) + len(" testing!"), + }, + { + name: "skaffold writer with no color and no timestamps", + writer: func(out io.Writer) io.Writer { + return skaffoldWriter{ + MainWriter: out, + EventWriter: ioutil.Discard, + } + }, + expectedLen: len("testing!"), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + var buf bytes.Buffer + out := test.writer(&buf) + Default.Fprintf(out, "testing!") + testutil.CheckDeepEqual(t, test.expectedLen, len(buf.String())) }) } } From c2b6deb00f73af13f93e50d98b3cabbe6b970069 Mon Sep 17 00:00:00 2001 From: Aaron Prindle Date: Thu, 8 Jul 2021 13:37:29 -0700 Subject: [PATCH 056/103] working cloud profiler export for skaffold (#6066) --- cmd/skaffold/skaffold.go | 18 ++++++ go.mod | 22 ++++---- go.sum | 117 +++++++++++++++++++++++++++++++++------ 3 files changed, 127 insertions(+), 30 deletions(-) diff --git a/cmd/skaffold/skaffold.go b/cmd/skaffold/skaffold.go index 10c70299799..a9b7b764880 100644 --- a/cmd/skaffold/skaffold.go +++ b/cmd/skaffold/skaffold.go @@ -19,13 +19,16 @@ package main import ( "context" "errors" + "log" "os" + "cloud.google.com/go/profiler" "github.com/sirupsen/logrus" "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/version" ) type ExitCoder interface { @@ -33,6 +36,21 @@ type ExitCoder interface { } func main() { + if _, ok := os.LookupEnv("SKAFFOLD_PROFILER"); ok { + err := profiler.Start(profiler.Config{ + Service: os.Getenv("SKAFFOLD_PROFILER_SERVICE"), + NoHeapProfiling: true, + NoAllocProfiling: true, + NoGoroutineProfiling: true, + DebugLogging: true, + // ProjectID must be set if not running on GCP. + ProjectID: os.Getenv("SKAFFOLD_PROFILER_PROJECT"), + ServiceVersion: version.Get().Version, + }) + if err != nil { + log.Fatalf("failed to start the profiler: %v", err) + } + } var code int if err := app.Run(os.Stdout, os.Stderr); err != nil { if errors.Is(err, context.Canceled) { diff --git a/go.mod b/go.mod index cb2603c4ccd..2fa7626ed31 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ replace ( require ( 4d63.com/tz v1.1.0 - cloud.google.com/go v0.72.0 + cloud.google.com/go v0.84.0 cloud.google.com/go/storage v1.10.0 github.com/AlecAivazis/survey/v2 v2.2.7 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.20.0 @@ -36,8 +36,8 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e - github.com/golang/protobuf v1.4.3 - github.com/google/go-cmp v0.5.5 + github.com/golang/protobuf v1.5.2 + github.com/google/go-cmp v0.5.6 github.com/google/go-containerregistry v0.5.1 github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20210216200643-d81088d9983e // indirect github.com/google/go-github v17.0.0+incompatible @@ -77,16 +77,14 @@ require ( go.opentelemetry.io/otel/trace v0.20.0 golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect golang.org/x/mod v0.4.2 - golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect - golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58 - golang.org/x/sync v0.0.0-20201207232520-09787c993a3a - golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46 + golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c + golang.org/x/sys v0.0.0-20210603125802-9665404d3644 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 - google.golang.org/api v0.35.0 - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20201202151023-55d61f90c1ce - google.golang.org/grpc v1.33.2 - google.golang.org/protobuf v1.25.0 + google.golang.org/api v0.48.0 + google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d + google.golang.org/grpc v1.38.0 + google.golang.org/protobuf v1.26.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 honnef.co/go/tools v0.1.3 // indirect diff --git a/go.sum b/go.sum index aef8cbdce43..d216250ed7e 100644 --- a/go.sum +++ b/go.sum @@ -26,8 +26,14 @@ cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZ cloud.google.com/go v0.61.0/go.mod h1:XukKJg4Y7QsUu0Hxg3qQKUWR4VuWivmyMK2+rUyxAqw= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0 h1:eWRCuwubtDrCJG0oSUMgnsbD4CmPFQF2ei4OFbXvwww= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0 h1:hVhK90DwCdOAYGME/FJd9vNIZye9HBR6Yy3fu4js3N8= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -291,6 +297,8 @@ github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLI github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -425,6 +433,9 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4s github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -608,9 +619,14 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= @@ -654,9 +670,11 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-containerregistry v0.0.0-20191010200024-a3d713f9b7f8/go.mod h1:KyKXa9ciM8+lgMXwOVsXi7UxGrsf9mM61Mzs+xKUrKE= github.com/google/go-containerregistry v0.1.2/go.mod h1:GPivBPgdAyd2SU+vf6EpsgOtWDuPqjW0hJZt4rNdTZ4= github.com/google/go-containerregistry v0.2.1/go.mod h1:Ts3Wioz1r5ayWx8sS6vLcWltWcM1aqFjd/eVrkFhrWM= @@ -690,8 +708,9 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible h1:xmapqc1AyLoB+ddYT6r04bD9lIjlOqGaREovi0SzFaE= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -700,6 +719,11 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22 h1:ub2sxhs2A0HRa2dWHavvmWxiVGXNfE9wI+gcTMwED8A= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= @@ -1328,6 +1352,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= @@ -1351,8 +1376,9 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4-0.20200608061201-1901b56b9515/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 h1:Q3C9yzW6I9jqEc8sawxzxZmY48fs9u220KXq6d5s3XU= @@ -1451,8 +1477,10 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1461,6 +1489,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -1521,9 +1550,13 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420 h1:a8jGStKg0XqKDlKqjLrXn0ioF5MH36pT7Z0BRTqLhbk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1535,8 +1568,13 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58 h1:Mj83v+wSRNEar42a/MQgxk9X42TdEmrOl9i+y8WbxLo= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1547,8 +1585,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1634,13 +1673,22 @@ golang.org/x/sys v0.0.0-20201013081832-0aaa2718063a/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210216163648-f7da38b97c65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46 h1:V066+OYJ66oTjnhm4Yrn7SXIwSCiDQJxpBxmvqb1N1c= -golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644 h1:CA1DEQ4NdKphKeL70tvsWNdT5oFh1lOjihRcEDROi0I= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1651,8 +1699,9 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1748,10 +1797,15 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1795,8 +1849,14 @@ google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.34.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.35.0 h1:TBCmTTxUrRDA1iTctnK/fIeitxIZ+TQuaf0j29fmCGo= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0 h1:RDAPWfNFY06dffEXfn7hZF5Fr1ZbnChzfQZAPyBd1+I= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1854,8 +1914,19 @@ google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201022181438-0ff5f38871d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201202151023-55d61f90c1ce h1:iS2R2xZpNiQFZrGqWisFYEYzOyKzvz07am2h/QXKqoY= -google.golang.org/genproto v0.0.0-20201202151023-55d61f90c1ce/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d h1:KzwjikDymrEmYYbdyfievTwjEeGlu+OM6oiKBkF3Jfg= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= @@ -1879,8 +1950,16 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1890,8 +1969,10 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= From 46cf5be0a87ae42fb3cbb24d6220ccb840607e9f Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Thu, 8 Jul 2021 15:40:54 -0700 Subject: [PATCH 057/103] [v2] Add v2 events for render process. (#6144) --- docs/content/en/docs/references/api/grpc.md | 15 + pkg/skaffold/constants/constants.go | 1 + pkg/skaffold/event/v2/event.go | 9 + pkg/skaffold/event/v2/event_test.go | 2 + pkg/skaffold/event/v2/metadata.go | 2 + pkg/skaffold/event/v2/metadata_test.go | 6 +- pkg/skaffold/event/v2/render.go | 62 ++ pkg/skaffold/event/v2/render_test.go | 73 +++ proto/enums/enums.pb.go | 438 ++++++++------- proto/enums/enums.proto | 14 + proto/v1/skaffold.pb.go | 12 + proto/v2/skaffold.pb.go | 593 ++++++++++++++------ proto/v2/skaffold.proto | 30 + 13 files changed, 890 insertions(+), 367 deletions(-) create mode 100644 pkg/skaffold/event/v2/render.go create mode 100644 pkg/skaffold/event/v2/render_test.go diff --git a/docs/content/en/docs/references/api/grpc.md b/docs/content/en/docs/references/api/grpc.md index d115afab20e..66e048fe0fb 100644 --- a/docs/content/en/docs/references/api/grpc.md +++ b/docs/content/en/docs/references/api/grpc.md @@ -864,6 +864,21 @@ Enum indicating the log level of a line of output + + +### RenderType +Enum indicating render manifests type + +| Name | Number | Description | +| ---- |:------:| ----------- | +| UNKNOWN_RENDER_TYPE | 0 | Could not determine Render Type | +| RAWK8S | 1 | Raw Manifests | +| KUSTOMIZE_MANIFEST | 2 | kustomize manifests | +| HELM_CHART | 3 | helm charts | +| KPT_MANIFEST | 4 | kpt manifests | + + + ### StatusCode diff --git a/pkg/skaffold/constants/constants.go b/pkg/skaffold/constants/constants.go index e581d9d2384..aef384ae448 100644 --- a/pkg/skaffold/constants/constants.go +++ b/pkg/skaffold/constants/constants.go @@ -28,6 +28,7 @@ const ( Init = Phase("Init") Build = Phase("Build") Test = Phase("Test") + Render = Phase("Render") Deploy = Phase("Deploy") StatusCheck = Phase("StatusCheck") PortForward = Phase("PortForward") diff --git a/pkg/skaffold/event/v2/event.go b/pkg/skaffold/event/v2/event.go index ef37cb433e8..2bf8856831e 100644 --- a/pkg/skaffold/event/v2/event.go +++ b/pkg/skaffold/event/v2/event.go @@ -217,6 +217,10 @@ func emptyStateWithArtifacts(builds map[string]string, metadata *proto.Metadata, Status: NotStarted, StatusCode: proto.StatusCode_OK, }, + RenderState: &proto.RenderState{ + Status: NotStarted, + StatusCode: proto.StatusCode_OK, + }, DeployState: &proto.DeployState{ Status: NotStarted, AutoTrigger: autoDeploy, @@ -413,6 +417,11 @@ func (ev *eventHandler) handleExec(event *proto.Event) { ev.stateLock.Lock() ev.state.TestState.Status = te.Status ev.stateLock.Unlock() + case *proto.Event_RenderEvent: + te := e.RenderEvent + ev.stateLock.Lock() + ev.state.RenderState.Status = te.Status + ev.stateLock.Unlock() case *proto.Event_DeploySubtaskEvent: de := e.DeploySubtaskEvent ev.stateLock.Lock() diff --git a/pkg/skaffold/event/v2/event_test.go b/pkg/skaffold/event/v2/event_test.go index be2014a1e79..121362ae97f 100644 --- a/pkg/skaffold/event/v2/event_test.go +++ b/pkg/skaffold/event/v2/event_test.go @@ -117,6 +117,7 @@ func TestResetStateOnBuild(t *testing.T) { "image1": Complete, }, }, + RenderState: &proto.RenderState{Status: Complete}, DeployState: &proto.DeployState{Status: Complete}, ForwardedPorts: map[int32]*proto.PortForwardEvent{ 2001: { @@ -137,6 +138,7 @@ func TestResetStateOnBuild(t *testing.T) { }, }, TestState: &proto.TestState{Status: NotStarted}, + RenderState: &proto.RenderState{Status: NotStarted}, DeployState: &proto.DeployState{Status: NotStarted}, StatusCheckState: &proto.StatusCheckState{Status: NotStarted, Resources: map[string]string{}}, FileSyncState: &proto.FileSyncState{Status: NotStarted}, diff --git a/pkg/skaffold/event/v2/metadata.go b/pkg/skaffold/event/v2/metadata.go index 0e99c5435e8..e5b0701e001 100644 --- a/pkg/skaffold/event/v2/metadata.go +++ b/pkg/skaffold/event/v2/metadata.go @@ -42,6 +42,7 @@ func LogMetaEvent() { func initializeMetadata(pipelines []latestV1.Pipeline, kubeContext string, runID string) *proto.Metadata { m := &proto.Metadata{ Build: &proto.BuildMetadata{}, + Render: &proto.RenderMetadata{}, Deploy: &proto.DeployMetadata{}, RunID: runID, } @@ -75,6 +76,7 @@ func initializeMetadata(pipelines []latestV1.Pipeline, kubeContext string, runID Cluster: getClusterType(kubeContext), } } + // TODO(v2 render): Add the renderMetadata initialization once the pipeline is switched to latestV2.Pipeline return m } diff --git a/pkg/skaffold/event/v2/metadata_test.go b/pkg/skaffold/event/v2/metadata_test.go index 2a7ba7f7730..5253d7dcb9a 100644 --- a/pkg/skaffold/event/v2/metadata_test.go +++ b/pkg/skaffold/event/v2/metadata_test.go @@ -52,6 +52,7 @@ func TestEmptyState(t *testing.T) { Type: proto.BuildType_LOCAL, Artifacts: []*proto.BuildMetadata_Artifact{{Type: proto.BuilderType_DOCKER, Name: "docker-artifact-1"}}, }, + Render: &proto.RenderMetadata{}, Deploy: &proto.DeployMetadata{ Cluster: proto.ClusterType_MINIKUBE, Deployers: []*proto.DeployMetadata_Deployer{ @@ -89,6 +90,7 @@ func TestEmptyState(t *testing.T) { {Type: proto.BuilderType_DOCKER, Name: "docker-artifact-2"}, }, }, + Render: &proto.RenderMetadata{}, Deploy: &proto.DeployMetadata{ Cluster: proto.ClusterType_GKE, Deployers: []*proto.DeployMetadata_Deployer{{Type: proto.DeployerType_KUSTOMIZE, Count: 1}}, @@ -112,6 +114,7 @@ func TestEmptyState(t *testing.T) { Type: proto.BuildType_GCB, Artifacts: []*proto.BuildMetadata_Artifact{{Type: proto.BuilderType_KANIKO, Name: "artifact-1"}}, }, + Render: &proto.RenderMetadata{}, Deploy: &proto.DeployMetadata{}, RunID: "run-id", }, @@ -127,7 +130,8 @@ func TestEmptyState(t *testing.T) { }, cluster: "some-private", expected: &proto.Metadata{ - Build: &proto.BuildMetadata{}, + Build: &proto.BuildMetadata{}, + Render: &proto.RenderMetadata{}, Deploy: &proto.DeployMetadata{ Cluster: proto.ClusterType_OTHER, Deployers: []*proto.DeployMetadata_Deployer{{Type: proto.DeployerType_KUSTOMIZE, Count: 1}}, diff --git a/pkg/skaffold/event/v2/render.go b/pkg/skaffold/event/v2/render.go new file mode 100644 index 00000000000..3f81cf1fc92 --- /dev/null +++ b/pkg/skaffold/event/v2/render.go @@ -0,0 +1,62 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2 + +import ( + "fmt" + "strconv" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" + sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" + proto "github.com/GoogleContainerTools/skaffold/proto/v2" +) + +// RendererInProgress adds an event to mark a render process starts. +func RendererInProgress(id int) { + handler.handleRenderSubtaskEvent(&proto.RenderSubtaskEvent{ + Id: strconv.Itoa(id), + TaskId: fmt.Sprintf("%s-%d", constants.Render, handler.iteration), + Status: InProgress, + }) +} + +// RendererFailed adds an event to mark a render process has been failed. +func RendererFailed(id int, err error) { + handler.handleRenderSubtaskEvent(&proto.RenderSubtaskEvent{ + Id: strconv.Itoa(id), + TaskId: fmt.Sprintf("%s-%d", constants.Render, handler.iteration), + Status: Failed, + ActionableErr: sErrors.ActionableErrV2(handler.cfg, constants.Render, err), + }) +} + +// RendererSucceeded adds an event to mark a render process has been succeeded. +func RendererSucceeded(id int) { + handler.handleRenderSubtaskEvent(&proto.RenderSubtaskEvent{ + Id: strconv.Itoa(id), + TaskId: fmt.Sprintf("%s-%d", constants.Render, handler.iteration), + Status: Succeeded, + }) +} + +func (ev *eventHandler) handleRenderSubtaskEvent(e *proto.RenderSubtaskEvent) { + ev.handle(&proto.Event{ + EventType: &proto.Event_RenderEvent{ + RenderEvent: e, + }, + }) +} diff --git a/pkg/skaffold/event/v2/render_test.go b/pkg/skaffold/event/v2/render_test.go new file mode 100644 index 00000000000..46bed3b93a6 --- /dev/null +++ b/pkg/skaffold/event/v2/render_test.go @@ -0,0 +1,73 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2 + +import ( + "errors" + "fmt" + "testing" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" + sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" + latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + proto "github.com/GoogleContainerTools/skaffold/proto/v2" +) + +func TestHandleRenderSubtaskEvent(t *testing.T) { + tests := []struct { + name string + event *proto.RenderSubtaskEvent + }{ + { + name: "In Progress", + event: &proto.RenderSubtaskEvent{ + Id: "0", + TaskId: fmt.Sprintf("%s-%d", constants.Render, 0), + Status: InProgress, + }, + }, + { + name: "Failed", + event: &proto.RenderSubtaskEvent{ + Id: "23", + TaskId: fmt.Sprintf("%s-%d", constants.Render, 0), + Status: Failed, + ActionableErr: sErrors.ActionableErrV2(handler.cfg, constants.Render, errors.New("render failed")), + }, + }, + { + name: "Succeeded", + event: &proto.RenderSubtaskEvent{ + Id: "99", + TaskId: fmt.Sprintf("%s-%d", constants.Render, 12), + Status: Succeeded, + }, + }, + } + + defer func() { handler = newHandler() }() + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + handler = newHandler() + handler.state = emptyState(mockCfg([]latestV1.Pipeline{{}}, "test")) + + wait(t, func() bool { return handler.getState().RenderState.Status == NotStarted }) + handler.handleRenderSubtaskEvent(test.event) + wait(t, func() bool { return handler.getState().RenderState.Status == test.event.Status }) + }) + } +} diff --git a/proto/enums/enums.pb.go b/proto/enums/enums.pb.go index d1c08826d8c..bdf21ff2c41 100644 --- a/proto/enums/enums.pb.go +++ b/proto/enums/enums.pb.go @@ -136,6 +136,46 @@ func (TesterType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_888b6bd9597961ff, []int{2} } +// Enum indicating render manifests type +type RenderType int32 + +const ( + // Could not determine Render Type + RenderType_UNKNOWN_RENDER_TYPE RenderType = 0 + // Raw Manifests + RenderType_RAWK8S RenderType = 1 + // kustomize manifests + RenderType_KUSTOMIZE_MANIFEST RenderType = 2 + // helm charts + RenderType_HELM_CHART RenderType = 3 + // kpt manifests + RenderType_KPT_MANIFEST RenderType = 4 +) + +var RenderType_name = map[int32]string{ + 0: "UNKNOWN_RENDER_TYPE", + 1: "RAWK8S", + 2: "KUSTOMIZE_MANIFEST", + 3: "HELM_CHART", + 4: "KPT_MANIFEST", +} + +var RenderType_value = map[string]int32{ + "UNKNOWN_RENDER_TYPE": 0, + "RAWK8S": 1, + "KUSTOMIZE_MANIFEST": 2, + "HELM_CHART": 3, + "KPT_MANIFEST": 4, +} + +func (x RenderType) String() string { + return proto.EnumName(RenderType_name, int32(x)) +} + +func (RenderType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_888b6bd9597961ff, []int{3} +} + // Enum indicating deploy tools used type DeployerType int32 @@ -173,7 +213,7 @@ func (x DeployerType) String() string { } func (DeployerType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_888b6bd9597961ff, []int{3} + return fileDescriptor_888b6bd9597961ff, []int{4} } // Enum indicating cluster type the application is deployed to @@ -209,7 +249,7 @@ func (x ClusterType) String() string { } func (ClusterType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_888b6bd9597961ff, []int{4} + return fileDescriptor_888b6bd9597961ff, []int{5} } // Enum indicating the log level of a line of output @@ -253,7 +293,7 @@ func (x LogLevel) String() string { } func (LogLevel) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_888b6bd9597961ff, []int{5} + return fileDescriptor_888b6bd9597961ff, []int{6} } // Enum for Status codes
@@ -871,7 +911,7 @@ func (x StatusCode) String() string { } func (StatusCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_888b6bd9597961ff, []int{6} + return fileDescriptor_888b6bd9597961ff, []int{7} } // Enum for Suggestion codes @@ -1144,13 +1184,14 @@ func (x SuggestionCode) String() string { } func (SuggestionCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_888b6bd9597961ff, []int{7} + return fileDescriptor_888b6bd9597961ff, []int{8} } func init() { proto.RegisterEnum("proto.enums.BuilderType", BuilderType_name, BuilderType_value) proto.RegisterEnum("proto.enums.BuildType", BuildType_name, BuildType_value) proto.RegisterEnum("proto.enums.TesterType", TesterType_name, TesterType_value) + proto.RegisterEnum("proto.enums.RenderType", RenderType_name, RenderType_value) proto.RegisterEnum("proto.enums.DeployerType", DeployerType_name, DeployerType_value) proto.RegisterEnum("proto.enums.ClusterType", ClusterType_name, ClusterType_value) proto.RegisterEnum("proto.enums.LogLevel", LogLevel_name, LogLevel_value) @@ -1161,197 +1202,200 @@ func init() { func init() { proto.RegisterFile("enums.proto", fileDescriptor_888b6bd9597961ff) } var fileDescriptor_888b6bd9597961ff = []byte{ - // 3070 bytes of a gzipped FileDescriptorProto + // 3115 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x59, 0x69, 0x90, 0x1c, 0xc5, - 0x95, 0x66, 0xa6, 0xa7, 0xa7, 0xbb, 0x53, 0x1c, 0x49, 0xa2, 0xfb, 0x96, 0x40, 0x02, 0x06, 0x56, - 0x62, 0x97, 0x0d, 0x7e, 0xec, 0xbf, 0xec, 0xaa, 0x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 0xb4, 0x1d, 0x30, - 0x7c, 0x9c, 0x6c, 0x43, 0x9b, 0x86, 0xa5, 0x89, 0xee, 0x45, 0x92, 0x1f, 0x62, 0x3e, 0xbe, 0xba, - 0x34, 0x2a, 0x13, 0xab, 0x79, 0xa5, 0x59, 0x08, 0xba, 0xf1, 0x35, 0x64, 0x17, 0xda, 0x56, 0x11, - 0x82, 0x35, 0x61, 0xe4, 0xf3, 0x0e, 0x67, 0xbe, 0x81, 0x2c, 0x92, 0x0b, 0xd0, 0xce, 0x11, 0x08, - 0x0f, 0xe3, 0x80, 0x85, 0x4c, 0xe8, 0x0c, 0x75, 0x82, 0x6c, 0x47, 0x9b, 0x87, 0x4e, 0xa7, 0x69, - 0x1a, 0x44, 0x4a, 0x19, 0xf9, 0xc9, 0x11, 0x79, 0x27, 0x92, 0x6d, 0xee, 0xfb, 0x4c, 0x18, 0xf9, - 0x60, 0xe4, 0x10, 0x5e, 0x24, 0x3a, 0x01, 0xf7, 0xb4, 0x11, 0x9f, 0x22, 0x3b, 0xd1, 0xd6, 0x8a, - 0xd8, 0x78, 0xc6, 0x71, 0xef, 0xb5, 0x64, 0x37, 0xda, 0x5e, 0x41, 0x70, 0x31, 0x4b, 0x03, 0xee, - 0xa7, 0x31, 0x95, 0xd4, 0x9e, 0x76, 0x69, 0xd8, 0x88, 0x0e, 0x0f, 0x98, 0xa3, 0x63, 0x79, 0xe4, - 0xa8, 0x1e, 0xf5, 0x7a, 0x2c, 0xed, 0xc8, 0x28, 0x4c, 0xe3, 0x24, 0x08, 0x8c, 0x96, 0x15, 0xb2, - 0x03, 0x6d, 0xa9, 0xa0, 0xba, 0x4c, 0xa7, 0x3e, 0xef, 0x42, 0xa4, 0x00, 0xe0, 0xf4, 0xc8, 0x59, - 0x44, 0x94, 0xaa, 0x98, 0x7a, 0xcc, 0x88, 0xdf, 0x59, 0xfa, 0x5c, 0xb2, 0x2e, 0x57, 0x5a, 0xce, - 0x0f, 0x6b, 0xb8, 0xae, 0x84,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d, 0x25, 0x82, 0x6b, 0x3c, 0x41, 0xb6, 0xa1, 0x4d, 0x5e, 0x24, 0x34, 0xe5, + 0x82, 0xc9, 0x54, 0x69, 0x99, 0x78, 0x3a, 0x91, 0xcc, 0x80, 0xf1, 0xe4, 0xcc, 0xd5, 0x08, 0xc9, + 0xde, 0xa2, 0x0b, 0xc1, 0x46, 0x74, 0xae, 0x53, 0x26, 0x99, 0x28, 0x45, 0x00, 0xa1, 0x69, 0x49, + 0xe7, 0xba, 0xff, 0xa3, 0xf0, 0x04, 0x38, 0xde, 0x35, 0x3b, 0xe5, 0x87, 0x59, 0x1a, 0x52, 0xc1, + 0x5b, 0x46, 0x15, 0x44, 0xa4, 0xc3, 0x82, 0x30, 0xf5, 0x3a, 0x54, 0x6a, 0x5c, 0x21, 0x18, 0xad, + 0xed, 0xc6, 0xba, 0x40, 0x4c, 0xcd, 0x1c, 0x42, 0x6b, 0xfd, 0xde, 0xa9, 0x85, 0xfe, 0x75, 0x99, + 0xb9, 0xcd, 0x68, 0xbd, 0x33, 0xe7, 0xb3, 0x38, 0x88, 0xe6, 0x0b, 0x83, 0x75, 0x34, 0x05, 0xca, + 0xf0, 0x04, 0x39, 0x13, 0x35, 0x72, 0x73, 0x78, 0x12, 0xc2, 0xd3, 0x4d, 0x9a, 0xcc, 0xd3, 0x01, + 0xae, 0x40, 0x78, 0xba, 0x31, 0x68, 0xe6, 0x68, 0x8d, 0xb7, 0x70, 0x3a, 0x0f, 0x4a, 0xe9, 0x28, + 0xb3, 0x58, 0x3a, 0xbd, 0x6b, 0x51, 0x3d, 0xe4, 0x82, 0x83, 0x8a, 0x2c, 0xbc, 0x5d, 0x66, 0xc3, + 0x1b, 0xe9, 0x0e, 0x93, 0xb8, 0x32, 0x73, 0x10, 0xd5, 0x83, 0xfe, 0xf1, 0xa0, 0x77, 0x6d, 0x6f, + 0x01, 0x96, 0x7d, 0xd6, 0x4c, 0xda, 0xd6, 0x21, 0x2e, 0x5a, 0x11, 0x9e, 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, 0x94, 0x61, 0xe6, 0x06, 0x62, 0xf7, 0x6f, 0xb1, 0x86, 0x48, 0xc1, 0x20, + 0xbe, 0x0f, 0xed, 0xb6, 0x68, 0x4b, 0x95, 0x33, 0x2c, 0xfc, 0x67, 0x07, 0x3d, 0x53, 0xe1, 0x9f, + 0xa9, 0x35, 0x2f, 0x3f, 0xfc, 0xdf, 0xc7, 0x4f, 0xac, 0x5c, 0x79, 0xfa, 0x8a, 0xfd, 0xff, 0xd7, + 0x3f, 0x79, 0xa0, 0xdd, 0xef, 0x1f, 0x5f, 0xe8, 0x79, 0xfd, 0xc5, 0x95, 0x23, 0x27, 0x16, 0x7b, + 0x4b, 0xba, 0xdf, 0x5f, 0x58, 0x3e, 0xb0, 0x7c, 0xf5, 0x91, 0x63, 0xc7, 0xfa, 0x0b, 0x47, 0x0f, + 0x98, 0xbf, 0xe1, 0x1e, 0x30, 0x7f, 0xc3, 0xbd, 0x62, 0xda, 0xfc, 0xe3, 0xb2, 0x7f, 0x05, 0x00, + 0x00, 0xff, 0xff, 0xe5, 0x8b, 0x9c, 0x07, 0xe6, 0x1d, 0x00, 0x00, } diff --git a/proto/enums/enums.proto b/proto/enums/enums.proto index c13d0607ae8..fcd979ac9c5 100644 --- a/proto/enums/enums.proto +++ b/proto/enums/enums.proto @@ -43,6 +43,20 @@ enum TesterType { CONTAINER_STRUCTURE_TEST = 2; } +// Enum indicating render manifests type +enum RenderType { + // Could not determine Render Type + UNKNOWN_RENDER_TYPE = 0; + // Raw Manifests + RAWK8S = 1; + // kustomize manifests + KUSTOMIZE_MANIFEST = 2; + // helm charts + HELM_CHART = 3; + // kpt manifests + KPT_MANIFEST = 4; +} + // Enum indicating deploy tools used enum DeployerType { // Could not determine Deployer Type diff --git a/proto/v1/skaffold.pb.go b/proto/v1/skaffold.pb.go index a21b5c14c45..e9aa219874e 100644 --- a/proto/v1/skaffold.pb.go +++ b/proto/v1/skaffold.pb.go @@ -63,6 +63,18 @@ const TesterType_UNKNOWN_TEST_TYPE = TesterType(enums.TesterType_UNKNOWN_TEST_TY const TesterType_UNIT = TesterType(enums.TesterType_UNIT) const TesterType_CONTAINER_STRUCTURE_TEST = TesterType(enums.TesterType_CONTAINER_STRUCTURE_TEST) +// RenderType from public import enums/enums.proto +type RenderType = enums.RenderType + +var RenderType_name = enums.RenderType_name +var RenderType_value = enums.RenderType_value + +const RenderType_UNKNOWN_RENDER_TYPE = RenderType(enums.RenderType_UNKNOWN_RENDER_TYPE) +const RenderType_RAWK8S = RenderType(enums.RenderType_RAWK8S) +const RenderType_KUSTOMIZE_MANIFEST = RenderType(enums.RenderType_KUSTOMIZE_MANIFEST) +const RenderType_HELM_CHART = RenderType(enums.RenderType_HELM_CHART) +const RenderType_KPT_MANIFEST = RenderType(enums.RenderType_KPT_MANIFEST) + // DeployerType from public import enums/enums.proto type DeployerType = enums.DeployerType diff --git a/proto/v2/skaffold.pb.go b/proto/v2/skaffold.pb.go index 9885c0741a2..58432a34eee 100644 --- a/proto/v2/skaffold.pb.go +++ b/proto/v2/skaffold.pb.go @@ -63,6 +63,18 @@ const TesterType_UNKNOWN_TEST_TYPE = TesterType(enums.TesterType_UNKNOWN_TEST_TY const TesterType_UNIT = TesterType(enums.TesterType_UNIT) const TesterType_CONTAINER_STRUCTURE_TEST = TesterType(enums.TesterType_CONTAINER_STRUCTURE_TEST) +// RenderType from public import enums/enums.proto +type RenderType = enums.RenderType + +var RenderType_name = enums.RenderType_name +var RenderType_value = enums.RenderType_value + +const RenderType_UNKNOWN_RENDER_TYPE = RenderType(enums.RenderType_UNKNOWN_RENDER_TYPE) +const RenderType_RAWK8S = RenderType(enums.RenderType_RAWK8S) +const RenderType_KUSTOMIZE_MANIFEST = RenderType(enums.RenderType_KUSTOMIZE_MANIFEST) +const RenderType_HELM_CHART = RenderType(enums.RenderType_HELM_CHART) +const RenderType_KPT_MANIFEST = RenderType(enums.RenderType_KPT_MANIFEST) + // DeployerType from public import enums/enums.proto type DeployerType = enums.DeployerType @@ -452,6 +464,7 @@ type State struct { DebuggingContainers []*DebuggingContainerEvent `protobuf:"bytes,6,rep,name=debuggingContainers,proto3" json:"debuggingContainers,omitempty"` Metadata *Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` TestState *TestState `protobuf:"bytes,8,opt,name=testState,proto3" json:"testState,omitempty"` + RenderState *RenderState `protobuf:"bytes,9,opt,name=renderState,proto3" json:"renderState,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -538,11 +551,19 @@ func (m *State) GetTestState() *TestState { return nil } +func (m *State) GetRenderState() *RenderState { + if m != nil { + return m.RenderState + } + return nil +} + type Metadata struct { Build *BuildMetadata `protobuf:"bytes,1,opt,name=build,proto3" json:"build,omitempty"` Deploy *DeployMetadata `protobuf:"bytes,2,opt,name=deploy,proto3" json:"deploy,omitempty"` Test *TestMetadata `protobuf:"bytes,3,opt,name=test,proto3" json:"test,omitempty"` RunID string `protobuf:"bytes,4,opt,name=runID,proto3" json:"runID,omitempty"` + Render *RenderMetadata `protobuf:"bytes,5,opt,name=render,proto3" json:"render,omitempty"` // Additional key value pairs to describe the build pipeline Additional map[string]string `protobuf:"bytes,99,rep,name=additional,proto3" json:"additional,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -603,6 +624,13 @@ func (m *Metadata) GetRunID() string { return "" } +func (m *Metadata) GetRender() *RenderMetadata { + if m != nil { + return m.Render + } + return nil +} + func (m *Metadata) GetAdditional() map[string]string { if m != nil { return m.Additional @@ -816,6 +844,93 @@ func (m *TestMetadata_Tester) GetCount() int32 { return 0 } +// RenderMetadata describes the render pipeline +type RenderMetadata struct { + Renderers []*RenderMetadata_Renderer `protobuf:"bytes,1,rep,name=Renderers,proto3" json:"Renderers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenderMetadata) Reset() { *m = RenderMetadata{} } +func (m *RenderMetadata) String() string { return proto.CompactTextString(m) } +func (*RenderMetadata) ProtoMessage() {} +func (*RenderMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_39088757fd9c8e40, []int{7} +} + +func (m *RenderMetadata) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RenderMetadata.Unmarshal(m, b) +} +func (m *RenderMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RenderMetadata.Marshal(b, m, deterministic) +} +func (m *RenderMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenderMetadata.Merge(m, src) +} +func (m *RenderMetadata) XXX_Size() int { + return xxx_messageInfo_RenderMetadata.Size(m) +} +func (m *RenderMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_RenderMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_RenderMetadata proto.InternalMessageInfo + +func (m *RenderMetadata) GetRenderers() []*RenderMetadata_Renderer { + if m != nil { + return m.Renderers + } + return nil +} + +type RenderMetadata_Renderer struct { + Type enums.RenderType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.enums.RenderType" json:"type,omitempty"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenderMetadata_Renderer) Reset() { *m = RenderMetadata_Renderer{} } +func (m *RenderMetadata_Renderer) String() string { return proto.CompactTextString(m) } +func (*RenderMetadata_Renderer) ProtoMessage() {} +func (*RenderMetadata_Renderer) Descriptor() ([]byte, []int) { + return fileDescriptor_39088757fd9c8e40, []int{7, 0} +} + +func (m *RenderMetadata_Renderer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RenderMetadata_Renderer.Unmarshal(m, b) +} +func (m *RenderMetadata_Renderer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RenderMetadata_Renderer.Marshal(b, m, deterministic) +} +func (m *RenderMetadata_Renderer) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenderMetadata_Renderer.Merge(m, src) +} +func (m *RenderMetadata_Renderer) XXX_Size() int { + return xxx_messageInfo_RenderMetadata_Renderer.Size(m) +} +func (m *RenderMetadata_Renderer) XXX_DiscardUnknown() { + xxx_messageInfo_RenderMetadata_Renderer.DiscardUnknown(m) +} + +var xxx_messageInfo_RenderMetadata_Renderer proto.InternalMessageInfo + +func (m *RenderMetadata_Renderer) GetType() enums.RenderType { + if m != nil { + return m.Type + } + return enums.RenderType_UNKNOWN_RENDER_TYPE +} + +func (m *RenderMetadata_Renderer) GetCount() int32 { + if m != nil { + return m.Count + } + return 0 +} + type DeployMetadata struct { Deployers []*DeployMetadata_Deployer `protobuf:"bytes,1,rep,name=deployers,proto3" json:"deployers,omitempty"` Cluster enums.ClusterType `protobuf:"varint,2,opt,name=cluster,proto3,enum=proto.enums.ClusterType" json:"cluster,omitempty"` @@ -828,7 +943,7 @@ func (m *DeployMetadata) Reset() { *m = DeployMetadata{} } func (m *DeployMetadata) String() string { return proto.CompactTextString(m) } func (*DeployMetadata) ProtoMessage() {} func (*DeployMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{7} + return fileDescriptor_39088757fd9c8e40, []int{8} } func (m *DeployMetadata) XXX_Unmarshal(b []byte) error { @@ -875,7 +990,7 @@ func (m *DeployMetadata_Deployer) Reset() { *m = DeployMetadata_Deployer func (m *DeployMetadata_Deployer) String() string { return proto.CompactTextString(m) } func (*DeployMetadata_Deployer) ProtoMessage() {} func (*DeployMetadata_Deployer) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{7, 0} + return fileDescriptor_39088757fd9c8e40, []int{8, 0} } func (m *DeployMetadata_Deployer) XXX_Unmarshal(b []byte) error { @@ -931,7 +1046,7 @@ func (m *BuildState) Reset() { *m = BuildState{} } func (m *BuildState) String() string { return proto.CompactTextString(m) } func (*BuildState) ProtoMessage() {} func (*BuildState) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{8} + return fileDescriptor_39088757fd9c8e40, []int{9} } func (m *BuildState) XXX_Unmarshal(b []byte) error { @@ -988,7 +1103,7 @@ func (m *TestState) Reset() { *m = TestState{} } func (m *TestState) String() string { return proto.CompactTextString(m) } func (*TestState) ProtoMessage() {} func (*TestState) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{9} + return fileDescriptor_39088757fd9c8e40, []int{10} } func (m *TestState) XXX_Unmarshal(b []byte) error { @@ -1023,6 +1138,56 @@ func (m *TestState) GetStatusCode() enums.StatusCode { return enums.StatusCode_OK } +// `RenderState` describes the current state of the render +type RenderState struct { + // Status of the current render + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // Renderstate status code + StatusCode enums.StatusCode `protobuf:"varint,2,opt,name=statusCode,proto3,enum=proto.enums.StatusCode" json:"statusCode,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenderState) Reset() { *m = RenderState{} } +func (m *RenderState) String() string { return proto.CompactTextString(m) } +func (*RenderState) ProtoMessage() {} +func (*RenderState) Descriptor() ([]byte, []int) { + return fileDescriptor_39088757fd9c8e40, []int{11} +} + +func (m *RenderState) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RenderState.Unmarshal(m, b) +} +func (m *RenderState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RenderState.Marshal(b, m, deterministic) +} +func (m *RenderState) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenderState.Merge(m, src) +} +func (m *RenderState) XXX_Size() int { + return xxx_messageInfo_RenderState.Size(m) +} +func (m *RenderState) XXX_DiscardUnknown() { + xxx_messageInfo_RenderState.DiscardUnknown(m) +} + +var xxx_messageInfo_RenderState proto.InternalMessageInfo + +func (m *RenderState) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *RenderState) GetStatusCode() enums.StatusCode { + if m != nil { + return m.StatusCode + } + return enums.StatusCode_OK +} + // `DeployState` describes the status of the current deploy type DeployState struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` @@ -1037,7 +1202,7 @@ func (m *DeployState) Reset() { *m = DeployState{} } func (m *DeployState) String() string { return proto.CompactTextString(m) } func (*DeployState) ProtoMessage() {} func (*DeployState) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{10} + return fileDescriptor_39088757fd9c8e40, []int{12} } func (m *DeployState) XXX_Unmarshal(b []byte) error { @@ -1100,7 +1265,7 @@ func (m *StatusCheckState) Reset() { *m = StatusCheckState{} } func (m *StatusCheckState) String() string { return proto.CompactTextString(m) } func (*StatusCheckState) ProtoMessage() {} func (*StatusCheckState) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{11} + return fileDescriptor_39088757fd9c8e40, []int{13} } func (m *StatusCheckState) XXX_Unmarshal(b []byte) error { @@ -1155,7 +1320,7 @@ func (m *FileSyncState) Reset() { *m = FileSyncState{} } func (m *FileSyncState) String() string { return proto.CompactTextString(m) } func (*FileSyncState) ProtoMessage() {} func (*FileSyncState) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{12} + return fileDescriptor_39088757fd9c8e40, []int{14} } func (m *FileSyncState) XXX_Unmarshal(b []byte) error { @@ -1207,6 +1372,7 @@ type Event struct { // *Event_DebuggingContainerEvent // *Event_TerminationEvent // *Event_TestEvent + // *Event_RenderEvent EventType isEvent_EventType `protobuf_oneof:"event_type"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1217,7 +1383,7 @@ func (m *Event) Reset() { *m = Event{} } func (m *Event) String() string { return proto.CompactTextString(m) } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{13} + return fileDescriptor_39088757fd9c8e40, []int{15} } func (m *Event) XXX_Unmarshal(b []byte) error { @@ -1297,6 +1463,10 @@ type Event_TestEvent struct { TestEvent *TestSubtaskEvent `protobuf:"bytes,13,opt,name=testEvent,proto3,oneof"` } +type Event_RenderEvent struct { + RenderEvent *RenderSubtaskEvent `protobuf:"bytes,14,opt,name=renderEvent,proto3,oneof"` +} + func (*Event_MetaEvent) isEvent_EventType() {} func (*Event_SkaffoldLogEvent) isEvent_EventType() {} @@ -1321,6 +1491,8 @@ func (*Event_TerminationEvent) isEvent_EventType() {} func (*Event_TestEvent) isEvent_EventType() {} +func (*Event_RenderEvent) isEvent_EventType() {} + func (m *Event) GetEventType() isEvent_EventType { if m != nil { return m.EventType @@ -1412,6 +1584,13 @@ func (m *Event) GetTestEvent() *TestSubtaskEvent { return nil } +func (m *Event) GetRenderEvent() *RenderSubtaskEvent { + if x, ok := m.GetEventType().(*Event_RenderEvent); ok { + return x.RenderEvent + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*Event) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1427,6 +1606,7 @@ func (*Event) XXX_OneofWrappers() []interface{} { (*Event_DebuggingContainerEvent)(nil), (*Event_TerminationEvent)(nil), (*Event_TestEvent)(nil), + (*Event_RenderEvent)(nil), } } @@ -1443,7 +1623,7 @@ func (m *TerminationEvent) Reset() { *m = TerminationEvent{} } func (m *TerminationEvent) String() string { return proto.CompactTextString(m) } func (*TerminationEvent) ProtoMessage() {} func (*TerminationEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{14} + return fileDescriptor_39088757fd9c8e40, []int{16} } func (m *TerminationEvent) XXX_Unmarshal(b []byte) error { @@ -1492,7 +1672,7 @@ func (m *ActionableErr) Reset() { *m = ActionableErr{} } func (m *ActionableErr) String() string { return proto.CompactTextString(m) } func (*ActionableErr) ProtoMessage() {} func (*ActionableErr) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{15} + return fileDescriptor_39088757fd9c8e40, []int{17} } func (m *ActionableErr) XXX_Unmarshal(b []byte) error { @@ -1547,7 +1727,7 @@ func (m *MetaEvent) Reset() { *m = MetaEvent{} } func (m *MetaEvent) String() string { return proto.CompactTextString(m) } func (*MetaEvent) ProtoMessage() {} func (*MetaEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{16} + return fileDescriptor_39088757fd9c8e40, []int{18} } func (m *MetaEvent) XXX_Unmarshal(b []byte) error { @@ -1598,7 +1778,7 @@ func (m *SkaffoldLogEvent) Reset() { *m = SkaffoldLogEvent{} } func (m *SkaffoldLogEvent) String() string { return proto.CompactTextString(m) } func (*SkaffoldLogEvent) ProtoMessage() {} func (*SkaffoldLogEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{17} + return fileDescriptor_39088757fd9c8e40, []int{19} } func (m *SkaffoldLogEvent) XXX_Unmarshal(b []byte) error { @@ -1669,7 +1849,7 @@ func (m *ApplicationLogEvent) Reset() { *m = ApplicationLogEvent{} } func (m *ApplicationLogEvent) String() string { return proto.CompactTextString(m) } func (*ApplicationLogEvent) ProtoMessage() {} func (*ApplicationLogEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{18} + return fileDescriptor_39088757fd9c8e40, []int{20} } func (m *ApplicationLogEvent) XXX_Unmarshal(b []byte) error { @@ -1736,7 +1916,7 @@ func (m *TaskEvent) Reset() { *m = TaskEvent{} } func (m *TaskEvent) String() string { return proto.CompactTextString(m) } func (*TaskEvent) ProtoMessage() {} func (*TaskEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{19} + return fileDescriptor_39088757fd9c8e40, []int{21} } func (m *TaskEvent) XXX_Unmarshal(b []byte) error { @@ -1817,7 +1997,7 @@ func (m *BuildSubtaskEvent) Reset() { *m = BuildSubtaskEvent{} } func (m *BuildSubtaskEvent) String() string { return proto.CompactTextString(m) } func (*BuildSubtaskEvent) ProtoMessage() {} func (*BuildSubtaskEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{20} + return fileDescriptor_39088757fd9c8e40, []int{22} } func (m *BuildSubtaskEvent) XXX_Unmarshal(b []byte) error { @@ -1896,7 +2076,7 @@ func (m *TestSubtaskEvent) Reset() { *m = TestSubtaskEvent{} } func (m *TestSubtaskEvent) String() string { return proto.CompactTextString(m) } func (*TestSubtaskEvent) ProtoMessage() {} func (*TestSubtaskEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{21} + return fileDescriptor_39088757fd9c8e40, []int{23} } func (m *TestSubtaskEvent) XXX_Unmarshal(b []byte) error { @@ -1945,6 +2125,71 @@ func (m *TestSubtaskEvent) GetActionableErr() *ActionableErr { return nil } +// `RenderSubtaskEvent` represents the status of a render, and is emitted by Skaffold +// anytime a render starts or completes, successfully or not. +type RenderSubtaskEvent struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TaskId string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` + ActionableErr *ActionableErr `protobuf:"bytes,4,opt,name=actionableErr,proto3" json:"actionableErr,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenderSubtaskEvent) Reset() { *m = RenderSubtaskEvent{} } +func (m *RenderSubtaskEvent) String() string { return proto.CompactTextString(m) } +func (*RenderSubtaskEvent) ProtoMessage() {} +func (*RenderSubtaskEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_39088757fd9c8e40, []int{24} +} + +func (m *RenderSubtaskEvent) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RenderSubtaskEvent.Unmarshal(m, b) +} +func (m *RenderSubtaskEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RenderSubtaskEvent.Marshal(b, m, deterministic) +} +func (m *RenderSubtaskEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenderSubtaskEvent.Merge(m, src) +} +func (m *RenderSubtaskEvent) XXX_Size() int { + return xxx_messageInfo_RenderSubtaskEvent.Size(m) +} +func (m *RenderSubtaskEvent) XXX_DiscardUnknown() { + xxx_messageInfo_RenderSubtaskEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_RenderSubtaskEvent proto.InternalMessageInfo + +func (m *RenderSubtaskEvent) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RenderSubtaskEvent) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +func (m *RenderSubtaskEvent) GetStatus() string { + if m != nil { + return m.Status + } + return "" +} + +func (m *RenderSubtaskEvent) GetActionableErr() *ActionableErr { + if m != nil { + return m.ActionableErr + } + return nil +} + // `DeploySubtaskEvent` represents the status of a deployment, and is emitted by Skaffold // anytime a deployment starts or completes, successfully or not. type DeploySubtaskEvent struct { @@ -1961,7 +2206,7 @@ func (m *DeploySubtaskEvent) Reset() { *m = DeploySubtaskEvent{} } func (m *DeploySubtaskEvent) String() string { return proto.CompactTextString(m) } func (*DeploySubtaskEvent) ProtoMessage() {} func (*DeploySubtaskEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{22} + return fileDescriptor_39088757fd9c8e40, []int{25} } func (m *DeploySubtaskEvent) XXX_Unmarshal(b []byte) error { @@ -2032,7 +2277,7 @@ func (m *StatusCheckSubtaskEvent) Reset() { *m = StatusCheckSubtaskEvent func (m *StatusCheckSubtaskEvent) String() string { return proto.CompactTextString(m) } func (*StatusCheckSubtaskEvent) ProtoMessage() {} func (*StatusCheckSubtaskEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{23} + return fileDescriptor_39088757fd9c8e40, []int{26} } func (m *StatusCheckSubtaskEvent) XXX_Unmarshal(b []byte) error { @@ -2124,7 +2369,7 @@ func (m *PortForwardEvent) Reset() { *m = PortForwardEvent{} } func (m *PortForwardEvent) String() string { return proto.CompactTextString(m) } func (*PortForwardEvent) ProtoMessage() {} func (*PortForwardEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{24} + return fileDescriptor_39088757fd9c8e40, []int{27} } func (m *PortForwardEvent) XXX_Unmarshal(b []byte) error { @@ -2239,7 +2484,7 @@ func (m *FileSyncEvent) Reset() { *m = FileSyncEvent{} } func (m *FileSyncEvent) String() string { return proto.CompactTextString(m) } func (*FileSyncEvent) ProtoMessage() {} func (*FileSyncEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{25} + return fileDescriptor_39088757fd9c8e40, []int{28} } func (m *FileSyncEvent) XXX_Unmarshal(b []byte) error { @@ -2323,7 +2568,7 @@ func (m *DebuggingContainerEvent) Reset() { *m = DebuggingContainerEvent func (m *DebuggingContainerEvent) String() string { return proto.CompactTextString(m) } func (*DebuggingContainerEvent) ProtoMessage() {} func (*DebuggingContainerEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{26} + return fileDescriptor_39088757fd9c8e40, []int{29} } func (m *DebuggingContainerEvent) XXX_Unmarshal(b []byte) error { @@ -2425,7 +2670,7 @@ func (m *UserIntentRequest) Reset() { *m = UserIntentRequest{} } func (m *UserIntentRequest) String() string { return proto.CompactTextString(m) } func (*UserIntentRequest) ProtoMessage() {} func (*UserIntentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{27} + return fileDescriptor_39088757fd9c8e40, []int{30} } func (m *UserIntentRequest) XXX_Unmarshal(b []byte) error { @@ -2464,7 +2709,7 @@ func (m *TriggerRequest) Reset() { *m = TriggerRequest{} } func (m *TriggerRequest) String() string { return proto.CompactTextString(m) } func (*TriggerRequest) ProtoMessage() {} func (*TriggerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{28} + return fileDescriptor_39088757fd9c8e40, []int{31} } func (m *TriggerRequest) XXX_Unmarshal(b []byte) error { @@ -2506,7 +2751,7 @@ func (m *TriggerState) Reset() { *m = TriggerState{} } func (m *TriggerState) String() string { return proto.CompactTextString(m) } func (*TriggerState) ProtoMessage() {} func (*TriggerState) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{29} + return fileDescriptor_39088757fd9c8e40, []int{32} } func (m *TriggerState) XXX_Unmarshal(b []byte) error { @@ -2572,7 +2817,7 @@ func (m *Intent) Reset() { *m = Intent{} } func (m *Intent) String() string { return proto.CompactTextString(m) } func (*Intent) ProtoMessage() {} func (*Intent) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{30} + return fileDescriptor_39088757fd9c8e40, []int{33} } func (m *Intent) XXX_Unmarshal(b []byte) error { @@ -2627,7 +2872,7 @@ func (m *Suggestion) Reset() { *m = Suggestion{} } func (m *Suggestion) String() string { return proto.CompactTextString(m) } func (*Suggestion) ProtoMessage() {} func (*Suggestion) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{31} + return fileDescriptor_39088757fd9c8e40, []int{34} } func (m *Suggestion) XXX_Unmarshal(b []byte) error { @@ -2676,7 +2921,7 @@ func (m *IntOrString) Reset() { *m = IntOrString{} } func (m *IntOrString) String() string { return proto.CompactTextString(m) } func (*IntOrString) ProtoMessage() {} func (*IntOrString) Descriptor() ([]byte, []int) { - return fileDescriptor_39088757fd9c8e40, []int{32} + return fileDescriptor_39088757fd9c8e40, []int{35} } func (m *IntOrString) XXX_Unmarshal(b []byte) error { @@ -2731,11 +2976,14 @@ func init() { proto.RegisterType((*BuildMetadata_Artifact)(nil), "proto.v2.BuildMetadata.Artifact") proto.RegisterType((*TestMetadata)(nil), "proto.v2.TestMetadata") proto.RegisterType((*TestMetadata_Tester)(nil), "proto.v2.TestMetadata.Tester") + proto.RegisterType((*RenderMetadata)(nil), "proto.v2.RenderMetadata") + proto.RegisterType((*RenderMetadata_Renderer)(nil), "proto.v2.RenderMetadata.Renderer") proto.RegisterType((*DeployMetadata)(nil), "proto.v2.DeployMetadata") proto.RegisterType((*DeployMetadata_Deployer)(nil), "proto.v2.DeployMetadata.Deployer") proto.RegisterType((*BuildState)(nil), "proto.v2.BuildState") proto.RegisterMapType((map[string]string)(nil), "proto.v2.BuildState.ArtifactsEntry") proto.RegisterType((*TestState)(nil), "proto.v2.TestState") + proto.RegisterType((*RenderState)(nil), "proto.v2.RenderState") proto.RegisterType((*DeployState)(nil), "proto.v2.DeployState") proto.RegisterType((*StatusCheckState)(nil), "proto.v2.StatusCheckState") proto.RegisterMapType((map[string]string)(nil), "proto.v2.StatusCheckState.ResourcesEntry") @@ -2749,6 +2997,7 @@ func init() { proto.RegisterType((*TaskEvent)(nil), "proto.v2.TaskEvent") proto.RegisterType((*BuildSubtaskEvent)(nil), "proto.v2.BuildSubtaskEvent") proto.RegisterType((*TestSubtaskEvent)(nil), "proto.v2.TestSubtaskEvent") + proto.RegisterType((*RenderSubtaskEvent)(nil), "proto.v2.RenderSubtaskEvent") proto.RegisterType((*DeploySubtaskEvent)(nil), "proto.v2.DeploySubtaskEvent") proto.RegisterType((*StatusCheckSubtaskEvent)(nil), "proto.v2.StatusCheckSubtaskEvent") proto.RegisterType((*PortForwardEvent)(nil), "proto.v2.PortForwardEvent") @@ -2766,148 +3015,154 @@ func init() { func init() { proto.RegisterFile("v2/skaffold.proto", fileDescriptor_39088757fd9c8e40) } var fileDescriptor_39088757fd9c8e40 = []byte{ - // 2252 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0x5b, 0x6f, 0x1b, 0xc7, - 0x15, 0x16, 0x49, 0xf1, 0xb2, 0x87, 0xa2, 0x2c, 0x8d,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0x56, 0xf3, 0x10, 0x1a, 0x06, 0x43, 0x78, - 0xf9, 0x80, 0xdb, 0xdf, 0x55, 0xa1, 0xcc, 0x8f, 0x52, 0xf4, 0x31, 0x58, 0x09, 0xb7, 0x94, 0xc7, - 0x66, 0xab, 0x2d, 0xc8, 0x65, 0x5b, 0x91, 0xcb, 0xf6, 0xb1, 0x42, 0xe0, 0x14, 0x8c, 0xee, 0x82, - 0xc5, 0x78, 0x01, 0x57, 0x23, 0x0f, 0xd0, 0x25, 0xf3, 0x20, 0xe3, 0x43, 0x07, 0x33, 0x38, 0xc5, - 0xa1, 0x03, 0x58, 0x50, 0x94, 0xf8, 0x51, 0xd8, 0x13, 0xb2, 0xa5, 0x1c, 0x99, 0xca, 0x20, 0x0e, - 0x66, 0x70, 0x4e, 0x0a, 0x3d, 0x85, 0x25, 0x67, 0x38, 0xec, 0xfb, 0x2e, 0x27, 0xce, 0x89, 0x32, - 0xc1, 0xcc, 0xb4, 0x8a, 0xb9, 0x95, 0x07, 0x1d, 0xcc, 0xe0, 0x49, 0xb2, 0x6c, 0x46, 0xd4, 0x89, - 0xcf, 0x84, 0xa2, 0x72, 0x8e, 0xdd, 0xa8, 0x21, 0x36, 0xa3, 0x04, 0x87, 0x1e, 0xc2, 0xa2, 0xa0, - 0xac, 0xa3, 0x93, 0x54, 0xb8, 0xc2, 0x85, 0xaf, 0x67, 0xeb, 0x88, 0x06, 0x39, 0x98, 0xc1, 0x79, - 0x39, 0xf4, 0x18, 0x90, 0xe4, 0xb1, 0xba, 0x36, 0xc1, 0xcc, 0xd6, 0x72, 0xc4, 0xd7, 0x54, 0x37, - 0x41, 0x12, 0xdd, 0x07, 0x6b, 0x18, 0x46, 0x54, 0xa8, 0xa9, 0x5d, 0xc4, 0xab, 0xd8, 0xc4, 0x12, - 0x38, 0xfa, 0x0a, 0x56, 0x75, 0x0e, 0xab, 0x3b, 0x64, 0x71, 0x4d, 0xb7, 0x26, 0x6f, 0x1e, 0xd3, - 0xab, 0x69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 0xb9, 0x86, 0xa4, 0xe0, 0x1e, 0x87, 0x61, 0x3f, 0x4e, - 0x32, 0x42, 0xfc, 0x7a, 0xda, 0x39, 0xef, 0x7e, 0x5e, 0x3a, 0xa9, 0xf0, 0xef, 0xbb, 0xff, 0x0b, - 0x00, 0x00, 0xff, 0xff, 0xdd, 0xc7, 0xd9, 0xd9, 0xb5, 0x1d, 0x00, 0x00, + // 2349 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x6f, 0x1b, 0xc9, + 0xf1, 0xf7, 0x90, 0x1a, 0x92, 0x53, 0x14, 0x69, 0xa9, 0x65, 0x5b, 0xfc, 0xd3, 0xb2, 0xd7, 0x9e, + 0xdd, 0xfd, 0xc7, 0xfb, 0x22, 0x6d, 0x3a, 0x59, 0x2f, 0x8c, 0x78, 0x37, 0xf2, 0x53, 0x8a, 0x5f, + 0xeb, 0x96, 0x76, 0x81, 0x3c, 0x36, 0xc6, 0x68, 0xa6, 0x45, 0x0f, 0x44, 0xce, 0x30, 0x33, 0x4d, + 0xed, 0xf2, 0x16, 0xe4, 0x10, 0xe4, 0x90, 0x53, 0xb2, 0xa7, 0x9c, 0x16, 0xc8, 0x29, 0xf7, 0x7c, + 0x83, 0x00, 0xf9, 0x02, 0x01, 0xf2, 0x01, 0x82, 0x1c, 0x82, 0x20, 0xe7, 0x9c, 0x83, 0x7e, 0xcd, + 0x74, 0xcf, 0x90, 0x96, 0x65, 0xc7, 0x48, 0x2e, 0xd2, 0x74, 0xf7, 0xaf, 0xaa, 0xab, 0xab, 0x7f, + 0x5d, 0x5d, 0xd5, 0x84, 0xd5, 0xc3, 0x41, 0x3f, 0x3d, 0xf0, 0xf6, 0xf7, 0xe3, 0x51, 0xd0, 0x9b, + 0x24, 0x31, 0x8d, 0x51, 0x83, 0xff, 0xeb, 0x1d, 0x0e, 0xba, 0x1b, 0xc3, 0x38, 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xb0, 0xca, 0xde, 0x5d, 0x03, 0x75, 0x27, 0xa2, 0xc9, 0x0c, 0x17, 0x44, + 0xd1, 0x5d, 0x58, 0x61, 0xbe, 0x98, 0xa6, 0xb7, 0x9e, 0x11, 0xff, 0x40, 0x98, 0xb2, 0xc4, 0x4d, + 0xe9, 0x9a, 0xea, 0x74, 0x04, 0x2e, 0xc9, 0xa0, 0x1b, 0xd0, 0xda, 0x0f, 0x47, 0x64, 0x67, 0x16, + 0xf9, 0x42, 0x89, 0xcd, 0x95, 0xac, 0xe7, 0x4a, 0xee, 0xea, 0xc3, 0xd8, 0x44, 0xa3, 0x1d, 0x58, + 0x0b, 0xc8, 0xde, 0x74, 0x38, 0x0c, 0xa3, 0xe1, 0xad, 0x38, 0xa2, 0x5e, 0x18, 0x91, 0x24, 0xed, + 0xd4, 0xf8, 0xc2, 0x2e, 0xea, 0x4e, 0x29, 0x82, 0xee, 0x1c, 0x92, 0x88, 0xe2, 0x79, 0xd2, 0xa8, + 0x07, 0x8d, 0x31, 0xa1, 0x5e, 0xe0, 0x51, 0xaf, 0x53, 0xe7, 0xe6, 0xa0, 0x5c, 0xd3, 0x43, 0x39, + 0x82, 0x33, 0x0c, 0xba, 0x02, 0x0e, 0x25, 0x29, 0x15, 0xf6, 0x37, 0xb8, 0xc0, 0x5a, 0x2e, 0xb0, + 0xab, 0x86, 0x70, 0x8e, 0x62, 0x9b, 0x98, 0x90, 0x28, 0x20, 0x89, 0x10, 0x72, 0x8a, 0x9b, 0x88, + 0xf3, 0x41, 0xac, 0x23, 0xbb, 0x5f, 0xc0, 0xda, 0x9c, 0xed, 0x61, 0x2c, 0x3c, 0x20, 0x33, 0xce, + 0x21, 0x1b, 0xb3, 0x4f, 0x74, 0x19, 0xec, 0x43, 0x6f, 0x34, 0x55, 0x04, 0xd1, 0x76, 0x85, 0x89, + 0x49, 0x1d, 0xc2, 0x09, 0x02, 0x78, 0xbd, 0xf2, 0x91, 0xe5, 0xfe, 0xb5, 0x02, 0x0d, 0xb5, 0x42, + 0xf4, 0x01, 0xd8, 0x9c, 0x77, 0x92, 0x9a, 0xeb, 0x05, 0x6a, 0x66, 0x9e, 0x10, 0x28, 0x74, 0x19, + 0x6a, 0x82, 0x6e, 0x72, 0xca, 0x4e, 0x91, 0x93, 0x99, 0x80, 0xc4, 0xa1, 0x77, 0x61, 0x89, 0xb9, + 0xa4, 0x53, 0xe5, 0xf8, 0x33, 0xa6, 0xcf, 0x32, 0x34, 0xc7, 0xa0, 0x53, 0x60, 0x27, 0xd3, 0x68, + 0xfb, 0x36, 0x67, 0x99, 0x83, 0x45, 0x83, 0xcd, 0x29, 0xbc, 0x23, 0x79, 0xd3, 0x29, 0xba, 0x30, + 0x9f, 0x53, 0xe0, 0xd0, 0x4d, 0x00, 0x2f, 0x08, 0x42, 0x16, 0x57, 0xbc, 0x51, 0xc7, 0xe7, 0x44, + 0x71, 0xcb, 0xdb, 0xdb, 0xdb, 0xcc, 0x40, 0xe2, 0x00, 0x68, 0x52, 0xdd, 0x1b, 0x70, 0xb2, 0x30, + 0xac, 0x6f, 0x80, 0x23, 0x36, 0xe0, 0x94, 0xbe, 0x01, 0x8e, 0xee, 0xe4, 0x5f, 0x55, 0xa1, 0x65, + 0x78, 0x10, 0x7d, 0x0c, 0x8e, 0x97, 0xd0, 0x70, 0xdf, 0xf3, 0x69, 0xda, 0xb1, 0xb8, 0x4d, 0x17, + 0x16, 0x78, 0xbb, 0xb7, 0x29, 0x81, 0x38, 0x17, 0xe1, 0x8e, 0x9c, 0x4d, 0xc4, 0x54, 0xed, 0xcc, + 0x91, 0x22, 0xd4, 0x71, 0xe9, 0xdd, 0xd9, 0x84, 0x60, 0x8e, 0x41, 0xf7, 0xe6, 0x38, 0xe0, 0x5b, + 0x0b, 0x27, 0x7b, 0x8e, 0x17, 0x7e, 0x61, 0x41, 0x43, 0x19, 0x83, 0xde, 0x97, 0x16, 0x58, 0xdc, + 0x82, 0x4e, 0xd9, 0x02, 0x92, 0x68, 0x36, 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, 0xf7, 0xd5, 0x7f, + 0x07, 0x00, 0x00, 0xff, 0xff, 0x90, 0x22, 0x13, 0xf6, 0xfc, 0x1f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/v2/skaffold.proto b/proto/v2/skaffold.proto index 51f8905d859..7e09a168c9b 100644 --- a/proto/v2/skaffold.proto +++ b/proto/v2/skaffold.proto @@ -31,6 +31,7 @@ message State { repeated DebuggingContainerEvent debuggingContainers = 6; Metadata metadata = 7; TestState testState = 8; + RenderState renderState = 9; } message Metadata { @@ -38,6 +39,7 @@ message Metadata { DeployMetadata deploy = 2; TestMetadata test = 3; string runID = 4; + RenderMetadata render = 5; // Additional key value pairs to describe the build pipeline map additional = 99; } @@ -64,6 +66,16 @@ message TestMetadata { repeated Tester Testers = 1; } + +// RenderMetadata describes the render pipeline +message RenderMetadata { + message Renderer { + enums.RenderType type = 1; + int32 count = 2; + } + repeated Renderer Renderers = 1; +} + message DeployMetadata { message Deployer { enums.DeployerType type = 1; @@ -95,6 +107,14 @@ message TestState { enums.StatusCode statusCode = 2; } +// `RenderState` describes the current state of the render +message RenderState { + // Status of the current render + string status = 1; + // Renderstate status code + enums.StatusCode statusCode = 2; +} + // `DeployState` describes the status of the current deploy message DeployState { string status = 1; @@ -140,6 +160,7 @@ message Event { DebuggingContainerEvent debuggingContainerEvent = 11; // describes the appearance or disappearance of a debugging container TerminationEvent terminationEvent = 12; // describes a skaffold termination event TestSubtaskEvent testEvent = 13; // describes if the test has started, is in progress or is complete. + RenderSubtaskEvent renderEvent = 14; // describes if the render has started, is in progress or is complete. } } @@ -210,6 +231,15 @@ message TestSubtaskEvent { ActionableErr actionableErr = 4; // actionable error message } +// `RenderSubtaskEvent` represents the status of a render, and is emitted by Skaffold +// anytime a render starts or completes, successfully or not. +message RenderSubtaskEvent { + string id = 1; // id of the subtask which will be used in SkaffoldLog + string task_id = 2; // id of the task of skaffold that this event came from + string status = 3; // render status oneof: InProgress, Completed, Failed + ActionableErr actionableErr = 4; // actionable error message +} + // `DeploySubtaskEvent` represents the status of a deployment, and is emitted by Skaffold // anytime a deployment starts or completes, successfully or not. message DeploySubtaskEvent { From 64bd534cdc73f202ce828786c6d1bcb72504df79 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Thu, 8 Jul 2021 16:26:27 -0700 Subject: [PATCH 058/103] simplify buildsubtask id handling (#6167) --- pkg/skaffold/build/scheduler.go | 2 +- pkg/skaffold/event/v2/build.go | 20 +------------------- pkg/skaffold/runner/build.go | 1 - 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/pkg/skaffold/build/scheduler.go b/pkg/skaffold/build/scheduler.go index 1e5fbfa9a28..ab1234789a5 100644 --- a/pkg/skaffold/build/scheduler.go +++ b/pkg/skaffold/build/scheduler.go @@ -108,7 +108,7 @@ func (s *scheduler) build(ctx context.Context, tags tag.ImageTags, i int) error } defer closeFn() - w = output.WithEventContext(w, constants.Build, strconv.Itoa(eventV2.GetArtifactID(a)), "skaffold") + w = output.WithEventContext(w, constants.Build, a.ImageName, "skaffold") finalTag, err := performBuild(ctx, w, tags, a, s.artifactBuilder) if err != nil { event.BuildFailed(a.ImageName, err) diff --git a/pkg/skaffold/event/v2/build.go b/pkg/skaffold/event/v2/build.go index dda12cc4fc4..65451d67564 100644 --- a/pkg/skaffold/event/v2/build.go +++ b/pkg/skaffold/event/v2/build.go @@ -18,11 +18,9 @@ package v2 import ( "fmt" - "strconv" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" proto "github.com/GoogleContainerTools/skaffold/proto/v2" ) @@ -31,22 +29,6 @@ const ( Build = "Build" ) -var artifactIDs = map[string]int{} - -func AssignArtifactIDs(artifacts []*latestV1.Artifact) { - for i, a := range artifacts { - artifactIDs[a.ImageName] = i - } -} - -func GetArtifactID(a *latestV1.Artifact) int { - if id, ok := artifactIDs[a.ImageName]; ok { - return id - } - - return -1 -} - func CacheCheckInProgress(artifact string) { buildSubtaskEvent(artifact, Cache, InProgress, nil) } @@ -77,7 +59,7 @@ func buildSubtaskEvent(artifact, step, status string, err error) { aErr = sErrors.ActionableErrV2(handler.cfg, constants.Build, err) } handler.handleBuildSubtaskEvent(&proto.BuildSubtaskEvent{ - Id: strconv.Itoa(artifactIDs[artifact]), + Id: artifact, TaskId: fmt.Sprintf("%s-%d", constants.Build, handler.iteration), Artifact: artifact, Step: step, diff --git a/pkg/skaffold/runner/build.go b/pkg/skaffold/runner/build.go index f912c1442b2..65e12f2c257 100644 --- a/pkg/skaffold/runner/build.go +++ b/pkg/skaffold/runner/build.go @@ -65,7 +65,6 @@ func (r *Builder) GetBuilds() []graph.Artifact { // Build builds a list of artifacts. func (r *Builder) Build(ctx context.Context, out io.Writer, artifacts []*latestV1.Artifact) ([]graph.Artifact, error) { eventV2.TaskInProgress(constants.Build, "Build containers") - eventV2.AssignArtifactIDs(artifacts) out = output.WithEventContext(out, constants.Build, eventV2.SubtaskIDNone, "skaffold") // Use tags directly from the Kubernetes manifests. From be4b609d3ab5ce67147c25288ddc188bf209519a Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Thu, 8 Jul 2021 19:50:45 -0400 Subject: [PATCH 059/103] Update Jib docs with some advanced usage examples (#6169) - use of jib.args for additional command-line arguments - use of custom builder for full control --- .../en/docs/pipeline-stages/builders/jib.md | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/content/en/docs/pipeline-stages/builders/jib.md b/docs/content/en/docs/pipeline-stages/builders/jib.md index ea5921ed4d3..8144f5804bb 100644 --- a/docs/content/en/docs/pipeline-stages/builders/jib.md +++ b/docs/content/en/docs/pipeline-stages/builders/jib.md @@ -105,4 +105,30 @@ The following options can optionally be configured: Following configuration instructs skaffold to build `gcr.io/k8s-skaffold/project1` with Google Cloud Build using Jib builder: -{{% readfile file="samples/builders/gcb-jib.yaml" %}} \ No newline at end of file +{{% readfile file="samples/builders/gcb-jib.yaml" %}} + +## Advanced usage + +### Additional arguments + +The `jib` build artifact supports an [`args`](https://skaffold.dev/docs/references/yaml/#build-artifacts-jib-args) field to provide additional arguments to the Maven or Gradle command-line. For example, a Gradle user may choose to use: +``` +artifacts: +- image: jib-gradle-image + jib: + args: [--no-daemon] +``` + +### Using the `custom` builder + +Some users may have more complicated builds that may be better suited to using the [`custom` builder](https://skaffold.dev/docs/pipeline-stages/builders/custom/). For example, the `jib` builder normally invokes the `prepare-package` goal rather than `package` as Jib packages the `.class` files rather than package in the jar. But some plugins require the `package` goal. +``` +artifacts: +- image: jib-gradle-image + custom: + buildCommand: mvn -Dimage=$IMAGE package $(if [ $PUSH_IMAGE = true ]; then echo jib:build; else echo jib:dockerBuild; fi) + dependencies: + paths: + - src/** +``` + From 24d332cf35398c503276af6384faed18b4fbf6c8 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Thu, 8 Jul 2021 21:38:54 -0700 Subject: [PATCH 060/103] [v2 refactoring proposal] Decouple the runner creation from v1 schema (#6068) * [v2] Decouple the runner creation from v1 schema but using schema interface util.VersionedConfig. * fix conflict. * remove todo * fix linter Co-authored-by: tejal29 --- cmd/skaffold/app/cmd/apply.go | 4 +- cmd/skaffold/app/cmd/build.go | 7 +- cmd/skaffold/app/cmd/build_test.go | 21 ++- cmd/skaffold/app/cmd/debug_test.go | 5 +- cmd/skaffold/app/cmd/delete.go | 4 +- cmd/skaffold/app/cmd/deploy.go | 5 +- cmd/skaffold/app/cmd/dev.go | 7 +- cmd/skaffold/app/cmd/dev_test.go | 9 +- cmd/skaffold/app/cmd/diagnose.go | 8 +- cmd/skaffold/app/cmd/diagnose_test.go | 11 +- cmd/skaffold/app/cmd/filter.go | 7 +- cmd/skaffold/app/cmd/generate_pipeline.go | 4 +- cmd/skaffold/app/cmd/render.go | 4 +- cmd/skaffold/app/cmd/run.go | 4 +- cmd/skaffold/app/cmd/run_test.go | 23 ++- cmd/skaffold/app/cmd/runner.go | 16 +- cmd/skaffold/app/cmd/test.go | 5 +- pkg/skaffold/parser/config.go | 5 +- pkg/skaffold/parser/config_test.go | 191 +++++++++++--------- pkg/skaffold/runner/runcontext/context.go | 5 +- pkg/skaffold/runner/runner.go | 3 +- pkg/skaffold/runner/v1/generate_pipeline.go | 5 +- pkg/skaffold/runner/v2/generate_pipeline.go | 4 +- 23 files changed, 201 insertions(+), 156 deletions(-) diff --git a/cmd/skaffold/app/cmd/apply.go b/cmd/skaffold/app/cmd/apply.go index a961ef94b8d..c8111ba516e 100644 --- a/cmd/skaffold/app/cmd/apply.go +++ b/cmd/skaffold/app/cmd/apply.go @@ -27,7 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) // NewCmdApply describes the CLI command to apply manifests to a cluster. @@ -53,7 +53,7 @@ func doApply(ctx context.Context, out io.Writer, args []string) error { if err := validateManifests(args); err != nil { return err } - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { return r.Apply(ctx, out) }) } diff --git a/cmd/skaffold/app/cmd/build.go b/cmd/skaffold/app/cmd/build.go index b35f94eea11..435fca9810e 100644 --- a/cmd/skaffold/app/cmd/build.go +++ b/cmd/skaffold/app/cmd/build.go @@ -29,6 +29,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) var ( @@ -67,7 +68,7 @@ func doBuild(ctx context.Context, out io.Writer) error { buildOut = ioutil.Discard } - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { bRes, err := r.Build(ctx, buildOut, targetArtifacts(opts, configs)) if quietFlag || buildOutputFlag != "" { @@ -94,10 +95,10 @@ func doBuild(ctx context.Context, out io.Writer) error { }) } -func targetArtifacts(opts config.SkaffoldOptions, configs []*latestV1.SkaffoldConfig) []*latestV1.Artifact { +func targetArtifacts(opts config.SkaffoldOptions, configs []util.VersionedConfig) []*latestV1.Artifact { var targetArtifacts []*latestV1.Artifact for _, cfg := range configs { - for _, artifact := range cfg.Build.Artifacts { + for _, artifact := range cfg.(*latestV1.SkaffoldConfig).Build.Artifacts { if opts.IsTargetImage(artifact) { targetArtifacts = append(targetArtifacts, artifact) } diff --git a/cmd/skaffold/app/cmd/build_test.go b/cmd/skaffold/app/cmd/build_test.go index 39e0f46ba65..406b61d46cc 100644 --- a/cmd/skaffold/app/cmd/build_test.go +++ b/cmd/skaffold/app/cmd/build_test.go @@ -30,6 +30,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -50,8 +51,8 @@ func (r *mockRunner) Stop() error { } func TestTagFlag(t *testing.T) { - mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return &mockRunner{}, []*latestV1.SkaffoldConfig{{}}, nil, nil + mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return &mockRunner{}, []util.VersionedConfig{&latestV1.SkaffoldConfig{}}, nil, nil } testutil.Run(t, "override tag with argument", func(t *testutil.T) { @@ -69,8 +70,8 @@ func TestTagFlag(t *testing.T) { } func TestQuietFlag(t *testing.T) { - mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return &mockRunner{}, []*latestV1.SkaffoldConfig{{}}, nil, nil + mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return &mockRunner{}, []util.VersionedConfig{&latestV1.SkaffoldConfig{}}, nil, nil } tests := []struct { @@ -115,8 +116,8 @@ func TestQuietFlag(t *testing.T) { } func TestFileOutputFlag(t *testing.T) { - mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return &mockRunner{}, []*latestV1.SkaffoldConfig{{}}, nil, nil + mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return &mockRunner{}, []util.VersionedConfig{&latestV1.SkaffoldConfig{}}, nil, nil } tests := []struct { @@ -178,16 +179,16 @@ func TestFileOutputFlag(t *testing.T) { } func TestRunBuild(t *testing.T) { - errRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { + errRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { return nil, nil, nil, errors.New("some error") } - mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return &mockRunner{}, []*latestV1.SkaffoldConfig{{}}, nil, nil + mockCreateRunner := func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return &mockRunner{}, []util.VersionedConfig{&latestV1.SkaffoldConfig{}}, nil, nil } tests := []struct { description string - mock func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) + mock func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) shouldErr bool }{ { diff --git a/cmd/skaffold/app/cmd/debug_test.go b/cmd/skaffold/app/cmd/debug_test.go index 801eb0e3950..b030714284f 100644 --- a/cmd/skaffold/app/cmd/debug_test.go +++ b/cmd/skaffold/app/cmd/debug_test.go @@ -25,6 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -49,8 +50,8 @@ func TestNewCmdDebug(t *testing.T) { func TestDebugIndependentFromDev(t *testing.T) { mockRunner := &mockDevRunner{} testutil.Run(t, "DevDebug", func(t *testutil.T) { - t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return mockRunner, []*latestV1.SkaffoldConfig{{}}, nil, nil + t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return mockRunner, []util.VersionedConfig{&latestV1.SkaffoldConfig{}}, nil, nil }) t.Override(&opts, config.SkaffoldOptions{}) t.Override(&doDev, func(context.Context, io.Writer) error { diff --git a/cmd/skaffold/app/cmd/delete.go b/cmd/skaffold/app/cmd/delete.go index ef763af46fc..6c0f5e2f836 100644 --- a/cmd/skaffold/app/cmd/delete.go +++ b/cmd/skaffold/app/cmd/delete.go @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) // NewCmdDelete describes the CLI command to delete deployed resources. @@ -35,7 +35,7 @@ func NewCmdDelete() *cobra.Command { } func doDelete(ctx context.Context, out io.Writer) error { - return withRunner(ctx, out, func(r runner.Runner, _ []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, _ []util.VersionedConfig) error { return r.Cleanup(ctx, out) }) } diff --git a/cmd/skaffold/app/cmd/deploy.go b/cmd/skaffold/app/cmd/deploy.go index 60375a06002..eb9a34153e3 100644 --- a/cmd/skaffold/app/cmd/deploy.go +++ b/cmd/skaffold/app/cmd/deploy.go @@ -27,6 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) var ( @@ -51,13 +52,13 @@ func NewCmdDeploy() *cobra.Command { } func doDeploy(ctx context.Context, out io.Writer) error { - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { if opts.SkipRender { return r.DeployAndLog(ctx, out, []graph.Artifact{}) } var artifacts []*latestV1.Artifact for _, cfg := range configs { - artifacts = append(artifacts, cfg.Build.Artifacts...) + artifacts = append(artifacts, cfg.(*latestV1.SkaffoldConfig).Build.Artifacts...) } buildArtifacts, err := getBuildArtifactsAndSetTags(artifacts, r.ApplyDefaultRepo) if err != nil { diff --git a/cmd/skaffold/app/cmd/dev.go b/cmd/skaffold/app/cmd/dev.go index bc6f1e56ad9..34111c3b1ec 100644 --- a/cmd/skaffold/app/cmd/dev.go +++ b/cmd/skaffold/app/cmd/dev.go @@ -26,6 +26,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) // for testing @@ -60,10 +61,12 @@ func runDev(ctx context.Context, out io.Writer) error { case <-ctx.Done(): return nil default: - err := withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + // Note: The latestV1.SkaffoldConfig is used for both latestV1 schema and latestV2 schema because + // the latestV1 and latestV2 use the same Build struct. Ideally they should be separated. + err := withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { var artifacts []*latestV1.Artifact for _, cfg := range configs { - artifacts = append(artifacts, cfg.Build.Artifacts...) + artifacts = append(artifacts, cfg.(*latestV1.SkaffoldConfig).Build.Artifacts...) } err := r.Dev(ctx, out, artifacts) diff --git a/cmd/skaffold/app/cmd/dev_test.go b/cmd/skaffold/app/cmd/dev_test.go index 6a2e3a50a63..d542ffed01e 100644 --- a/cmd/skaffold/app/cmd/dev_test.go +++ b/cmd/skaffold/app/cmd/dev_test.go @@ -26,6 +26,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -96,8 +97,8 @@ func TestDoDev(t *testing.T) { hasDeployed: test.hasDeployed, errDev: context.Canceled, } - t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return mockRunner, []*latestV1.SkaffoldConfig{{}}, nil, nil + t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return mockRunner, []util.VersionedConfig{&latestV1.SkaffoldConfig{}}, nil, nil }) t.Override(&opts, config.SkaffoldOptions{ Cleanup: true, @@ -146,8 +147,8 @@ func TestDevConfigChange(t *testing.T) { testutil.Run(t, "test config change", func(t *testutil.T) { mockRunner := &mockConfigChangeRunner{} - t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return mockRunner, []*latestV1.SkaffoldConfig{{}}, nil, nil + t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return mockRunner, []util.VersionedConfig{&latestV1.SkaffoldConfig{}}, nil, nil }) t.Override(&opts, config.SkaffoldOptions{ Cleanup: true, diff --git a/cmd/skaffold/app/cmd/diagnose.go b/cmd/skaffold/app/cmd/diagnose.go index 10f674dc967..695f30d95bf 100644 --- a/cmd/skaffold/app/cmd/diagnose.go +++ b/cmd/skaffold/app/cmd/diagnose.go @@ -28,6 +28,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/parser" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + schemaUtil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/version" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" @@ -66,7 +67,7 @@ func doDiagnose(ctx context.Context, out io.Writer) error { } // remove the dependency config references since they have already been imported and will be marshalled together. for i := range configs { - configs[i].Dependencies = nil + configs[i].(*latestV1.SkaffoldConfig).Dependencies = nil } buf, err := yaml.MarshalWithSeparator(configs) if err != nil { @@ -77,12 +78,13 @@ func doDiagnose(ctx context.Context, out io.Writer) error { return nil } -func printArtifactDiagnostics(ctx context.Context, out io.Writer, configs []*latestV1.SkaffoldConfig) error { +func printArtifactDiagnostics(ctx context.Context, out io.Writer, configs []schemaUtil.VersionedConfig) error { runCtx, err := getRunContext(opts, configs) if err != nil { return fmt.Errorf("getting run context: %w", err) } - for _, config := range configs { + for _, c := range configs { + config := c.(*latestV1.SkaffoldConfig) fmt.Fprintln(out, "Skaffold version:", version.Get().GitCommit) fmt.Fprintln(out, "Configuration version:", config.APIVersion) fmt.Fprintln(out, "Number of artifacts:", len(config.Build.Artifacts)) diff --git a/cmd/skaffold/app/cmd/diagnose_test.go b/cmd/skaffold/app/cmd/diagnose_test.go index cdb31e651f2..fe07d92d93f 100644 --- a/cmd/skaffold/app/cmd/diagnose_test.go +++ b/cmd/skaffold/app/cmd/diagnose_test.go @@ -25,6 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -57,20 +58,20 @@ metadata: for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - t.Override(&getRunContext, func(config.SkaffoldOptions, []*latestV1.SkaffoldConfig) (*runcontext.RunContext, error) { + t.Override(&getRunContext, func(config.SkaffoldOptions, []util.VersionedConfig) (*runcontext.RunContext, error) { return nil, fmt.Errorf("cannot get the runtime context") }) t.Override(&yamlOnly, test.yamlOnly) - t.Override(&getCfgs, func(opts config.SkaffoldOptions) ([]*latestV1.SkaffoldConfig, error) { - return []*latestV1.SkaffoldConfig{ - { + t.Override(&getCfgs, func(opts config.SkaffoldOptions) ([]util.VersionedConfig, error) { + return []util.VersionedConfig{ + &latestV1.SkaffoldConfig{ APIVersion: "testVersion", Kind: "Config", Metadata: latestV1.Metadata{ Name: "config1", }, }, - { + &latestV1.SkaffoldConfig{ APIVersion: "testVersion", Kind: "Config", Metadata: latestV1.Metadata{ diff --git a/cmd/skaffold/app/cmd/filter.go b/cmd/skaffold/app/cmd/filter.go index d056de18ea1..b8231e6e14b 100644 --- a/cmd/skaffold/app/cmd/filter.go +++ b/cmd/skaffold/app/cmd/filter.go @@ -31,6 +31,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) // for tests @@ -58,7 +59,7 @@ func NewCmdFilter() *cobra.Command { // runFilter loads the Kubernetes manifests from stdin and applies the debug transformations. // Unlike `skaffold debug`, this filtering affects all images and not just the built artifacts. func runFilter(ctx context.Context, out io.Writer, debuggingFilters bool, buildArtifacts []graph.Artifact) error { - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { manifestList, err := manifest.Load(os.Stdin) if err != nil { return fmt.Errorf("loading manifests: %w", err) @@ -87,7 +88,7 @@ func runFilter(ctx context.Context, out io.Writer, debuggingFilters bool, buildA }) } -func getInsecureRegistries(opts config.SkaffoldOptions, configs []*latestV1.SkaffoldConfig) (map[string]bool, error) { +func getInsecureRegistries(opts config.SkaffoldOptions, configs []util.VersionedConfig) (map[string]bool, error) { cfgRegistries, err := config.GetInsecureRegistries(opts.GlobalConfig) if err != nil { return nil, err @@ -96,7 +97,7 @@ func getInsecureRegistries(opts config.SkaffoldOptions, configs []*latestV1.Skaf regList = append(regList, opts.InsecureRegistries...) for _, cfg := range configs { - regList = append(regList, cfg.Build.InsecureRegistries...) + regList = append(regList, cfg.(*latestV1.SkaffoldConfig).Build.InsecureRegistries...) } regList = append(regList, cfgRegistries...) insecureRegistries := make(map[string]bool, len(regList)) diff --git a/cmd/skaffold/app/cmd/generate_pipeline.go b/cmd/skaffold/app/cmd/generate_pipeline.go index c6dd86cf24d..369b69093db 100644 --- a/cmd/skaffold/app/cmd/generate_pipeline.go +++ b/cmd/skaffold/app/cmd/generate_pipeline.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) var ( @@ -44,7 +44,7 @@ func NewCmdGeneratePipeline() *cobra.Command { } func doGeneratePipeline(ctx context.Context, out io.Writer) error { - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { if err := r.GeneratePipeline(ctx, out, configs, configFiles, "pipeline.yaml"); err != nil { return fmt.Errorf("generating : %w", err) } diff --git a/cmd/skaffold/app/cmd/render.go b/cmd/skaffold/app/cmd/render.go index 66e12a92ffd..633cda6bec6 100644 --- a/cmd/skaffold/app/cmd/render.go +++ b/cmd/skaffold/app/cmd/render.go @@ -27,7 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/flags" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) var ( @@ -60,7 +60,7 @@ func doRender(ctx context.Context, out io.Writer) error { buildOut = out } - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { var bRes []graph.Artifact if renderFromBuildOutputFile.String() != "" { diff --git a/cmd/skaffold/app/cmd/run.go b/cmd/skaffold/app/cmd/run.go index d62e2c2d241..ea228b50fc4 100644 --- a/cmd/skaffold/app/cmd/run.go +++ b/cmd/skaffold/app/cmd/run.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/tips" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) // NewCmdRun describes the CLI command to run a pipeline. @@ -41,7 +41,7 @@ func NewCmdRun() *cobra.Command { } func doRun(ctx context.Context, out io.Writer) error { - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { bRes, err := r.Build(ctx, out, targetArtifacts(opts, configs)) if err != nil { return fmt.Errorf("failed to build: %w", err) diff --git a/cmd/skaffold/app/cmd/run_test.go b/cmd/skaffold/app/cmd/run_test.go index f0606604bd2..9bd4a5bc117 100644 --- a/cmd/skaffold/app/cmd/run_test.go +++ b/cmd/skaffold/app/cmd/run_test.go @@ -27,6 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -92,19 +93,21 @@ func TestDoRun(t *testing.T) { for _, test := range tests { testutil.Run(t, "", func(t *testutil.T) { mockRunner := &mockRunRunner{} - t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { - return mockRunner, []*latestV1.SkaffoldConfig{{ - Pipeline: latestV1.Pipeline{ - Build: latestV1.BuildConfig{ - Artifacts: []*latestV1.Artifact{ - {ImageName: "first"}, - {ImageName: "second-test"}, - {ImageName: "test"}, - {ImageName: "aaabbbccc"}, + t.Override(&createRunner, func(io.Writer, config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { + return mockRunner, []util.VersionedConfig{ + &latestV1.SkaffoldConfig{ + Pipeline: latestV1.Pipeline{ + Build: latestV1.BuildConfig{ + Artifacts: []*latestV1.Artifact{ + {ImageName: "first"}, + {ImageName: "second-test"}, + {ImageName: "test"}, + {ImageName: "aaabbbccc"}, + }, }, }, }, - }}, nil, nil + }, nil, nil }) t.Override(&opts, config.SkaffoldOptions{ TargetImages: []string{"test"}, diff --git a/cmd/skaffold/app/cmd/runner.go b/cmd/skaffold/app/cmd/runner.go index 4a2ca503391..c2634fcd1d0 100644 --- a/cmd/skaffold/app/cmd/runner.go +++ b/cmd/skaffold/app/cmd/runner.go @@ -37,6 +37,7 @@ import ( v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/defaults" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/validation" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/update" "github.com/GoogleContainerTools/skaffold/proto/v1" @@ -45,7 +46,7 @@ import ( // For tests var createRunner = createNewRunner -func withRunner(ctx context.Context, out io.Writer, action func(runner.Runner, []*latestV1.SkaffoldConfig) error) error { +func withRunner(ctx context.Context, out io.Writer, action func(runner.Runner, []util.VersionedConfig) error) error { runner, config, runCtx, err := createRunner(out, opts) if err != nil { return err @@ -57,13 +58,17 @@ func withRunner(ctx context.Context, out io.Writer, action func(runner.Runner, [ } // createNewRunner creates a Runner and returns the SkaffoldConfig associated with it. -func createNewRunner(out io.Writer, opts config.SkaffoldOptions) (runner.Runner, []*latestV1.SkaffoldConfig, *runcontext.RunContext, error) { +func createNewRunner(out io.Writer, opts config.SkaffoldOptions) (runner.Runner, []util.VersionedConfig, *runcontext.RunContext, error) { runCtx, configs, err := runContext(out, opts) if err != nil { return nil, nil, nil, err } - instrumentation.Init(configs, opts.User) + var v1Configs []*latestV1.SkaffoldConfig + for _, c := range configs { + v1Configs = append(v1Configs, c.(*latestV1.SkaffoldConfig)) + } + instrumentation.Init(v1Configs, opts.User) runner, err := v1.NewForConfig(runCtx) if err != nil { event.InititializationFailed(err) @@ -72,7 +77,7 @@ func createNewRunner(out io.Writer, opts config.SkaffoldOptions) (runner.Runner, return runner, configs, runCtx, nil } -func runContext(out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunContext, []*latestV1.SkaffoldConfig, error) { +func runContext(out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunContext, []util.VersionedConfig, error) { cfgSet, err := withFallbackConfig(out, opts, parser.GetConfigSet) if err != nil { return nil, nil, err @@ -82,10 +87,11 @@ func runContext(out io.Writer, opts config.SkaffoldOptions) (*runcontext.RunCont if err := validation.Process(cfgSet, validation.GetValidationOpts(opts)); err != nil { return nil, nil, fmt.Errorf("invalid skaffold config: %w", err) } - var configs []*latestV1.SkaffoldConfig + var configs []util.VersionedConfig for _, cfg := range cfgSet { configs = append(configs, cfg.SkaffoldConfig) } + runCtx, err := runcontext.GetRunContext(opts, configs) if err != nil { return nil, nil, fmt.Errorf("getting run context: %w", err) diff --git a/cmd/skaffold/app/cmd/test.go b/cmd/skaffold/app/cmd/test.go index 002ea10f3f0..b4735d2b75a 100644 --- a/cmd/skaffold/app/cmd/test.go +++ b/cmd/skaffold/app/cmd/test.go @@ -25,6 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/tips" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) // NewCmdTest describes the CLI command to test artifacts. @@ -39,10 +40,10 @@ func NewCmdTest() *cobra.Command { } func doTest(ctx context.Context, out io.Writer) error { - return withRunner(ctx, out, func(r runner.Runner, configs []*latestV1.SkaffoldConfig) error { + return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error { var artifacts []*latestV1.Artifact for _, c := range configs { - artifacts = append(artifacts, c.Build.Artifacts...) + artifacts = append(artifacts, c.(*latestV1.SkaffoldConfig).Build.Artifacts...) } buildArtifacts, err := getBuildArtifactsAndSetTags(artifacts, r.ApplyDefaultRepo) if err != nil { diff --git a/pkg/skaffold/parser/config.go b/pkg/skaffold/parser/config.go index 6b1a71433b7..08bd65b6611 100644 --- a/pkg/skaffold/parser/config.go +++ b/pkg/skaffold/parser/config.go @@ -32,6 +32,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/defaults" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/errors" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + schemaUtil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tags" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -61,12 +62,12 @@ func newRecord() *record { } // GetAllConfigs returns the list of all skaffold configurations parsed from the target config file in addition to all resolved dependency configs. -func GetAllConfigs(opts config.SkaffoldOptions) ([]*latestV1.SkaffoldConfig, error) { +func GetAllConfigs(opts config.SkaffoldOptions) ([]schemaUtil.VersionedConfig, error) { set, err := GetConfigSet(opts) if err != nil { return nil, err } - var cfgs []*latestV1.SkaffoldConfig + var cfgs []schemaUtil.VersionedConfig for _, cfg := range set { cfgs = append(cfgs, cfg.SkaffoldConfig) } diff --git a/pkg/skaffold/parser/config_test.go b/pkg/skaffold/parser/config_test.go index 62e4d76942e..790a02a9b8c 100644 --- a/pkg/skaffold/parser/config_test.go +++ b/pkg/skaffold/parser/config_test.go @@ -27,6 +27,7 @@ import ( sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/git" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + schemaUtil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/proto/v1" "github.com/GoogleContainerTools/skaffold/testutil" @@ -93,28 +94,34 @@ func TestGetAllConfigs(t *testing.T) { makePathsAbsolute *bool errCode proto.StatusCode applyProfilesRecursively bool - expected func(base string) []*latestV1.SkaffoldConfig + expected func(base string) []schemaUtil.VersionedConfig }{ { description: "makePathsAbsolute unspecified; no dependencies", documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}}}}, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg00", "image00", ".", nil)} + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg00", "image00", ".", nil), + } }, }, { description: "makePathsAbsolute unspecified; no dependencies, config flag", documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}, {name: "cfg01", requiresStanza: ""}}}}, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg01", "image01", ".", nil)} + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg01", "image01", ".", nil), + } }, configFilter: []string{"cfg01"}, }, { description: "makePathsAbsolute unspecified; no dependencies, config flag, profiles flag", documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}, {name: "cfg01", requiresStanza: ""}}}}, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg01", "pf0image01", ".", nil)} + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg01", "pf0image01", ".", nil), + } }, configFilter: []string{"cfg01"}, profiles: []string{"pf0"}, @@ -132,8 +139,8 @@ requires: {path: "doc1/skaffold.yaml", configs: []mockCfg{{name: "cfg10", requiresStanza: ""}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg10", "image10", filepath.Join(base, "doc1"), nil), createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}, {Path: "doc2", Names: []string{"cfg21"}}}), @@ -156,8 +163,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -177,8 +184,8 @@ requires: {path: "doc1/skaffold.yaml", configs: []mockCfg{{name: "cfg10", requiresStanza: ""}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg01", "image01", ".", nil), createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Names: []string{"cfg01"}}, {Path: "doc2", Names: []string{"cfg21"}}}), @@ -197,8 +204,8 @@ requires: - configs: [cfg11] `}, {name: "cfg11", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg11", "image11", filepath.Join(base, "doc1"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Names: []string{"cfg11"}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1"}}), @@ -224,8 +231,8 @@ requires: configs: [cfg00] `}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), []latestV1.ConfigDependency{{Path: base, Names: []string{"cfg00"}}}), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -249,8 +256,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "pf0image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -280,8 +287,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf0image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "pf0image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0", ActivatedBy: []string{"pf0"}}}}}), createCfg("cfg00", "pf0image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0", ActivatedBy: []string{"pf0"}}}}}), @@ -308,8 +315,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf1image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "pf0image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf1"}}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0"}}}}), @@ -365,8 +372,8 @@ requires: `}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg11", "image11", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), } @@ -444,8 +451,8 @@ requires: `}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{GitRepo: &latestV1.GitInfo{Repo: "doc2", Path: "skaffold.yaml", Ref: "main"}, Names: []string{"cfg21"}}}), createCfg("cfg11", "image11", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{GitRepo: &latestV1.GitInfo{Repo: "doc2", Ref: "main"}, Names: []string{"cfg21"}}}), @@ -458,16 +465,20 @@ requires: description: "makePathsAbsolute false; no dependencies", makePathsAbsolute: util.BoolPtr(false), documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}}}}, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg00", "image00", ".", nil)} + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg00", "image00", ".", nil), + } }, }, { description: "makePathsAbsolute false; no dependencies, config flag", makePathsAbsolute: util.BoolPtr(false), documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}, {name: "cfg01", requiresStanza: ""}}}}, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg01", "image01", ".", nil)} + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg01", "image01", ".", nil), + } }, configFilter: []string{"cfg01"}, }, @@ -475,8 +486,10 @@ requires: description: "makePathsAbsolute false; no dependencies, config flag, profiles flag", makePathsAbsolute: util.BoolPtr(false), documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}, {name: "cfg01", requiresStanza: ""}}}}, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg01", "pf0image01", ".", nil)} + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg01", "pf0image01", ".", nil), + } }, configFilter: []string{"cfg01"}, profiles: []string{"pf0"}, @@ -495,8 +508,8 @@ requires: {path: "doc1/skaffold.yaml", configs: []mockCfg{{name: "cfg10", requiresStanza: ""}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg10", "image10", ".", nil), createCfg("cfg21", "image21", ".", nil), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}, {Path: "doc2", Names: []string{"cfg21"}}}), @@ -520,8 +533,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", ".", nil), createCfg("cfg10", "image10", ".", []latestV1.ConfigDependency{{Path: "../doc2", Names: []string{"cfg21"}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -542,8 +555,8 @@ requires: {path: "doc1/skaffold.yaml", configs: []mockCfg{{name: "cfg10", requiresStanza: ""}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg01", "image01", ".", nil), createCfg("cfg21", "image21", ".", nil), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Names: []string{"cfg01"}}, {Path: "doc2", Names: []string{"cfg21"}}}), @@ -563,8 +576,8 @@ requires: - configs: [cfg11] `}, {name: "cfg11", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg11", "image11", ".", nil), createCfg("cfg10", "image10", ".", []latestV1.ConfigDependency{{Names: []string{"cfg11"}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1"}}), @@ -591,8 +604,8 @@ requires: configs: [cfg00] `}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", ".", []latestV1.ConfigDependency{{Path: "../", Names: []string{"cfg00"}}}), createCfg("cfg10", "image10", ".", []latestV1.ConfigDependency{{Path: "../doc2", Names: []string{"cfg21"}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -617,8 +630,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", ".", nil), createCfg("cfg10", "image10", ".", []latestV1.ConfigDependency{{Path: "../doc2", Names: []string{"cfg21"}}}), createCfg("cfg00", "pf0image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -649,8 +662,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf0image21", ".", nil), createCfg("cfg10", "pf0image10", ".", []latestV1.ConfigDependency{{Path: "../doc2", Names: []string{"cfg21"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0", ActivatedBy: []string{"pf0"}}}}}), createCfg("cfg00", "pf0image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0", ActivatedBy: []string{"pf0"}}}}}), @@ -678,8 +691,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf1image21", ".", nil), createCfg("cfg10", "pf0image10", ".", []latestV1.ConfigDependency{{Path: "../doc2", Names: []string{"cfg21"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf1"}}}}), createCfg("cfg00", "image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0"}}}}), @@ -737,8 +750,8 @@ requires: `}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", ".", nil), createCfg("cfg11", "image11", ".", []latestV1.ConfigDependency{{Path: "../doc2", Names: []string{"cfg21"}}}), } @@ -820,8 +833,8 @@ requires: `}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", ".", nil), createCfg("cfg10", "image10", ".", []latestV1.ConfigDependency{{GitRepo: &latestV1.GitInfo{Repo: "doc2", Path: "skaffold.yaml", Ref: "main"}, Names: []string{"cfg21"}}}), createCfg("cfg11", "image11", ".", []latestV1.ConfigDependency{{GitRepo: &latestV1.GitInfo{Repo: "doc2", Ref: "main"}, Names: []string{"cfg21"}}}), @@ -834,16 +847,20 @@ requires: description: "makePathsAbsolute true; no dependencies", makePathsAbsolute: util.BoolPtr(true), documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}}}}, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg00", "image00", base, nil)} + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg00", "image00", base, nil), + } }, }, { description: "makePathsAbsolute true; no dependencies, config flag", makePathsAbsolute: util.BoolPtr(true), documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}, {name: "cfg01", requiresStanza: ""}}}}, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg01", "image01", base, nil)} + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg01", "image01", base, nil), + } }, configFilter: []string{"cfg01"}, }, @@ -851,8 +868,10 @@ requires: description: "makePathsAbsolute true; no dependencies, config flag, profiles flag", makePathsAbsolute: util.BoolPtr(true), documents: []document{{path: "skaffold.yaml", configs: []mockCfg{{name: "cfg00", requiresStanza: ""}, {name: "cfg01", requiresStanza: ""}}}}, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{createCfg("cfg01", "pf0image01", base, nil)} + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ + createCfg("cfg01", "pf0image01", base, nil), + } }, configFilter: []string{"cfg01"}, profiles: []string{"pf0"}, @@ -871,8 +890,8 @@ requires: {path: "doc1/skaffold.yaml", configs: []mockCfg{{name: "cfg10", requiresStanza: ""}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg10", "image10", filepath.Join(base, "doc1"), nil), createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg00", "image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1"), Names: []string{"cfg10"}}, {Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), @@ -896,8 +915,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1"), Names: []string{"cfg10"}}}), @@ -918,8 +937,8 @@ requires: {path: "doc1/skaffold.yaml", configs: []mockCfg{{name: "cfg10", requiresStanza: ""}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg01", "image01", base, nil), createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg00", "image00", base, []latestV1.ConfigDependency{{Names: []string{"cfg01"}}, {Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), @@ -939,8 +958,8 @@ requires: - configs: [cfg11] `}, {name: "cfg11", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg11", "image11", filepath.Join(base, "doc1"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Names: []string{"cfg11"}}}), createCfg("cfg00", "image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1")}}), @@ -967,8 +986,8 @@ requires: configs: [cfg00] `}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), []latestV1.ConfigDependency{{Path: base, Names: []string{"cfg00"}}}), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1"), Names: []string{"cfg10"}}}), @@ -993,8 +1012,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "pf0image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1"), Names: []string{"cfg10"}}}), @@ -1025,8 +1044,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf0image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "pf0image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0", ActivatedBy: []string{"pf0"}}}}}), createCfg("cfg00", "pf0image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1"), Names: []string{"cfg10"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0", ActivatedBy: []string{"pf0"}}}}}), @@ -1054,8 +1073,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf1image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "pf0image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf1"}}}}), createCfg("cfg00", "image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1"), Names: []string{"cfg10"}, ActiveProfiles: []latestV1.ProfileDependency{{Name: "pf0"}}}}), @@ -1113,8 +1132,8 @@ requires: `}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg11", "image11", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), } @@ -1196,8 +1215,8 @@ requires: `}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{GitRepo: &latestV1.GitInfo{Repo: "doc2", Path: "skaffold.yaml", Ref: "main"}, Names: []string{"cfg21"}}}), createCfg("cfg11", "image11", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{GitRepo: &latestV1.GitInfo{Repo: "doc2", Ref: "main"}, Names: []string{"cfg21"}}}), @@ -1223,8 +1242,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf0image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "pf0image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "pf0image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -1250,8 +1269,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf0image21", ".", nil), createCfg("cfg10", "pf0image10", ".", []latestV1.ConfigDependency{{Path: "../doc2", Names: []string{"cfg21"}}}), createCfg("cfg00", "pf0image00", ".", []latestV1.ConfigDependency{{Path: "doc1", Names: []string{"cfg10"}}}), @@ -1277,8 +1296,8 @@ requires: `}, {name: "cfg11", requiresStanza: ""}}}, {path: "doc2/skaffold.yaml", configs: []mockCfg{{name: "cfg20", requiresStanza: ""}, {name: "cfg21", requiresStanza: ""}}}, }, - expected: func(base string) []*latestV1.SkaffoldConfig { - return []*latestV1.SkaffoldConfig{ + expected: func(base string) []schemaUtil.VersionedConfig { + return []schemaUtil.VersionedConfig{ createCfg("cfg21", "pf0image21", filepath.Join(base, "doc2"), nil), createCfg("cfg10", "pf0image10", filepath.Join(base, "doc1"), []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc2"), Names: []string{"cfg21"}}}), createCfg("cfg00", "pf0image00", base, []latestV1.ConfigDependency{{Path: filepath.Join(base, "doc1"), Names: []string{"cfg10"}}}), @@ -1300,7 +1319,7 @@ requires: tmpDir.Write(d.path, strings.Join(cfgs, "\n---\n")) } tmpDir.Chdir() - var expected []*latestV1.SkaffoldConfig + var expected []schemaUtil.VersionedConfig if test.expected != nil { wd, _ := util.RealWorkDir() expected = test.expected(wd) diff --git a/pkg/skaffold/runner/runcontext/context.go b/pkg/skaffold/runner/runcontext/context.go index 8784989e532..60117fb3d6b 100644 --- a/pkg/skaffold/runner/runcontext/context.go +++ b/pkg/skaffold/runner/runcontext/context.go @@ -27,6 +27,7 @@ import ( kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" runnerutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/util" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + schemaUtil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) @@ -199,11 +200,11 @@ func (rc *RunContext) BuildConcurrency() int { return rc func (rc *RunContext) IsMultiConfig() bool { return rc.Pipelines.IsMultiPipeline() } func (rc *RunContext) GetRunID() string { return rc.RunID } -func GetRunContext(opts config.SkaffoldOptions, configs []*latestV1.SkaffoldConfig) (*RunContext, error) { +func GetRunContext(opts config.SkaffoldOptions, configs []schemaUtil.VersionedConfig) (*RunContext, error) { var pipelines []latestV1.Pipeline for _, cfg := range configs { if cfg != nil { - pipelines = append(pipelines, cfg.Pipeline) + pipelines = append(pipelines, cfg.(*latestV1.SkaffoldConfig).Pipeline) } } kubeConfig, err := kubectx.CurrentConfig() diff --git a/pkg/skaffold/runner/runner.go b/pkg/skaffold/runner/runner.go index 7a17b6f7771..551a817d34e 100644 --- a/pkg/skaffold/runner/runner.go +++ b/pkg/skaffold/runner/runner.go @@ -23,6 +23,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) const ( @@ -43,7 +44,7 @@ type Runner interface { Dev(context.Context, io.Writer, []*latestV1.Artifact) error Deploy(context.Context, io.Writer, []graph.Artifact) error DeployAndLog(context.Context, io.Writer, []graph.Artifact) error - GeneratePipeline(context.Context, io.Writer, []*latestV1.SkaffoldConfig, []string, string) error + GeneratePipeline(context.Context, io.Writer, []util.VersionedConfig, []string, string) error HasBuilt() bool HasDeployed() bool Prune(context.Context, io.Writer) error diff --git a/pkg/skaffold/runner/v1/generate_pipeline.go b/pkg/skaffold/runner/v1/generate_pipeline.go index 9137ac0a116..767063536f1 100644 --- a/pkg/skaffold/runner/v1/generate_pipeline.go +++ b/pkg/skaffold/runner/v1/generate_pipeline.go @@ -27,16 +27,17 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/defaults" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) -func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, configs []*latestV1.SkaffoldConfig, configPaths []string, fileOut string) error { +func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, configs []util.VersionedConfig, configPaths []string, fileOut string) error { // Keep track of files, configs, and profiles. This will be used to know which files to write // profiles to and what flags to add to task commands var baseConfig []*pipeline.ConfigFile for _, config := range configs { cfgFile := &pipeline.ConfigFile{ Path: r.runCtx.ConfigurationFile(), - Config: config, + Config: config.(*latestV1.SkaffoldConfig), Profile: nil, } baseConfig = append(baseConfig, cfgFile) diff --git a/pkg/skaffold/runner/v2/generate_pipeline.go b/pkg/skaffold/runner/v2/generate_pipeline.go index decb9c2ce2a..c512d45ed09 100644 --- a/pkg/skaffold/runner/v2/generate_pipeline.go +++ b/pkg/skaffold/runner/v2/generate_pipeline.go @@ -20,9 +20,9 @@ import ( "fmt" "io" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) -func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, configs []*latestV1.SkaffoldConfig, configPaths []string, fileOut string) error { +func (r *SkaffoldRunner) GeneratePipeline(ctx context.Context, out io.Writer, configs []util.VersionedConfig, configPaths []string, fileOut string) error { return fmt.Errorf("not implemented error: SkaffoldRunner(v2).GeneratePipeline") } From 1970818059da249e309aacde39c3b8f2548a6e8f Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Thu, 8 Jul 2021 21:43:48 -0700 Subject: [PATCH 061/103] Disable k3d integration tests (#6171) --- .travis.yml | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 22713b2403b..044eba236e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,30 +113,30 @@ jobs: <<: *registry_mirror script: - env IT_PARTITION=3 make integration-in-kind - - name: "k3d integration partition 0" - <<: *integration_test - <<: *upgrade_docker - <<: *registry_mirror - script: - - env IT_PARTITION=0 make integration-in-k3d - - name: "k3d integration partition 1" - <<: *integration_test - <<: *upgrade_docker - <<: *registry_mirror - script: - - env IT_PARTITION=1 make integration-in-k3d - - name: "k3d integration partition 2" - <<: *integration_test - <<: *upgrade_docker - <<: *registry_mirror - script: - - env IT_PARTITION=2 make integration-in-k3d - - name: "k3d integration partition 3" - <<: *integration_test - <<: *upgrade_docker - <<: *registry_mirror - script: - - env IT_PARTITION=3 make integration-in-k3d + # - name: "k3d integration partition 0" + # <<: *integration_test + # <<: *upgrade_docker + # <<: *registry_mirror + # script: + # - env IT_PARTITION=0 make integration-in-k3d + # - name: "k3d integration partition 1" + # <<: *integration_test + # <<: *upgrade_docker + # <<: *registry_mirror + # script: + # - env IT_PARTITION=1 make integration-in-k3d + # - name: "k3d integration partition 2" + # <<: *integration_test + # <<: *upgrade_docker + # <<: *registry_mirror + # script: + # - env IT_PARTITION=2 make integration-in-k3d + # - name: "k3d integration partition 3" + # <<: *integration_test + # <<: *upgrade_docker + # <<: *registry_mirror + # script: + # - env IT_PARTITION=3 make integration-in-k3d - os: linux name: "diag/Linux unit" <<: *registry_mirror From d615e2e1963bade7ef71d009917c06c7cad6b92a Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Sat, 10 Jul 2021 00:18:01 +0530 Subject: [PATCH 062/103] refactor: (#6160) - add `v1.Artifact` reference to `podSyncer` - add `io.Writer` parameter to `Sync` method --- pkg/skaffold/runner/v1/dev.go | 2 +- pkg/skaffold/runner/v1/runner_test.go | 2 +- pkg/skaffold/sync/sync.go | 9 +++++---- pkg/skaffold/sync/sync_test.go | 4 +++- pkg/skaffold/sync/syncer_mux.go | 9 ++++++--- pkg/skaffold/sync/types.go | 17 ++++++++++++----- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/pkg/skaffold/runner/v1/dev.go b/pkg/skaffold/runner/v1/dev.go index 7c1ae4024e1..00428113e1f 100644 --- a/pkg/skaffold/runner/v1/dev.go +++ b/pkg/skaffold/runner/v1/dev.go @@ -92,7 +92,7 @@ func (r *SkaffoldRunner) doDev(ctx context.Context, out io.Writer) error { output.Default.Fprintf(out, "Syncing %d files for %s\n", fileCount, s.Image) fileSyncInProgress(fileCount, s.Image) - if err := r.deployer.GetSyncer().Sync(childCtx, s); err != nil { + if err := r.deployer.GetSyncer().Sync(childCtx, out, s); err != nil { logrus.Warnln("Skipping deploy due to sync error:", err) fileSyncFailed(fileCount, s.Image, err) event.DevLoopFailedInPhase(r.devIteration, constants.Sync, err) diff --git a/pkg/skaffold/runner/v1/runner_test.go b/pkg/skaffold/runner/v1/runner_test.go index bcff563c5c2..a0df677b9ae 100644 --- a/pkg/skaffold/runner/v1/runner_test.go +++ b/pkg/skaffold/runner/v1/runner_test.go @@ -161,7 +161,7 @@ func (t *TestBench) Build(_ context.Context, _ io.Writer, _ tag.ImageTags, artif return builds, nil } -func (t *TestBench) Sync(_ context.Context, item *sync.Item) error { +func (t *TestBench) Sync(_ context.Context, _ io.Writer, item *sync.Item) error { if len(t.syncErrors) > 0 { err := t.syncErrors[0] t.syncErrors = t.syncErrors[1:] diff --git a/pkg/skaffold/sync/sync.go b/pkg/skaffold/sync/sync.go index 31bb796a784..ebf7c9c249f 100644 --- a/pkg/skaffold/sync/sync.go +++ b/pkg/skaffold/sync/sync.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "io" "os/exec" "path" "path/filepath" @@ -100,7 +101,7 @@ func syncItem(a *latestV1.Artifact, tag string, e filemon.Events, syncRules []*l return nil, nil } - return &Item{Image: tag, Copy: toCopy, Delete: toDelete}, nil + return &Item{Image: tag, Artifact: a, Copy: toCopy, Delete: toDelete}, nil } func inferredSyncItem(a *latestV1.Artifact, tag string, e filemon.Events, cfg docker.Config) (*Item, error) { @@ -144,7 +145,7 @@ func inferredSyncItem(a *latestV1.Artifact, tag string, e filemon.Events, cfg do } } - return &Item{Image: tag, Copy: toCopy}, nil + return &Item{Image: tag, Artifact: a, Copy: toCopy}, nil } func syncMapForArtifact(a *latestV1.Artifact, cfg docker.Config) (map[string][]string, error) { @@ -187,7 +188,7 @@ func autoSyncItem(ctx context.Context, a *latestV1.Artifact, tag string, e filem // do a rebuild return nil, nil } - return &Item{Image: tag, Copy: toCopy, Delete: toDelete}, nil + return &Item{Image: tag, Artifact: a, Copy: toCopy, Delete: toDelete}, nil default: // TODO: this error does appear a little late in the build, perhaps it could surface at first run, rather than first sync? @@ -252,7 +253,7 @@ func matchSyncRules(syncRules []*latestV1.SyncRule, relPath, containerWd string) return dsts, nil } -func (s *podSyncer) Sync(ctx context.Context, item *Item) error { +func (s *podSyncer) Sync(ctx context.Context, out io.Writer, item *Item) error { if len(item.Copy) > 0 { logrus.Infoln("Copying files:", item.Copy, "to", item.Image) diff --git a/pkg/skaffold/sync/sync_test.go b/pkg/skaffold/sync/sync_test.go index a13d67fea8a..f91b4efbcdb 100644 --- a/pkg/skaffold/sync/sync_test.go +++ b/pkg/skaffold/sync/sync_test.go @@ -758,7 +758,9 @@ func TestNewSyncItem(t *testing.T) { }) actual, err := NewItem(ctx, test.artifact, test.evt, test.builds, &mockConfig{}, 0) - + if test.expected != nil { + test.expected.Artifact = test.artifact + } t.CheckErrorAndDeepEqual(test.shouldErr, err, test.expected, actual) }) } diff --git a/pkg/skaffold/sync/syncer_mux.go b/pkg/skaffold/sync/syncer_mux.go index af4cf12123b..21c832b3a2f 100644 --- a/pkg/skaffold/sync/syncer_mux.go +++ b/pkg/skaffold/sync/syncer_mux.go @@ -16,13 +16,16 @@ limitations under the License. package sync -import "context" +import ( + "context" + "io" +) type SyncerMux []Syncer -func (s SyncerMux) Sync(ctx context.Context, item *Item) error { +func (s SyncerMux) Sync(ctx context.Context, out io.Writer, item *Item) error { for _, syncer := range s { - if err := syncer.Sync(ctx, item); err != nil { + if err := syncer.Sync(ctx, out, item); err != nil { return err } } diff --git a/pkg/skaffold/sync/types.go b/pkg/skaffold/sync/types.go index 99c190b8380..d25fed8b554 100644 --- a/pkg/skaffold/sync/types.go +++ b/pkg/skaffold/sync/types.go @@ -18,20 +18,23 @@ package sync import ( "context" + "io" pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" ) type syncMap map[string][]string type Item struct { - Image string - Copy map[string][]string - Delete map[string][]string + Image string + Artifact *v1.Artifact + Copy map[string][]string + Delete map[string][]string } type Syncer interface { - Sync(context.Context, *Item) error + Sync(context.Context, io.Writer, *Item) error } type podSyncer struct { @@ -45,6 +48,10 @@ type Config interface { type NoopSyncer struct{} -func (s *NoopSyncer) Sync(context.Context, *Item) error { +func (s *NoopSyncer) Sync(context.Context, io.Writer, *Item) error { return nil } + +func (i *Item) HasChanges() bool { + return i != nil && (len(i.Copy) > 0 || len(i.Delete) > 0) +} From bd6a7a8a2f92b198ea7d7a34ccd3c44f4dfdb3c1 Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Fri, 9 Jul 2021 14:48:56 -0400 Subject: [PATCH 063/103] Update Jib build plugin versions after 3.1.2 release (#6168) * Update Jib versions * empty commit to trigger tests --- examples/jib-gradle/build.gradle | 2 +- examples/jib-multimodule/pom.xml | 2 +- examples/jib-sync/build.gradle | 2 +- examples/jib-sync/pom.xml | 2 +- examples/jib/pom.xml | 2 +- integration/examples/jib-gradle/build.gradle | 2 +- integration/examples/jib-multimodule/pom.xml | 2 +- integration/examples/jib-sync/build.gradle | 2 +- integration/examples/jib-sync/pom.xml | 2 +- integration/examples/jib/pom.xml | 2 +- integration/testdata/debug/java/pom.xml | 2 +- integration/testdata/jib/pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/jib-gradle/build.gradle b/examples/jib-gradle/build.gradle index ebfa4cda8b7..6dc4b54d559 100644 --- a/examples/jib-gradle/build.gradle +++ b/examples/jib-gradle/build.gradle @@ -3,7 +3,7 @@ plugins { id 'groovy' id 'io.spring.dependency-management' version '1.0.6.RELEASE' id 'net.ltgt.apt-idea' version '0.18' - id 'com.google.cloud.tools.jib' version '3.1.1' + id 'com.google.cloud.tools.jib' version '3.1.2' } sourceCompatibility = 1.8 diff --git a/examples/jib-multimodule/pom.xml b/examples/jib-multimodule/pom.xml index d5580ab183c..eca054fa3b2 100644 --- a/examples/jib-multimodule/pom.xml +++ b/examples/jib-multimodule/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0 + 3.1.2 diff --git a/examples/jib-sync/build.gradle b/examples/jib-sync/build.gradle index f325f852f7d..de0a936cbe9 100644 --- a/examples/jib-sync/build.gradle +++ b/examples/jib-sync/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id 'org.springframework.boot' version '2.0.5.RELEASE' id 'io.spring.dependency-management' version '1.0.7.RELEASE' - id 'com.google.cloud.tools.jib' version '3.0.0' + id 'com.google.cloud.tools.jib' version '3.1.2' } repositories { diff --git a/examples/jib-sync/pom.xml b/examples/jib-sync/pom.xml index c5678a310b8..de20ccd3ac7 100644 --- a/examples/jib-sync/pom.xml +++ b/examples/jib-sync/pom.xml @@ -9,7 +9,7 @@ 1.8 - 3.0.0 + 3.1.2 diff --git a/examples/jib/pom.xml b/examples/jib/pom.xml index 78a4a718e4a..fd367996d74 100644 --- a/examples/jib/pom.xml +++ b/examples/jib/pom.xml @@ -9,7 +9,7 @@ 1.8 - 3.0.0 + 3.1.2 diff --git a/integration/examples/jib-gradle/build.gradle b/integration/examples/jib-gradle/build.gradle index ebfa4cda8b7..6dc4b54d559 100644 --- a/integration/examples/jib-gradle/build.gradle +++ b/integration/examples/jib-gradle/build.gradle @@ -3,7 +3,7 @@ plugins { id 'groovy' id 'io.spring.dependency-management' version '1.0.6.RELEASE' id 'net.ltgt.apt-idea' version '0.18' - id 'com.google.cloud.tools.jib' version '3.1.1' + id 'com.google.cloud.tools.jib' version '3.1.2' } sourceCompatibility = 1.8 diff --git a/integration/examples/jib-multimodule/pom.xml b/integration/examples/jib-multimodule/pom.xml index d5580ab183c..eca054fa3b2 100644 --- a/integration/examples/jib-multimodule/pom.xml +++ b/integration/examples/jib-multimodule/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0 + 3.1.2 diff --git a/integration/examples/jib-sync/build.gradle b/integration/examples/jib-sync/build.gradle index f325f852f7d..de0a936cbe9 100644 --- a/integration/examples/jib-sync/build.gradle +++ b/integration/examples/jib-sync/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id 'org.springframework.boot' version '2.0.5.RELEASE' id 'io.spring.dependency-management' version '1.0.7.RELEASE' - id 'com.google.cloud.tools.jib' version '3.0.0' + id 'com.google.cloud.tools.jib' version '3.1.2' } repositories { diff --git a/integration/examples/jib-sync/pom.xml b/integration/examples/jib-sync/pom.xml index c5678a310b8..de20ccd3ac7 100644 --- a/integration/examples/jib-sync/pom.xml +++ b/integration/examples/jib-sync/pom.xml @@ -9,7 +9,7 @@ 1.8 - 3.0.0 + 3.1.2 diff --git a/integration/examples/jib/pom.xml b/integration/examples/jib/pom.xml index 78a4a718e4a..fd367996d74 100644 --- a/integration/examples/jib/pom.xml +++ b/integration/examples/jib/pom.xml @@ -9,7 +9,7 @@ 1.8 - 3.0.0 + 3.1.2 diff --git a/integration/testdata/debug/java/pom.xml b/integration/testdata/debug/java/pom.xml index 3c66e59bc17..2a7abef3e55 100644 --- a/integration/testdata/debug/java/pom.xml +++ b/integration/testdata/debug/java/pom.xml @@ -8,7 +8,7 @@ Simple Java server with Skaffold and Jib - 3.1.1 + 3.1.2 1.8 1.8 diff --git a/integration/testdata/jib/pom.xml b/integration/testdata/jib/pom.xml index b8dfb703ea8..e5b11df793b 100644 --- a/integration/testdata/jib/pom.xml +++ b/integration/testdata/jib/pom.xml @@ -8,7 +8,7 @@ Simple Java server with Skaffold and Jib - 3.1.1 + 3.1.2 1.8 1.8 From 433e950a15f2b585aeb8eac3e22a47704ab4f2dc Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Fri, 9 Jul 2021 16:07:36 -0400 Subject: [PATCH 064/103] Doc tweaks (#6176) * Small doc tweaks - reorganize Resources page to put Community to the top - add StackOverflow - remove 2019 Roadmap - add Cloud Shell as an installation option * fixes --- docs/content/en/docs/install/_index.md | 64 ++++++++++++++--------- docs/content/en/docs/quickstart/_index.md | 2 + docs/content/en/docs/resources/_index.md | 47 +++++------------ 3 files changed, 53 insertions(+), 60 deletions(-) diff --git a/docs/content/en/docs/install/_index.md b/docs/content/en/docs/install/_index.md index bfa20f1667a..a5566afd833 100644 --- a/docs/content/en/docs/install/_index.md +++ b/docs/content/en/docs/install/_index.md @@ -18,39 +18,52 @@ Your use of this software is subject to the [Google Privacy Policy](https://poli {{% tabs %}} +{{% tab "GOOGLE CLOUD SHELL" %}} + +Google Cloud Platform's [_Cloud Shell_](http://cloud.google.com/shell) +provides a free [browser-based terminal/CLI and editor](https://cloud.google.com/shell#product-demo) +with Skaffold, Minikube, and Docker pre-installed. +(Requires a [Google Account](https://accounts.google.com/SignUp).) + +Cloud Shell is a great way to try Skaffold out. + +[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_git_repo=https%3A%2F%2Fgithub.com%2FGoogleContainerTools%2Fskaffold&cloudshell_working_dir=examples%2Fgetting-started) + +{{% /tab %}} + {{% tab "LINUX" %}} The latest **stable** binaries can be found here: -https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 -https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-arm64 +- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 +- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-arm64 Simply download the appropriate binary and add it to your `PATH`. Or, copy+paste one of the following commands in your terminal: ```bash -# For Linux AMD64 +# For Linux x86_64 (amd64) curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \ sudo install skaffold /usr/local/bin/ ``` ```bash -# For Linux ARM64 +# For Linux ARMv8 (arm64) curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-arm64 && \ sudo install skaffold /usr/local/bin/ ``` We also release a **bleeding edge** build, built from the latest commit: -https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 -https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-arm64 +- Linux x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 +- Linux ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-arm64 ```bash -# For Linux on AMD64 +# For Linux on x86_64 (amd64) curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 && \ sudo install skaffold /usr/local/bin/ ``` ```bash -# For Linux on ARM64 +# For Linux on ARMv8 (arm64) curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-arm64 && \ sudo install skaffold /usr/local/bin/ ``` @@ -61,36 +74,36 @@ sudo install skaffold /usr/local/bin/ The latest **stable** binaries can be found here: -https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-amd64 -https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-arm64 +- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-amd64 +- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-arm64 Simply download the appropriate binary and add it to your `PATH`. Or, copy+paste one of the following commands in your terminal: ```bash -# For macOS on AMD64 +# For macOS on x86_64 (amd64) curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-amd64 && \ sudo install skaffold /usr/local/bin/ ``` ```bash -# For macOS on ARM64 +# For macOS on ARMv8 (arm64) curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-arm64 && \ sudo install skaffold /usr/local/bin/ ``` We also release a **bleeding edge** build, built from the latest commit: -https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-amd64 -https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-arm64 +- Darwin x86_64 (amd64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-amd64 +- Darwin ARMv8 (arm64): https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-arm64 ```bash -# For macOS on AMD64 +# For macOS on x86_64 (amd64) curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-amd64 && \ sudo install skaffold /usr/local/bin/ ``` ```bash -# For macOS on ARM64 +# For macOS on ARMv8 (arm64) curl -Lo skaffold https://storage.googleapis.com/skaffold/builds/latest/skaffold-darwin-arm64 && \ sudo install skaffold /usr/local/bin/ ``` @@ -125,6 +138,15 @@ https://storage.googleapis.com/skaffold/builds/latest/skaffold-windows-amd64.exe --- +### Scoop + +Skaffold can be installed using the [Scoop package manager](https://scoop.sh/). +This package is not maintained by the Skaffold team. + +```powershell +scoop install skaffold +``` + ### Chocolatey Skaffold can be installed using the [Chocolatey package manager](https://chocolatey.org/packages/skaffold). @@ -143,16 +165,6 @@ For more information about this defect see ```bash choco install -y skaffold ``` - -### Scoop - -Skaffold can be installed using the [Scoop package manager](https://scoop.sh/). -This package is not maintained by the Skaffold team. - -```powershell -scoop install skaffold -``` - {{% /tab %}} {{% tab "DOCKER" %}} diff --git a/docs/content/en/docs/quickstart/_index.md b/docs/content/en/docs/quickstart/_index.md index 30d67c8ff7b..26b0d0cfdee 100644 --- a/docs/content/en/docs/quickstart/_index.md +++ b/docs/content/en/docs/quickstart/_index.md @@ -182,4 +182,6 @@ using [Builders]({{}}), [Taggers]({{< [Skaffold Tutorials]({{< relref "/docs/tutorials" >}}) details some of the common use cases of Skaffold. +Questions? See our [Community section]({{< relref "/docs/resources#Community" >}}) for ways to get in touch. + :mega: **Please fill out our [quick 5-question survey](https://forms.gle/BMTbGQXLWSdn7vEs6)** to tell us how satisfied you are with Skaffold, and what improvements we should make. Thank you! :dancers: diff --git a/docs/content/en/docs/resources/_index.md b/docs/content/en/docs/resources/_index.md index 9d778e4b198..70578fc2780 100644 --- a/docs/content/en/docs/resources/_index.md +++ b/docs/content/en/docs/resources/_index.md @@ -5,32 +5,21 @@ weight: 130 no_list: true --- -## 2020 Roadmap - -This now lives [on Github](https://github.com/GoogleContainerTools/skaffold/blob/master/ROADMAP.md). - -## 2019 Roadmap +## Community -* Plugin model for builders - * DONE - see custom artifacts -* IDE integration VSCode and IntelliJ Skaffold dev/build/run/deploy support, Skaffold Config code completion - * DONE, see [Cloud Code](http://cloud.google.com/code) -* Debugging JVM applications - * DONE, we have Java, go, python and node for [debugging]({{}}) -* Skaffold keeps track of what it built, for faster restarts - * DONE, artifact caching is enabled by default, can be controlled with the `--cache-artifacts` flag -* Pipeline CRD integration - * DONE - we have Tekton pipeline generation in alpha, docs to come +Join the Skaffold community and discuss the project at: -In 2019 we also focused a major part of our efforts in fixing bugs, improve our triage, pull request and design processes, created better documentation, and continuously increased test coverage. +* StackOverflow using the [`skaffold` tag](https://stackoverflow.com/questions/tagged/skaffold) +* [Skaffold Mailing List] +* [#Skaffold channel on Kubernetes Slack](https://kubernetes.slack.com/messages/CABQMSZA6/) (click on _Create an account_ to join) +* [Give us feedback](feedback) -We reprioritized these items for next year: +The Skaffold Project also holds a monthly meeting on the last +Wednesday of the month at 9:30am PST on [Google Meet](https://meet.google.com/tje-kwpx-ixv)! +Everyone is welcome to attend! If you join the [Skaffold Mailing List], +a calendar invite will be sent to your Google Calendar. -* Provide help with integration testing -* Automated Kubernetes manifest generation -* Infrastructure scaffolding for CI/CD on GCP/GKE -* Document end-to-end solutions -* Status dashboard for build (test) and deployment besides logging +[Skaffold Mailing List]: https://groups.google.com/forum#!forum/skaffold-users ## Contributing @@ -43,16 +32,6 @@ on GitHub. See [Release Notes](https://github.com/GoogleContainerTools/skaffold/blob/master/CHANGELOG.md) on Github. -## Community - -You can join the Skaffold community and discuss the project at: - -* [Skaffold Mailing List](https://groups.google.com/forum#!forum/skaffold-users) -* [Skaffold Topic on Kubernetes Slack](https://kubernetes.slack.com/messages/CABQMSZA6/) -* [Give us feedback](feedback) +## Roadmap -The Skaffold Project also holds a bi-weekly meeting at 9:30am PST on Google -Hangouts. Everyone is welcome to add suggestions to the [Meeting Agenda](https://docs.google.com/document/d/1mnCC_fAI3pmg3Vb2nMJyPk8Qtjjuapw_BTyqI_dX7sk/edit) -and [attend the meeting](https://hangouts.google.com/hangouts/_/google.com/skaffold). -If you join the Skaffold Mailing List, a calendar invite will be sent to your Google -Calendar. +See our roadmap [in GitHub](https://github.com/GoogleContainerTools/skaffold/blob/master/ROADMAP.md). From ccef6a8132b6f786fdca260a17ff43b580bfce7e Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Fri, 9 Jul 2021 14:19:34 -0700 Subject: [PATCH 065/103] Move kubectl CLI from Runner to Deployer (#6179) --- pkg/skaffold/deploy/helm/deploy.go | 6 ++++-- pkg/skaffold/deploy/kpt/kpt.go | 7 +++++-- pkg/skaffold/deploy/kubectl/cli.go | 4 ++-- pkg/skaffold/deploy/kubectl/kubectl.go | 7 ++++--- pkg/skaffold/deploy/kustomize/kustomize.go | 4 ++-- pkg/skaffold/log/provider.go | 14 +++++++------- pkg/skaffold/runner/v1/deploy_test.go | 6 ++---- pkg/skaffold/runner/v1/new.go | 8 +++----- pkg/skaffold/runner/v1/runner.go | 2 -- pkg/skaffold/sync/provider.go | 14 +++++++------- 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index 4a5f7e1b9de..1be648da511 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -47,6 +47,7 @@ import ( deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" + pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" kloader "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" @@ -143,6 +144,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component } podSelector := kubernetes.NewImageList() + kubectl := pkgkubectl.NewCLI(cfg, cfg.GetKubeNamespace()) return &Deployer{ HelmDeploy: h, @@ -150,9 +152,9 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector), + logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl), originalImages: originalImages, kubeContext: cfg.GetKubeContext(), kubeConfig: cfg.GetKubeConfig(), diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 659d1dcdedb..09ec126cb50 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -42,6 +42,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" + pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" kloader "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/manifest" @@ -106,15 +107,17 @@ type Config interface { // NewDeployer generates a new Deployer object contains the kptDeploy schema. func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KptDeploy) *Deployer { podSelector := kubernetes.NewImageList() + kubectl := pkgkubectl.NewCLI(cfg, cfg.GetKubeNamespace()) + return &Deployer{ KptDeploy: d, podSelector: podSelector, accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector), + logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl), insecureRegistries: cfg.GetInsecureRegistries(), labels: labels, globalConfig: cfg.GlobalConfig(), diff --git a/pkg/skaffold/deploy/kubectl/cli.go b/pkg/skaffold/deploy/kubectl/cli.go index 3c9b3eee6f0..7481aade124 100644 --- a/pkg/skaffold/deploy/kubectl/cli.go +++ b/pkg/skaffold/deploy/kubectl/cli.go @@ -60,9 +60,9 @@ type Config interface { HydratedManifests() []string } -func NewCLI(cfg Config, flags latestV1.KubectlFlags, defaultNameSpace string) CLI { +func NewCLI(cfg Config, flags latestV1.KubectlFlags, defaultNamespace string) CLI { return CLI{ - CLI: kubectl.NewCLI(cfg, defaultNameSpace), + CLI: kubectl.NewCLI(cfg, defaultNamespace), Flags: flags, forceDeploy: cfg.ForceDeploy(), waitForDeletions: cfg.WaitForDeletions(), diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index 474efe40767..6ebd4580f80 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -87,6 +87,7 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component } podSelector := kubernetes.NewImageList() + kubectl := NewCLI(cfg, d.Flags, defaultNamespace) return &Deployer{ KubectlDeploy: d, @@ -94,13 +95,13 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector), + logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl.CLI), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl.CLI), workingDir: cfg.GetWorkingDir(), globalConfig: cfg.GlobalConfig(), defaultRepo: cfg.DefaultRepo(), - kubectl: NewCLI(cfg, d.Flags, defaultNamespace), + kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), skipRender: cfg.SkipRender(), labels: labels, diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index d5f874180d6..ac702fc5655 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -142,9 +142,9 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), debugger: provider.Debugger.GetKubernetesDebugger(podSelector), imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector), + logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl.CLI), statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector), + syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl.CLI), kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), globalConfig: cfg.GlobalConfig(), diff --git a/pkg/skaffold/log/provider.go b/pkg/skaffold/log/provider.go index 45a3ae0231b..f3123926fdf 100644 --- a/pkg/skaffold/log/provider.go +++ b/pkg/skaffold/log/provider.go @@ -25,14 +25,14 @@ import ( ) type Provider interface { - GetKubernetesLogger(*kubernetes.ImageList) Logger + GetKubernetesLogger(*kubernetes.ImageList, *kubectl.CLI) Logger GetNoopLogger() Logger } type fullProvider struct { tail bool - kubernetesLogger func(*kubernetes.ImageList) Logger + kubernetesLogger func(*kubernetes.ImageList, *kubectl.CLI) Logger noopLogger func() Logger } @@ -41,11 +41,11 @@ var ( once sync.Once ) -func NewLogProvider(config logger.Config, cli *kubectl.CLI) Provider { +func NewLogProvider(config logger.Config) Provider { once.Do(func() { provider = &fullProvider{ tail: config.Tail(), - kubernetesLogger: func(podSelector *kubernetes.ImageList) Logger { + kubernetesLogger: func(podSelector *kubernetes.ImageList, cli *kubectl.CLI) Logger { return logger.NewLogAggregator(cli, podSelector, config) }, noopLogger: func() Logger { @@ -56,11 +56,11 @@ func NewLogProvider(config logger.Config, cli *kubectl.CLI) Provider { return provider } -func (p *fullProvider) GetKubernetesLogger(s *kubernetes.ImageList) Logger { +func (p *fullProvider) GetKubernetesLogger(s *kubernetes.ImageList, cli *kubectl.CLI) Logger { if !p.tail { return p.noopLogger() } - return p.kubernetesLogger(s) + return p.kubernetesLogger(s, cli) } func (p *fullProvider) GetNoopLogger() Logger { @@ -70,7 +70,7 @@ func (p *fullProvider) GetNoopLogger() Logger { // NoopProvider is used in tests type NoopProvider struct{} -func (p *NoopProvider) GetKubernetesLogger(_ *kubernetes.ImageList) Logger { +func (p *NoopProvider) GetKubernetesLogger(*kubernetes.ImageList, *kubectl.CLI) Logger { return &NoopLogger{} } diff --git a/pkg/skaffold/runner/v1/deploy_test.go b/pkg/skaffold/runner/v1/deploy_test.go index b97e960293e..3a80fc07a1d 100644 --- a/pkg/skaffold/runner/v1/deploy_test.go +++ b/pkg/skaffold/runner/v1/deploy_test.go @@ -28,7 +28,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" @@ -127,9 +126,8 @@ func TestSkaffoldDeployRenderOnly(t *testing.T) { deployer, err := runner.GetDeployer(runCtx, deploy.NoopComponentProvider, nil) t.RequireNoError(err) r := SkaffoldRunner{ - runCtx: runCtx, - kubectlCLI: kubectl.NewCLI(runCtx, ""), - deployer: deployer, + runCtx: runCtx, + deployer: deployer, } var builds []graph.Artifact diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index f8b34aec9f5..d6cdfdd726c 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -33,7 +33,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/filemon" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" - pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" @@ -53,7 +52,7 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { event.LogMetaEvent() eventV2.InitializeState(runCtx) eventV2.LogMetaEvent() - kubectlCLI := pkgkubectl.NewCLI(runCtx, "") + // kubectlCLI := pkgkubectl.NewCLI(runCtx, "") _, endTrace := instrumentation.StartTrace(context.Background(), "NewForConfig") defer endTrace() @@ -90,9 +89,9 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { Accessor: access.NewAccessorProvider(labeller), Debugger: debug.NewDebugProvider(runCtx), ImageLoader: loader.NewImageLoaderProvider(), - Logger: log.NewLogProvider(runCtx, kubectlCLI), + Logger: log.NewLogProvider(runCtx), Monitor: status.NewMonitorProvider(labeller), - Syncer: sync.NewSyncProvider(runCtx, kubectlCLI), + Syncer: sync.NewSyncProvider(runCtx), } deployer, err = runner.GetDeployer(runCtx, provider, labeller.Labels()) @@ -148,7 +147,6 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { listener: runner.NewSkaffoldListener(monitor, rtrigger, sourceDependencies, intentChan), artifactStore: store, sourceDependencies: sourceDependencies, - kubectlCLI: kubectlCLI, labeller: labeller, cache: artifactCache, runCtx: runCtx, diff --git a/pkg/skaffold/runner/v1/runner.go b/pkg/skaffold/runner/v1/runner.go index 371867650ec..698b819e306 100644 --- a/pkg/skaffold/runner/v1/runner.go +++ b/pkg/skaffold/runner/v1/runner.go @@ -22,7 +22,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/filemon" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/test" @@ -38,7 +37,6 @@ type SkaffoldRunner struct { monitor filemon.Monitor listener runner.Listener - kubectlCLI *kubectl.CLI cache cache.Cache changeSet runner.ChangeSet runCtx *runcontext.RunContext diff --git a/pkg/skaffold/sync/provider.go b/pkg/skaffold/sync/provider.go index 97399d77f68..c4beb3a70a1 100644 --- a/pkg/skaffold/sync/provider.go +++ b/pkg/skaffold/sync/provider.go @@ -24,12 +24,12 @@ import ( ) type Provider interface { - GetKubernetesSyncer(*kubernetes.ImageList) Syncer + GetKubernetesSyncer(*kubernetes.ImageList, *kubectl.CLI) Syncer GetNoopSyncer() Syncer } type fullProvider struct { - kubernetesSyncer func(*kubernetes.ImageList) Syncer + kubernetesSyncer func(*kubernetes.ImageList, *kubectl.CLI) Syncer noopSyncer func() Syncer } @@ -38,10 +38,10 @@ var ( once gosync.Once ) -func NewSyncProvider(config Config, cli *kubectl.CLI) Provider { +func NewSyncProvider(config Config) Provider { once.Do(func() { provider = &fullProvider{ - kubernetesSyncer: func(podSelector *kubernetes.ImageList) Syncer { + kubernetesSyncer: func(podSelector *kubernetes.ImageList, cli *kubectl.CLI) Syncer { return &podSyncer{ kubectl: cli, config: config, @@ -55,8 +55,8 @@ func NewSyncProvider(config Config, cli *kubectl.CLI) Provider { return provider } -func (p *fullProvider) GetKubernetesSyncer(s *kubernetes.ImageList) Syncer { - return p.kubernetesSyncer(s) +func (p *fullProvider) GetKubernetesSyncer(s *kubernetes.ImageList, cli *kubectl.CLI) Syncer { + return p.kubernetesSyncer(s, cli) } func (p *fullProvider) GetNoopSyncer() Syncer { @@ -65,7 +65,7 @@ func (p *fullProvider) GetNoopSyncer() Syncer { type NoopProvider struct{} -func (p *NoopProvider) GetKubernetesSyncer(_ *kubernetes.ImageList) Syncer { +func (p *NoopProvider) GetKubernetesSyncer(*kubernetes.ImageList, *kubectl.CLI) Syncer { return &NoopSyncer{} } From 37cdc303185fc1915ece2f8b93506ae6a8bf26af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jul 2021 17:23:10 -0400 Subject: [PATCH 066/103] Bump 4d63.com/tz from 1.1.0 to 1.2.0 (#6152) --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2fa7626ed31..0f5d5231f81 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ replace ( ) require ( - 4d63.com/tz v1.1.0 + 4d63.com/tz v1.2.0 cloud.google.com/go v0.84.0 cloud.google.com/go/storage v1.10.0 github.com/AlecAivazis/survey/v2 v2.2.7 diff --git a/go.sum b/go.sum index d216250ed7e..f4a9acde8ae 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ 4d63.com/embedfiles v0.0.0-20190311033909-995e0740726f/go.mod h1:HxEsUxoVZyRxsZML/S6e2xAuieFMlGO0756ncWx1aXE= 4d63.com/tz v1.1.0 h1:Hi58WbeFjiUH4XOWuCpl5iSzuUuw1axZzTqIfMKPKrg= 4d63.com/tz v1.1.0/go.mod h1:SHGqVdL7hd2ZaX2T9uEiOZ/OFAUfCCLURdLPJsd8ZNs= +4d63.com/tz v1.2.0 h1:EpJt060xY+M+M0Wj8btz+THdOJbSxj4i8jhVQP3Wr0U= +4d63.com/tz v1.2.0/go.mod h1:SHGqVdL7hd2ZaX2T9uEiOZ/OFAUfCCLURdLPJsd8ZNs= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= From 1b94a3874e20d473748e1c3dfebead4b683203d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jul 2021 23:01:21 -0400 Subject: [PATCH 067/103] Bump github.com/russross/blackfriday/v2 from 2.0.1 to 2.1.0 (#6150) --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0f5d5231f81..d759fb4631d 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 github.com/rjeczalik/notify v0.9.3-0.20201210012515-e2a77dcc14cf - github.com/russross/blackfriday/v2 v2.0.1 + github.com/russross/blackfriday/v2 v2.1.0 github.com/segmentio/textio v1.2.0 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.1.3 diff --git a/go.sum b/go.sum index f4a9acde8ae..5eaba5e033b 100644 --- a/go.sum +++ b/go.sum @@ -1186,6 +1186,8 @@ github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNue github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= From 7a8f05453cba4f7a47d947975e294ffb816bfb60 Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Sat, 10 Jul 2021 20:19:51 +0530 Subject: [PATCH 068/103] hooks: add hooks execution environment variables (#6163) * hooks: add hooks execution environment variables * prefix env variables with `SKAFFOLD_` * address pr feedback --- cmd/skaffold/app/cmd/runner.go | 2 + pkg/skaffold/hooks/env.go | 113 +++++++++++++++ pkg/skaffold/hooks/env_test.go | 162 ++++++++++++++++++++++ pkg/skaffold/runner/runcontext/context.go | 2 + testutil/util.go | 8 ++ 5 files changed, 287 insertions(+) create mode 100644 pkg/skaffold/hooks/env.go create mode 100644 pkg/skaffold/hooks/env_test.go diff --git a/cmd/skaffold/app/cmd/runner.go b/cmd/skaffold/app/cmd/runner.go index c2634fcd1d0..64feed3dc3d 100644 --- a/cmd/skaffold/app/cmd/runner.go +++ b/cmd/skaffold/app/cmd/runner.go @@ -27,6 +27,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/hooks" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/initializer" initConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/initializer/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" @@ -69,6 +70,7 @@ func createNewRunner(out io.Writer, opts config.SkaffoldOptions) (runner.Runner, v1Configs = append(v1Configs, c.(*latestV1.SkaffoldConfig)) } instrumentation.Init(v1Configs, opts.User) + hooks.SetupStaticEnvOptions(runCtx) runner, err := v1.NewForConfig(runCtx) if err != nil { event.InititializationFailed(err) diff --git a/pkg/skaffold/hooks/env.go b/pkg/skaffold/hooks/env.go new file mode 100644 index 00000000000..ee2a9345637 --- /dev/null +++ b/pkg/skaffold/hooks/env.go @@ -0,0 +1,113 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "fmt" + "reflect" + "strings" + "unicode" +) + +var staticEnvOpts StaticEnvOpts + +// StaticEnvOpts contains the environment variables to be set in a lifecycle hook executor that don't change during the lifetime of the process. +type StaticEnvOpts struct { + DefaultRepo *string + RPCPort int + HTTPPort int + WorkDir string +} + +// BuildEnvOpts contains the environment variables to be set in a build type lifecycle hook executor. +type BuildEnvOpts struct { + Image string + PushImage bool + ImageRepo string + ImageTag string + BuildContext string +} + +// SyncEnvOpts contains the environment variables to be set in a sync type lifecycle hook executor. +type SyncEnvOpts struct { + Image string + BuildContext string + FilesAddedOrModified *string + FilesDeleted *string + KubeContext string + Namespaces string +} + +// DeployEnvOpts contains the environment variables to be set in a deploy type lifecycle hook executor. +type DeployEnvOpts struct { + RunID string + KubeContext string + Namespaces string +} + +type Config interface { + DefaultRepo() *string + GetWorkingDir() string + RPCPort() int + RPCHTTPPort() int +} + +func SetupStaticEnvOptions(cfg Config) { + staticEnvOpts = StaticEnvOpts{ + DefaultRepo: cfg.DefaultRepo(), + WorkDir: cfg.GetWorkingDir(), + RPCPort: cfg.RPCPort(), + HTTPPort: cfg.RPCHTTPPort(), + } +} + +// getEnv converts the fields of BuildEnvOpts, SyncEnvOpts, DeployEnvOpts and CommonEnvOpts structs to a `key=value` environment variables slice. +// Each field name is converted from CamelCase to SCREAMING_SNAKE_CASE and prefixed with `SKAFFOLD`. +// For example the field `KubeContext` with value `kind` becomes `SKAFFOLD_KUBE_CONTEXT=kind` +func getEnv(optsStruct interface{}) []string { + var env []string + structVal := reflect.ValueOf(optsStruct) + t := structVal.Type() + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + v := structVal.Field(i) + if v.Kind() == reflect.Ptr && v.IsNil() { + continue + } + v = reflect.Indirect(v) + env = append(env, fmt.Sprintf("SKAFFOLD_%s=%v", toScreamingSnakeCase(f.Name), v.Interface())) + } + return env +} + +// toScreamingSnakeCase converts CamelCase strings to SCREAMING_SNAKE_CASE. +// For example KubeContext to KUBE_CONTEXT +func toScreamingSnakeCase(s string) string { + r := []rune(s) + var b strings.Builder + for i := 0; i < len(r); i++ { + if i > 0 && unicode.IsUpper(r[i]) { + if !unicode.IsUpper(r[i-1]) { + b.WriteRune('_') + } else if i+1 < len(r) && !unicode.IsUpper(r[i+1]) { + b.WriteRune('_') + } + } + b.WriteRune(unicode.ToUpper(r[i])) + } + return b.String() +} diff --git a/pkg/skaffold/hooks/env_test.go b/pkg/skaffold/hooks/env_test.go new file mode 100644 index 00000000000..ef4349d9227 --- /dev/null +++ b/pkg/skaffold/hooks/env_test.go @@ -0,0 +1,162 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "testing" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestSetupStaticEnvOptions(t *testing.T) { + defer func() { + staticEnvOpts = StaticEnvOpts{} + }() + + cfg := mockCfg{ + defaultRepo: util.StringPtr("gcr.io/foo"), + workDir: ".", + rpcPort: 8080, + httpPort: 8081, + } + SetupStaticEnvOptions(cfg) + testutil.CheckDeepEqual(t, cfg.defaultRepo, staticEnvOpts.DefaultRepo) + testutil.CheckDeepEqual(t, cfg.workDir, staticEnvOpts.WorkDir) + testutil.CheckDeepEqual(t, cfg.rpcPort, staticEnvOpts.RPCPort) + testutil.CheckDeepEqual(t, cfg.httpPort, staticEnvOpts.HTTPPort) +} + +func TestGetEnv(t *testing.T) { + tests := []struct { + description string + input interface{} + expected []string + }{ + { + description: "static env opts, all defined", + input: StaticEnvOpts{ + DefaultRepo: util.StringPtr("gcr.io/foo"), + RPCPort: 8080, + HTTPPort: 8081, + WorkDir: "./foo", + }, + expected: []string{ + "SKAFFOLD_DEFAULT_REPO=gcr.io/foo", + "SKAFFOLD_RPC_PORT=8080", + "SKAFFOLD_HTTP_PORT=8081", + "SKAFFOLD_WORK_DIR=./foo", + }, + }, + { + description: "static env opts, some missing", + input: StaticEnvOpts{ + RPCPort: 8080, + HTTPPort: 8081, + WorkDir: "./foo", + }, + expected: []string{ + "SKAFFOLD_RPC_PORT=8080", + "SKAFFOLD_HTTP_PORT=8081", + "SKAFFOLD_WORK_DIR=./foo", + }, + }, + { + description: "build env opts", + input: BuildEnvOpts{ + Image: "foo", + PushImage: true, + ImageRepo: "gcr.io/foo", + ImageTag: "latest", + BuildContext: "./foo", + }, + expected: []string{ + "SKAFFOLD_IMAGE=foo", + "SKAFFOLD_PUSH_IMAGE=true", + "SKAFFOLD_IMAGE_REPO=gcr.io/foo", + "SKAFFOLD_IMAGE_TAG=latest", + "SKAFFOLD_BUILD_CONTEXT=./foo", + }, + }, + { + description: "sync env opts, all defined", + input: SyncEnvOpts{ + Image: "foo", + FilesAddedOrModified: util.StringPtr("./foo/1;./foo/2"), + FilesDeleted: util.StringPtr("./foo/3;./foo/4"), + KubeContext: "minikube", + Namespaces: "np1,np2,np3", + BuildContext: "./foo", + }, + expected: []string{ + "SKAFFOLD_IMAGE=foo", + "SKAFFOLD_FILES_ADDED_OR_MODIFIED=./foo/1;./foo/2", + "SKAFFOLD_FILES_DELETED=./foo/3;./foo/4", + "SKAFFOLD_KUBE_CONTEXT=minikube", + "SKAFFOLD_NAMESPACES=np1,np2,np3", + "SKAFFOLD_BUILD_CONTEXT=./foo", + }, + }, + { + description: "sync env opts, some missing", + input: SyncEnvOpts{ + Image: "foo", + KubeContext: "minikube", + Namespaces: "np1,np2,np3", + BuildContext: "./foo", + }, + expected: []string{ + "SKAFFOLD_IMAGE=foo", + "SKAFFOLD_KUBE_CONTEXT=minikube", + "SKAFFOLD_NAMESPACES=np1,np2,np3", + "SKAFFOLD_BUILD_CONTEXT=./foo", + }, + }, + { + description: "deploy env opts", + input: DeployEnvOpts{ + RunID: "1234", + KubeContext: "minikube", + Namespaces: "np1,np2,np3", + }, + expected: []string{ + "SKAFFOLD_RUN_ID=1234", + "SKAFFOLD_KUBE_CONTEXT=minikube", + "SKAFFOLD_NAMESPACES=np1,np2,np3", + }, + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + actual := getEnv(test.input) + t.CheckElementsMatch(test.expected, actual) + }) + } +} + +type mockCfg struct { + defaultRepo *string + workDir string + rpcPort int + httpPort int +} + +func (m mockCfg) DefaultRepo() *string { return m.defaultRepo } +func (m mockCfg) GetWorkingDir() string { return m.workDir } +func (m mockCfg) RPCPort() int { return m.rpcPort } +func (m mockCfg) RPCHTTPPort() int { return m.httpPort } diff --git a/pkg/skaffold/runner/runcontext/context.go b/pkg/skaffold/runner/runcontext/context.go index 60117fb3d6b..e9e852a2448 100644 --- a/pkg/skaffold/runner/runcontext/context.go +++ b/pkg/skaffold/runner/runcontext/context.go @@ -199,6 +199,8 @@ func (rc *RunContext) WatchPollInterval() int { return rc func (rc *RunContext) BuildConcurrency() int { return rc.Opts.BuildConcurrency } func (rc *RunContext) IsMultiConfig() bool { return rc.Pipelines.IsMultiPipeline() } func (rc *RunContext) GetRunID() string { return rc.RunID } +func (rc *RunContext) RPCPort() int { return rc.Opts.RPCPort } +func (rc *RunContext) RPCHTTPPort() int { return rc.Opts.RPCHTTPPort } func GetRunContext(opts config.SkaffoldOptions, configs []schemaUtil.VersionedConfig) (*RunContext, error) { var pipelines []latestV1.Pipeline diff --git a/testutil/util.go b/testutil/util.go index afd25c392f6..d076230a378 100644 --- a/testutil/util.go +++ b/testutil/util.go @@ -141,6 +141,14 @@ func (t *T) CheckError(shouldErr bool, err error) { CheckError(t.T, shouldErr, err) } +// CheckElementsMatch validates that two given slices contain the same elements +// while disregarding their order. +// Elements of both slices have to be comparable by '==' +func (t *T) CheckElementsMatch(expected, actual interface{}) { + t.Helper() + CheckElementsMatch(t.T, expected, actual) +} + // CheckErrorAndFailNow checks that the provided error complies with whether or not we expect an error // and fails the test execution immediately if it does not. // Useful for testing functions which return (obj interface{}, e error) and subsequent checks operate on `obj` From 62a01f66b6050bd04d08278b1b3d48302f1414cc Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Mon, 12 Jul 2021 11:09:38 -0700 Subject: [PATCH 069/103] design proposal to show user survey other than Hats (#6186) * design proposal to show user survey other than Hats * Apply suggestions from code review Co-authored-by: Brian de Alwis * code review comments Co-authored-by: Brian de Alwis --- docs/design_proposals/user_survey_hooks.md | 127 +++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 docs/design_proposals/user_survey_hooks.md diff --git a/docs/design_proposals/user_survey_hooks.md b/docs/design_proposals/user_survey_hooks.md new file mode 100644 index 00000000000..8658cb1fafb --- /dev/null +++ b/docs/design_proposals/user_survey_hooks.md @@ -0,0 +1,127 @@ +# Title + +* Author(s): Tejal Desai +* Design Shepherd: Brian de Alwis +* Date: 07/11/2021 +* Status: Proposed + +## Background + +Currently, we get feedback on Skaffold via Skaffold HaTS survey. +However, in this survey we cannot prompt users for feedback on existing features or new proposed features. +It is difficult for us to solicit feedback on existing features and the impact of proposed changes. +For example, with render v2, we are changing how deploy works. This may affect our existing helm deployer users. +See [#6166](https://github.com/GoogleContainerTools/skaffold/issues/6166) + +## Design + +This document proposes to extend the existing HaTS survey framework to incorporate a set of user surveys. + +### User survey definition +In order to make sure only relevant surveys are shown to user, we have added a survey config. +``` +type config struct { + id string + // promptText is shown to the user and should be formatted so each line should fit in < 80 characters. + // For example: `As a Helm user, we are requesting your feedback on a proposed change to Skaffold's integration with Helm.` + promptText string + // startsAt mentions the date after the users survey should be prompted. This will ensure, skaffold team can finalize the survey + // even after release date. + startsAt time.Time + // expiresAt places a time limit of the user survey. As users are only prompted every two weeks + // by design, this time limit should be at least 4 weeks after the upcoming release date to account + // for release propagation lag to Cloud SDK and Cloud Shell. + expiresAt time.Time + isRelevantFn func([]util.VersionedConfig) bool + URL string +} + +``` +The survey config has two key fields +1) expiresAt - This decided the lifetime of the survey. e.g. if we are collecting user feedback to get feedback on helm deployer re-design, then it makes sense to target the survey towards helm deployer user for a limited time until the re-design requirement phase is complete. +2) isRelevantFn - This function determines if the user is a target audience for the survey. For the above example, it only makes sense to show the survey for helm deployer users, like this. +``` +{ + id: helmID, + expiresAt: time.Date(2021, time.August, 14, 00, 00, 00, 0, time.UTC), + isRelevantFn: func(cfgs []util.VersionedConfig, command string) bool { + for _, cfg := range cfgs { + if v1Cfg, ok := cfg.(*latestV1.SkaffoldConfig) ; ok { + if h := v1Cfg.Deploy.HelmDeploy; h != nil { + return true + } + } + } + return false + }, +URL: helmURL, +}, + +``` +For multi-module users, we could use something like the following: +``` + isRelevantFn: func(cfgs []util.VersionedConfig, _ string) bool { + return len(cfgs) > 1 + }, +``` + +### How to prompt users to take user surveys + +#### Rules to show survey prompt +When prompting users with surveys, we need to keep in mind 2 important rules +1) *Don't prompt users too often.* + Currently, we only prompt users to fill in HaTs survey every two weeks until they fill. +2) *Don't prompt users if they have already taken the survey.* + Currently, we only prompt users to fill in HaTS Survey if they haven't taken it in last 3 months. + +For non HaTS surveys or user surveys, we will follow the same rules, +1) Prompt users to fill in the survey once 2 weeks if its relevant to them until they fill it. +2) Stop prompting once they have taken the survey. + +The user survey information will be tracked in the existing `Survey` config in the skaffold global config +``` +// SurveyConfig is the survey config information +type SurveyConfig struct { + DisablePrompt *bool `yaml:"disable-prompt,omitempty"` + LastTaken string `yaml:"last-taken,omitempty"` + LastPrompted string `yaml:"last-prompted,omitempty"` ++ UserSurveys []*UseSurvey `yaml:"user-surveys,omitempty"` +} + +type UserSurvey struct { + ID string `yaml:"id"` + Taken *bool `yaml:"taken,omitempty"` +} +``` + + +### Implementation details. +The current `ShouldDisplaySurveyPrompt` returns true only if +1) If survey prompt is not disabled and +2) If HaTS survey was not taken in last 3 months (stored in `SurveyConfig.LastTaken`) and +3) If survey prompt was not shown `SurveyConfig.LastPrompted` in last 2 weeks. + +This behavior will be changed to `ShouldDisplaySurveyPrompt` returns true if +1) If survey prompt is not disabled and +2) If survey prompt was not shown `SurveyConfig.LastPrompted` in last 2 weeks and +3) If there is an active relevant user survey is available or HaTS survey was not taken in last 3 months + +If both active relevant user survey is available or HaTS survey was not taken, then Skaffold will give preference to user survey over hats survey. +Since, HaTS survey never expire, +- if user takes the user survey this time, HaTS survey will be prompted the next time. +- if the user never takes the user survey, the HaTS survey will be prompted once the user survey expires. + **Note User surveys should not run longer than a quarter so that we don't reduce the volume of HaTS Survey, + +## Alternate Methods +Other methods to get feedback is manually via pinging slack users to fill in a survey. +However, this requires a core member to manually remind users from time to time to fill in a survey. +Another disadvantage is users could form a biased opinion due to the questions asked in the user survey and +rate low on the NPS score. + + +## Implementation plan +- [ ] add survey config struct +- [ ] add `-id` flag to survey command with default as `hats` +- [ ] add `UserSurvey` struct to skaffold global config +- [ ] change prompt logic to show active relevant prompts +- [ ] Change set and unset command to set user survey fields. From edac263be11de7b5ebd83c38cbba62245753aff7 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Mon, 12 Jul 2021 13:32:11 -0700 Subject: [PATCH 070/103] Add survey config and framework to show feature surveys to skaffold users. (#6185) * add survey config and -id flag to survey command * add tests * fix test names * revert not required * code review comments --- cmd/skaffold/app/cmd/survey.go | 9 +- docs/content/en/docs/references/cli/_index.md | 6 + pkg/skaffold/constants/constants.go | 3 + pkg/skaffold/survey/config.go | 113 +++++++++ pkg/skaffold/survey/config_test.go | 233 ++++++++++++++++++ pkg/skaffold/survey/survey.go | 35 ++- pkg/skaffold/survey/survey_test.go | 3 +- 7 files changed, 381 insertions(+), 21 deletions(-) create mode 100644 pkg/skaffold/survey/config.go create mode 100644 pkg/skaffold/survey/config_test.go diff --git a/cmd/skaffold/app/cmd/survey.go b/cmd/skaffold/app/cmd/survey.go index cc4c8214d96..62d9800157c 100644 --- a/cmd/skaffold/app/cmd/survey.go +++ b/cmd/skaffold/app/cmd/survey.go @@ -25,13 +25,18 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/survey" ) +var surveyID string + func NewCmdSurvey() *cobra.Command { return NewCmd("survey"). WithDescription("Opens a web browser to fill out the Skaffold survey"). + WithFlags([]*Flag{ + {Value: &surveyID, Name: "id", DefValue: survey.HatsID, Usage: "Survey ID for survey command to open."}, + }). NoArgs(showSurvey) } -func showSurvey(context context.Context, out io.Writer) error { +func showSurvey(ctx context.Context, out io.Writer) error { s := survey.New(opts.GlobalConfig) - return s.OpenSurveyForm(context, out) + return s.OpenSurveyForm(ctx, out, surveyID) } diff --git a/docs/content/en/docs/references/cli/_index.md b/docs/content/en/docs/references/cli/_index.md index e5f97fb8a65..d8cb7c3ad6d 100644 --- a/docs/content/en/docs/references/cli/_index.md +++ b/docs/content/en/docs/references/cli/_index.md @@ -1125,6 +1125,9 @@ Opens a web browser to fill out the Skaffold survey ``` +Options: + --id='hats': Survey ID for survey command to open. + Usage: skaffold survey [options] @@ -1132,6 +1135,9 @@ Use "skaffold options" for a list of global command-line options (applies to all ``` +Env vars: + +* `SKAFFOLD_ID` (same as `--id`) ### skaffold test diff --git a/pkg/skaffold/constants/constants.go b/pkg/skaffold/constants/constants.go index aef384ae448..c512178caff 100644 --- a/pkg/skaffold/constants/constants.go +++ b/pkg/skaffold/constants/constants.go @@ -73,6 +73,9 @@ const ( GithubIssueLink = "https://github.com/GoogleContainerTools/skaffold/issues/new" Windows = "windows" + + // HaTS is the HaTS Survey ID + HaTS = "hats" ) type Phase string diff --git a/pkg/skaffold/survey/config.go b/pkg/skaffold/survey/config.go new file mode 100644 index 00000000000..2997766f394 --- /dev/null +++ b/pkg/skaffold/survey/config.go @@ -0,0 +1,113 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package survey + +import ( + "fmt" + "time" + + sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" +) + +const ( + HatsID = "hats" + hatsURL = "https://forms.gle/BMTbGQXLWSdn7vEs6" +) + +var ( + hats = config{ + id: HatsID, + promptText: "Help improve Skaffold with our 2-minute anonymous survey", + isRelevantFn: func([]util.VersionedConfig, sConfig.RunMode) bool { + return true + }, + URL: hatsURL, + } + // surveys contains all the skaffold survey information + surveys = []config{hats} +) + +// config defines a survey. +type config struct { + id string + // promptText is shown to the user and should be formatted so each line should fit in < 80 characters. + // For example: `As a Helm user, we are requesting your feedback on a proposed change to Skaffold's integration with Helm.` + promptText string + // startsAt mentions the date after the users survey should be prompted. This will ensure, Skaffold team can finalize the survey + // even after release date. + startsAt time.Time + // expiresAt places a time limit of the user survey. As users are only prompted every two weeks + // by design, this time limit should be at least 4 weeks after the upcoming release date to account + // for release propagation lag to Cloud SDK and Cloud Shell. + expiresAt time.Time + isRelevantFn func([]util.VersionedConfig, sConfig.RunMode) bool + URL string +} + +func (s config) isActive() bool { + return s.expiresAt.IsZero() || s.expiresAt.After(time.Now()) +} + +func (s config) prompt() string { + if s.id == hats.id { + return fmt.Sprintf(`%s: run 'skaffold survey' +`, s.promptText) + } + return fmt.Sprintf(`%s: run 'skaffold survey -id %s' +`, s.promptText, s.id) +} + +func (s config) isRelevant(cfgs []util.VersionedConfig, cmd sConfig.RunMode) bool { + return s.isRelevantFn(cfgs, cmd) +} + +func (s config) isValid() bool { + if s.id == HatsID { + return true + } + today := s.startsAt + if today.IsZero() { + today = time.Now() + } + return s.expiresAt.Sub(today) < 60*24*time.Hour +} + +func getSurvey(id string) (config, bool) { + for _, s := range surveys { + if s.id == id { + return s, true + } + } + return config{}, false +} + +func validKeys() []string { + keys := make([]string, 0, len(surveys)) + for _, s := range surveys { + keys = append(keys, s.id) + } + return keys +} + +func init() { + for _, s := range surveys { + if !s.isValid() { + panic(fmt.Errorf("survey %q is valid for more than a 60 days - user surveys must be valid for 60 days or less", s.id)) + } + } +} diff --git a/pkg/skaffold/survey/config_test.go b/pkg/skaffold/survey/config_test.go new file mode 100644 index 00000000000..720decf3550 --- /dev/null +++ b/pkg/skaffold/survey/config_test.go @@ -0,0 +1,233 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package survey + +import ( + "testing" + "time" + + sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestSurveyPrompt(t *testing.T) { + tests := []struct { + description string + s config + expected string + }{ + { + description: "hats survey", + s: hats, + expected: `Help improve Skaffold with our 2-minute anonymous survey: run 'skaffold survey' +`, + }, + { + description: "not hats survey", + s: config{ + id: "foo", + promptText: "Looks like you are using foo feature. Help improve Skaffold foo feature and take this survey", + expiresAt: time.Date(2021, time.August, 14, 00, 00, 00, 0, time.UTC), + }, + expected: `Looks like you are using foo feature. Help improve Skaffold foo feature and take this survey: run 'skaffold survey -id foo' +`, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.CheckDeepEqual(test.s.prompt(), test.expected) + }) + } +} + +func TestSurveyActive(t *testing.T) { + tests := []struct { + description string + s config + expected bool + }{ + { + description: "no expiry", + s: hats, + expected: true, + }, + { + description: "expiry in past", + s: config{ + id: "expired", + expiresAt: time.Date(2020, 8, 1, 0, 0, 0, 0, time.UTC), + }, + }, + { + description: "expiry in future", + s: config{ + id: "active", + expiresAt: time.Now().AddDate(1, 0, 0), + }, + expected: true, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.CheckDeepEqual(test.s.isActive(), test.expected) + }) + } +} + +func TestSurveyRelevant(t *testing.T) { + testMock := mockVersionedConfig{version: "test"} + prodMock := mockVersionedConfig{version: "prod"} + + tests := []struct { + description string + s config + cfgs []util.VersionedConfig + expected bool + }{ + { + description: "hats is always relevant", + s: hats, + expected: true, + }, + { + description: "relevant based on input configs", + s: config{ + id: "foo", + isRelevantFn: func(cfgs []util.VersionedConfig, _ sConfig.RunMode) bool { + return len(cfgs) > 1 + }, + }, + cfgs: []util.VersionedConfig{testMock, prodMock}, + expected: true, + }, + { + description: "not relevant based on config", + s: config{ + id: "foo", + isRelevantFn: func(cfgs []util.VersionedConfig, _ sConfig.RunMode) bool { + return len(cfgs) > 1 + }, + }, + cfgs: []util.VersionedConfig{testMock}, + }, + { + description: "contains a config with test version", + s: config{ + id: "version-value-test", + isRelevantFn: func(cfgs []util.VersionedConfig, _ sConfig.RunMode) bool { + for _, cfg := range cfgs { + if m, ok := cfg.(mockVersionedConfig); ok { + if m.version == "test" { + return true + } + } + } + return false + }, + }, + cfgs: []util.VersionedConfig{prodMock, testMock}, + expected: true, + }, + { + description: "does not contains a config with test version", + s: config{ + id: "version-value-test", + isRelevantFn: func(cfgs []util.VersionedConfig, _ sConfig.RunMode) bool { + for _, cfg := range cfgs { + if m, ok := cfg.(mockVersionedConfig); ok { + if m.version == "test" { + return true + } + } + } + return false + }, + }, + cfgs: []util.VersionedConfig{prodMock}, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.CheckDeepEqual(test.s.isRelevant(test.cfgs, "dev"), test.expected) + }) + } +} + +func TestIsValid(t *testing.T) { + tests := []struct { + description string + s config + expected bool + }{ + { + description: "only hats", + s: hats, + expected: true, + }, + { + description: "4 weeks valid survey with start date", + s: config{ + id: "invalid", + startsAt: time.Now().AddDate(0, 1, 0), + expiresAt: time.Now().AddDate(0, 2, 0), + }, + expected: true, + }, + { + description: "4 weeks valid survey without start date", + s: config{ + id: "valid", + expiresAt: time.Now().AddDate(0, 1, 0), + }, + expected: true, + }, + { + description: "90 days invalid survey without start date", + s: config{ + id: "invalid", + expiresAt: time.Now().AddDate(0, 0, 90), + }, + }, + { + description: "90 days invalid survey with start date", + s: config{ + id: "invalid", + startsAt: time.Now().AddDate(0, 1, 0), + expiresAt: time.Now().AddDate(0, 1, 90), + }, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.CheckDeepEqual(test.s.isValid(), test.expected) + }) + } +} + +// mockVersionedConfig implements util.VersionedConfig. +type mockVersionedConfig struct { + version string +} + +func (m mockVersionedConfig) GetVersion() string { + return m.version +} + +func (m mockVersionedConfig) Upgrade() (util.VersionedConfig, error) { + return m, nil +} diff --git a/pkg/skaffold/survey/survey.go b/pkg/skaffold/survey/survey.go index dab7dbdca1d..cd20d8eff5e 100644 --- a/pkg/skaffold/survey/survey.go +++ b/pkg/skaffold/survey/survey.go @@ -24,31 +24,26 @@ import ( "github.com/pkg/browser" "github.com/sirupsen/logrus" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" ) const ( - Prompt = `Help improve Skaffold with our 2-minute anonymous survey: run 'skaffold survey' -` + Form = `Thank you for offering your feedback on Skaffold! Understanding your experiences and opinions helps us make Skaffold better for you and other users. - URL = "https://forms.gle/BMTbGQXLWSdn7vEs6" -) - -var ( - Form = fmt.Sprintf(`Thank you for offering your feedback on Skaffold! Understanding your experiences and opinions helps us make Skaffold better for you and other users. - -Skaffold will now attempt to open the survey in your default web browser. You may also manually open it using this link: +Skaffold will now attempt to open the survey in your default web browser. You may also manually open it using this URL: %s Tip: To permanently disable the survey prompt, run: - skaffold config set --survey --global disable-prompt true`, URL) + skaffold config set --survey --global disable-prompt true` +) +var ( // for testing isStdOut = output.IsStdout open = browser.OpenURL - updateConfig = config.UpdateGlobalSurveyPrompted + updateConfig = sConfig.UpdateGlobalSurveyPrompted ) type Runner struct { @@ -63,21 +58,25 @@ func New(configFile string) *Runner { func (s *Runner) DisplaySurveyPrompt(out io.Writer) error { if isStdOut(out) { - output.Green.Fprintf(out, Prompt) + output.Green.Fprintf(out, hats.prompt()) } return updateConfig(s.configFile) } -func (s *Runner) OpenSurveyForm(_ context.Context, out io.Writer) error { - _, err := fmt.Fprintln(out, Form) +func (s *Runner) OpenSurveyForm(_ context.Context, out io.Writer, id string) error { + sc, ok := getSurvey(id) + if !ok { + return fmt.Errorf("invalid survey id %q - please enter one of %s", id, validKeys()) + } + _, err := fmt.Fprintln(out, fmt.Sprintf(Form, sc.URL)) if err != nil { return err } - if err := open(URL); err != nil { - logrus.Debugf("could not open url %s", URL) + if err := open(sc.URL); err != nil { + logrus.Debugf("could not open url %s", sc.URL) return err } // Currently we will only update the global survey taken // When prompting for the survey, we need to use the same field. - return config.UpdateGlobalSurveyTaken(s.configFile) + return sConfig.UpdateGlobalSurveyTaken(s.configFile) } diff --git a/pkg/skaffold/survey/survey_test.go b/pkg/skaffold/survey/survey_test.go index 58b83bc3fc9..fd5182831ac 100644 --- a/pkg/skaffold/survey/survey_test.go +++ b/pkg/skaffold/survey/survey_test.go @@ -33,7 +33,8 @@ func TestDisplaySurveyForm(t *testing.T) { { description: "std out", mockStdOut: true, - expected: Prompt, + expected: `Help improve Skaffold with our 2-minute anonymous survey: run 'skaffold survey' +`, }, { description: "not std out", From 5848b663bdf248f8128fa7e5eee61caa94ff0afb Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Mon, 12 Jul 2021 16:52:13 -0400 Subject: [PATCH 071/103] Propagate Kaniko environment to GCB (#6181) --- pkg/skaffold/build/gcb/kaniko.go | 16 ++++++++++++++++ pkg/skaffold/build/gcb/kaniko_test.go | 11 +++++++++++ 2 files changed, 27 insertions(+) diff --git a/pkg/skaffold/build/gcb/kaniko.go b/pkg/skaffold/build/gcb/kaniko.go index 6576c81639d..00bfbbbbac9 100644 --- a/pkg/skaffold/build/gcb/kaniko.go +++ b/pkg/skaffold/build/gcb/kaniko.go @@ -20,8 +20,10 @@ import ( "fmt" "google.golang.org/api/cloudbuild/v1" + v1 "k8s.io/api/core/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/kaniko" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/misc" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" ) @@ -40,10 +42,24 @@ func (b *Builder) kanikoBuildSpec(a *latestV1.Artifact, tag string) (cloudbuild. return cloudbuild.Build{}, err } + env, err := misc.EvaluateEnv(envFromVars(k.Env)) + if err != nil { + return cloudbuild.Build{}, fmt.Errorf("unable to evaluate env variables: %w", err) + } + return cloudbuild.Build{ Steps: []*cloudbuild.BuildStep{{ Name: b.KanikoImage, Args: kanikoArgs, + Env: env, }}, }, nil } + +func envFromVars(env []v1.EnvVar) []string { + s := make([]string, 0, len(env)) + for _, envVar := range env { + s = append(s, envVar.Name+"="+envVar.Value) + } + return s +} diff --git a/pkg/skaffold/build/gcb/kaniko_test.go b/pkg/skaffold/build/gcb/kaniko_test.go index ee5c611f2a1..3be57595826 100644 --- a/pkg/skaffold/build/gcb/kaniko_test.go +++ b/pkg/skaffold/build/gcb/kaniko_test.go @@ -20,6 +20,7 @@ import ( "testing" "google.golang.org/api/cloudbuild/v1" + kv1 "k8s.io/api/core/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/kaniko" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" @@ -35,6 +36,7 @@ func TestKanikoBuildSpec(t *testing.T) { description string artifact *latestV1.KanikoArtifact expectedArgs []string + expectedEnv []string }{ { description: "simple build", @@ -57,6 +59,14 @@ func TestKanikoBuildSpec(t *testing.T) { kaniko.BuildArgsFlag, "arg2", }, }, + { + description: "with Env", + artifact: &latestV1.KanikoArtifact{ + DockerfilePath: "Dockerfile", + Env: []kv1.EnvVar{{Name: "KEY1", Value: "VALUE1"}, {Name: "KEY2", Value: "VALUE2"}}, + }, + expectedEnv: []string{"KEY1=VALUE1", "KEY2=VALUE2"}, + }, { description: "with Cache", artifact: &latestV1.KanikoArtifact{ @@ -409,6 +419,7 @@ func TestKanikoBuildSpec(t *testing.T) { Steps: []*cloudbuild.BuildStep{{ Name: "gcr.io/kaniko-project/executor", Args: append(append(defaultExpectedArgs, imageArgs...), test.expectedArgs...), + Env: test.expectedEnv, }}, Options: &cloudbuild.BuildOptions{ DiskSizeGb: 100, From 12e9772889b768344fcd6bb88aa447b472729aaa Mon Sep 17 00:00:00 2001 From: Pablo Caderno Date: Tue, 13 Jul 2021 06:52:42 +1000 Subject: [PATCH 072/103] Added template expansion for helm chart version (#6157) --- .../content/en/docs/environment/templating.md | 1 + pkg/skaffold/deploy/helm/args.go | 5 ++-- pkg/skaffold/deploy/helm/deploy.go | 9 ++++++-- pkg/skaffold/deploy/helm/helm_test.go | 23 +++++++++++++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/docs/content/en/docs/environment/templating.md b/docs/content/en/docs/environment/templating.md index b24bd3a20d0..6bf685f6800 100644 --- a/docs/content/en/docs/environment/templating.md +++ b/docs/content/en/docs/environment/templating.md @@ -20,6 +20,7 @@ List of fields that support templating: * `deploy.helm.releases.setValueTemplates` (see [Deploying with helm]({{< relref "/docs/pipeline-stages/deployers#deploying-with-helm)" >}})) * `deploy.helm.releases.name` (see [Deploying with helm]({{< relref "/docs/pipeline-stages/deployers#deploying-with-helm)" >}})) * `deploy.helm.releases.namespace` (see [Deploying with helm]({{< relref "/docs/pipeline-stages/deployers#deploying-with-helm)" >}})) +* `deploy.helm.releases.version` (see [Deploying with helm]({{< relref "/docs/pipeline-stages/deployers#deploying-with-helm)" >}})) * `deploy.kubectl.defaultNamespace` * `deploy.kustomize.defaultNamespace` * `portForward.namespace` diff --git a/pkg/skaffold/deploy/helm/args.go b/pkg/skaffold/deploy/helm/args.go index 8ac79e350c4..d8959d59ff2 100644 --- a/pkg/skaffold/deploy/helm/args.go +++ b/pkg/skaffold/deploy/helm/args.go @@ -42,6 +42,7 @@ type installOpts struct { helmVersion semver.Version postRenderer string repo string + version string } // constructOverrideArgs creates the command line arguments for overrides @@ -146,8 +147,8 @@ func (h *Deployer) installArgs(r latestV1.HelmRelease, builds []graph.Artifact, // 2) Package chart into a .tgz archive with specific version and then deploy // that packaged chart. This way user can apply any version and appVersion // for the chart. - if r.Packaged == nil && r.Version != "" { - args = append(args, "--version", r.Version) + if r.Packaged == nil && o.version != "" { + args = append(args, "--version", o.version) } args = append(args, o.chartPath) diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index 1be648da511..c857f514221 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -230,7 +230,11 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art if err != nil { return nil, userErr(fmt.Sprintf("cannot expand release name %q", r.Name), err) } - results, err := h.deployRelease(ctx, out, releaseName, r, builds, valuesSet, h.bV) + chartVersion, err := util.ExpandEnvTemplateOrFail(r.Version, nil) + if err != nil { + return nil, userErr(fmt.Sprintf("cannot expand chart version %q", r.Version), err) + } + results, err := h.deployRelease(ctx, out, releaseName, r, builds, valuesSet, h.bV, chartVersion) if err != nil { return nil, userErr(fmt.Sprintf("deploying %q", releaseName), err) } @@ -418,7 +422,7 @@ func (h *Deployer) Render(ctx context.Context, out io.Writer, builds []graph.Art } // deployRelease deploys a single release -func (h *Deployer) deployRelease(ctx context.Context, out io.Writer, releaseName string, r latestV1.HelmRelease, builds []graph.Artifact, valuesSet map[string]bool, helmVersion semver.Version) ([]types.Artifact, error) { +func (h *Deployer) deployRelease(ctx context.Context, out io.Writer, releaseName string, r latestV1.HelmRelease, builds []graph.Artifact, valuesSet map[string]bool, helmVersion semver.Version, chartVersion string) ([]types.Artifact, error) { var err error opts := installOpts{ releaseName: releaseName, @@ -428,6 +432,7 @@ func (h *Deployer) deployRelease(ctx context.Context, out io.Writer, releaseName chartPath: chartSource(r), helmVersion: helmVersion, repo: r.Repo, + version: chartVersion, } var installEnv []string diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index 072071abc52..6b4a978634e 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -141,6 +141,17 @@ var testDeployConfigValuesFilesTemplated = latestV1.HelmDeploy{ }}, } +var testDeployConfigVersionTemplated = latestV1.HelmDeploy{ + Releases: []latestV1.HelmRelease{{ + Name: "skaffold-helm", + ChartPath: "examples/test", + ArtifactOverrides: map[string]string{ + "image": "skaffold-helm", + }, + Version: "{{.VERSION}}", + }}, +} + var testDeployConfigSetFiles = latestV1.HelmDeploy{ Releases: []latestV1.HelmRelease{{ Name: "skaffold-helm", @@ -899,6 +910,18 @@ func TestHelmDeploy(t *testing.T) { helm: testDeployConfigValuesFilesTemplated, builds: testBuilds, }, + { + description: "deploy with templated version", + commands: testutil. + CmdRunWithOutput("helm version --client", version31). + AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm --version 1.0 examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), + env: []string{"VERSION=1.0"}, + helm: testDeployConfigVersionTemplated, + builds: testBuilds, + }, { description: "deploy with setFiles", commands: testutil. From db90d3815cc3657144cb1b23bbcc79f2eea7279f Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Mon, 12 Jul 2021 16:41:07 -0700 Subject: [PATCH 073/103] refactor ShouldDisplaySurveyPrompt from config package to survey (#6187) * add survey config and -id flag to survey command * add tests * revert not required * code review comments * refactor ShouldDisplaySurveyPrompt from config package to survey * remove static time.Now for testing and use time.Now.Add in tests * move recentlyPromptedOrTaken and isSurveyPromptDisabled to survey. Create a new timeutil package * code review comments * fix rebase --- cmd/skaffold/app/cmd/cmd.go | 5 +- pkg/skaffold/config/util.go | 32 +----- pkg/skaffold/config/util_test.go | 157 +---------------------------- pkg/skaffold/survey/survey.go | 22 ++++ pkg/skaffold/survey/survey_test.go | 121 ++++++++++++++++++++++ pkg/skaffold/timeutil/util.go | 32 ++++++ pkg/skaffold/timeutil/util_test.go | 55 ++++++++++ 7 files changed, 237 insertions(+), 187 deletions(-) create mode 100644 pkg/skaffold/timeutil/util.go create mode 100644 pkg/skaffold/timeutil/util_test.go diff --git a/cmd/skaffold/app/cmd/cmd.go b/cmd/skaffold/app/cmd/cmd.go index 5dc0ef3c87c..c2ac49beb94 100644 --- a/cmd/skaffold/app/cmd/cmd.go +++ b/cmd/skaffold/app/cmd/cmd.go @@ -65,6 +65,7 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { updateMsg := make(chan string, 1) surveyPrompt := make(chan bool, 1) var metricsPrompt bool + s := survey.New(opts.GlobalConfig) rootCmd := &cobra.Command{ Use: "skaffold", @@ -113,7 +114,7 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { // Always perform all checks. go func() { updateMsg <- updateCheckForReleasedVersionsIfNotDisabled(versionInfo.Version) - surveyPrompt <- config.ShouldDisplaySurveyPrompt(opts.GlobalConfig) + surveyPrompt <- s.ShouldDisplaySurveyPrompt() }() metricsPrompt = prompt.ShouldDisplayMetricsPrompt(opts.GlobalConfig) return nil @@ -134,7 +135,7 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { select { case shouldDisplay := <-surveyPrompt: if shouldDisplay { - if err := survey.New(opts.GlobalConfig).DisplaySurveyPrompt(cmd.OutOrStdout()); err != nil { + if err := s.DisplaySurveyPrompt(cmd.OutOrStdout()); err != nil { fmt.Fprintf(cmd.OutOrStderr(), "%v\n", err) } } diff --git a/pkg/skaffold/config/util.go b/pkg/skaffold/config/util.go index d5f736e3875..d7ec8a0fd5a 100644 --- a/pkg/skaffold/config/util.go +++ b/pkg/skaffold/config/util.go @@ -31,6 +31,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/cluster" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/timeutil" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" ) @@ -307,26 +308,6 @@ func IsUpdateCheckEnabled(configfile string) bool { return cfg == nil || cfg.UpdateCheck == nil || *cfg.UpdateCheck } -func ShouldDisplaySurveyPrompt(configfile string) bool { - cfg, disabled := isSurveyPromptDisabled(configfile) - return !disabled && !recentlyPromptedOrTaken(cfg) -} - -func isSurveyPromptDisabled(configfile string) (*ContextConfig, bool) { - cfg, err := GetConfigForCurrentKubectx(configfile) - if err != nil { - return nil, false - } - return cfg, cfg != nil && cfg.Survey != nil && cfg.Survey.DisablePrompt != nil && *cfg.Survey.DisablePrompt -} - -func recentlyPromptedOrTaken(cfg *ContextConfig) bool { - if cfg == nil || cfg.Survey == nil { - return false - } - return lessThan(cfg.Survey.LastTaken, 90*24*time.Hour) || lessThan(cfg.Survey.LastPrompted, 10*24*time.Hour) -} - func ShouldDisplayUpdateMsg(configfile string) bool { cfg, err := GetConfigForCurrentKubectx(configfile) if err != nil { @@ -335,7 +316,7 @@ func ShouldDisplayUpdateMsg(configfile string) bool { if cfg == nil || cfg.UpdateCheckConfig == nil { return true } - return !lessThan(cfg.UpdateCheckConfig.LastPrompted, 24*time.Hour) + return !timeutil.LessThan(cfg.UpdateCheckConfig.LastPrompted, 24*time.Hour) } // UpdateMsgDisplayed updates the `last-prompted` config for `update-config` in @@ -363,15 +344,6 @@ func UpdateMsgDisplayed(configFile string) error { return err } -func lessThan(date string, duration time.Duration) bool { - t, err := time.Parse(time.RFC3339, date) - if err != nil { - logrus.Debugf("could not parse date %q", date) - return false - } - return current().Sub(t) < duration -} - func UpdateGlobalSurveyTaken(configFile string) error { // Today's date today := current().Format(time.RFC3339) diff --git a/pkg/skaffold/config/util_test.go b/pkg/skaffold/config/util_test.go index cae36f0306c..14c1779661b 100644 --- a/pkg/skaffold/config/util_test.go +++ b/pkg/skaffold/config/util_test.go @@ -451,155 +451,6 @@ func TestK3dClusterName(t *testing.T) { } } -func TestIsSurveyPromptDisabled(t *testing.T) { - tests := []struct { - description string - cfg *ContextConfig - readErr error - expected bool - }{ - { - description: "config disable-prompt is nil returns false", - cfg: &ContextConfig{}, - }, - { - description: "config disable-prompt is true", - cfg: &ContextConfig{Survey: &SurveyConfig{DisablePrompt: util.BoolPtr(true)}}, - expected: true, - }, - { - description: "config disable-prompt is false", - cfg: &ContextConfig{Survey: &SurveyConfig{DisablePrompt: util.BoolPtr(false)}}, - }, - { - description: "disable prompt is nil", - cfg: &ContextConfig{Survey: &SurveyConfig{}}, - }, - { - description: "config is nil", - cfg: nil, - }, - { - description: "config has err", - cfg: nil, - readErr: fmt.Errorf("error while reading"), - }, - } - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - t.Override(&GetConfigForCurrentKubectx, func(string) (*ContextConfig, error) { return test.cfg, test.readErr }) - _, actual := isSurveyPromptDisabled("dummyconfig") - t.CheckDeepEqual(test.expected, actual) - }) - } -} - -func TestLessThan(t *testing.T) { - tests := []struct { - description string - date string - duration time.Duration - expected bool - }{ - { - description: "date is less than 10 days from 01/30/2019", - date: "2019-01-22T13:04:05Z", - duration: 10 * 24 * time.Hour, - expected: true, - }, - { - description: "date is not less than 10 days from 01/30/2019", - date: "2019-01-19T13:04:05Z", - duration: 10 * 24 * time.Hour, - }, - { - description: "date is not right format", - date: "01-19=20129", - expected: false, - }, - } - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - t.Override(¤t, func() time.Time { - t, _ := time.Parse(time.RFC3339, "2019-01-30T12:04:05Z") - return t - }) - t.CheckDeepEqual(test.expected, lessThan(test.date, test.duration)) - }) - } -} - -func TestShouldDisplayPrompt(t *testing.T) { - tests := []struct { - description string - cfg *ContextConfig - expected bool - }{ - { - description: "should not display prompt when prompt is disabled", - cfg: &ContextConfig{Survey: &SurveyConfig{DisablePrompt: util.BoolPtr(true)}}, - }, - { - description: "should not display prompt when last prompted is less than 2 weeks", - cfg: &ContextConfig{ - Survey: &SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastPrompted: "2019-01-22T00:00:00Z", - }, - }, - }, - { - description: "should not display prompt when last taken in less than 3 months", - cfg: &ContextConfig{ - Survey: &SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastTaken: "2018-11-22T00:00:00Z", - }, - }, - }, - { - description: "should display prompt when last prompted is before 2 weeks", - cfg: &ContextConfig{ - Survey: &SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastPrompted: "2019-01-10T00:00:00Z", - }, - }, - expected: true, - }, - { - description: "should display prompt when last taken is before than 3 months ago", - cfg: &ContextConfig{ - Survey: &SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastTaken: "2017-11-10T00:00:00Z", - }, - }, - expected: true, - }, - { - description: "should not display prompt when last taken is recent than 3 months ago", - cfg: &ContextConfig{ - Survey: &SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastTaken: "2019-01-10T00:00:00Z", - LastPrompted: "2019-01-10T00:00:00Z", - }, - }, - }, - } - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - t.Override(&GetConfigForCurrentKubectx, func(string) (*ContextConfig, error) { return test.cfg, nil }) - t.Override(¤t, func() time.Time { - t, _ := time.Parse(time.RFC3339, "2019-01-30T12:04:05Z") - return t - }) - t.CheckDeepEqual(test.expected, ShouldDisplaySurveyPrompt("dummyconfig")) - }) - } -} - func TestGetDefaultRepo(t *testing.T) { tests := []struct { description string @@ -831,9 +682,8 @@ kubeContexts: []`, } func TestShouldDisplayUpdateMsg(t *testing.T) { - today, _ := time.Parse(time.RFC3339, "2021-01-01T12:04:05Z") - todayStr := "2021-01-01T00:00:00Z" - yesterday := "2020-12-22T00:00:00Z" + todayStr := time.Now().Format(time.RFC3339) + yesterday := time.Now().AddDate(0, 0, -1).Format(time.RFC3339) tests := []struct { description string cfg *ContextConfig @@ -856,9 +706,6 @@ func TestShouldDisplayUpdateMsg(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { t.Override(&GetConfigForCurrentKubectx, func(string) (*ContextConfig, error) { return test.cfg, nil }) - t.Override(¤t, func() time.Time { - return today - }) t.CheckDeepEqual(test.expected, ShouldDisplayUpdateMsg("dummyconfig")) }) } diff --git a/pkg/skaffold/survey/survey.go b/pkg/skaffold/survey/survey.go index cd20d8eff5e..c98da03c701 100644 --- a/pkg/skaffold/survey/survey.go +++ b/pkg/skaffold/survey/survey.go @@ -20,12 +20,14 @@ import ( "context" "fmt" "io" + "time" "github.com/pkg/browser" "github.com/sirupsen/logrus" sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/timeutil" ) const ( @@ -56,6 +58,26 @@ func New(configFile string) *Runner { } } +func (s *Runner) ShouldDisplaySurveyPrompt() bool { + cfg, disabled := isSurveyPromptDisabled(s.configFile) + return !disabled && !recentlyPromptedOrTaken(cfg) +} + +func isSurveyPromptDisabled(configfile string) (*sConfig.ContextConfig, bool) { + cfg, err := sConfig.GetConfigForCurrentKubectx(configfile) + if err != nil { + return nil, false + } + return cfg, cfg != nil && cfg.Survey != nil && cfg.Survey.DisablePrompt != nil && *cfg.Survey.DisablePrompt +} + +func recentlyPromptedOrTaken(cfg *sConfig.ContextConfig) bool { + if cfg == nil || cfg.Survey == nil { + return false + } + return timeutil.LessThan(cfg.Survey.LastTaken, 90*24*time.Hour) || timeutil.LessThan(cfg.Survey.LastPrompted, 10*24*time.Hour) +} + func (s *Runner) DisplaySurveyPrompt(out io.Writer) error { if isStdOut(out) { output.Green.Fprintf(out, hats.prompt()) diff --git a/pkg/skaffold/survey/survey_test.go b/pkg/skaffold/survey/survey_test.go index fd5182831ac..3a32d082d83 100644 --- a/pkg/skaffold/survey/survey_test.go +++ b/pkg/skaffold/survey/survey_test.go @@ -18,9 +18,13 @@ package survey import ( "bytes" + "fmt" "io" "testing" + "time" + sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -53,3 +57,120 @@ func TestDisplaySurveyForm(t *testing.T) { }) } } + +func TestShouldDisplayPrompt(t *testing.T) { + tenDaysAgo := time.Now().AddDate(0, 0, -10).Format(time.RFC3339) + fiveDaysAgo := time.Now().AddDate(0, 0, -5).Format(time.RFC3339) + // less than 90 days ago + twoMonthsAgo := time.Now().AddDate(0, -2, -5).Format(time.RFC3339) + // at least 90 days ago + threeMonthsAgo := time.Now().AddDate(0, -3, -5).Format(time.RFC3339) + + tests := []struct { + description string + cfg *sConfig.ContextConfig + expected bool + }{ + { + description: "should not display prompt when prompt is disabled", + cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(true)}}, + }, + { + description: "should not display prompt when last prompted is less than 2 weeks", + cfg: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastPrompted: fiveDaysAgo, + }, + }, + }, + { + description: "should not display prompt when last taken in less than 3 months", + cfg: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastTaken: twoMonthsAgo, + }, + }, + }, + { + description: "should display prompt when last prompted is before 2 weeks", + cfg: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastPrompted: tenDaysAgo, + }, + }, + expected: true, + }, + { + description: "should display prompt when last taken is before than 3 months ago", + cfg: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastTaken: threeMonthsAgo, + }, + }, + expected: true, + }, + { + description: "should not display prompt when last taken is recent than 3 months ago", + cfg: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastTaken: twoMonthsAgo, + LastPrompted: twoMonthsAgo, + }, + }, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&sConfig.GetConfigForCurrentKubectx, func(string) (*sConfig.ContextConfig, error) { return test.cfg, nil }) + t.CheckDeepEqual(test.expected, New("test").ShouldDisplaySurveyPrompt()) + }) + } +} + +func TestIsSurveyPromptDisabled(t *testing.T) { + tests := []struct { + description string + cfg *sConfig.ContextConfig + readErr error + expected bool + }{ + { + description: "config disable-prompt is nil returns false", + cfg: &sConfig.ContextConfig{}, + }, + { + description: "config disable-prompt is true", + cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(true)}}, + expected: true, + }, + { + description: "config disable-prompt is false", + cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(false)}}, + }, + { + description: "disable prompt is nil", + cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{}}, + }, + { + description: "config is nil", + cfg: nil, + }, + { + description: "config has err", + cfg: nil, + readErr: fmt.Errorf("error while reading"), + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&sConfig.GetConfigForCurrentKubectx, func(string) (*sConfig.ContextConfig, error) { return test.cfg, test.readErr }) + _, actual := isSurveyPromptDisabled("dummyconfig") + t.CheckDeepEqual(test.expected, actual) + }) + } +} diff --git a/pkg/skaffold/timeutil/util.go b/pkg/skaffold/timeutil/util.go new file mode 100644 index 00000000000..8cad2669f5c --- /dev/null +++ b/pkg/skaffold/timeutil/util.go @@ -0,0 +1,32 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package timeutil + +import ( + "time" + + "github.com/sirupsen/logrus" +) + +func LessThan(date string, duration time.Duration) bool { + t, err := time.Parse(time.RFC3339, date) + if err != nil { + logrus.Debugf("could not parse date %q", date) + return false + } + return time.Since(t) < duration +} diff --git a/pkg/skaffold/timeutil/util_test.go b/pkg/skaffold/timeutil/util_test.go new file mode 100644 index 00000000000..8b0b0c74490 --- /dev/null +++ b/pkg/skaffold/timeutil/util_test.go @@ -0,0 +1,55 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package timeutil + +import ( + "testing" + "time" + + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestLessThan(t *testing.T) { + tests := []struct { + description string + date string + duration time.Duration + expected bool + }{ + { + description: "date is less than 10 days from now", + date: time.Now().AddDate(0, 0, -5).Format(time.RFC3339), + duration: 10 * 24 * time.Hour, + expected: true, + }, + { + description: "date is not less than 10 days from now", + date: time.Now().AddDate(0, 0, -11).Format(time.RFC3339), + duration: 10 * 24 * time.Hour, + }, + { + description: "date is not right format", + date: "01-19=20129", + expected: false, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.CheckDeepEqual(test.expected, LessThan(test.date, test.duration)) + }) + } +} From 5501bd8ca7caf3c672c22a3974b7de028d5beb8a Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 13 Jul 2021 04:50:55 -0700 Subject: [PATCH 074/103] refactor: Use globalConfig instead of kubecontext config for survey config. (#6191) --- pkg/skaffold/survey/survey.go | 16 +++--- pkg/skaffold/survey/survey_test.go | 86 +++++++++++++++++------------- 2 files changed, 60 insertions(+), 42 deletions(-) diff --git a/pkg/skaffold/survey/survey.go b/pkg/skaffold/survey/survey.go index c98da03c701..0bec81a8a0c 100644 --- a/pkg/skaffold/survey/survey.go +++ b/pkg/skaffold/survey/survey.go @@ -63,19 +63,23 @@ func (s *Runner) ShouldDisplaySurveyPrompt() bool { return !disabled && !recentlyPromptedOrTaken(cfg) } -func isSurveyPromptDisabled(configfile string) (*sConfig.ContextConfig, bool) { - cfg, err := sConfig.GetConfigForCurrentKubectx(configfile) +func isSurveyPromptDisabled(configfile string) (*sConfig.GlobalConfig, bool) { + cfg, err := sConfig.ReadConfigFile(configfile) if err != nil { return nil, false } - return cfg, cfg != nil && cfg.Survey != nil && cfg.Survey.DisablePrompt != nil && *cfg.Survey.DisablePrompt + return cfg, cfg != nil && cfg.Global != nil && + cfg.Global.Survey != nil && + cfg.Global.Survey.DisablePrompt != nil && + *cfg.Global.Survey.DisablePrompt } -func recentlyPromptedOrTaken(cfg *sConfig.ContextConfig) bool { - if cfg == nil || cfg.Survey == nil { +func recentlyPromptedOrTaken(cfg *sConfig.GlobalConfig) bool { + if cfg == nil || cfg.Global == nil || cfg.Global.Survey == nil { return false } - return timeutil.LessThan(cfg.Survey.LastTaken, 90*24*time.Hour) || timeutil.LessThan(cfg.Survey.LastPrompted, 10*24*time.Hour) + return timeutil.LessThan(cfg.Global.Survey.LastTaken, 90*24*time.Hour) || + timeutil.LessThan(cfg.Global.Survey.LastPrompted, 10*24*time.Hour) } func (s *Runner) DisplaySurveyPrompt(out io.Writer) error { diff --git a/pkg/skaffold/survey/survey_test.go b/pkg/skaffold/survey/survey_test.go index 3a32d082d83..99a65d448ac 100644 --- a/pkg/skaffold/survey/survey_test.go +++ b/pkg/skaffold/survey/survey_test.go @@ -68,65 +68,73 @@ func TestShouldDisplayPrompt(t *testing.T) { tests := []struct { description string - cfg *sConfig.ContextConfig + cfg *sConfig.GlobalConfig expected bool }{ { description: "should not display prompt when prompt is disabled", - cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(true)}}, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(true)}, + }}, }, { description: "should not display prompt when last prompted is less than 2 weeks", - cfg: &sConfig.ContextConfig{ - Survey: &sConfig.SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastPrompted: fiveDaysAgo, - }, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastPrompted: fiveDaysAgo, + }}, }, }, { description: "should not display prompt when last taken in less than 3 months", - cfg: &sConfig.ContextConfig{ - Survey: &sConfig.SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastTaken: twoMonthsAgo, - }, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastTaken: twoMonthsAgo, + }}, }, }, { description: "should display prompt when last prompted is before 2 weeks", - cfg: &sConfig.ContextConfig{ - Survey: &sConfig.SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastPrompted: tenDaysAgo, - }, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastPrompted: tenDaysAgo, + }}, }, expected: true, }, { description: "should display prompt when last taken is before than 3 months ago", - cfg: &sConfig.ContextConfig{ - Survey: &sConfig.SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastTaken: threeMonthsAgo, - }, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastTaken: threeMonthsAgo, + }}, }, expected: true, }, { description: "should not display prompt when last taken is recent than 3 months ago", - cfg: &sConfig.ContextConfig{ - Survey: &sConfig.SurveyConfig{ - DisablePrompt: util.BoolPtr(false), - LastTaken: twoMonthsAgo, - LastPrompted: twoMonthsAgo, - }, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{ + Survey: &sConfig.SurveyConfig{ + DisablePrompt: util.BoolPtr(false), + LastTaken: twoMonthsAgo, + LastPrompted: twoMonthsAgo, + }}, }, }, } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - t.Override(&sConfig.GetConfigForCurrentKubectx, func(string) (*sConfig.ContextConfig, error) { return test.cfg, nil }) + t.Override(&sConfig.ReadConfigFile, func(string) (*sConfig.GlobalConfig, error) { return test.cfg, nil }) t.CheckDeepEqual(test.expected, New("test").ShouldDisplaySurveyPrompt()) }) } @@ -135,26 +143,32 @@ func TestShouldDisplayPrompt(t *testing.T) { func TestIsSurveyPromptDisabled(t *testing.T) { tests := []struct { description string - cfg *sConfig.ContextConfig + cfg *sConfig.GlobalConfig readErr error expected bool }{ { description: "config disable-prompt is nil returns false", - cfg: &sConfig.ContextConfig{}, + cfg: &sConfig.GlobalConfig{}, }, { description: "config disable-prompt is true", - cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(true)}}, - expected: true, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(true)}}, + }, + expected: true, }, { description: "config disable-prompt is false", - cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(false)}}, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{DisablePrompt: util.BoolPtr(false)}}, + }, }, { description: "disable prompt is nil", - cfg: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{}}, + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{}}, + }, }, { description: "config is nil", @@ -168,7 +182,7 @@ func TestIsSurveyPromptDisabled(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - t.Override(&sConfig.GetConfigForCurrentKubectx, func(string) (*sConfig.ContextConfig, error) { return test.cfg, test.readErr }) + t.Override(&sConfig.ReadConfigFile, func(string) (*sConfig.GlobalConfig, error) { return test.cfg, test.readErr }) _, actual := isSurveyPromptDisabled("dummyconfig") t.CheckDeepEqual(test.expected, actual) }) From c14e5625439f77f2748f144714040d5423dfe2a8 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 13 Jul 2021 06:39:50 -0700 Subject: [PATCH 075/103] Don't update survey prompt if survey prompt is not shown to stdout (#6192) --- pkg/skaffold/survey/survey.go | 13 +++++++------ pkg/skaffold/survey/survey_test.go | 20 +++++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pkg/skaffold/survey/survey.go b/pkg/skaffold/survey/survey.go index 0bec81a8a0c..2f94f0f95a4 100644 --- a/pkg/skaffold/survey/survey.go +++ b/pkg/skaffold/survey/survey.go @@ -43,9 +43,9 @@ Tip: To permanently disable the survey prompt, run: var ( // for testing - isStdOut = output.IsStdout - open = browser.OpenURL - updateConfig = sConfig.UpdateGlobalSurveyPrompted + isStdOut = output.IsStdout + open = browser.OpenURL + updateSurveyPrompted = sConfig.UpdateGlobalSurveyPrompted ) type Runner struct { @@ -83,10 +83,11 @@ func recentlyPromptedOrTaken(cfg *sConfig.GlobalConfig) bool { } func (s *Runner) DisplaySurveyPrompt(out io.Writer) error { - if isStdOut(out) { - output.Green.Fprintf(out, hats.prompt()) + if !isStdOut(out) { + return nil } - return updateConfig(s.configFile) + output.Green.Fprintf(out, hats.prompt()) + return updateSurveyPrompted(s.configFile) } func (s *Runner) OpenSurveyForm(_ context.Context, out io.Writer, id string) error { diff --git a/pkg/skaffold/survey/survey_test.go b/pkg/skaffold/survey/survey_test.go index 99a65d448ac..31ca8f15503 100644 --- a/pkg/skaffold/survey/survey_test.go +++ b/pkg/skaffold/survey/survey_test.go @@ -30,18 +30,23 @@ import ( func TestDisplaySurveyForm(t *testing.T) { tests := []struct { - description string - mockStdOut bool - expected string + description string + mockSurveyPrompted func(_ string) error + expected string + mockStdOut bool }{ { - description: "std out", - mockStdOut: true, + description: "std out", + mockStdOut: true, + mockSurveyPrompted: func(_ string) error { return nil }, expected: `Help improve Skaffold with our 2-minute anonymous survey: run 'skaffold survey' `, }, { description: "not std out", + mockSurveyPrompted: func(_ string) error { + return fmt.Errorf("not expected to call") + }, }, } for _, test := range tests { @@ -50,9 +55,10 @@ func TestDisplaySurveyForm(t *testing.T) { t.Override(&isStdOut, mock) mockOpen := func(string) error { return nil } t.Override(&open, mockOpen) - t.Override(&updateConfig, func(_ string) error { return nil }) + t.Override(&updateSurveyPrompted, test.mockSurveyPrompted) var buf bytes.Buffer - New("test").DisplaySurveyPrompt(&buf) + err := New("test").DisplaySurveyPrompt(&buf) + t.CheckNoError(err) t.CheckDeepEqual(test.expected, buf.String()) }) } From b13aad2beb5933d7c57ba2a3275b6ecff15ec1c8 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 13 Jul 2021 06:43:48 -0700 Subject: [PATCH 076/103] Rename UpdateGlobalSurveyTaken to UpdateHaTSSurveyTaken (#6193) We do not update the last-taken on feature surveys, just HaTS surveys. --- pkg/skaffold/config/util.go | 2 +- pkg/skaffold/config/util_test.go | 2 +- pkg/skaffold/survey/survey.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/skaffold/config/util.go b/pkg/skaffold/config/util.go index d7ec8a0fd5a..5619d73ebab 100644 --- a/pkg/skaffold/config/util.go +++ b/pkg/skaffold/config/util.go @@ -344,7 +344,7 @@ func UpdateMsgDisplayed(configFile string) error { return err } -func UpdateGlobalSurveyTaken(configFile string) error { +func UpdateHaTSSurveyTaken(configFile string) error { // Today's date today := current().Format(time.RFC3339) ai := fmt.Sprintf(updateLastTaken, today) diff --git a/pkg/skaffold/config/util_test.go b/pkg/skaffold/config/util_test.go index 14c1779661b..7cf232affb5 100644 --- a/pkg/skaffold/config/util_test.go +++ b/pkg/skaffold/config/util_test.go @@ -544,7 +544,7 @@ kubeContexts: []`, }) // update the time - err := UpdateGlobalSurveyTaken(cfg) + err := UpdateHaTSSurveyTaken(cfg) t.CheckNoError(err) actualConfig, cfgErr := ReadConfigFile(cfg) diff --git a/pkg/skaffold/survey/survey.go b/pkg/skaffold/survey/survey.go index 2f94f0f95a4..319b286337a 100644 --- a/pkg/skaffold/survey/survey.go +++ b/pkg/skaffold/survey/survey.go @@ -103,7 +103,7 @@ func (s *Runner) OpenSurveyForm(_ context.Context, out io.Writer, id string) err logrus.Debugf("could not open url %s", sc.URL) return err } - // Currently we will only update the global survey taken + // Currently we will only update the global config survey taken // When prompting for the survey, we need to use the same field. - return sConfig.UpdateGlobalSurveyTaken(s.configFile) + return sConfig.UpdateHaTSSurveyTaken(s.configFile) } From 8d0a32f6fd7a6a361e9143567ed406750d633c0a Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 13 Jul 2021 06:53:35 -0700 Subject: [PATCH 077/103] Survey is only active if start date is in past (#6194) --- pkg/skaffold/survey/config.go | 3 ++- pkg/skaffold/survey/config_test.go | 33 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/pkg/skaffold/survey/config.go b/pkg/skaffold/survey/config.go index 2997766f394..94e7c85a54f 100644 --- a/pkg/skaffold/survey/config.go +++ b/pkg/skaffold/survey/config.go @@ -60,7 +60,8 @@ type config struct { } func (s config) isActive() bool { - return s.expiresAt.IsZero() || s.expiresAt.After(time.Now()) + return s.expiresAt.IsZero() || + (s.startsAt.Before(time.Now()) && s.expiresAt.After(time.Now())) } func (s config) prompt() string { diff --git a/pkg/skaffold/survey/config_test.go b/pkg/skaffold/survey/config_test.go index 720decf3550..5940a670a08 100644 --- a/pkg/skaffold/survey/config_test.go +++ b/pkg/skaffold/survey/config_test.go @@ -73,6 +73,14 @@ func TestSurveyActive(t *testing.T) { expiresAt: time.Date(2020, 8, 1, 0, 0, 0, 0, time.UTC), }, }, + { + description: "start date set but expiry in past", + s: config{ + id: "expired", + startsAt: time.Date(2020, 7, 1, 0, 0, 0, 0, time.UTC), + expiresAt: time.Date(2020, 8, 1, 0, 0, 0, 0, time.UTC), + }, + }, { description: "expiry in future", s: config{ @@ -81,6 +89,31 @@ func TestSurveyActive(t *testing.T) { }, expected: true, }, + { + description: "no start date set and expiry in future", + s: config{ + id: "active", + expiresAt: time.Now().AddDate(1, 0, 0), + }, + expected: true, + }, + { + description: "start date set in a month from now", + s: config{ + id: "inactive", + startsAt: time.Now().AddDate(0, 1, 0), + expiresAt: time.Now().AddDate(1, 0, 0), + }, + }, + { + description: "start date set in past and expiry in future", + s: config{ + id: "active", + startsAt: time.Now().AddDate(0, -1, 0), + expiresAt: time.Now().AddDate(1, 0, 0), + }, + expected: true, + }, } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { From a0b7a80497abe0501e2f702e144d4aabd7a67192 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Tue, 13 Jul 2021 14:43:35 -0400 Subject: [PATCH 078/103] Replace missing template values with empty string (#6136) * Replace missing template values with empty string * gofmt * Restore previous behaviour and introduce `default` function --- pkg/skaffold/deploy/helm/helm_test.go | 6 +++--- pkg/skaffold/util/env_template.go | 30 +++++++++++++++++++++++++- pkg/skaffold/util/env_template_test.go | 29 +++++++++++++++++++++++-- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index 6b4a978634e..90693af2cbb 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -119,7 +119,7 @@ var testDeployConfigTemplated = latestV1.HelmDeploy{ SetValueTemplates: map[string]string{ "some.key": "somevalue", "other.key": "{{.FOO}}", - "missing.key": "{{.MISSING}}", + "missing.key": `{{default "" .MISSING}}`, "image.name": "{{.IMAGE_NAME}}", "image.tag": "{{.DIGEST}}", "{{.FOO}}": "somevalue", @@ -894,7 +894,7 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). - AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set image.name=skaffold-helm --set image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set missing.key= --set other.key=FOOBAR --set some.key=somevalue --set FOOBAR=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). + AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set image.name=skaffold-helm --set image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set missing.key= --set other.key=FOOBAR --set some.key=somevalue --set FOOBAR=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), helm: testDeployConfigTemplated, builds: testBuilds, @@ -1355,7 +1355,7 @@ func TestHelmRender(t *testing.T) { shouldErr: false, commands: testutil. CmdRunWithOutput("helm version --client", version31). - AndRun("helm --kube-context kubecontext template skaffold-helm examples/test --set-string image=skaffold-helm:tag1 --set image.name=skaffold-helm --set image.tag=skaffold-helm:tag1 --set missing.key= --set other.key=FOOBAR --set some.key=somevalue --set FOOBAR=somevalue --kubeconfig kubeconfig"), + AndRun("helm --kube-context kubecontext template skaffold-helm examples/test --set-string image=skaffold-helm:tag1 --set image.name=skaffold-helm --set image.tag=skaffold-helm:tag1 --set missing.key= --set other.key=FOOBAR --set some.key=somevalue --set FOOBAR=somevalue --kubeconfig kubeconfig"), helm: testDeployConfigTemplated, builds: []graph.Artifact{ { diff --git a/pkg/skaffold/util/env_template.go b/pkg/skaffold/util/env_template.go index 015d93cc3d7..1f123b845a0 100644 --- a/pkg/skaffold/util/env_template.go +++ b/pkg/skaffold/util/env_template.go @@ -20,6 +20,7 @@ import ( "bytes" "fmt" "os" + "reflect" "sort" "strings" "text/template" @@ -30,6 +31,9 @@ import ( // For testing var ( OSEnviron = os.Environ + funcsMap = template.FuncMap{ + "default": defaultFunc, + } ) // ExpandEnvTemplate parses and executes template s with an optional environment map @@ -53,7 +57,7 @@ func ExpandEnvTemplateOrFail(s string, envMap map[string]string) (string, error) // ParseEnvTemplate is a simple wrapper to parse an env template func ParseEnvTemplate(t string) (*template.Template, error) { - return template.New("envTemplate").Parse(t) + return template.New("envTemplate").Funcs(funcsMap).Parse(t) } // ExecuteEnvTemplate executes an envTemplate based on OS environment variables and a custom map @@ -131,3 +135,27 @@ func MapToFlag(m map[string]*string, flag string) ([]string, error) { return kvFlags, nil } + +// defaultFunc is a template function that behaves as sprig's default function. +// See https://masterminds.github.io/sprig/defaults.html#default +func defaultFunc(dflt, value interface{}) interface{} { + if value == nil { + return dflt + } + v := reflect.ValueOf(value) + switch v.Kind() { + case reflect.Array, reflect.Slice: + if v.Len() == 0 { + return dflt + } + case reflect.Ptr: + if v.IsNil() { + return dflt + } + default: + if v.IsZero() { + return dflt + } + } + return value +} diff --git a/pkg/skaffold/util/env_template_test.go b/pkg/skaffold/util/env_template_test.go index 143903a70b0..19163dd1578 100644 --- a/pkg/skaffold/util/env_template_test.go +++ b/pkg/skaffold/util/env_template_test.go @@ -17,6 +17,7 @@ limitations under the License. package util import ( + "fmt" "testing" "github.com/GoogleContainerTools/skaffold/testutil" @@ -62,6 +63,12 @@ func TestEnvTemplate_ExecuteEnvTemplate(t *testing.T) { env: []string{"VAL=KEY"}, shouldErr: true, }, + { + description: "missing results in empty", + template: `{{default "a" .FOO}}:{{.BAR}}`, + customMap: map[string]string{}, + want: "a:", + }, } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { @@ -85,7 +92,6 @@ func TestEnvTemplate_ExpandEnvTemplateOrFail(t *testing.T) { template string customMap map[string]string env []string - option string want string shouldErr bool }{ @@ -102,7 +108,6 @@ func TestEnvTemplate_ExpandEnvTemplateOrFail(t *testing.T) { { description: "variable does not exist", template: "{{.DOES_NOT_EXIST}}", - option: "missingkey=error", shouldErr: true, }, } @@ -174,3 +179,23 @@ func TestMapToFlag(t *testing.T) { }) } } + +func TestDefaultFunc(t *testing.T) { + for _, empty := range []interface{}{nil, false, 0, "", []string{}} { + t.Run(fmt.Sprintf("empties: %v (%T)", empty, empty), func(t *testing.T) { + dflt := "default" + if defaultFunc(dflt, empty) != dflt { + t.Error("did not return default") + } + }) + } + s := "string" + for _, nonEmpty := range []interface{}{&s, true, 1, "hoot", []string{"hoot"}} { + t.Run(fmt.Sprintf("non-empty: %v (%T)", nonEmpty, nonEmpty), func(t *testing.T) { + dflt := "default" + if defaultFunc(dflt, nonEmpty) == dflt { + t.Error("should not return default") + } + }) + } +} From 634ad08c98165053787aa534eb421859a9a414c5 Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Tue, 13 Jul 2021 12:19:00 -0700 Subject: [PATCH 079/103] [refactor] Remove Provider Interface (#6190) * Remove Provider interface * key singletons on kubecontext through component package variables --- integration/render_test.go | 8 +- pkg/skaffold/access/provider.go | 70 ----------- pkg/skaffold/debug/provider.go | 80 ------------ .../component/kubernetes/accessor_test.go | 75 ++++++++++++ .../deploy/component/kubernetes/component.go | 114 ++++++++++++++++++ .../component/kubernetes/debugger_test.go | 55 +++++++++ .../component/kubernetes/monitor_test.go} | 38 +++--- pkg/skaffold/deploy/deploy.go | 22 ---- pkg/skaffold/deploy/helm/deploy.go | 18 +-- pkg/skaffold/deploy/helm/helm_test.go | 14 +-- pkg/skaffold/deploy/kpt/kpt.go | 19 +-- pkg/skaffold/deploy/kpt/kpt_test.go | 26 ++-- pkg/skaffold/deploy/kubectl/cli.go | 3 + pkg/skaffold/deploy/kubectl/kubectl.go | 25 ++-- pkg/skaffold/deploy/kubectl/kubectl_test.go | 20 +-- pkg/skaffold/deploy/kustomize/kustomize.go | 20 +-- .../deploy/kustomize/kustomize_test.go | 16 +-- .../portforward/forwarder_manager.go | 23 +++- pkg/skaffold/loader/provider.go | 55 --------- pkg/skaffold/runner/deployer.go | 17 +-- pkg/skaffold/runner/deployer_test.go | 52 ++++++-- pkg/skaffold/runner/v1/deploy_test.go | 3 +- pkg/skaffold/runner/v1/new.go | 18 +-- pkg/skaffold/status/provider.go | 63 ---------- pkg/skaffold/sync/kubectl.go | 4 +- pkg/skaffold/sync/provider.go | 74 ------------ pkg/skaffold/sync/sync.go | 2 +- pkg/skaffold/sync/types.go | 9 +- 28 files changed, 439 insertions(+), 504 deletions(-) delete mode 100644 pkg/skaffold/access/provider.go delete mode 100644 pkg/skaffold/debug/provider.go create mode 100644 pkg/skaffold/deploy/component/kubernetes/accessor_test.go create mode 100644 pkg/skaffold/deploy/component/kubernetes/component.go create mode 100644 pkg/skaffold/deploy/component/kubernetes/debugger_test.go rename pkg/skaffold/{status/provider_test.go => deploy/component/kubernetes/monitor_test.go} (63%) delete mode 100644 pkg/skaffold/loader/provider.go delete mode 100644 pkg/skaffold/status/provider.go delete mode 100644 pkg/skaffold/sync/provider.go diff --git a/integration/render_test.go b/integration/render_test.go index 4e868be176d..62b3073fb1e 100644 --- a/integration/render_test.go +++ b/integration/render_test.go @@ -30,9 +30,9 @@ import ( "github.com/GoogleContainerTools/skaffold/integration/skaffold" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/helm" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -89,7 +89,7 @@ spec: }, }, }}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Manifests: []string{"deployment.yaml"}, }) t.RequireNoError(err) @@ -249,7 +249,7 @@ spec: Opts: config.SkaffoldOptions{ AddSkaffoldLabels: true, }, - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Manifests: []string{"deployment.yaml"}, }) t.RequireNoError(err) @@ -435,7 +435,7 @@ spec: }, }, }}), - }, nil, deploy.NoopComponentProvider, &latestV1.HelmDeploy{ + }, &label.DefaultLabeller{}, &latestV1.HelmDeploy{ Releases: test.helmReleases, }) t.RequireNoError(err) diff --git a/pkg/skaffold/access/provider.go b/pkg/skaffold/access/provider.go deleted file mode 100644 index 9ddec163ee3..00000000000 --- a/pkg/skaffold/access/provider.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2021 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package access - -import ( - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" -) - -type Provider interface { - GetKubernetesAccessor(portforward.Config, *kubernetes.ImageList) Accessor - GetNoopAccessor() Accessor -} - -type fullProvider struct { - label label.Config - k8sAccessor map[string]Accessor -} - -func NewAccessorProvider(labelConfig label.Config) Provider { - return &fullProvider{label: labelConfig, k8sAccessor: make(map[string]Accessor)} -} - -func (p *fullProvider) GetKubernetesAccessor(config portforward.Config, podSelector *kubernetes.ImageList) Accessor { - if !config.PortForwardOptions().Enabled() { - return &NoopAccessor{} - } - context := config.GetKubeContext() - - if p.k8sAccessor[context] == nil { - p.k8sAccessor[context] = portforward.NewForwarderManager(kubectl.NewCLI(config, ""), - podSelector, - p.label.RunIDSelector(), - config.Mode(), - config.PortForwardOptions(), - config.PortForwardResources()) - } - return p.k8sAccessor[context] -} - -func (p *fullProvider) GetNoopAccessor() Accessor { - return &NoopAccessor{} -} - -// NoopProvider is used in tests -type NoopProvider struct{} - -func (p *NoopProvider) GetKubernetesAccessor(_ portforward.Config, _ *kubernetes.ImageList) Accessor { - return &NoopAccessor{} -} - -func (p *NoopProvider) GetNoopAccessor() Accessor { - return &NoopAccessor{} -} diff --git a/pkg/skaffold/debug/provider.go b/pkg/skaffold/debug/provider.go deleted file mode 100644 index ed9ae35466d..00000000000 --- a/pkg/skaffold/debug/provider.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2021 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package debug - -import ( - "sync" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/debugging" -) - -// Provider is an object that distributes instances of all implementations of -// Debugger in the Skaffold codebase. -type Provider interface { - // GetKubernetesDebugger returns a new instance of the Kubernetes Debugger implementation - GetKubernetesDebugger(*kubernetes.ImageList) Debugger - - // GetNoopDebugger returns a new instance of a Debugger that does nothing. - GetNoopDebugger() Debugger -} - -type fullProvider struct { - kubernetesDebugger func(*kubernetes.ImageList) Debugger -} - -var ( - provider *fullProvider - once sync.Once -) - -// NewDebugProvider instantiates the Provider object that is used to retrieve instances of Debuggers. -// This method is used by the Runner, which then passes it along to the Deployers it instantiates. -func NewDebugProvider(debugConfig Config) Provider { - once.Do(func() { - provider = &fullProvider{ - kubernetesDebugger: func(podSelector *kubernetes.ImageList) Debugger { - if debugConfig.Mode() != config.RunModes.Debug { - return &NoopDebugger{} - } - - return debugging.NewContainerManager(podSelector) - }, - } - }) - return provider -} - -func (p *fullProvider) GetKubernetesDebugger(podSelector *kubernetes.ImageList) Debugger { - return p.kubernetesDebugger(podSelector) -} - -func (p *fullProvider) GetNoopDebugger() Debugger { - return &NoopDebugger{} -} - -// NoopProvider is used in tests -type NoopProvider struct{} - -func (p *NoopProvider) GetKubernetesDebugger(_ *kubernetes.ImageList) Debugger { - return &NoopDebugger{} -} - -func (p *NoopProvider) GetNoopDebugger() Debugger { - return &NoopDebugger{} -} diff --git a/pkg/skaffold/deploy/component/kubernetes/accessor_test.go b/pkg/skaffold/deploy/component/kubernetes/accessor_test.go new file mode 100644 index 00000000000..40ba70920f6 --- /dev/null +++ b/pkg/skaffold/deploy/component/kubernetes/accessor_test.go @@ -0,0 +1,75 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubernetes + +import ( + "fmt" + "os" + "reflect" + "testing" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +type mockAccessConfig struct { + portforward.Config + opts config.PortForwardOptions +} + +func (m mockAccessConfig) Mode() config.RunMode { return "" } + +func (m mockAccessConfig) PortForwardOptions() config.PortForwardOptions { return m.opts } + +func (m mockAccessConfig) PortForwardResources() []*v1.PortForwardResource { return nil } + +func TestGetAccessor(t *testing.T) { + tests := []struct { + description string + enabled bool + isNoop bool + }{ + { + description: "unspecified parameter defaults to disabled", + isNoop: true, + }, + { + description: "portForwardEnabled parameter set to true", + enabled: true, + }, + { + description: "portForwardEnabled parameter set to false", + isNoop: true, + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + opts := config.PortForwardOptions{} + if test.enabled { + opts.Append("1") // default enabled mode + } + a := NewAccessor(mockAccessConfig{opts: opts}, test.description, nil, nil, label.NewLabeller(false, nil, "")) + fmt.Fprintf(os.Stdout, "retrieved accessor: %+v\n", a) + t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(a)).Type() == reflect.TypeOf(access.NoopAccessor{})) + }) + } +} diff --git a/pkg/skaffold/deploy/component/kubernetes/component.go b/pkg/skaffold/deploy/component/kubernetes/component.go new file mode 100644 index 00000000000..4659234cec8 --- /dev/null +++ b/pkg/skaffold/deploy/component/kubernetes/component.go @@ -0,0 +1,114 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubernetes + +import ( + gosync "sync" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/debugging" + k8sloader "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" + k8slogger "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/logger" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" + k8sstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" +) + +// For testing +var ( + NewAccessor = newAccessor + NewDebugger = newDebugger + NewImageLoader = newImageLoader + NewLogger = newLogger + NewMonitor = newMonitor + NewSyncer = newSyncer + + accessLock gosync.Mutex + k8sAccessor map[string]access.Accessor + + monitorLock gosync.Mutex + k8sMonitor map[string]status.Monitor +) + +func newAccessor(cfg portforward.Config, kubeContext string, cli *kubectl.CLI, podSelector kubernetes.PodSelector, labeller label.Config) access.Accessor { + accessLock.Lock() + defer accessLock.Unlock() + if k8sAccessor == nil { + k8sAccessor = make(map[string]access.Accessor) + } + if k8sAccessor[kubeContext] == nil { + if !cfg.PortForwardOptions().Enabled() { + k8sAccessor[kubeContext] = &access.NoopAccessor{} + } + m := portforward.NewForwarderManager(cli, podSelector, labeller.RunIDSelector(), cfg.Mode(), cfg.PortForwardOptions(), cfg.PortForwardResources()) + if m == nil { + k8sAccessor[kubeContext] = &access.NoopAccessor{} + } else { + k8sAccessor[kubeContext] = m + } + } + + return k8sAccessor[kubeContext] +} + +func newDebugger(mode config.RunMode, podSelector kubernetes.PodSelector) debug.Debugger { + if mode != config.RunModes.Debug { + return &debug.NoopDebugger{} + } + + return debugging.NewContainerManager(podSelector) +} + +func newImageLoader(cfg k8sloader.Config, cli *kubectl.CLI) loader.ImageLoader { + if cfg.LoadImages() { + return k8sloader.NewImageLoader(cfg.GetKubeContext(), cli) + } + return &loader.NoopImageLoader{} +} + +func newLogger(config k8slogger.Config, cli *kubectl.CLI, podSelector kubernetes.PodSelector) log.Logger { + return k8slogger.NewLogAggregator(cli, podSelector, config) +} + +func newMonitor(cfg k8sstatus.Config, kubeContext string, labeller *label.DefaultLabeller) status.Monitor { + monitorLock.Lock() + defer monitorLock.Unlock() + if k8sMonitor == nil { + k8sMonitor = make(map[string]status.Monitor) + } + if k8sMonitor[kubeContext] == nil { + enabled := cfg.StatusCheck() + if enabled != nil && !*enabled { // assume disabled only if explicitly set to false + k8sMonitor[kubeContext] = &status.NoopMonitor{} + } else { + k8sMonitor[kubeContext] = k8sstatus.NewStatusMonitor(cfg, labeller) + } + } + return k8sMonitor[kubeContext] +} + +func newSyncer(config sync.Config, cli *kubectl.CLI) sync.Syncer { + return sync.NewPodSyncer(cli, config) +} diff --git a/pkg/skaffold/deploy/component/kubernetes/debugger_test.go b/pkg/skaffold/deploy/component/kubernetes/debugger_test.go new file mode 100644 index 00000000000..e6fda2498e3 --- /dev/null +++ b/pkg/skaffold/deploy/component/kubernetes/debugger_test.go @@ -0,0 +1,55 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubernetes + +import ( + "reflect" + "testing" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestGetDebugger(t *testing.T) { + tests := []struct { + description string + runMode config.RunMode + isNoop bool + }{ + { + description: "unspecified run mode defaults to disabled", + isNoop: true, + }, + { + description: "run mode set to debug", + runMode: config.RunModes.Debug, + }, + { + description: "run mode set to dev", + runMode: config.RunModes.Dev, + isNoop: true, + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + d := NewDebugger(test.runMode, nil) + t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(d)).Type() == reflect.TypeOf(debug.NoopDebugger{})) + }) + } +} diff --git a/pkg/skaffold/status/provider_test.go b/pkg/skaffold/deploy/component/kubernetes/monitor_test.go similarity index 63% rename from pkg/skaffold/status/provider_test.go rename to pkg/skaffold/deploy/component/kubernetes/monitor_test.go index c8a2dd8099e..e89f79d18c5 100644 --- a/pkg/skaffold/status/provider_test.go +++ b/pkg/skaffold/deploy/component/kubernetes/monitor_test.go @@ -14,19 +14,34 @@ See the License for the specific language governing permissions and limitations under the License. */ -package status +package kubernetes import ( "reflect" "testing" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" + k8sstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" ) -func TestMonitorProvider(t *testing.T) { +type mockStatusConfig struct { + k8sstatus.Config + statusCheck *bool +} + +func (m mockStatusConfig) StatusCheck() *bool { return m.statusCheck } + +func (m mockStatusConfig) GetKubeContext() string { return "" } + +func (m mockStatusConfig) StatusCheckDeadlineSeconds() int { return 0 } + +func (m mockStatusConfig) Muted() config.Muted { return config.Muted{} } + +func TestGetMonitor(t *testing.T) { tests := []struct { description string statusCheck *bool @@ -48,21 +63,8 @@ func TestMonitorProvider(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - m := NewMonitorProvider(nil).GetKubernetesMonitor(mockConfig{statusCheck: test.statusCheck}) - t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(m)).Type() == reflect.TypeOf(NoopMonitor{})) + m := NewMonitor(mockStatusConfig{statusCheck: test.statusCheck}, test.description, label.NewLabeller(false, nil, "")) + t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(m)).Type() == reflect.TypeOf(status.NoopMonitor{})) }) } } - -type mockConfig struct { - status.Config - statusCheck *bool -} - -func (m mockConfig) StatusCheck() *bool { return m.statusCheck } - -func (m mockConfig) GetKubeContext() string { return "" } - -func (m mockConfig) StatusCheckDeadlineSeconds() int { return 0 } - -func (m mockConfig) Muted() config.Muted { return config.Muted{} } diff --git a/pkg/skaffold/deploy/deploy.go b/pkg/skaffold/deploy/deploy.go index 56cda4434e8..db48d8d625b 100644 --- a/pkg/skaffold/deploy/deploy.go +++ b/pkg/skaffold/deploy/deploy.go @@ -23,22 +23,11 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" ) -// NoopComponentProvider is for tests -var NoopComponentProvider = ComponentProvider{ - Accessor: &access.NoopProvider{}, - Debugger: &debug.NoopProvider{}, - ImageLoader: &loader.NoopProvider{}, - Logger: &log.NoopProvider{}, - Monitor: &status.NoopProvider{}, - Syncer: &sync.NoopProvider{}, -} - // Deployer is the Deploy API of skaffold and responsible for deploying // the build results to a Kubernetes cluster type Deployer interface { @@ -78,14 +67,3 @@ type Deployer interface { // GetStatusMonitor returns a Deployer's implementation of a StatusMonitor GetStatusMonitor() status.Monitor } - -// ComponentProvider serves as a clean way to send three providers -// as params to the Deployer constructors -type ComponentProvider struct { - Accessor access.Provider - Debugger debug.Provider - ImageLoader loader.Provider - Logger log.Provider - Monitor status.Provider - Syncer sync.Provider -} diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index c857f514221..f205e187bec 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -39,7 +39,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + component "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/component/kubernetes" deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" @@ -124,7 +124,7 @@ type Config interface { } // NewDeployer returns a configured Deployer. Returns an error if current version of helm is less than 3.0.0. -func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, h *latestV1.HelmDeploy) (*Deployer, error) { +func NewDeployer(cfg Config, labeller *label.DefaultLabeller, h *latestV1.HelmDeploy) (*Deployer, error) { hv, err := binVer() if err != nil { return nil, versionGetErr(err) @@ -149,19 +149,19 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component return &Deployer{ HelmDeploy: h, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), - debugger: provider.Debugger.GetKubernetesDebugger(podSelector), - imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl), - statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl), + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl, podSelector, labeller), + debugger: component.NewDebugger(cfg.Mode(), podSelector), + imageLoader: component.NewImageLoader(cfg, kubectl), + logger: component.NewLogger(cfg, kubectl, podSelector), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), + syncer: component.NewSyncer(cfg, kubectl), originalImages: originalImages, kubeContext: cfg.GetKubeContext(), kubeConfig: cfg.GetKubeConfig(), namespace: cfg.GetKubeNamespace(), forceDeploy: cfg.ForceDeploy(), configFile: cfg.ConfigurationFile(), - labels: labels, + labels: labeller.Labels(), bV: hv, enableDebug: cfg.Mode() == config.RunModes.Debug, isMultiConfig: cfg.IsMultiConfig(), diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index 90693af2cbb..d123ec02c1d 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -26,8 +26,8 @@ import ( "github.com/mitchellh/go-homedir" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" @@ -485,7 +485,7 @@ func TestNewDeployer(t *testing.T) { testutil.Run(t, test.description, func(t *testutil.T) { t.Override(&util.DefaultExecCommand, testutil.CmdRunWithOutput("helm version --client", test.helmVersion)) - _, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &testDeployConfig) + _, err := NewDeployer(&helmConfig{}, &label.DefaultLabeller{}, &testDeployConfig) t.CheckError(test.shouldErr, err) }) } @@ -1037,7 +1037,7 @@ func TestHelmDeploy(t *testing.T) { namespace: test.namespace, force: test.force, configFile: "test.yaml", - }, nil, deploy.NoopComponentProvider, &test.helm) + }, &label.DefaultLabeller{}, &test.helm) t.RequireNoError(err) if test.configure != nil { @@ -1114,7 +1114,7 @@ func TestHelmCleanup(t *testing.T) { deployer, err := NewDeployer(&helmConfig{ namespace: test.namespace, - }, nil, deploy.NoopComponentProvider, &test.helm) + }, &label.DefaultLabeller{}, &test.helm) t.RequireNoError(err) deployer.Cleanup(context.Background(), ioutil.Discard) @@ -1217,7 +1217,7 @@ func TestHelmDependencies(t *testing.T) { local = tmpDir.Root() } - deployer, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &latestV1.HelmDeploy{ + deployer, err := NewDeployer(&helmConfig{}, &label.DefaultLabeller{}, &latestV1.HelmDeploy{ Releases: []latestV1.HelmRelease{{ Name: "skaffold-helm", ChartPath: local, @@ -1482,7 +1482,7 @@ func TestHelmRender(t *testing.T) { t.Override(&util.DefaultExecCommand, test.commands) deployer, err := NewDeployer(&helmConfig{ namespace: test.namespace, - }, nil, deploy.NoopComponentProvider, &test.helm) + }, &label.DefaultLabeller{}, &test.helm) t.RequireNoError(err) err = deployer.Render(context.Background(), ioutil.Discard, test.builds, true, file) t.CheckError(test.shouldErr, err) @@ -1551,7 +1551,7 @@ func TestGenerateSkaffoldDebugFilter(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { t.Override(&util.DefaultExecCommand, testutil.CmdRunWithOutput("helm version --client", version31)) - h, err := NewDeployer(&helmConfig{}, nil, deploy.NoopComponentProvider, &testDeployConfig) + h, err := NewDeployer(&helmConfig{}, &label.DefaultLabeller{}, &testDeployConfig) t.RequireNoError(err) result := h.generateSkaffoldDebugFilter(test.buildFile) t.CheckDeepEqual(test.result, result) diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index 09ec126cb50..e1d31e45d3f 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -35,9 +35,10 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + component "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/component/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" @@ -105,21 +106,21 @@ type Config interface { } // NewDeployer generates a new Deployer object contains the kptDeploy schema. -func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KptDeploy) *Deployer { +func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latestV1.KptDeploy) *Deployer { podSelector := kubernetes.NewImageList() kubectl := pkgkubectl.NewCLI(cfg, cfg.GetKubeNamespace()) return &Deployer{ KptDeploy: d, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), - debugger: provider.Debugger.GetKubernetesDebugger(podSelector), - imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl), - statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl), + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl, podSelector, labeller), + debugger: component.NewDebugger(cfg.Mode(), podSelector), + imageLoader: component.NewImageLoader(cfg, kubectl), + logger: component.NewLogger(cfg, kubectl, podSelector), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), + syncer: component.NewSyncer(cfg, kubectl), insecureRegistries: cfg.GetInsecureRegistries(), - labels: labels, + labels: labeller.Labels(), globalConfig: cfg.GlobalConfig(), hasKustomization: hasKustomization, kubeContext: cfg.GetKubeContext(), diff --git a/pkg/skaffold/deploy/kpt/kpt_test.go b/pkg/skaffold/deploy/kpt/kpt_test.go index f7453b9b81f..62137c4b88e 100644 --- a/pkg/skaffold/deploy/kpt/kpt_test.go +++ b/pkg/skaffold/deploy/kpt/kpt_test.go @@ -27,8 +27,8 @@ import ( "strings" "testing" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" @@ -53,7 +53,7 @@ spec: // Test that kpt deployer manipulate manifests in the given order and no intermediate data is // stored after each step: -// Step 1. `kp fn source` (read in the manifest as stdin), +// Step 1. `kpt fn source` (read in the manifest as stdin), // Step 2. `kpt fn run` (validate, transform or generate the manifests via kpt functions), // Step 3. `kpt fn sink` (to temp dir to run kuustomize build on), // Step 4. `kustomize build` (if the temp dir from step 3 has a Kustomization hydrate the manifest), @@ -234,7 +234,7 @@ func TestKpt_Deploy(t *testing.T) { t.Override(&client.Client, deployutil.MockK8sClient) t.NewTempDir().Chdir() - k := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, &test.kpt) + k := NewDeployer(&kptConfig{}, &label.DefaultLabeller{}, &test.kpt) if test.hasKustomization != nil { k.hasKustomization = test.hasKustomization } @@ -377,7 +377,7 @@ func TestKpt_Dependencies(t *testing.T) { tmpDir.WriteFiles(test.createFiles) tmpDir.WriteFiles(test.kustomizations) - k := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, &test.kpt) + k := NewDeployer(&kptConfig{}, &label.DefaultLabeller{}, &test.kpt) res, err := k.Dependencies() @@ -430,7 +430,7 @@ func TestKpt_Cleanup(t *testing.T) { k := NewDeployer(&kptConfig{ workingDir: ".", - }, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KptDeploy{ Live: latestV1.KptLive{ Apply: latestV1.KptApplyInventory{ Dir: test.applyDir, @@ -492,7 +492,7 @@ spec: tests := []struct { description string builds []graph.Artifact - labels map[string]string + labels []string kpt latestV1.KptDeploy commands util.Command hasKustomization func(string) bool @@ -537,7 +537,7 @@ spec: Tag: "gcr.io/project/image2:tag2", }, }, - labels: map[string]string{"user/label": "test"}, + labels: []string{"user/label=test"}, kpt: latestV1.KptDeploy{ Dir: "test", Fn: latestV1.KptFn{FnPath: "kpt-func.yaml"}, @@ -611,7 +611,7 @@ spec: Tag: "gcr.io/project/image1:tag1", }, }, - labels: map[string]string{"user/label": "test"}, + labels: []string{"user/label=test"}, kpt: latestV1.KptDeploy{ Dir: ".", }, @@ -790,7 +790,9 @@ spec: t.Override(&util.DefaultExecCommand, test.commands) t.NewTempDir().Chdir() - k := NewDeployer(&kptConfig{workingDir: "."}, test.labels, deploy.NoopComponentProvider, &test.kpt) + labeller := label.NewLabeller(false, test.labels, "") + + k := NewDeployer(&kptConfig{workingDir: "."}, labeller, &test.kpt) if test.hasKustomization != nil { k.hasKustomization = test.hasKustomization } @@ -867,7 +869,7 @@ func TestKpt_GetApplyDir(t *testing.T) { k := NewDeployer(&kptConfig{ workingDir: ".", - }, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KptDeploy{ Live: test.live, }) @@ -1026,7 +1028,7 @@ spec: } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - k := NewDeployer(&kptConfig{}, nil, deploy.NoopComponentProvider, nil) + k := NewDeployer(&kptConfig{}, &label.DefaultLabeller{}, nil) actualManifest, err := k.excludeKptFn(test.manifests) t.CheckErrorAndDeepEqual(false, err, test.expected.String(), actualManifest.String()) }) @@ -1173,7 +1175,7 @@ func TestNonEmptyKubeconfig(t *testing.T) { testutil.Run(t, "", func(t *testutil.T) { t.Override(&util.DefaultExecCommand, commands) t.Override(&client.Client, deployutil.MockK8sClient) - k := NewDeployer(&kptConfig{config: "testConfigPath"}, nil, deploy.NoopComponentProvider, &latestV1.KptDeploy{ + k := NewDeployer(&kptConfig{config: "testConfigPath"}, &label.DefaultLabeller{}, &latestV1.KptDeploy{ Dir: ".", Live: latestV1.KptLive{ Apply: latestV1.KptApplyInventory{ diff --git a/pkg/skaffold/deploy/kubectl/cli.go b/pkg/skaffold/deploy/kubectl/cli.go index 7481aade124..778c2b1f8c1 100644 --- a/pkg/skaffold/deploy/kubectl/cli.go +++ b/pkg/skaffold/deploy/kubectl/cli.go @@ -58,6 +58,9 @@ type Config interface { WaitForDeletions() config.WaitForDeletions Mode() config.RunMode HydratedManifests() []string + DefaultPipeline() latestV1.Pipeline + Tail() bool + PipelineForImage(imageName string) (latestV1.Pipeline, bool) } func NewCLI(cfg Config, flags latestV1.KubectlFlags, defaultNamespace string) CLI { diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index 6ebd4580f80..3b810719034 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -32,8 +32,9 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + component "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/component/kubernetes" deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" @@ -70,13 +71,13 @@ type Deployer struct { defaultRepo *string kubectl CLI insecureRegistries map[string]bool - labels map[string]string + labeller *label.DefaultLabeller skipRender bool } // NewDeployer returns a new Deployer for a DeployConfig filled // with the needed configuration for `kubectl apply` -func NewDeployer(cfg Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KubectlDeploy) (*Deployer, error) { +func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latestV1.KubectlDeploy) (*Deployer, error) { defaultNamespace := "" if d.DefaultNamespace != nil { var err error @@ -92,19 +93,19 @@ func NewDeployer(cfg Config, labels map[string]string, provider deploy.Component return &Deployer{ KubectlDeploy: d, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), - debugger: provider.Debugger.GetKubernetesDebugger(podSelector), - imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl.CLI), - statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl.CLI), + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl.CLI, podSelector, labeller), + debugger: component.NewDebugger(cfg.Mode(), podSelector), + imageLoader: component.NewImageLoader(cfg, kubectl.CLI), + logger: component.NewLogger(cfg, kubectl.CLI, podSelector), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), + syncer: component.NewSyncer(cfg, kubectl.CLI), workingDir: cfg.GetWorkingDir(), globalConfig: cfg.GlobalConfig(), defaultRepo: cfg.DefaultRepo(), kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), skipRender: cfg.SkipRender(), - labels: labels, + labeller: labeller, hydratedManifests: cfg.HydratedManifests(), }, nil } @@ -168,7 +169,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art endTrace(instrumentation.TraceEndError(err)) return nil, err } - manifests, err = manifests.SetLabels(k.labels) + manifests, err = manifests.SetLabels(k.labeller.Labels()) endTrace() case k.skipRender: childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_readManifests") @@ -412,7 +413,7 @@ func (k *Deployer) renderManifests(ctx context.Context, out io.Writer, builds [] return nil, err } - return manifests.SetLabels(k.labels) + return manifests.SetLabels(k.labeller.Labels()) } // Cleanup deletes what was deployed by calling Deploy. diff --git a/pkg/skaffold/deploy/kubectl/kubectl_test.go b/pkg/skaffold/deploy/kubectl/kubectl_test.go index d9bda052086..866e550f15c 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl_test.go +++ b/pkg/skaffold/deploy/kubectl/kubectl_test.go @@ -28,7 +28,7 @@ import ( "time" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" @@ -245,7 +245,7 @@ func TestKubectlDeploy(t *testing.T) { }, RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{ Namespace: skaffoldNamespaceOption}}, - }, nil, deploy.NoopComponentProvider, &test.kubectl) + }, &label.DefaultLabeller{}, &test.kubectl) t.RequireNoError(err) _, err = k.Deploy(context.Background(), ioutil.Discard, test.builds) @@ -319,7 +319,7 @@ func TestKubectlCleanup(t *testing.T) { k, err := NewDeployer(&kubectlConfig{ workingDir: ".", RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}}, - }, nil, deploy.NoopComponentProvider, &test.kubectl) + }, &label.DefaultLabeller{}, &test.kubectl) t.RequireNoError(err) err = k.Cleanup(context.Background(), ioutil.Discard) @@ -366,7 +366,7 @@ func TestKubectlDeployerRemoteCleanup(t *testing.T) { k, err := NewDeployer(&kubectlConfig{ workingDir: ".", RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}}, - }, nil, deploy.NoopComponentProvider, &test.kubectl) + }, &label.DefaultLabeller{}, &test.kubectl) t.RequireNoError(err) err = k.Cleanup(context.Background(), ioutil.Discard) @@ -401,7 +401,7 @@ func TestKubectlRedeploy(t *testing.T) { Enabled: true, Delay: 0 * time.Millisecond, Max: 10 * time.Second}, - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{Manifests: []string{tmpDir.Path("deployment-app.yaml"), tmpDir.Path("deployment-web.yaml")}}) + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{Manifests: []string{tmpDir.Path("deployment-app.yaml"), tmpDir.Path("deployment-web.yaml")}}) t.RequireNoError(err) // Deploy one manifest @@ -466,7 +466,7 @@ func TestKubectlWaitForDeletions(t *testing.T) { Delay: 0 * time.Millisecond, Max: 10 * time.Second, }, - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{Manifests: []string{tmpDir.Path("deployment-web.yaml")}}) + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{Manifests: []string{tmpDir.Path("deployment-web.yaml")}}) t.RequireNoError(err) var out bytes.Buffer @@ -504,7 +504,7 @@ func TestKubectlWaitForDeletionsFails(t *testing.T) { Delay: 10 * time.Second, Max: 100 * time.Millisecond, }, - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{Manifests: []string{tmpDir.Path("deployment-web.yaml")}}) + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{Manifests: []string{tmpDir.Path("deployment-web.yaml")}}) t.RequireNoError(err) _, err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ @@ -565,7 +565,7 @@ func TestDependencies(t *testing.T) { Touch("00/b.yaml", "00/a.yaml"). Chdir() - k, err := NewDeployer(&kubectlConfig{}, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{Manifests: test.manifests}) + k, err := NewDeployer(&kubectlConfig{}, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{Manifests: test.manifests}) t.RequireNoError(err) dependencies, err := k.Dependencies() @@ -681,7 +681,7 @@ spec: deployer, err := NewDeployer(&kubectlConfig{ workingDir: ".", defaultRepo: "gcr.io/project", - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Manifests: []string{tmpDir.Path("deployment.yaml")}, }) t.RequireNoError(err) @@ -727,7 +727,7 @@ func TestGCSManifests(t *testing.T) { workingDir: ".", skipRender: test.skipRender, RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: TestNamespace}}, - }, nil, deploy.NoopComponentProvider, &test.kubectl) + }, &label.DefaultLabeller{}, &test.kubectl) t.RequireNoError(err) _, err = k.Deploy(context.Background(), ioutil.Discard, nil) diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index ac702fc5655..bdd84910b89 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -30,9 +30,10 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + component "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/component/kubernetes" deployerr "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/error" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" @@ -121,7 +122,7 @@ type Deployer struct { useKubectlKustomize bool } -func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.ComponentProvider, d *latestV1.KustomizeDeploy) (*Deployer, error) { +func NewDeployer(cfg kubectl.Config, labeller *label.DefaultLabeller, d *latestV1.KustomizeDeploy) (*Deployer, error) { defaultNamespace := "" if d.DefaultNamespace != nil { var err error @@ -136,19 +137,20 @@ func NewDeployer(cfg kubectl.Config, labels map[string]string, provider deploy.C useKubectlKustomize := !KustomizeBinaryCheck() && kubectlVersionCheck(kubectl) podSelector := kubernetes.NewImageList() + return &Deployer{ KustomizeDeploy: d, podSelector: podSelector, - accessor: provider.Accessor.GetKubernetesAccessor(cfg, podSelector), - debugger: provider.Debugger.GetKubernetesDebugger(podSelector), - imageLoader: provider.ImageLoader.GetKubernetesImageLoader(cfg), - logger: provider.Logger.GetKubernetesLogger(podSelector, kubectl.CLI), - statusMonitor: provider.Monitor.GetKubernetesMonitor(cfg), - syncer: provider.Syncer.GetKubernetesSyncer(podSelector, kubectl.CLI), + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl.CLI, podSelector, labeller), + debugger: component.NewDebugger(cfg.Mode(), podSelector), + imageLoader: component.NewImageLoader(cfg, kubectl.CLI), + logger: component.NewLogger(cfg, kubectl.CLI, podSelector), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), + syncer: component.NewSyncer(cfg, kubectl.CLI), kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), globalConfig: cfg.GlobalConfig(), - labels: labels, + labels: labeller.Labels(), useKubectlKustomize: useKubectlKustomize, }, nil } diff --git a/pkg/skaffold/deploy/kustomize/kustomize_test.go b/pkg/skaffold/deploy/kustomize/kustomize_test.go index e5e2d4cecf7..2a6e717d5c2 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize_test.go +++ b/pkg/skaffold/deploy/kustomize/kustomize_test.go @@ -26,8 +26,8 @@ import ( "time" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" deployutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" @@ -190,7 +190,7 @@ func TestKustomizeDeploy(t *testing.T) { }, RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{ Namespace: skaffoldNamespaceOption, - }}}, nil, deploy.NoopComponentProvider, &test.kustomize) + }}}, &label.DefaultLabeller{}, &test.kustomize) t.RequireNoError(err) _, err = k.Deploy(context.Background(), ioutil.Discard, test.builds) @@ -256,7 +256,7 @@ func TestKustomizeCleanup(t *testing.T) { workingDir: tmpDir.Root(), RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{ Namespace: kubectl.TestNamespace}}, - }, nil, deploy.NoopComponentProvider, &test.kustomize) + }, &label.DefaultLabeller{}, &test.kustomize) t.RequireNoError(err) err = k.Cleanup(context.Background(), ioutil.Discard) @@ -458,7 +458,7 @@ func TestDependenciesForKustomization(t *testing.T) { tmpDir.Write(path, contents) } - k, err := NewDeployer(&kustomizeConfig{}, nil, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{KustomizePaths: kustomizePaths}) + k, err := NewDeployer(&kustomizeConfig{}, &label.DefaultLabeller{}, &latestV1.KustomizeDeploy{KustomizePaths: kustomizePaths}) t.RequireNoError(err) deps, err := k.Dependencies() @@ -541,7 +541,7 @@ func TestKustomizeRender(t *testing.T) { tests := []struct { description string builds []graph.Artifact - labels map[string]string + labels []string kustomizations []kustomizationCall expected string shouldErr bool @@ -598,7 +598,7 @@ spec: Tag: "gcr.io/project/image2:tag2", }, }, - labels: map[string]string{"user/label": "test"}, + labels: []string{"user/label=test"}, kustomizations: []kustomizationCall{ { folder: ".", @@ -699,10 +699,12 @@ spec: t.Override(&util.DefaultExecCommand, fakeCmd) t.NewTempDir().Chdir() + labeller := label.NewLabeller(false, test.labels, "") + k, err := NewDeployer(&kustomizeConfig{ workingDir: ".", RunContext: runcontext.RunContext{Opts: config.SkaffoldOptions{Namespace: kubectl.TestNamespace}}, - }, test.labels, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{ + }, labeller, &latestV1.KustomizeDeploy{ KustomizePaths: kustomizationPaths, }) t.RequireNoError(err) diff --git a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go index ea368556845..a6d3934566b 100644 --- a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go +++ b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go @@ -22,6 +22,7 @@ import ( "io" "github.com/sirupsen/logrus" + "golang.org/x/sync/singleflight" v1 "k8s.io/api/core/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" @@ -52,6 +53,9 @@ type Forwarder interface { type ForwarderManager struct { forwarders []Forwarder entryManager *EntryManager + label string + + singleRun singleflight.Group } // NewForwarderManager returns a new port manager which handles starting and stopping port forwarding @@ -78,6 +82,8 @@ func NewForwarderManager(cli *kubectl.CLI, podSelector kubernetes.PodSelector, l return &ForwarderManager{ forwarders: forwarders, entryManager: entryManager, + label: label, + singleRun: singleflight.Group{}, } } @@ -113,13 +119,20 @@ func debugPorts(pod *v1.Pod, c v1.Container) []v1.ContainerPort { return ports } -// Start begins all forwarders managed by the ForwarderManager func (p *ForwarderManager) Start(ctx context.Context, out io.Writer, namespaces []string) error { // Port forwarding is not enabled. if p == nil { return nil } + _, err, _ := p.singleRun.Do(p.label, func() (interface{}, error) { + return struct{}{}, p.start(ctx, out, namespaces) + }) + return err +} + +// Start begins all forwarders managed by the ForwarderManager +func (p *ForwarderManager) start(ctx context.Context, out io.Writer, namespaces []string) error { eventV2.TaskInProgress(constants.PortForward, "Port forward URLs") ctx, endTrace := instrumentation.StartTrace(ctx, "Start") defer endTrace() @@ -137,13 +150,19 @@ func (p *ForwarderManager) Start(ctx context.Context, out io.Writer, namespaces return nil } -// Stop cleans up and terminates all forwarders managed by the ForwarderManager func (p *ForwarderManager) Stop() { // Port forwarding is not enabled. if p == nil { return } + p.singleRun.Do(p.label, func() (interface{}, error) { + p.stop() + return struct{}{}, nil + }) +} +// Stop cleans up and terminates all forwarders managed by the ForwarderManager +func (p *ForwarderManager) stop() { for _, f := range p.forwarders { f.Stop() } diff --git a/pkg/skaffold/loader/provider.go b/pkg/skaffold/loader/provider.go deleted file mode 100644 index 51924179a27..00000000000 --- a/pkg/skaffold/loader/provider.go +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2021 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package loader - -import ( - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" -) - -type Provider interface { - GetKubernetesImageLoader(loader.Config) ImageLoader - GetNoopImageLoader() ImageLoader -} - -type fullProvider struct{} - -func NewImageLoaderProvider() Provider { - return &fullProvider{} -} - -func (p *fullProvider) GetKubernetesImageLoader(config loader.Config) ImageLoader { - if config.LoadImages() { - return loader.NewImageLoader(config.GetKubeContext(), kubectl.NewCLI(config, "")) - } - return &NoopImageLoader{} -} - -func (p *fullProvider) GetNoopImageLoader() ImageLoader { - return &NoopImageLoader{} -} - -// NoopProvider is used in tests -type NoopProvider struct{} - -func (p *NoopProvider) GetKubernetesImageLoader(loader.Config) ImageLoader { - return &NoopImageLoader{} -} - -func (p *NoopProvider) GetNoopImageLoader() ImageLoader { - return &NoopImageLoader{} -} diff --git a/pkg/skaffold/runner/deployer.go b/pkg/skaffold/runner/deployer.go index 7c3c67f0135..294c845de6a 100644 --- a/pkg/skaffold/runner/deployer.go +++ b/pkg/skaffold/runner/deployer.go @@ -26,6 +26,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" @@ -55,9 +56,9 @@ func (d *deployerCtx) StatusCheck() *bool { } // GetDeployer creates a deployer from a given RunContext and deploy pipeline definitions. -func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, error) { +func GetDeployer(runCtx *runcontext.RunContext, labeller *label.DefaultLabeller) (deploy.Deployer, error) { if runCtx.Opts.Apply { - return getDefaultDeployer(runCtx, provider, labels) + return getDefaultDeployer(runCtx, labeller) } deployerCfg := runCtx.Deployers() @@ -66,7 +67,7 @@ func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvide for _, d := range deployerCfg { dCtx := &deployerCtx{runCtx, d} if d.HelmDeploy != nil { - h, err := helm.NewDeployer(dCtx, labels, provider, d.HelmDeploy) + h, err := helm.NewDeployer(dCtx, labeller, d.HelmDeploy) if err != nil { return nil, err } @@ -74,12 +75,12 @@ func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvide } if d.KptDeploy != nil { - deployer := kpt.NewDeployer(dCtx, labels, provider, d.KptDeploy) + deployer := kpt.NewDeployer(dCtx, labeller, d.KptDeploy) deployers = append(deployers, deployer) } if d.KubectlDeploy != nil { - deployer, err := kubectl.NewDeployer(dCtx, labels, provider, d.KubectlDeploy) + deployer, err := kubectl.NewDeployer(dCtx, labeller, d.KubectlDeploy) if err != nil { return nil, err } @@ -87,7 +88,7 @@ func GetDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvide } if d.KustomizeDeploy != nil { - deployer, err := kustomize.NewDeployer(dCtx, labels, provider, d.KustomizeDeploy) + deployer, err := kustomize.NewDeployer(dCtx, labeller, d.KustomizeDeploy) if err != nil { return nil, err } @@ -111,7 +112,7 @@ The default deployer will honor a select set of deploy configuration from an exi For a multi-config project, we do not currently support resolving conflicts between differing sets of this deploy configuration. Therefore, in this function we do implicit validation of the provided configuration, and fail if any conflict cannot be resolved. */ -func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.ComponentProvider, labels map[string]string) (deploy.Deployer, error) { +func getDefaultDeployer(runCtx *runcontext.RunContext, labeller *label.DefaultLabeller) (deploy.Deployer, error) { deployCfgs := runCtx.DeployConfigs() var kFlags *v1.KubectlFlags @@ -169,7 +170,7 @@ func getDefaultDeployer(runCtx *runcontext.RunContext, provider deploy.Component Flags: *kFlags, DefaultNamespace: defaultNamespace, } - defaultDeployer, err := kubectl.NewDeployer(runCtx, labels, provider, k) + defaultDeployer, err := kubectl.NewDeployer(runCtx, labeller, k) if err != nil { return nil, fmt.Errorf("instantiating default kubectl deployer: %w", err) } diff --git a/pkg/skaffold/runner/deployer_test.go b/pkg/skaffold/runner/deployer_test.go index e0769a6f2fc..5f526354a58 100644 --- a/pkg/skaffold/runner/deployer_test.go +++ b/pkg/skaffold/runner/deployer_test.go @@ -20,14 +20,28 @@ import ( "reflect" "testing" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + component "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/component/kubernetes" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/helm" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kustomize" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" + pkgkubectl "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + k8sloader "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/loader" + k8slogger "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/logger" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/portforward" + k8sstatus "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -64,7 +78,7 @@ func TestGetDeployer(tOuter *testing.T) { expected: deploy.NewDeployerMux([]deploy.Deployer{ t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{}, })).(deploy.Deployer), }, false), @@ -75,7 +89,7 @@ func TestGetDeployer(tOuter *testing.T) { expected: deploy.NewDeployerMux([]deploy.Deployer{ t.RequireNonNilResult(kustomize.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KustomizeDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KustomizeDeploy{ Flags: latestV1.KubectlFlags{}, })).(deploy.Deployer), }, false), @@ -93,7 +107,7 @@ func TestGetDeployer(tOuter *testing.T) { apply: true, expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{}, })).(deploy.Deployer), }, @@ -104,7 +118,7 @@ func TestGetDeployer(tOuter *testing.T) { apply: true, expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{}, })).(deploy.Deployer), }, @@ -139,7 +153,7 @@ func TestGetDeployer(tOuter *testing.T) { DeployType: test.cfg, }, }}), - }, deploy.NoopComponentProvider, nil) + }, &label.DefaultLabeller{}) t.CheckError(test.shouldErr, err) t.CheckTypeEquality(test.expected, deployer) @@ -159,6 +173,24 @@ func TestGetDeployer(tOuter *testing.T) { func TestGetDefaultDeployer(tOuter *testing.T) { testutil.Run(tOuter, "TestGetDeployer", func(t *testutil.T) { + t.Override(&component.NewAccessor, func(portforward.Config, string, *pkgkubectl.CLI, kubernetes.PodSelector, label.Config) access.Accessor { + return &access.NoopAccessor{} + }) + t.Override(&component.NewDebugger, func(config.RunMode, kubernetes.PodSelector) debug.Debugger { + return &debug.NoopDebugger{} + }) + t.Override(&component.NewMonitor, func(k8sstatus.Config, string, *label.DefaultLabeller) status.Monitor { + return &status.NoopMonitor{} + }) + t.Override(&component.NewImageLoader, func(k8sloader.Config, *pkgkubectl.CLI) loader.ImageLoader { + return &loader.NoopImageLoader{} + }) + t.Override(&component.NewSyncer, func(sync.Config, *pkgkubectl.CLI) sync.Syncer { + return &sync.NoopSyncer{} + }) + t.Override(&component.NewLogger, func(k8slogger.Config, *pkgkubectl.CLI, kubernetes.PodSelector) log.Logger { + return &log.NoopLogger{} + }) tests := []struct { name string cfgs []latestV1.DeployType @@ -172,7 +204,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) { }}, expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{}, })).(*kubectl.Deployer), }, @@ -188,7 +220,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) { }}, expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{ Apply: []string{"--foo"}, Global: []string{"--bar"}, @@ -222,7 +254,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) { }}, expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{}, })).(*kubectl.Deployer), }, @@ -233,7 +265,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) { }}, expected: t.RequireNonNilResult(kubectl.NewDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines([]latestV1.Pipeline{{}}), - }, nil, deploy.NoopComponentProvider, &latestV1.KubectlDeploy{ + }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{ Flags: latestV1.KubectlFlags{}, })).(*kubectl.Deployer), }, @@ -251,7 +283,7 @@ func TestGetDefaultDeployer(tOuter *testing.T) { } deployer, err := getDefaultDeployer(&runcontext.RunContext{ Pipelines: runcontext.NewPipelines(pipelines), - }, deploy.NoopComponentProvider, nil) + }, &label.DefaultLabeller{}) t.CheckErrorAndFailNow(test.shouldErr, err) diff --git a/pkg/skaffold/runner/v1/deploy_test.go b/pkg/skaffold/runner/v1/deploy_test.go index 3a80fc07a1d..ca0e44e0b22 100644 --- a/pkg/skaffold/runner/v1/deploy_test.go +++ b/pkg/skaffold/runner/v1/deploy_test.go @@ -26,7 +26,6 @@ import ( "k8s.io/client-go/tools/clientcmd/api" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" @@ -123,7 +122,7 @@ func TestSkaffoldDeployRenderOnly(t *testing.T) { KubeContext: "does-not-exist", } - deployer, err := runner.GetDeployer(runCtx, deploy.NoopComponentProvider, nil) + deployer, err := runner.GetDeployer(runCtx, nil) t.RequireNoError(err) r := SkaffoldRunner{ runCtx: runCtx, diff --git a/pkg/skaffold/runner/v1/new.go b/pkg/skaffold/runner/v1/new.go index d6cdfdd726c..4a189f5d0a2 100644 --- a/pkg/skaffold/runner/v1/new.go +++ b/pkg/skaffold/runner/v1/new.go @@ -22,10 +22,8 @@ import ( "github.com/sirupsen/logrus" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/cache" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" @@ -33,14 +31,10 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/filemon" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/instrumentation" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/loader" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/runcontext" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/server" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/test" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/trigger" @@ -52,7 +46,6 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { event.LogMetaEvent() eventV2.InitializeState(runCtx) eventV2.LogMetaEvent() - // kubectlCLI := pkgkubectl.NewCLI(runCtx, "") _, endTrace := instrumentation.StartTrace(context.Background(), "NewForConfig") defer endTrace() @@ -85,16 +78,7 @@ func NewForConfig(runCtx *runcontext.RunContext) (*SkaffoldRunner, error) { } var deployer deploy.Deployer - provider := deploy.ComponentProvider{ - Accessor: access.NewAccessorProvider(labeller), - Debugger: debug.NewDebugProvider(runCtx), - ImageLoader: loader.NewImageLoaderProvider(), - Logger: log.NewLogProvider(runCtx), - Monitor: status.NewMonitorProvider(labeller), - Syncer: sync.NewSyncProvider(runCtx), - } - - deployer, err = runner.GetDeployer(runCtx, provider, labeller.Labels()) + deployer, err = runner.GetDeployer(runCtx, labeller) if err != nil { endTrace(instrumentation.TraceEndError(err)) return nil, fmt.Errorf("creating deployer: %w", err) diff --git a/pkg/skaffold/status/provider.go b/pkg/skaffold/status/provider.go deleted file mode 100644 index 9265893155f..00000000000 --- a/pkg/skaffold/status/provider.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2021 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package status - -import ( - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/status" -) - -type Provider interface { - GetKubernetesMonitor(config status.Config) Monitor - GetNoopMonitor() Monitor -} - -type fullProvider struct { - k8sMonitor map[string]Monitor // keyed on KubeContext. TODO: make KubeContext a struct type. - labeller *label.DefaultLabeller -} - -func NewMonitorProvider(l *label.DefaultLabeller) Provider { - return &fullProvider{k8sMonitor: make(map[string]Monitor), labeller: l} -} - -func (p *fullProvider) GetKubernetesMonitor(config status.Config) Monitor { - enabled := config.StatusCheck() - if enabled != nil && !*enabled { // assume disabled only if explicitly set to false - return &NoopMonitor{} - } - context := config.GetKubeContext() - if p.k8sMonitor[context] == nil { - p.k8sMonitor[context] = status.NewStatusMonitor(config, p.labeller) - } - return p.k8sMonitor[context] -} - -func (p *fullProvider) GetNoopMonitor() Monitor { - return &NoopMonitor{} -} - -// NoopProvider is used in tests -type NoopProvider struct{} - -func (p *NoopProvider) GetKubernetesMonitor(config status.Config) Monitor { - return &NoopMonitor{} -} - -func (p *NoopProvider) GetNoopMonitor() Monitor { - return &NoopMonitor{} -} diff --git a/pkg/skaffold/sync/kubectl.go b/pkg/skaffold/sync/kubectl.go index 978ecaed851..2613aeb53ff 100644 --- a/pkg/skaffold/sync/kubectl.go +++ b/pkg/skaffold/sync/kubectl.go @@ -26,7 +26,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) -func (s *podSyncer) deleteFileFn(ctx context.Context, pod v1.Pod, container v1.Container, files syncMap) *exec.Cmd { +func (s *PodSyncer) deleteFileFn(ctx context.Context, pod v1.Pod, container v1.Container, files syncMap) *exec.Cmd { args := make([]string, 0, 9+len(files)) args = append(args, pod.Name, "--namespace", pod.Namespace, "-c", container.Name, "--", "rm", "-rf", "--") for _, dsts := range files { @@ -35,7 +35,7 @@ func (s *podSyncer) deleteFileFn(ctx context.Context, pod v1.Pod, container v1.C return s.kubectl.Command(ctx, "exec", args...) } -func (s *podSyncer) copyFileFn(ctx context.Context, pod v1.Pod, container v1.Container, files syncMap) *exec.Cmd { +func (s *PodSyncer) copyFileFn(ctx context.Context, pod v1.Pod, container v1.Container, files syncMap) *exec.Cmd { // Use "m" flag to touch the files as they are copied. reader, writer := io.Pipe() go func() { diff --git a/pkg/skaffold/sync/provider.go b/pkg/skaffold/sync/provider.go deleted file mode 100644 index c4beb3a70a1..00000000000 --- a/pkg/skaffold/sync/provider.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2021 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package sync - -import ( - gosync "sync" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" -) - -type Provider interface { - GetKubernetesSyncer(*kubernetes.ImageList, *kubectl.CLI) Syncer - GetNoopSyncer() Syncer -} - -type fullProvider struct { - kubernetesSyncer func(*kubernetes.ImageList, *kubectl.CLI) Syncer - noopSyncer func() Syncer -} - -var ( - provider *fullProvider - once gosync.Once -) - -func NewSyncProvider(config Config) Provider { - once.Do(func() { - provider = &fullProvider{ - kubernetesSyncer: func(podSelector *kubernetes.ImageList, cli *kubectl.CLI) Syncer { - return &podSyncer{ - kubectl: cli, - config: config, - } - }, - noopSyncer: func() Syncer { - return nil - }, - } - }) - return provider -} - -func (p *fullProvider) GetKubernetesSyncer(s *kubernetes.ImageList, cli *kubectl.CLI) Syncer { - return p.kubernetesSyncer(s, cli) -} - -func (p *fullProvider) GetNoopSyncer() Syncer { - return p.noopSyncer() -} - -type NoopProvider struct{} - -func (p *NoopProvider) GetKubernetesSyncer(*kubernetes.ImageList, *kubectl.CLI) Syncer { - return &NoopSyncer{} -} - -func (p *NoopProvider) GetNoopSyncer() Syncer { - return &NoopSyncer{} -} diff --git a/pkg/skaffold/sync/sync.go b/pkg/skaffold/sync/sync.go index ebf7c9c249f..cba882243af 100644 --- a/pkg/skaffold/sync/sync.go +++ b/pkg/skaffold/sync/sync.go @@ -253,7 +253,7 @@ func matchSyncRules(syncRules []*latestV1.SyncRule, relPath, containerWd string) return dsts, nil } -func (s *podSyncer) Sync(ctx context.Context, out io.Writer, item *Item) error { +func (s *PodSyncer) Sync(ctx context.Context, out io.Writer, item *Item) error { if len(item.Copy) > 0 { logrus.Infoln("Copying files:", item.Copy, "to", item.Image) diff --git a/pkg/skaffold/sync/types.go b/pkg/skaffold/sync/types.go index d25fed8b554..55f9f3a0450 100644 --- a/pkg/skaffold/sync/types.go +++ b/pkg/skaffold/sync/types.go @@ -37,11 +37,18 @@ type Syncer interface { Sync(context.Context, io.Writer, *Item) error } -type podSyncer struct { +type PodSyncer struct { kubectl *pkgkubectl.CLI config Config } +func NewPodSyncer(cli *pkgkubectl.CLI, config Config) *PodSyncer { + return &PodSyncer{ + kubectl: cli, + config: config, + } +} + type Config interface { GetNamespaces() []string } From 6391c38bf3bd95a86e85ca97d6609686c2f48a32 Mon Sep 17 00:00:00 2001 From: Brian de Alwis Date: Tue, 13 Jul 2021 15:56:09 -0400 Subject: [PATCH 080/103] Update release workflow to use actions-ecosystem/action-regex-match (#6188) * support releases from PR merges * support pre-release labels (e.g., 1.2.3-beta.1) --- .github/workflows/draft-release.yml | 44 ++++++++++++++++------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index e95b9483428..70d2bf40b5f 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -11,25 +11,36 @@ jobs: check: name: Check if release commit runs-on: ubuntu-latest - outputs: - applicable: ${{ steps.check-commit-message.outputs.applicable }} + if: "startsWith(github.event.head_commit.message, 'release: ')" steps: - - name: Check commit message + - name: Apply release-matching regexp to commit message + id: regex-match + uses: actions-ecosystem/action-regex-match@v2 + with: + text: ${{ github.event.head_commit.message }} + # Allow optional `v` prefix and GitHub PR reference suffix on first line only + # release: v1.2.3 + # release: 1.2.3-beta.1 + # release: v1.2.3-beta.1 (#9456) + regex: '^release: v?([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?)(\s+\(#[0-9]+\))?$' + flags: m + + - name: Determine if applicable id: check-commit-message + if: steps.regex-match.outputs.group1 != '' run: | - str='${{ github.event.head_commit.message }}' - regex="^release\s*:\s*(v[0-9]+\.[0-9]+\.[0-9]+|[0-9]+\.[0-9]+\.[0-9]+)" - if [[ "$str" =~ $regex ]]; then - echo "::set-output name=applicable::true" - echo This is a release commit. - fi + echo "::set-output name=applicable::true" + echo "This is a release commit: ${{ steps.regex-match.outputs.group1 }}" + outputs: + applicable: ${{ steps.check-commit-message.outputs.applicable }} + version: ${{ steps.regex-match.outputs.group1 }} release: + name: Create Tag and Draft Release needs: check if: needs.check.outputs.applicable == 'true' permissions: contents: write - name: Create Tag and Draft Release runs-on: ubuntu-latest steps: - name: Checkout code @@ -37,15 +48,10 @@ jobs: with: fetch-depth: 0 - - name: Calculate Tag and release names + - name: Calculate Tag and Release names run: | - t=$(echo ${{ github.event.head_commit.message }} | sed -ne 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p') - if [ -z "$t" ]; then - echo Malformed commit message; failed to extract semVer tag - return 1 - fi - echo TAG_NAME="v${t}" >> $GITHUB_ENV - echo RELEASE_NAME="v${t} Release" >> $GITHUB_ENV + echo TAG_NAME="v${{ needs.check.outputs.version }}" >> $GITHUB_ENV + echo RELEASE_NAME="v${{ needs.check.outputs.version }} Release" >> $GITHUB_ENV - name: Create and push Tag run: | @@ -62,7 +68,7 @@ jobs: - name: Download release artifacts run: | - #Wait 60m for all artifacts to be available + # Wait up to 60m for all artifacts to be available retries=20 found=0 while [ $found -lt 10 -a $retries -gt 0 ] From b3e02013f6b061b1f1b100dc16272b4a5fec33d1 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 13 Jul 2021 14:43:00 -0700 Subject: [PATCH 081/103] Add logic to show user survey in DisplaySurveyPrompt flow. (#6196) * add survey config and -id flag to survey command * add tests * revert not required * code review comments * move recentlyPromptedOrTaken and isSurveyPromptDisabled to survey. Create a new timeutil package * code review comments * fix rebase * refactor: Use globalConfig instead of kubecontext config for survey config. * Don't update survey prompt if survey prompt is not shown to stdout * fix linter * refactor UpdateGlobalSurveyTaken * survey is only active if start date is in past * Add global config for user surveys. Add logic to display user prompts * Apply suggestions from code review Co-authored-by: Brian de Alwis * code review changes * lint func * address nil pointer exception Co-authored-by: Brian de Alwis --- cmd/skaffold/app/cmd/cmd.go | 13 ++-- cmd/skaffold/app/cmd/survey.go | 2 +- pkg/skaffold/config/global_config.go | 12 +++- pkg/skaffold/config/util.go | 36 ++++++++++ pkg/skaffold/config/util_test.go | 74 +++++++++++++++++++ pkg/skaffold/survey/config.go | 44 +++++++++++- pkg/skaffold/survey/config_test.go | 44 +++++++++++- pkg/skaffold/survey/survey.go | 101 ++++++++++++++++++++++---- pkg/skaffold/survey/survey_test.go | 104 ++++++++++++++++++++++++++- 9 files changed, 400 insertions(+), 30 deletions(-) diff --git a/cmd/skaffold/app/cmd/cmd.go b/cmd/skaffold/app/cmd/cmd.go index c2ac49beb94..d37681c467c 100644 --- a/cmd/skaffold/app/cmd/cmd.go +++ b/cmd/skaffold/app/cmd/cmd.go @@ -63,9 +63,9 @@ const ( func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { updateMsg := make(chan string, 1) - surveyPrompt := make(chan bool, 1) + surveyPrompt := make(chan string, 1) var metricsPrompt bool - s := survey.New(opts.GlobalConfig) + var s *survey.Runner rootCmd := &cobra.Command{ Use: "skaffold", @@ -111,10 +111,11 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { logrus.Debugf("Disable housekeeping messages for command explicitly") return nil } + s = survey.New(opts.GlobalConfig, opts.ConfigurationFile, opts.Command) // Always perform all checks. go func() { updateMsg <- updateCheckForReleasedVersionsIfNotDisabled(versionInfo.Version) - surveyPrompt <- s.ShouldDisplaySurveyPrompt() + surveyPrompt <- s.NextSurveyID() }() metricsPrompt = prompt.ShouldDisplayMetricsPrompt(opts.GlobalConfig) return nil @@ -133,9 +134,9 @@ func NewSkaffoldCommand(out, errOut io.Writer) *cobra.Command { } // check if survey prompt needs to be displayed select { - case shouldDisplay := <-surveyPrompt: - if shouldDisplay { - if err := s.DisplaySurveyPrompt(cmd.OutOrStdout()); err != nil { + case promptSurveyID := <-surveyPrompt: + if promptSurveyID != "" { + if err := s.DisplaySurveyPrompt(cmd.OutOrStdout(), promptSurveyID); err != nil { fmt.Fprintf(cmd.OutOrStderr(), "%v\n", err) } } diff --git a/cmd/skaffold/app/cmd/survey.go b/cmd/skaffold/app/cmd/survey.go index 62d9800157c..216090f1781 100644 --- a/cmd/skaffold/app/cmd/survey.go +++ b/cmd/skaffold/app/cmd/survey.go @@ -37,6 +37,6 @@ func NewCmdSurvey() *cobra.Command { } func showSurvey(ctx context.Context, out io.Writer) error { - s := survey.New(opts.GlobalConfig) + s := survey.New(opts.GlobalConfig, opts.ConfigurationFile, opts.Command) return s.OpenSurveyForm(ctx, out, surveyID) } diff --git a/pkg/skaffold/config/global_config.go b/pkg/skaffold/config/global_config.go index a1fa8efbc41..99babe367b0 100644 --- a/pkg/skaffold/config/global_config.go +++ b/pkg/skaffold/config/global_config.go @@ -42,9 +42,15 @@ type ContextConfig struct { // SurveyConfig is the survey config information type SurveyConfig struct { - DisablePrompt *bool `yaml:"disable-prompt,omitempty"` - LastTaken string `yaml:"last-taken,omitempty"` - LastPrompted string `yaml:"last-prompted,omitempty"` + DisablePrompt *bool `yaml:"disable-prompt,omitempty"` + LastTaken string `yaml:"last-taken,omitempty"` + LastPrompted string `yaml:"last-prompted,omitempty"` + UserSurveys []*UserSurvey `yaml:"user-surveys,omitempty"` +} + +type UserSurvey struct { + ID string `yaml:"id"` + Taken *bool `yaml:"taken,omitempty"` } // UpdateConfig is the update config information diff --git a/pkg/skaffold/config/util.go b/pkg/skaffold/config/util.go index 5619d73ebab..071329dd35a 100644 --- a/pkg/skaffold/config/util.go +++ b/pkg/skaffold/config/util.go @@ -58,6 +58,7 @@ var ( // update global config with the time the survey was last taken updateLastTaken = "skaffold config set --survey --global last-taken %s" + updateUserTaken = "skaffold config set --survey --global --id %s taken true" // update global config with the time the survey was last prompted updateLastPrompted = "skaffold config set --survey --global last-prompted %s" ) @@ -434,3 +435,38 @@ func WriteFullConfig(configFile string, cfg *GlobalConfig) error { } return nil } + +func UpdateUserSurveyTaken(configFile string, id string) error { + ai := fmt.Sprintf(updateUserTaken, id) + aiErr := fmt.Errorf("could not automatically update the survey prompted timestamp - please run `%s`", ai) + configFile, err := ResolveConfigFile(configFile) + if err != nil { + return aiErr + } + fullConfig, err := ReadConfigFile(configFile) + if err != nil { + return aiErr + } + if fullConfig.Global == nil { + fullConfig.Global = &ContextConfig{} + } + if fullConfig.Global.Survey == nil { + fullConfig.Global.Survey = &SurveyConfig{} + } + fullConfig.Global.Survey.UserSurveys = updatedUserSurveys(fullConfig.Global.Survey.UserSurveys, id) + err = WriteFullConfig(configFile, fullConfig) + if err != nil { + return aiErr + } + return nil +} + +func updatedUserSurveys(us []*UserSurvey, id string) []*UserSurvey { + for _, s := range us { + if s.ID == id { + s.Taken = util.BoolPtr(true) + return us + } + } + return append(us, &UserSurvey{ID: id, Taken: util.BoolPtr(true)}) +} diff --git a/pkg/skaffold/config/util_test.go b/pkg/skaffold/config/util_test.go index 7cf232affb5..d97b52064e6 100644 --- a/pkg/skaffold/config/util_test.go +++ b/pkg/skaffold/config/util_test.go @@ -710,3 +710,77 @@ func TestShouldDisplayUpdateMsg(t *testing.T) { }) } } + +func TestUpdateUserSurveyTaken(t *testing.T) { + tests := []struct { + description string + cfg string + id string + expectedCfg *GlobalConfig + }{ + { + description: "update global context when user survey is empty", + id: "foo", + expectedCfg: &GlobalConfig{ + Global: &ContextConfig{ + Survey: &SurveyConfig{UserSurveys: []*UserSurvey{ + {ID: "foo", Taken: util.BoolPtr(true)}, + }}}, + ContextConfigs: []*ContextConfig{}, + }, + }, + { + description: "append user survey when not nil", + cfg: ` +global: + survey: + user-surveys: + - id: "foo1" + taken: true +kubeContexts: []`, + id: "foo2", + expectedCfg: &GlobalConfig{ + Global: &ContextConfig{ + Survey: &SurveyConfig{ + UserSurveys: []*UserSurvey{ + {ID: "foo1", Taken: util.BoolPtr(true)}, + {ID: "foo2", Taken: util.BoolPtr(true)}, + }}}, + ContextConfigs: []*ContextConfig{}, + }, + }, + { + description: "update entry for a key in user survey", + cfg: ` +global: + survey: + user-surveys: + - id: "foo" + taken: false +kubeContexts: []`, + id: "foo", + expectedCfg: &GlobalConfig{ + Global: &ContextConfig{ + Survey: &SurveyConfig{ + UserSurveys: []*UserSurvey{ + {ID: "foo", Taken: util.BoolPtr(true)}, + }}}, + ContextConfigs: []*ContextConfig{}, + }, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + cfg := t.TempFile("config", []byte(test.cfg)) + t.Override(&ReadConfigFile, ReadConfigFileNoCache) + + // update the time + err := UpdateUserSurveyTaken(cfg, test.id) + t.CheckNoError(err) + + actualConfig, cfgErr := ReadConfigFile(cfg) + t.CheckNoError(cfgErr) + t.CheckDeepEqual(test.expectedCfg, actualConfig) + }) + } +} diff --git a/pkg/skaffold/survey/config.go b/pkg/skaffold/survey/config.go index 94e7c85a54f..61e9d7edb99 100644 --- a/pkg/skaffold/survey/config.go +++ b/pkg/skaffold/survey/config.go @@ -18,9 +18,11 @@ package survey import ( "fmt" + "sort" "time" sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) @@ -39,7 +41,29 @@ var ( URL: hatsURL, } // surveys contains all the skaffold survey information - surveys = []config{hats} + surveys = []config{ + hats, + { + id: "helm", + URL: "https://forms.gle/cLQg8sGD71JnPSZf6", + startsAt: time.Date(2021, time.July, 15, 0, 0, 0, 0, time.UTC), + expiresAt: time.Date(2021, time.August, + 14, 00, 00, 00, 0, time.UTC), + promptText: "Help improve Skaffold's Helm support by taking our 2-minute anonymous survey", + isRelevantFn: func(cfgs []util.VersionedConfig, _ sConfig.RunMode) bool { + for _, cfg := range cfgs { + v1Cfg, ok := cfg.(*latestV1.SkaffoldConfig) + if !ok { + return false + } + if h := v1Cfg.Deploy.HelmDeploy; h != nil { + return true + } + } + return false + }, + }, + } ) // config defines a survey. @@ -69,7 +93,7 @@ func (s config) prompt() string { return fmt.Sprintf(`%s: run 'skaffold survey' `, s.promptText) } - return fmt.Sprintf(`%s: run 'skaffold survey -id %s' + return fmt.Sprintf(`%s: run 'skaffold survey --id %s' `, s.promptText, s.id) } @@ -112,3 +136,19 @@ func init() { } } } + +// sortSurveys sorts a slice of config based on expiry time in +// the ascending order. +// Survey that don't have expiry set are returned last. +func sortSurveys(s []config) []config { + sort.Slice(s, func(i, j int) bool { + if s[i].expiresAt.IsZero() { // i > j + return false + } + if s[j].expiresAt.IsZero() { // i < j + return true + } + return s[i].expiresAt.Before(s[j].expiresAt) // i < j + }) + return s +} diff --git a/pkg/skaffold/survey/config_test.go b/pkg/skaffold/survey/config_test.go index 5940a670a08..946e03b0e40 100644 --- a/pkg/skaffold/survey/config_test.go +++ b/pkg/skaffold/survey/config_test.go @@ -44,7 +44,7 @@ func TestSurveyPrompt(t *testing.T) { promptText: "Looks like you are using foo feature. Help improve Skaffold foo feature and take this survey", expiresAt: time.Date(2021, time.August, 14, 00, 00, 00, 0, time.UTC), }, - expected: `Looks like you are using foo feature. Help improve Skaffold foo feature and take this survey: run 'skaffold survey -id foo' + expected: `Looks like you are using foo feature. Help improve Skaffold foo feature and take this survey: run 'skaffold survey --id foo' `, }, } @@ -252,6 +252,48 @@ func TestIsValid(t *testing.T) { } } +func TestSortSurveys(t *testing.T) { + expected := []config{ + {id: "10Day", expiresAt: time.Now().AddDate(0, 0, 10)}, + {id: "started", startsAt: time.Now().AddDate(0, 0, -10), expiresAt: time.Now().AddDate(0, 0, 20)}, + {id: "2Months", expiresAt: time.Now().AddDate(0, 2, 0)}, + hats, + } + tests := []struct { + description string + input []config + }{ + { + description: "no expiry set at 0th position", + input: []config{ + hats, + {id: "2Months", expiresAt: time.Now().AddDate(0, 2, 0)}, + {id: "10Day", expiresAt: time.Now().AddDate(0, 0, 10)}, + {id: "started", startsAt: time.Now().AddDate(0, 0, -10), expiresAt: time.Now().AddDate(0, 0, 20)}, + }, + }, + { + description: "no expiry set in middle position", + input: []config{ + {id: "started", startsAt: time.Now().AddDate(0, 0, -10), expiresAt: time.Now().AddDate(0, 0, 20)}, + {id: "2Months", expiresAt: time.Now().AddDate(0, 2, 0)}, + hats, + {id: "10Day", expiresAt: time.Now().AddDate(0, 0, 10)}, + }, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + for i, a := range sortSurveys(test.input) { + if expected[i].id != a.id { + t.Errorf("expected to see %s, found %s at position %d", + expected[i].id, a.id, i) + } + } + }) + } +} + // mockVersionedConfig implements util.VersionedConfig. type mockVersionedConfig struct { version string diff --git a/pkg/skaffold/survey/survey.go b/pkg/skaffold/survey/survey.go index 319b286337a..2a513e5bba1 100644 --- a/pkg/skaffold/survey/survey.go +++ b/pkg/skaffold/survey/survey.go @@ -27,6 +27,7 @@ import ( sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/timeutil" ) @@ -46,21 +47,39 @@ var ( isStdOut = output.IsStdout open = browser.OpenURL updateSurveyPrompted = sConfig.UpdateGlobalSurveyPrompted + parseConfig = schema.ParseConfigAndUpgrade ) type Runner struct { - configFile string + configFile string + skaffoldConfig string + mode sConfig.RunMode } -func New(configFile string) *Runner { +func New(configFile string, skaffoldConfig string, mode string) *Runner { return &Runner{ - configFile: configFile, + configFile: configFile, + skaffoldConfig: skaffoldConfig, + mode: sConfig.RunMode(mode), } } -func (s *Runner) ShouldDisplaySurveyPrompt() bool { +// NextSurveyID returns the survey id of the survey to be shown +// to the user. In case no survey is available, it returns empty string. +func (s *Runner) NextSurveyID() string { + if id, ok := s.shouldDisplaySurveyPrompt(); ok { + return id + } + return "" +} + +func (s *Runner) shouldDisplaySurveyPrompt() (string, bool) { cfg, disabled := isSurveyPromptDisabled(s.configFile) - return !disabled && !recentlyPromptedOrTaken(cfg) + if disabled { + return "", !disabled + } + id := s.recentlyPromptedOrTaken(cfg) + return s.recentlyPromptedOrTaken(cfg), id != "" } func isSurveyPromptDisabled(configfile string) (*sConfig.GlobalConfig, bool) { @@ -74,20 +93,30 @@ func isSurveyPromptDisabled(configfile string) (*sConfig.GlobalConfig, bool) { *cfg.Global.Survey.DisablePrompt } -func recentlyPromptedOrTaken(cfg *sConfig.GlobalConfig) bool { +func (s *Runner) recentlyPromptedOrTaken(cfg *sConfig.GlobalConfig) string { if cfg == nil || cfg.Global == nil || cfg.Global.Survey == nil { - return false + return s.selectSurvey(map[string]struct{}{}) + } + if recentlyPrompted(cfg.Global.Survey) { + return "" } - return timeutil.LessThan(cfg.Global.Survey.LastTaken, 90*24*time.Hour) || - timeutil.LessThan(cfg.Global.Survey.LastPrompted, 10*24*time.Hour) + return s.selectSurvey(surveysTaken(cfg.Global.Survey)) } -func (s *Runner) DisplaySurveyPrompt(out io.Writer) error { +// recentlyPrompted returns true if the user has been recently prompted for a survey. +func recentlyPrompted(gc *sConfig.SurveyConfig) bool { + return timeutil.LessThan(gc.LastPrompted, 10*24*time.Hour) +} + +func (s *Runner) DisplaySurveyPrompt(out io.Writer, id string) error { if !isStdOut(out) { return nil } - output.Green.Fprintf(out, hats.prompt()) - return updateSurveyPrompted(s.configFile) + if sc, ok := getSurvey(id); ok { + output.Green.Fprintf(out, sc.prompt()) + return updateSurveyPrompted(s.configFile) + } + return nil } func (s *Runner) OpenSurveyForm(_ context.Context, out io.Writer, id string) error { @@ -103,7 +132,49 @@ func (s *Runner) OpenSurveyForm(_ context.Context, out io.Writer, id string) err logrus.Debugf("could not open url %s", sc.URL) return err } - // Currently we will only update the global config survey taken - // When prompting for the survey, we need to use the same field. - return sConfig.UpdateHaTSSurveyTaken(s.configFile) + + if id == HatsID { + return sConfig.UpdateHaTSSurveyTaken(s.configFile) + } + return sConfig.UpdateUserSurveyTaken(s.configFile, id) +} + +func surveysTaken(sc *sConfig.SurveyConfig) map[string]struct{} { + if sc == nil { + return map[string]struct{}{} + } + taken := map[string]struct{}{} + if timeutil.LessThan(sc.LastTaken, 90*24*time.Hour) { + taken[HatsID] = struct{}{} + } + for _, cs := range sc.UserSurveys { + if *cs.Taken { + taken[cs.ID] = struct{}{} + } + } + return taken +} + +func (s *Runner) selectSurvey(takenSurveys map[string]struct{}) string { + var candidates []config + for _, sc := range surveys { + if _, taken := takenSurveys[sc.id]; !taken && sc.isActive() { + candidates = append(candidates, sc) + } + } + if len(candidates) == 0 { + return "" + } + sortSurveys(candidates) + cfgs, err := parseConfig(s.skaffoldConfig) + if err != nil { + logrus.Debugf("error parsing skaffold.yaml %s", err) + return "" + } + for _, sc := range candidates { + if sc.isRelevantFn(cfgs, s.mode) { + return sc.id + } + } + return "" } diff --git a/pkg/skaffold/survey/survey_test.go b/pkg/skaffold/survey/survey_test.go index 31ca8f15503..d50e3b606aa 100644 --- a/pkg/skaffold/survey/survey_test.go +++ b/pkg/skaffold/survey/survey_test.go @@ -24,6 +24,7 @@ import ( "time" sConfig "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + schemaUtil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/GoogleContainerTools/skaffold/testutil" ) @@ -57,7 +58,7 @@ func TestDisplaySurveyForm(t *testing.T) { t.Override(&open, mockOpen) t.Override(&updateSurveyPrompted, test.mockSurveyPrompted) var buf bytes.Buffer - err := New("test").DisplaySurveyPrompt(&buf) + err := New("test", "skaffold.yaml", "dev").DisplaySurveyPrompt(&buf, HatsID) t.CheckNoError(err) t.CheckDeepEqual(test.expected, buf.String()) }) @@ -140,8 +141,13 @@ func TestShouldDisplayPrompt(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&surveys, []config{hats}) t.Override(&sConfig.ReadConfigFile, func(string) (*sConfig.GlobalConfig, error) { return test.cfg, nil }) - t.CheckDeepEqual(test.expected, New("test").ShouldDisplaySurveyPrompt()) + t.Override(&parseConfig, func(string) ([]schemaUtil.VersionedConfig, error) { + return []schemaUtil.VersionedConfig{mockVersionedConfig{version: "test"}}, nil + }) + _, actual := New("test", "yaml", "dev").shouldDisplaySurveyPrompt() + t.CheckDeepEqual(test.expected, actual) }) } } @@ -194,3 +200,97 @@ func TestIsSurveyPromptDisabled(t *testing.T) { }) } } + +func TestRecentlyPromptedOrTaken(t *testing.T) { + // less than 90 days ago + twoMonthsAgo := time.Now().AddDate(0, -2, -5).Format(time.RFC3339) + // at least 90 days ago + threeMonthsAgo := time.Now().AddDate(0, -3, -5).Format(time.RFC3339) + future := time.Now().AddDate(1, 0, 0) + tests := []struct { + description string + cfg *sConfig.GlobalConfig + input []config + expected string + }{ + { + description: "nil test - do not remove", + cfg: nil, + input: []config{hats}, + expected: HatsID, + }, + + // Current world when no user surveys are configured. + { + description: "no user surveys - hats not taken", + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{}}}, + input: []config{hats}, + expected: HatsID, + }, + { + description: "no user surveys - hats taken more than 3 months", + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{LastTaken: threeMonthsAgo}}}, + input: []config{hats}, + expected: HatsID, + }, + { + description: "no user surveys - hats taken less than 3 months", + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{LastTaken: twoMonthsAgo}}}, + input: []config{hats}, + expected: "", + }, + // User survey configured and are relevant + { + description: "user surveys, hats not taken, relevant survey", + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{}}}, + input: []config{hats, {id: "user", expiresAt: future, + isRelevantFn: func(_ []schemaUtil.VersionedConfig, _ sConfig.RunMode) bool { + return true + }}, + }, + expected: "user", + }, + { + description: "user survey taken, hats taken", + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{LastTaken: twoMonthsAgo, + UserSurveys: []*sConfig.UserSurvey{ + {ID: "user", Taken: util.BoolPtr(true)}, + }}}}, + input: []config{hats, {id: "user", expiresAt: future, + isRelevantFn: func(_ []schemaUtil.VersionedConfig, _ sConfig.RunMode) bool { + return true + }}, + }, + expected: "", + }, + { + description: "user survey taken, hats not taken", + cfg: &sConfig.GlobalConfig{ + Global: &sConfig.ContextConfig{Survey: &sConfig.SurveyConfig{ + UserSurveys: []*sConfig.UserSurvey{ + {ID: "user", Taken: util.BoolPtr(true)}, + }}}}, + input: []config{hats, {id: "user", expiresAt: future, + isRelevantFn: func(_ []schemaUtil.VersionedConfig, _ sConfig.RunMode) bool { + return true + }}, + }, + expected: HatsID, + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&surveys, test.input) + t.Override(&parseConfig, func(string) ([]schemaUtil.VersionedConfig, error) { + return []schemaUtil.VersionedConfig{mockVersionedConfig{version: "test"}}, nil + }) + actual := New("dummy", "yaml", "cmd").recentlyPromptedOrTaken(test.cfg) + t.CheckDeepEqual(test.expected, actual) + }) + } +} From 7b18b11ba98ea0e48c0dc500d0b8f48e94867978 Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Tue, 13 Jul 2021 15:06:15 -0700 Subject: [PATCH 082/103] Track deployment namespaces in Deployer (#6170) * Track deployment namespaces in Deployer * fix test name and unnecessary variable * Remove Namespaces and associated methods from RunContext: --- pkg/skaffold/access/access.go | 4 +- pkg/skaffold/access/access_mux.go | 4 +- pkg/skaffold/debug/debug.go | 4 +- pkg/skaffold/debug/debugger_mux.go | 4 +- .../component/kubernetes/accessor_test.go | 2 +- .../deploy/component/kubernetes/component.go | 20 +- .../component/kubernetes/debugger_test.go | 2 +- .../component/kubernetes/monitor_test.go | 2 +- pkg/skaffold/deploy/deploy.go | 4 +- pkg/skaffold/deploy/deploy_mux.go | 16 +- pkg/skaffold/deploy/deploy_mux_test.go | 62 ++--- pkg/skaffold/deploy/helm/deploy.go | 35 ++- pkg/skaffold/deploy/helm/helm_test.go | 243 ++++++++++-------- pkg/skaffold/deploy/kpt/kpt.go | 39 +-- pkg/skaffold/deploy/kpt/kpt_test.go | 4 +- pkg/skaffold/deploy/kubectl/kubectl.go | 37 ++- pkg/skaffold/deploy/kubectl/kubectl_test.go | 14 +- pkg/skaffold/deploy/kustomize/kustomize.go | 35 ++- .../deploy/kustomize/kustomize_test.go | 2 +- pkg/skaffold/deploy/util/util.go | 11 + .../util/util_test.go} | 12 +- .../kubernetes/debugging/container_manager.go | 8 +- .../debugging/container_manager_test.go | 2 +- pkg/skaffold/kubernetes/logger/log.go | 8 +- pkg/skaffold/kubernetes/logger/log_test.go | 4 +- .../portforward/forwarder_manager.go | 16 +- .../portforward/forwarder_manager_test.go | 3 +- .../kubernetes/status/status_check.go | 7 +- pkg/skaffold/log/log.go | 4 +- pkg/skaffold/log/logger_mux.go | 4 +- pkg/skaffold/log/provider.go | 79 ------ pkg/skaffold/runner/deployer_test.go | 10 +- pkg/skaffold/runner/notification.go | 6 +- pkg/skaffold/runner/runcontext/context.go | 24 -- pkg/skaffold/runner/timings.go | 8 +- pkg/skaffold/runner/timings_test.go | 8 +- pkg/skaffold/runner/util/util.go | 78 ------ pkg/skaffold/runner/util/util_test.go | 89 ------- pkg/skaffold/runner/v1/apply.go | 3 +- pkg/skaffold/runner/v1/deploy.go | 7 +- pkg/skaffold/runner/v1/deploy_test.go | 44 ---- pkg/skaffold/runner/v1/dev.go | 10 +- pkg/skaffold/runner/v1/runner_test.go | 6 +- pkg/skaffold/sync/sync.go | 4 +- pkg/skaffold/sync/types.go | 14 +- 45 files changed, 374 insertions(+), 628 deletions(-) rename pkg/skaffold/{runner/runcontext/context_test.go => deploy/util/util_test.go} (91%) delete mode 100644 pkg/skaffold/log/provider.go delete mode 100644 pkg/skaffold/runner/util/util.go delete mode 100644 pkg/skaffold/runner/util/util_test.go diff --git a/pkg/skaffold/access/access.go b/pkg/skaffold/access/access.go index 53d057e56d4..7e2628dd2da 100644 --- a/pkg/skaffold/access/access.go +++ b/pkg/skaffold/access/access.go @@ -25,7 +25,7 @@ import ( // that accesses and exposes deployed resources from Skaffold. type Accessor interface { // Start starts the resource accessor. - Start(context.Context, io.Writer, []string) error + Start(context.Context, io.Writer) error // Stop stops the resource accessor. Stop() @@ -33,6 +33,6 @@ type Accessor interface { type NoopAccessor struct{} -func (n *NoopAccessor) Start(context.Context, io.Writer, []string) error { return nil } +func (n *NoopAccessor) Start(context.Context, io.Writer) error { return nil } func (n *NoopAccessor) Stop() {} diff --git a/pkg/skaffold/access/access_mux.go b/pkg/skaffold/access/access_mux.go index 378cba10165..830183969f8 100644 --- a/pkg/skaffold/access/access_mux.go +++ b/pkg/skaffold/access/access_mux.go @@ -23,9 +23,9 @@ import ( type AccessorMux []Accessor -func (a AccessorMux) Start(ctx context.Context, out io.Writer, namespaces []string) error { +func (a AccessorMux) Start(ctx context.Context, out io.Writer) error { for _, accessor := range a { - if err := accessor.Start(ctx, out, namespaces); err != nil { + if err := accessor.Start(ctx, out); err != nil { return err } } diff --git a/pkg/skaffold/debug/debug.go b/pkg/skaffold/debug/debug.go index 28f201d532c..ce670aa1fe2 100644 --- a/pkg/skaffold/debug/debug.go +++ b/pkg/skaffold/debug/debug.go @@ -30,7 +30,7 @@ type Config interface { // that attaches to and helps debug deployed resources from Skaffold. type Debugger interface { // Start starts the debugger. - Start(context.Context, []string) error + Start(context.Context) error // Stop stops the debugger. Stop() @@ -41,7 +41,7 @@ type Debugger interface { type NoopDebugger struct{} -func (n *NoopDebugger) Start(context.Context, []string) error { return nil } +func (n *NoopDebugger) Start(context.Context) error { return nil } func (n *NoopDebugger) Stop() {} diff --git a/pkg/skaffold/debug/debugger_mux.go b/pkg/skaffold/debug/debugger_mux.go index bd6dc4787ab..5f1f12b9179 100644 --- a/pkg/skaffold/debug/debugger_mux.go +++ b/pkg/skaffold/debug/debugger_mux.go @@ -20,9 +20,9 @@ import "context" type DebuggerMux []Debugger -func (d DebuggerMux) Start(ctx context.Context, namespaces []string) error { +func (d DebuggerMux) Start(ctx context.Context) error { for _, debugger := range d { - if err := debugger.Start(ctx, namespaces); err != nil { + if err := debugger.Start(ctx); err != nil { return err } } diff --git a/pkg/skaffold/deploy/component/kubernetes/accessor_test.go b/pkg/skaffold/deploy/component/kubernetes/accessor_test.go index 40ba70920f6..ea385b5b837 100644 --- a/pkg/skaffold/deploy/component/kubernetes/accessor_test.go +++ b/pkg/skaffold/deploy/component/kubernetes/accessor_test.go @@ -67,7 +67,7 @@ func TestGetAccessor(t *testing.T) { if test.enabled { opts.Append("1") // default enabled mode } - a := NewAccessor(mockAccessConfig{opts: opts}, test.description, nil, nil, label.NewLabeller(false, nil, "")) + a := NewAccessor(mockAccessConfig{opts: opts}, test.description, nil, nil, label.NewLabeller(false, nil, ""), nil) fmt.Fprintf(os.Stdout, "retrieved accessor: %+v\n", a) t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(a)).Type() == reflect.TypeOf(access.NoopAccessor{})) }) diff --git a/pkg/skaffold/deploy/component/kubernetes/component.go b/pkg/skaffold/deploy/component/kubernetes/component.go index 4659234cec8..00d60dbdfcb 100644 --- a/pkg/skaffold/deploy/component/kubernetes/component.go +++ b/pkg/skaffold/deploy/component/kubernetes/component.go @@ -52,7 +52,7 @@ var ( k8sMonitor map[string]status.Monitor ) -func newAccessor(cfg portforward.Config, kubeContext string, cli *kubectl.CLI, podSelector kubernetes.PodSelector, labeller label.Config) access.Accessor { +func newAccessor(cfg portforward.Config, kubeContext string, cli *kubectl.CLI, podSelector kubernetes.PodSelector, labeller label.Config, namespaces *[]string) access.Accessor { accessLock.Lock() defer accessLock.Unlock() if k8sAccessor == nil { @@ -62,7 +62,7 @@ func newAccessor(cfg portforward.Config, kubeContext string, cli *kubectl.CLI, p if !cfg.PortForwardOptions().Enabled() { k8sAccessor[kubeContext] = &access.NoopAccessor{} } - m := portforward.NewForwarderManager(cli, podSelector, labeller.RunIDSelector(), cfg.Mode(), cfg.PortForwardOptions(), cfg.PortForwardResources()) + m := portforward.NewForwarderManager(cli, podSelector, labeller.RunIDSelector(), cfg.Mode(), namespaces, cfg.PortForwardOptions(), cfg.PortForwardResources()) if m == nil { k8sAccessor[kubeContext] = &access.NoopAccessor{} } else { @@ -73,12 +73,12 @@ func newAccessor(cfg portforward.Config, kubeContext string, cli *kubectl.CLI, p return k8sAccessor[kubeContext] } -func newDebugger(mode config.RunMode, podSelector kubernetes.PodSelector) debug.Debugger { +func newDebugger(mode config.RunMode, podSelector kubernetes.PodSelector, namespaces *[]string) debug.Debugger { if mode != config.RunModes.Debug { return &debug.NoopDebugger{} } - return debugging.NewContainerManager(podSelector) + return debugging.NewContainerManager(podSelector, namespaces) } func newImageLoader(cfg k8sloader.Config, cli *kubectl.CLI) loader.ImageLoader { @@ -88,11 +88,11 @@ func newImageLoader(cfg k8sloader.Config, cli *kubectl.CLI) loader.ImageLoader { return &loader.NoopImageLoader{} } -func newLogger(config k8slogger.Config, cli *kubectl.CLI, podSelector kubernetes.PodSelector) log.Logger { - return k8slogger.NewLogAggregator(cli, podSelector, config) +func newLogger(config k8slogger.Config, cli *kubectl.CLI, podSelector kubernetes.PodSelector, namespaces *[]string) log.Logger { + return k8slogger.NewLogAggregator(cli, podSelector, namespaces, config) } -func newMonitor(cfg k8sstatus.Config, kubeContext string, labeller *label.DefaultLabeller) status.Monitor { +func newMonitor(cfg k8sstatus.Config, kubeContext string, labeller *label.DefaultLabeller, namespaces *[]string) status.Monitor { monitorLock.Lock() defer monitorLock.Unlock() if k8sMonitor == nil { @@ -103,12 +103,12 @@ func newMonitor(cfg k8sstatus.Config, kubeContext string, labeller *label.Defaul if enabled != nil && !*enabled { // assume disabled only if explicitly set to false k8sMonitor[kubeContext] = &status.NoopMonitor{} } else { - k8sMonitor[kubeContext] = k8sstatus.NewStatusMonitor(cfg, labeller) + k8sMonitor[kubeContext] = k8sstatus.NewStatusMonitor(cfg, labeller, namespaces) } } return k8sMonitor[kubeContext] } -func newSyncer(config sync.Config, cli *kubectl.CLI) sync.Syncer { - return sync.NewPodSyncer(cli, config) +func newSyncer(cli *kubectl.CLI, namespaces *[]string) sync.Syncer { + return sync.NewPodSyncer(cli, namespaces) } diff --git a/pkg/skaffold/deploy/component/kubernetes/debugger_test.go b/pkg/skaffold/deploy/component/kubernetes/debugger_test.go index e6fda2498e3..248aef48e0d 100644 --- a/pkg/skaffold/deploy/component/kubernetes/debugger_test.go +++ b/pkg/skaffold/deploy/component/kubernetes/debugger_test.go @@ -48,7 +48,7 @@ func TestGetDebugger(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - d := NewDebugger(test.runMode, nil) + d := NewDebugger(test.runMode, nil, nil) t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(d)).Type() == reflect.TypeOf(debug.NoopDebugger{})) }) } diff --git a/pkg/skaffold/deploy/component/kubernetes/monitor_test.go b/pkg/skaffold/deploy/component/kubernetes/monitor_test.go index e89f79d18c5..e668e026a42 100644 --- a/pkg/skaffold/deploy/component/kubernetes/monitor_test.go +++ b/pkg/skaffold/deploy/component/kubernetes/monitor_test.go @@ -63,7 +63,7 @@ func TestGetMonitor(t *testing.T) { for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - m := NewMonitor(mockStatusConfig{statusCheck: test.statusCheck}, test.description, label.NewLabeller(false, nil, "")) + m := NewMonitor(mockStatusConfig{statusCheck: test.statusCheck}, test.description, label.NewLabeller(false, nil, ""), nil) t.CheckDeepEqual(test.isNoop, reflect.Indirect(reflect.ValueOf(m)).Type() == reflect.TypeOf(status.NoopMonitor{})) }) } diff --git a/pkg/skaffold/deploy/deploy.go b/pkg/skaffold/deploy/deploy.go index db48d8d625b..37dabbc172c 100644 --- a/pkg/skaffold/deploy/deploy.go +++ b/pkg/skaffold/deploy/deploy.go @@ -32,8 +32,8 @@ import ( // the build results to a Kubernetes cluster type Deployer interface { // Deploy should ensure that the build results are deployed to the Kubernetes - // cluster. Returns the list of impacted namespaces. - Deploy(context.Context, io.Writer, []graph.Artifact) ([]string, error) + // cluster. + Deploy(context.Context, io.Writer, []graph.Artifact) error // Dependencies returns a list of files that the deployer depends on. // In dev mode, a redeploy will be triggered diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go index a5e011bc92d..5a2234018d9 100644 --- a/pkg/skaffold/deploy/deploy_mux.go +++ b/pkg/skaffold/deploy/deploy_mux.go @@ -99,33 +99,29 @@ func (m DeployerMux) RegisterLocalImages(images []graph.Artifact) { } } -func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) ([]string, error) { - seenNamespaces := util.NewStringSet() - +func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) error { for i, deployer := range m.deployers { eventV2.DeployInProgress(i) w = output.WithEventContext(w, constants.Deploy, strconv.Itoa(i), "skaffold") ctx, endTrace := instrumentation.StartTrace(ctx, "Deploy") - namespaces, err := deployer.Deploy(ctx, w, as) - if err != nil { + if err := deployer.Deploy(ctx, w, as); err != nil { eventV2.DeployFailed(i, err) endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } - seenNamespaces.Insert(namespaces...) if m.iterativeStatusCheck { - if err = deployer.GetStatusMonitor().Check(ctx, w); err != nil { + if err := deployer.GetStatusMonitor().Check(ctx, w); err != nil { eventV2.DeployFailed(i, err) endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } } eventV2.DeploySucceeded(i) endTrace() } - return seenNamespaces.ToList(), nil + return nil } func (m DeployerMux) Dependencies() ([]string, error) { diff --git a/pkg/skaffold/deploy/deploy_mux_test.go b/pkg/skaffold/deploy/deploy_mux_test.go index a224ed9acb6..47fd824e5d5 100644 --- a/pkg/skaffold/deploy/deploy_mux_test.go +++ b/pkg/skaffold/deploy/deploy_mux_test.go @@ -39,14 +39,13 @@ import ( func NewMockDeployer() *MockDeployer { return &MockDeployer{labels: make(map[string]string)} } type MockDeployer struct { - labels map[string]string - deployNamespaces []string - deployErr error - dependencies []string - dependenciesErr error - cleanupErr error - renderResult string - renderErr error + labels map[string]string + deployErr error + dependencies []string + dependenciesErr error + cleanupErr error + renderResult string + renderErr error } func (m *MockDeployer) GetAccessor() access.Accessor { @@ -106,8 +105,8 @@ func (m *MockDeployer) WithRenderErr(err error) *MockDeployer { return m } -func (m *MockDeployer) Deploy(context.Context, io.Writer, []graph.Artifact) ([]string, error) { - return m.deployNamespaces, m.deployErr +func (m *MockDeployer) Deploy(context.Context, io.Writer, []graph.Artifact) error { + return m.deployErr } func (m *MockDeployer) Render(_ context.Context, w io.Writer, _ []graph.Artifact, _ bool, _ string) error { @@ -115,11 +114,6 @@ func (m *MockDeployer) Render(_ context.Context, w io.Writer, _ []graph.Artifact return m.renderErr } -func (m *MockDeployer) WithDeployNamespaces(namespaces []string) *MockDeployer { - m.deployNamespaces = namespaces - return m -} - func (m *MockDeployer) WithDependencies(dependencies []string) *MockDeployer { m.dependencies = dependencies return m @@ -141,32 +135,14 @@ func TestDeployerMux_Deploy(t *testing.T) { shouldErr bool }{ { - name: "disjoint namespaces are combined", - namespaces1: []string{"ns-a"}, - namespaces2: []string{"ns-b"}, - expectedNs: []string{"ns-a", "ns-b"}, - }, - { - name: "repeated namespaces are not duplicated", - namespaces1: []string{"ns-a", "ns-c"}, - namespaces2: []string{"ns-b", "ns-c"}, - expectedNs: []string{"ns-a", "ns-b", "ns-c"}, - }, - { - name: "short-circuits when first call fails", - namespaces1: []string{"ns-a"}, - err1: fmt.Errorf("failed in first"), - namespaces2: []string{"ns-b"}, - expectedNs: nil, - shouldErr: true, + name: "short-circuits when first call fails", + err1: fmt.Errorf("failed in first"), + shouldErr: true, }, { - name: "when second call fails", - namespaces1: []string{"ns-a"}, - namespaces2: []string{"ns-b"}, - err2: fmt.Errorf("failed in second"), - expectedNs: nil, - shouldErr: true, + name: "when second call fails", + err2: fmt.Errorf("failed in second"), + shouldErr: true, }, } @@ -181,13 +157,13 @@ func TestDeployerMux_Deploy(t *testing.T) { }}}) deployerMux := NewDeployerMux([]Deployer{ - NewMockDeployer().WithDeployNamespaces(test.namespaces1).WithDeployErr(test.err1), - NewMockDeployer().WithDeployNamespaces(test.namespaces2).WithDeployErr(test.err2), + NewMockDeployer().WithDeployErr(test.err1), + NewMockDeployer().WithDeployErr(test.err2), }, false) - namespaces, err := deployerMux.Deploy(context.Background(), nil, nil) + err := deployerMux.Deploy(context.Background(), nil, nil) - testutil.CheckErrorAndDeepEqual(t, test.shouldErr, err, test.expectedNs, namespaces) + testutil.CheckError(t, test.shouldErr, err) }) } } diff --git a/pkg/skaffold/deploy/helm/deploy.go b/pkg/skaffold/deploy/helm/deploy.go index f205e187bec..1900067db0f 100644 --- a/pkg/skaffold/deploy/helm/deploy.go +++ b/pkg/skaffold/deploy/helm/deploy.go @@ -103,6 +103,8 @@ type Deployer struct { namespace string configFile string + namespaces *[]string + // packaging temporary directory, used for predictable test output pkgTmpDir string @@ -145,16 +147,18 @@ func NewDeployer(cfg Config, labeller *label.DefaultLabeller, h *latestV1.HelmDe podSelector := kubernetes.NewImageList() kubectl := pkgkubectl.NewCLI(cfg, cfg.GetKubeNamespace()) + namespaces := []string{} return &Deployer{ HelmDeploy: h, podSelector: podSelector, - accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl, podSelector, labeller), - debugger: component.NewDebugger(cfg.Mode(), podSelector), + namespaces: &namespaces, + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl, podSelector, labeller, &namespaces), + debugger: component.NewDebugger(cfg.Mode(), podSelector, &namespaces), imageLoader: component.NewImageLoader(cfg, kubectl), - logger: component.NewLogger(cfg, kubectl, podSelector), - statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), - syncer: component.NewSyncer(cfg, kubectl), + logger: component.NewLogger(cfg, kubectl, podSelector, &namespaces), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller, &namespaces), + syncer: component.NewSyncer(kubectl, &namespaces), originalImages: originalImages, kubeContext: cfg.GetKubeContext(), kubeConfig: cfg.GetKubeConfig(), @@ -168,6 +172,10 @@ func NewDeployer(cfg Config, labeller *label.DefaultLabeller, h *latestV1.HelmDe }, nil } +func (h *Deployer) trackNamespaces(namespaces []string) { + *h.namespaces = deployutil.ConsolidateNamespaces(*h.namespaces, namespaces) +} + func (h *Deployer) GetAccessor() access.Accessor { return h.accessor } @@ -198,7 +206,7 @@ func (h *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { } // Deploy deploys the build results to the Kubernetes cluster -func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) ([]string, error) { +func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error { ctx, endTrace := instrumentation.StartTrace(ctx, "Deploy", map[string]string{ "DeployerType": "helm", }) @@ -208,13 +216,13 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art // This gives a better error message when the cluster can't // be reached. if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { - return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + return fmt.Errorf("unable to connect to Kubernetes: %w", err) } childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_LoadImages") if err := h.imageLoader.LoadImages(childCtx, out, h.localImages, h.originalImages, builds); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } endTrace() @@ -228,15 +236,15 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art for _, r := range h.Releases { releaseName, err := util.ExpandEnvTemplateOrFail(r.Name, nil) if err != nil { - return nil, userErr(fmt.Sprintf("cannot expand release name %q", r.Name), err) + return userErr(fmt.Sprintf("cannot expand release name %q", r.Name), err) } chartVersion, err := util.ExpandEnvTemplateOrFail(r.Version, nil) if err != nil { - return nil, userErr(fmt.Sprintf("cannot expand chart version %q", r.Version), err) + return userErr(fmt.Sprintf("cannot expand chart version %q", r.Version), err) } results, err := h.deployRelease(ctx, out, releaseName, r, builds, valuesSet, h.bV, chartVersion) if err != nil { - return nil, userErr(fmt.Sprintf("deploying %q", releaseName), err) + return userErr(fmt.Sprintf("deploying %q", releaseName), err) } // collect namespaces @@ -257,7 +265,7 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art } if err := label.Apply(ctx, h.labels, dRes); err != nil { - return nil, helmLabelErr(fmt.Errorf("adding labels: %w", err)) + return helmLabelErr(fmt.Errorf("adding labels: %w", err)) } // Collect namespaces in a string @@ -267,7 +275,8 @@ func (h *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art } h.TrackBuildArtifacts(builds) - return namespaces, nil + h.trackNamespaces(namespaces) + return nil } // Dependencies returns a list of files that the deployer depends on. diff --git a/pkg/skaffold/deploy/helm/helm_test.go b/pkg/skaffold/deploy/helm/helm_test.go index d123ec02c1d..789309723ad 100644 --- a/pkg/skaffold/deploy/helm/helm_test.go +++ b/pkg/skaffold/deploy/helm/helm_test.go @@ -522,8 +522,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - builds: testBuilds, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.0beta namespaced context deploy success", @@ -533,9 +534,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - namespace: kubectl.TestNamespace, - builds: testBuilds, + helm: testDeployConfig, + namespace: kubectl.TestNamespace, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.0 deploy success", @@ -545,8 +547,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - builds: testBuilds, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.0 namespaced deploy success", @@ -556,8 +559,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployNamespacedConfig, - builds: testBuilds, + helm: testDeployNamespacedConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.0 namespaced (with env template) deploy success", @@ -579,9 +583,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - namespace: kubectl.TestNamespace, - builds: testBuilds, + helm: testDeployConfig, + namespace: kubectl.TestNamespace, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.0 namespaced context deploy success overrides release namespaces", @@ -591,9 +596,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployNamespacedConfig, - namespace: kubectl.TestNamespace, - builds: testBuilds, + helm: testDeployNamespacedConfig, + namespace: kubectl.TestNamespace, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.1 deploy success", @@ -603,8 +609,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - builds: testBuilds, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.1 namespaced deploy success", @@ -614,8 +621,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testReleaseNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployNamespacedConfig, - builds: testBuilds, + helm: testDeployNamespacedConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.1 namespaced deploy (with env template) success", @@ -637,8 +645,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --repo https://charts.helm.sh/stable --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfigRemoteRepo, - builds: testBuilds, + helm: testDeployConfigRemoteRepo, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.1 namespaced context deploy success", @@ -648,9 +657,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - namespace: kubectl.TestNamespace, - builds: testBuilds, + helm: testDeployConfig, + namespace: kubectl.TestNamespace, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3.1 namespaced context deploy success overrides release namespaces", @@ -660,9 +670,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --namespace testNamespace --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all --namespace testNamespace skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployNamespacedConfig, - namespace: kubectl.TestNamespace, - builds: testBuilds, + helm: testDeployNamespacedConfig, + namespace: kubectl.TestNamespace, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy success with recreatePods", @@ -672,8 +683,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm --recreate-pods examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployRecreatePodsConfig, - builds: testBuilds, + helm: testDeployRecreatePodsConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy success with skipBuildDependencies", @@ -682,8 +694,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeploySkipBuildDependenciesConfig, - builds: testBuilds, + helm: testDeploySkipBuildDependenciesConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy should error for unmatched parameter", @@ -693,9 +706,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfigParameterUnmatched, - builds: testBuilds, - shouldErr: true, + helm: testDeployConfigParameterUnmatched, + builds: testBuilds, + shouldErr: true, + expectedNamespaces: []string{}, }, { description: "deploy success remote chart with skipBuildDependencies", @@ -704,15 +718,17 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext get all skaffold-helm --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm stable/chartmuseum --set-string image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeploySkipBuildDependencies, - builds: testBuilds, + helm: testDeploySkipBuildDependencies, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy success when `upgradeOnChange: false` and does not upgrade", commands: testutil. CmdRunWithOutput("helm version --client", version31). AndRun("helm --kube-context kubecontext get all skaffold-helm-upgradeOnChange --kubeconfig kubeconfig"), - helm: testDeployUpgradeOnChange, + helm: testDeployUpgradeOnChange, + expectedNamespaces: []string{}, }, { description: "deploy remote chart", @@ -721,7 +737,8 @@ func TestHelmDeploy(t *testing.T) { AndRunErr("helm --kube-context kubecontext get all skaffold-helm-remote --kubeconfig kubeconfig", fmt.Errorf("Error: release: not found")). AndRun("helm --kube-context kubecontext install skaffold-helm-remote stable/chartmuseum --repo https://charts.helm.sh/stable --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm-remote --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployRemoteChart, + helm: testDeployRemoteChart, + expectedNamespaces: []string{}, }, { description: "deploy remote chart with version", @@ -730,7 +747,8 @@ func TestHelmDeploy(t *testing.T) { AndRunErr("helm --kube-context kubecontext get all skaffold-helm-remote --kubeconfig kubeconfig", fmt.Errorf("Error: release: not found")). AndRun("helm --kube-context kubecontext install skaffold-helm-remote --version 1.0.0 stable/chartmuseum --repo https://charts.helm.sh/stable --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm-remote --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployRemoteChartVersion, + helm: testDeployRemoteChartVersion, + expectedNamespaces: []string{}, }, { description: "deploy error with remote chart", @@ -738,8 +756,9 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRunErr("helm --kube-context kubecontext get all skaffold-helm-remote --kubeconfig kubeconfig", fmt.Errorf("Error: release: not found")). AndRunErr("helm --kube-context kubecontext install skaffold-helm-remote stable/chartmuseum --repo https://charts.helm.sh/stable --kubeconfig kubeconfig", fmt.Errorf("building helm dependencies")), - helm: testDeployRemoteChart, - shouldErr: true, + helm: testDeployRemoteChart, + shouldErr: true, + expectedNamespaces: []string{}, }, { description: "get failure should install not upgrade", @@ -749,8 +768,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - builds: testBuilds, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm3 get failure should install not upgrade", @@ -760,8 +780,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - builds: testBuilds, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "get failure should install not upgrade with helm image strategy", @@ -771,8 +792,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image.repository=docker.io:5000/skaffold-helm,image.tag=3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployHelmStyleConfig, - builds: testBuilds, + helm: testDeployHelmStyleConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm image strategy with explicit registry should set the Helm registry value", @@ -782,8 +804,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext install skaffold-helm examples/test --set-string image.registry=docker.io:5000,image.repository=skaffold-helm,image.tag=3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployHelmExplicitRegistryStyleConfig, - builds: testBuilds, + helm: testDeployHelmExplicitRegistryStyleConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "get success should upgrade by force, not install", @@ -793,9 +816,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm --force examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - force: true, - builds: testBuilds, + helm: testDeployConfig, + force: true, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "get success should upgrade without force, not install", @@ -805,8 +829,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - builds: testBuilds, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy error", @@ -816,9 +841,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRunErr("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig", fmt.Errorf("unexpected error")). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - shouldErr: true, - helm: testDeployConfig, - builds: testBuilds, + shouldErr: true, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "dep build error", @@ -828,9 +854,10 @@ func TestHelmDeploy(t *testing.T) { AndRunErr("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig", fmt.Errorf("unexpected error")). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - shouldErr: true, - helm: testDeployConfig, - builds: testBuilds, + shouldErr: true, + helm: testDeployConfig, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "helm 3.0 beta should package chart and deploy", @@ -841,9 +868,10 @@ func TestHelmDeploy(t *testing.T) { AndRunWithOutput("helm --kube-context kubecontext package testdata/foo --destination "+tmpDir+" --version 0.1.2 --app-version 1.2.3 --kubeconfig kubeconfig", fmt.Sprintf("Packaged to %s", filepath.Join(tmpDir, "foo-0.1.2.tgz"))). AndRun("helm --kube-context kubecontext upgrade foo " + filepath.Join(tmpDir, "foo-0.1.2.tgz") + " --set-string image=foo:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all foo --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - shouldErr: false, - helm: testDeployFooWithPackaged, - builds: testBuildsFoo, + shouldErr: false, + helm: testDeployFooWithPackaged, + builds: testBuildsFoo, + expectedNamespaces: []string{}, }, { description: "helm 3.1 should package chart and deploy", @@ -854,9 +882,10 @@ func TestHelmDeploy(t *testing.T) { AndRunWithOutput("helm --kube-context kubecontext package testdata/foo --destination "+tmpDir+" --version 0.1.2 --app-version 1.2.3 --kubeconfig kubeconfig", fmt.Sprintf("Packaged to %s", filepath.Join(tmpDir, "foo-0.1.2.tgz"))). AndRun("helm --kube-context kubecontext upgrade foo " + filepath.Join(tmpDir, "foo-0.1.2.tgz") + " --set-string image=foo:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all foo --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - shouldErr: false, - helm: testDeployFooWithPackaged, - builds: testBuildsFoo, + shouldErr: false, + helm: testDeployFooWithPackaged, + builds: testBuildsFoo, + expectedNamespaces: []string{}, }, { description: "should fail to deploy when packaging fails", @@ -865,16 +894,18 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext get all foo --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext dep build testdata/foo --kubeconfig kubeconfig"). AndRunErr("helm --kube-context kubecontext package testdata/foo --destination "+tmpDir+" --version 0.1.2 --app-version 1.2.3 --kubeconfig kubeconfig", fmt.Errorf("packaging failed")), - shouldErr: true, - helm: testDeployFooWithPackaged, - builds: testBuildsFoo, + shouldErr: true, + helm: testDeployFooWithPackaged, + builds: testBuildsFoo, + expectedNamespaces: []string{}, }, { - description: "deploy and get missing templated release name should fail", - commands: testutil.CmdRunWithOutput("helm version --client", version31), - helm: testDeployWithTemplatedName, - builds: testBuilds, - shouldErr: true, + description: "deploy and get missing templated release name should fail", + commands: testutil.CmdRunWithOutput("helm version --client", version31), + helm: testDeployWithTemplatedName, + builds: testBuilds, + shouldErr: true, + expectedNamespaces: []string{}, }, { description: "deploy and get templated release name", @@ -885,8 +916,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade user-skaffold-helm examples/test --set-string image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all user-skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployWithTemplatedName, - builds: testBuilds, + helm: testDeployWithTemplatedName, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy with templated values", @@ -896,8 +928,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set image.name=skaffold-helm --set image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set missing.key= --set other.key=FOOBAR --set some.key=somevalue --set FOOBAR=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfigTemplated, - builds: testBuilds, + helm: testDeployConfigTemplated, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy with valuesFiles templated", @@ -907,8 +940,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 -f /some/file-FOOBAR.yaml -f skaffold-overrides.yaml --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfigValuesFilesTemplated, - builds: testBuilds, + helm: testDeployConfigValuesFilesTemplated, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy with templated version", @@ -918,9 +952,10 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm --version 1.0 examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - env: []string{"VERSION=1.0"}, - helm: testDeployConfigVersionTemplated, - builds: testBuilds, + env: []string{"VERSION=1.0"}, + helm: testDeployConfigVersionTemplated, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy with setFiles", @@ -930,8 +965,9 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun(fmt.Sprintf("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set-file expanded=%s --set-file value=/some/file.yaml -f skaffold-overrides.yaml --kubeconfig kubeconfig", strings.ReplaceAll(filepath.Join(home, "file.yaml"), "\\", "\\\\"))). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfigSetFiles, - builds: testBuilds, + helm: testDeployConfigSetFiles, + builds: testBuilds, + expectedNamespaces: []string{}, }, { description: "deploy without actual tags", @@ -947,6 +983,7 @@ func TestHelmDeploy(t *testing.T) { "See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration", "image [docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184] is not used.", }, + expectedNamespaces: []string{}, }, { description: "first release without tag, second with tag", @@ -960,16 +997,18 @@ func TestHelmDeploy(t *testing.T) { AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test --set-string image.tag=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --kubeconfig kubeconfig"). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testTwoReleases, - builds: testBuilds, + helm: testTwoReleases, + builds: testBuilds, + expectedNamespaces: []string{}, }, { - description: "debug for helm3.0 failure", - commands: testutil.CmdRunWithOutput("helm version --client", version30), - shouldErr: true, - helm: testDeployConfig, - builds: testBuilds, - configure: func(deployer *Deployer) { deployer.enableDebug = true }, + description: "debug for helm3.0 failure", + commands: testutil.CmdRunWithOutput("helm version --client", version30), + shouldErr: true, + helm: testDeployConfig, + builds: testBuilds, + configure: func(deployer *Deployer) { deployer.enableDebug = true }, + expectedNamespaces: []string{}, }, { description: "debug for helm3.1 success", @@ -980,9 +1019,10 @@ func TestHelmDeploy(t *testing.T) { AndRunEnv("helm --kube-context kubecontext upgrade skaffold-helm --post-renderer SKAFFOLD-BINARY examples/test --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set some.key=somevalue -f skaffold-overrides.yaml --kubeconfig kubeconfig", []string{"SKAFFOLD_FILENAME=test.yaml"}). AndRun("helm --kube-context kubecontext get all skaffold-helm --template {{.Release.Manifest}} --kubeconfig kubeconfig"), - helm: testDeployConfig, - builds: testBuilds, - configure: func(deployer *Deployer) { deployer.enableDebug = true }, + helm: testDeployConfig, + builds: testBuilds, + configure: func(deployer *Deployer) { deployer.enableDebug = true }, + expectedNamespaces: []string{}, }, { description: "helm3.1 should fail to deploy with createNamespace option", @@ -990,9 +1030,10 @@ func TestHelmDeploy(t *testing.T) { CmdRunWithOutput("helm version --client", version31). AndRunErr("helm --kube-context kubecontext get all --namespace testReleaseNamespace skaffold-helm --kubeconfig kubeconfig", fmt.Errorf("not found")). AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig"), - helm: testDeployCreateNamespaceConfig, - builds: testBuilds, - shouldErr: true, + helm: testDeployCreateNamespaceConfig, + builds: testBuilds, + shouldErr: true, + expectedNamespaces: []string{}, }, { description: "helm3.2 get failure should install with createNamespace not upgrade", @@ -1045,10 +1086,10 @@ func TestHelmDeploy(t *testing.T) { } deployer.pkgTmpDir = tmpDir // Deploy returns nil unless `helm get all ` is set up to return actual release info - nss, err := deployer.Deploy(context.Background(), ioutil.Discard, test.builds) + err = deployer.Deploy(context.Background(), ioutil.Discard, test.builds) t.CheckError(test.shouldErr, err) t.CheckDeepEqual(test.expectedWarnings, fakeWarner.Warnings) - t.CheckErrorAndDeepEqual(test.shouldErr, err, test.expectedNamespaces, nss) + t.CheckErrorAndDeepEqual(test.shouldErr, err, test.expectedNamespaces, *deployer.namespaces) }) } } diff --git a/pkg/skaffold/deploy/kpt/kpt.go b/pkg/skaffold/deploy/kpt/kpt.go index e1d31e45d3f..3ea5561fd5c 100644 --- a/pkg/skaffold/deploy/kpt/kpt.go +++ b/pkg/skaffold/deploy/kpt/kpt.go @@ -96,6 +96,8 @@ type Deployer struct { kubeContext string kubeConfig string namespace string + + namespaces *[]string } type Config interface { @@ -109,16 +111,18 @@ type Config interface { func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latestV1.KptDeploy) *Deployer { podSelector := kubernetes.NewImageList() kubectl := pkgkubectl.NewCLI(cfg, cfg.GetKubeNamespace()) + namespaces := []string{} return &Deployer{ KptDeploy: d, podSelector: podSelector, - accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl, podSelector, labeller), - debugger: component.NewDebugger(cfg.Mode(), podSelector), + namespaces: &namespaces, + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl, podSelector, labeller, &namespaces), + debugger: component.NewDebugger(cfg.Mode(), podSelector, &namespaces), imageLoader: component.NewImageLoader(cfg, kubectl), - logger: component.NewLogger(cfg, kubectl, podSelector), - statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), - syncer: component.NewSyncer(cfg, kubectl), + logger: component.NewLogger(cfg, kubectl, podSelector, &namespaces), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller, &namespaces), + syncer: component.NewSyncer(kubectl, &namespaces), insecureRegistries: cfg.GetInsecureRegistries(), labels: labeller.Labels(), globalConfig: cfg.GlobalConfig(), @@ -129,6 +133,10 @@ func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latestV1.KptDep } } +func (k *Deployer) trackNamespaces(namespaces []string) { + *k.namespaces = deployutil.ConsolidateNamespaces(*k.namespaces, namespaces) +} + func (k *Deployer) GetAccessor() access.Accessor { return k.accessor } @@ -212,7 +220,7 @@ func versionCheck(dir string, stdout io.Writer) error { // Deploy hydrates the manifests using kustomizations and kpt functions as described in the render method, // outputs them to the applyDir, and runs `kpt live apply` against applyDir to create resources in the cluster. // `kpt live apply` supports automated pruning declaratively via resources in the applyDir. -func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) ([]string, error) { +func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error { instrumentation.AddAttributesToCurrentSpanFromContext(ctx, map[string]string{ "DeployerType": "kpt", }) @@ -221,32 +229,32 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art // This gives a better error message when the cluster can't // be reached. if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { - return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + return fmt.Errorf("unable to connect to Kubernetes: %w", err) } _, endTrace := instrumentation.StartTrace(ctx, "Deploy_sanityCheck") if err := sanityCheck(k.Dir, out); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } endTrace() childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_loadImages") if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } _, endTrace = instrumentation.StartTrace(ctx, "Deploy_renderManifests") manifests, err := k.renderManifests(childCtx, builds) if err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } if len(manifests) == 0 { endTrace() - return nil, nil + return nil } endTrace() @@ -261,13 +269,13 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_getApplyDir") applyDir, err := k.getApplyDir(childCtx) if err != nil { - return nil, fmt.Errorf("getting applyDir: %w", err) + return fmt.Errorf("getting applyDir: %w", err) } endTrace() _, endTrace = instrumentation.StartTrace(ctx, "Deploy_manifest.Write") if err = sink(ctx, []byte(manifests.String()), applyDir); err != nil { - return nil, err + return err } endTrace() @@ -277,12 +285,13 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art cmd.Stderr = out if err := util.RunCmd(cmd); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } k.TrackBuildArtifacts(builds) endTrace() - return namespaces, nil + k.trackNamespaces(namespaces) + return nil } // Dependencies returns a list of files that the deployer depends on. This does NOT include applyDir. diff --git a/pkg/skaffold/deploy/kpt/kpt_test.go b/pkg/skaffold/deploy/kpt/kpt_test.go index 62137c4b88e..208606eee47 100644 --- a/pkg/skaffold/deploy/kpt/kpt_test.go +++ b/pkg/skaffold/deploy/kpt/kpt_test.go @@ -245,7 +245,7 @@ func TestKpt_Deploy(t *testing.T) { t.CheckNoError(os.Mkdir(k.Live.Apply.Dir, 0755)) } - _, err := k.Deploy(context.Background(), ioutil.Discard, test.builds) + err := k.Deploy(context.Background(), ioutil.Discard, test.builds) t.CheckError(test.shouldErr, err) }) } @@ -1185,7 +1185,7 @@ func TestNonEmptyKubeconfig(t *testing.T) { }) t.CheckNoError(os.Mkdir(k.Live.Apply.Dir, 0755)) defer os.RemoveAll(k.Live.Apply.Dir) - _, err := k.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{}) + err := k.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{}) t.CheckNoError(err) }) } diff --git a/pkg/skaffold/deploy/kubectl/kubectl.go b/pkg/skaffold/deploy/kubectl/kubectl.go index 3b810719034..1bcb7c3ecf7 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl.go +++ b/pkg/skaffold/deploy/kubectl/kubectl.go @@ -73,6 +73,8 @@ type Deployer struct { insecureRegistries map[string]bool labeller *label.DefaultLabeller skipRender bool + + namespaces *[]string } // NewDeployer returns a new Deployer for a DeployConfig filled @@ -89,16 +91,18 @@ func NewDeployer(cfg Config, labeller *label.DefaultLabeller, d *latestV1.Kubect podSelector := kubernetes.NewImageList() kubectl := NewCLI(cfg, d.Flags, defaultNamespace) + namespaces := []string{} return &Deployer{ KubectlDeploy: d, podSelector: podSelector, - accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl.CLI, podSelector, labeller), - debugger: component.NewDebugger(cfg.Mode(), podSelector), + namespaces: &namespaces, + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl.CLI, podSelector, labeller, &namespaces), + debugger: component.NewDebugger(cfg.Mode(), podSelector, &namespaces), imageLoader: component.NewImageLoader(cfg, kubectl.CLI), - logger: component.NewLogger(cfg, kubectl.CLI, podSelector), - statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), - syncer: component.NewSyncer(cfg, kubectl.CLI), + logger: component.NewLogger(cfg, kubectl.CLI, podSelector, &namespaces), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller, &namespaces), + syncer: component.NewSyncer(kubectl.CLI, &namespaces), workingDir: cfg.GetWorkingDir(), globalConfig: cfg.GlobalConfig(), defaultRepo: cfg.DefaultRepo(), @@ -139,9 +143,13 @@ func (k *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { k.logger.RegisterArtifacts(artifacts) } +func (k *Deployer) trackNamespaces(namespaces []string) { + *k.namespaces = deployutil.ConsolidateNamespaces(*k.namespaces, namespaces) +} + // Deploy templates the provided manifests with a simple `find and replace` and // runs `kubectl apply` on those manifests -func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) ([]string, error) { +func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error { var ( manifests manifest.ManifestList err error @@ -156,7 +164,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art // This gives a better error message when the cluster can't // be reached. if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { - return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + return fmt.Errorf("unable to connect to Kubernetes: %w", err) } // if any hydrated manifests are passed to `skaffold apply`, only deploy these @@ -167,7 +175,7 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art manifests, err = createManifestList(k.hydratedManifests) if err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } manifests, err = manifests.SetLabels(k.labeller.Labels()) endTrace() @@ -182,18 +190,18 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art } if err != nil { - return nil, err + return err } if len(manifests) == 0 { - return nil, nil + return nil } endTrace() _, endTrace = instrumentation.StartTrace(ctx, "Deploy_LoadImages") if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } endTrace() @@ -208,19 +216,20 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_WaitForDeletions") if err := k.kubectl.WaitForDeletions(childCtx, textio.NewPrefixWriter(out, " - "), manifests); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } endTrace() childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_KubectlApply") if err := k.kubectl.Apply(childCtx, textio.NewPrefixWriter(out, " - "), manifests); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } k.TrackBuildArtifacts(builds) endTrace() - return namespaces, nil + k.trackNamespaces(namespaces) + return nil } func (k *Deployer) manifestFiles(manifests []string) ([]string, error) { diff --git a/pkg/skaffold/deploy/kubectl/kubectl_test.go b/pkg/skaffold/deploy/kubectl/kubectl_test.go index 866e550f15c..b1504ae3e2d 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl_test.go +++ b/pkg/skaffold/deploy/kubectl/kubectl_test.go @@ -248,7 +248,7 @@ func TestKubectlDeploy(t *testing.T) { }, &label.DefaultLabeller{}, &test.kubectl) t.RequireNoError(err) - _, err = k.Deploy(context.Background(), ioutil.Discard, test.builds) + err = k.Deploy(context.Background(), ioutil.Discard, test.builds) t.CheckError(test.shouldErr, err) }) @@ -405,21 +405,21 @@ func TestKubectlRedeploy(t *testing.T) { t.RequireNoError(err) // Deploy one manifest - _, err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ + err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ {ImageName: "leeroy-web", Tag: "leeroy-web:v1"}, {ImageName: "leeroy-app", Tag: "leeroy-app:v1"}, }) t.CheckNoError(err) // Deploy one manifest since only one image is updated - _, err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ + err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ {ImageName: "leeroy-web", Tag: "leeroy-web:v1"}, {ImageName: "leeroy-app", Tag: "leeroy-app:v2"}, }) t.CheckNoError(err) // Deploy zero manifest since no image is updated - _, err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ + err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ {ImageName: "leeroy-web", Tag: "leeroy-web:v1"}, {ImageName: "leeroy-app", Tag: "leeroy-app:v2"}, }) @@ -470,7 +470,7 @@ func TestKubectlWaitForDeletions(t *testing.T) { t.RequireNoError(err) var out bytes.Buffer - _, err = deployer.Deploy(context.Background(), &out, []graph.Artifact{ + err = deployer.Deploy(context.Background(), &out, []graph.Artifact{ {ImageName: "leeroy-web", Tag: "leeroy-web:v1"}, }) @@ -507,7 +507,7 @@ func TestKubectlWaitForDeletionsFails(t *testing.T) { }, &label.DefaultLabeller{}, &latestV1.KubectlDeploy{Manifests: []string{tmpDir.Path("deployment-web.yaml")}}) t.RequireNoError(err) - _, err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ + err = deployer.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ {ImageName: "leeroy-web", Tag: "leeroy-web:v1"}, }) @@ -730,7 +730,7 @@ func TestGCSManifests(t *testing.T) { }, &label.DefaultLabeller{}, &test.kubectl) t.RequireNoError(err) - _, err = k.Deploy(context.Background(), ioutil.Discard, nil) + err = k.Deploy(context.Background(), ioutil.Discard, nil) t.CheckError(test.shouldErr, err) }) diff --git a/pkg/skaffold/deploy/kustomize/kustomize.go b/pkg/skaffold/deploy/kustomize/kustomize.go index bdd84910b89..405eb524088 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize.go +++ b/pkg/skaffold/deploy/kustomize/kustomize.go @@ -120,6 +120,8 @@ type Deployer struct { labels map[string]string globalConfig string useKubectlKustomize bool + + namespaces *[]string } func NewDeployer(cfg kubectl.Config, labeller *label.DefaultLabeller, d *latestV1.KustomizeDeploy) (*Deployer, error) { @@ -137,16 +139,18 @@ func NewDeployer(cfg kubectl.Config, labeller *label.DefaultLabeller, d *latestV useKubectlKustomize := !KustomizeBinaryCheck() && kubectlVersionCheck(kubectl) podSelector := kubernetes.NewImageList() + namespaces := []string{} return &Deployer{ KustomizeDeploy: d, podSelector: podSelector, - accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl.CLI, podSelector, labeller), - debugger: component.NewDebugger(cfg.Mode(), podSelector), + namespaces: &namespaces, + accessor: component.NewAccessor(cfg, cfg.GetKubeContext(), kubectl.CLI, podSelector, labeller, &namespaces), + debugger: component.NewDebugger(cfg.Mode(), podSelector, &namespaces), imageLoader: component.NewImageLoader(cfg, kubectl.CLI), - logger: component.NewLogger(cfg, kubectl.CLI, podSelector), - statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller), - syncer: component.NewSyncer(cfg, kubectl.CLI), + logger: component.NewLogger(cfg, kubectl.CLI, podSelector, &namespaces), + statusMonitor: component.NewMonitor(cfg, cfg.GetKubeContext(), labeller, &namespaces), + syncer: component.NewSyncer(kubectl.CLI, &namespaces), kubectl: kubectl, insecureRegistries: cfg.GetInsecureRegistries(), globalConfig: cfg.GlobalConfig(), @@ -155,6 +159,10 @@ func NewDeployer(cfg kubectl.Config, labeller *label.DefaultLabeller, d *latestV }, nil } +func (k *Deployer) trackNamespaces(namespaces []string) { + *k.namespaces = deployutil.ConsolidateNamespaces(*k.namespaces, namespaces) +} + func (k *Deployer) GetAccessor() access.Accessor { return k.accessor } @@ -202,7 +210,7 @@ func kubectlVersionCheck(kubectl kubectl.CLI) bool { } // Deploy runs `kubectl apply` on the manifest generated by kustomize. -func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) ([]string, error) { +func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error { instrumentation.AddAttributesToCurrentSpanFromContext(ctx, map[string]string{ "DeployerType": "kustomize", }) @@ -211,26 +219,26 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art // This gives a better error message when the cluster can't // be reached. if err := kubernetes.FailIfClusterIsNotReachable(); err != nil { - return nil, fmt.Errorf("unable to connect to Kubernetes: %w", err) + return fmt.Errorf("unable to connect to Kubernetes: %w", err) } childCtx, endTrace := instrumentation.StartTrace(ctx, "Deploy_renderManifests") manifests, err := k.renderManifests(childCtx, out, builds) if err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } if len(manifests) == 0 { endTrace() - return nil, nil + return nil } endTrace() childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_LoadImages") if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } endTrace() @@ -245,20 +253,21 @@ func (k *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Art childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_WaitForDeletions") if err := k.kubectl.WaitForDeletions(childCtx, textio.NewPrefixWriter(out, " - "), manifests); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } endTrace() childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_Apply") if err := k.kubectl.Apply(childCtx, textio.NewPrefixWriter(out, " - "), manifests); err != nil { endTrace(instrumentation.TraceEndError(err)) - return nil, err + return err } k.TrackBuildArtifacts(builds) endTrace() - return namespaces, nil + k.trackNamespaces(namespaces) + return nil } func (k *Deployer) renderManifests(ctx context.Context, out io.Writer, builds []graph.Artifact) (manifest.ManifestList, error) { diff --git a/pkg/skaffold/deploy/kustomize/kustomize_test.go b/pkg/skaffold/deploy/kustomize/kustomize_test.go index 2a6e717d5c2..d728109d4a1 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize_test.go +++ b/pkg/skaffold/deploy/kustomize/kustomize_test.go @@ -192,7 +192,7 @@ func TestKustomizeDeploy(t *testing.T) { Namespace: skaffoldNamespaceOption, }}}, &label.DefaultLabeller{}, &test.kustomize) t.RequireNoError(err) - _, err = k.Deploy(context.Background(), ioutil.Discard, test.builds) + err = k.Deploy(context.Background(), ioutil.Discard, test.builds) t.CheckError(test.shouldErr, err) }) diff --git a/pkg/skaffold/deploy/util/util.go b/pkg/skaffold/deploy/util/util.go index 8aae0078671..f287a6114ce 100644 --- a/pkg/skaffold/deploy/util/util.go +++ b/pkg/skaffold/deploy/util/util.go @@ -26,6 +26,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) // ApplyDefaultRepo applies the default repo to a given image tag. @@ -59,3 +60,13 @@ func AddTagsToPodSelector(artifacts []graph.Artifact, deployerArtifacts []graph. func MockK8sClient() (k8s.Interface, error) { return fakekubeclientset.NewSimpleClientset(), nil } + +func ConsolidateNamespaces(original, new []string) []string { + if len(new) == 0 { + return original + } + namespaces := util.NewStringSet() + namespaces.Insert(append(original, new...)...) + namespaces.Delete("") + return namespaces.ToList() +} diff --git a/pkg/skaffold/runner/runcontext/context_test.go b/pkg/skaffold/deploy/util/util_test.go similarity index 91% rename from pkg/skaffold/runner/runcontext/context_test.go rename to pkg/skaffold/deploy/util/util_test.go index 201c02c04fe..2daaa6fba07 100644 --- a/pkg/skaffold/runner/runcontext/context_test.go +++ b/pkg/skaffold/deploy/util/util_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package runcontext +package util import ( "testing" @@ -22,7 +22,7 @@ import ( "github.com/GoogleContainerTools/skaffold/testutil" ) -func TestRunContext_UpdateNamespaces(t *testing.T) { +func TestConsolidateNamespaces(t *testing.T) { tests := []struct { description string oldNamespaces []string @@ -79,13 +79,9 @@ func TestRunContext_UpdateNamespaces(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - runCtx := &RunContext{ - Namespaces: test.oldNamespaces, - } + ns := ConsolidateNamespaces(test.oldNamespaces, test.newNamespaces) - runCtx.UpdateNamespaces(test.newNamespaces) - - t.CheckDeepEqual(test.expected, runCtx.Namespaces) + t.CheckDeepEqual(test.expected, ns) }) } } diff --git a/pkg/skaffold/kubernetes/debugging/container_manager.go b/pkg/skaffold/kubernetes/debugging/container_manager.go index e4b9ff53602..6529ba0564b 100644 --- a/pkg/skaffold/kubernetes/debugging/container_manager.go +++ b/pkg/skaffold/kubernetes/debugging/container_manager.go @@ -39,9 +39,10 @@ type ContainerManager struct { active map[string]string // set of containers that have been notified events chan kubernetes.PodEvent stopWatcher func() + namespaces *[]string } -func NewContainerManager(podSelector kubernetes.PodSelector) *ContainerManager { +func NewContainerManager(podSelector kubernetes.PodSelector, namespaces *[]string) *ContainerManager { // Create the channel here as Stop() may be called before Start() when a build fails, thus // avoiding the possibility of closing a nil channel. Channels are cheap. return &ContainerManager{ @@ -49,17 +50,18 @@ func NewContainerManager(podSelector kubernetes.PodSelector) *ContainerManager { active: map[string]string{}, events: make(chan kubernetes.PodEvent), stopWatcher: func() {}, + namespaces: namespaces, } } -func (d *ContainerManager) Start(ctx context.Context, namespaces []string) error { +func (d *ContainerManager) Start(ctx context.Context) error { if d == nil { // debug mode probably not enabled return nil } d.podWatcher.Register(d.events) - stopWatcher, err := d.podWatcher.Start(namespaces) + stopWatcher, err := d.podWatcher.Start(*d.namespaces) if err != nil { return err } diff --git a/pkg/skaffold/kubernetes/debugging/container_manager_test.go b/pkg/skaffold/kubernetes/debugging/container_manager_test.go index dfa4df3a168..213d433901d 100644 --- a/pkg/skaffold/kubernetes/debugging/container_manager_test.go +++ b/pkg/skaffold/kubernetes/debugging/container_manager_test.go @@ -88,6 +88,6 @@ func TestContainerManagerZeroValue(t *testing.T) { var m *ContainerManager // Should not raise a nil dereference - m.Start(context.Background(), nil) + m.Start(context.Background()) m.Stop() } diff --git a/pkg/skaffold/kubernetes/logger/log.go b/pkg/skaffold/kubernetes/logger/log.go index f3afd023ad6..37da9aa1958 100644 --- a/pkg/skaffold/kubernetes/logger/log.go +++ b/pkg/skaffold/kubernetes/logger/log.go @@ -51,6 +51,7 @@ type LogAggregator struct { events chan kubernetes.PodEvent trackedContainers trackedContainers outputLock sync.Mutex + namespaces *[]string } type Config interface { @@ -60,7 +61,7 @@ type Config interface { } // NewLogAggregator creates a new LogAggregator for a given output. -func NewLogAggregator(cli *kubectl.CLI, podSelector kubernetes.PodSelector, config Config) *LogAggregator { +func NewLogAggregator(cli *kubectl.CLI, podSelector kubernetes.PodSelector, namespaces *[]string, config Config) *LogAggregator { return &LogAggregator{ kubectlcli: cli, config: config, @@ -69,6 +70,7 @@ func NewLogAggregator(cli *kubectl.CLI, podSelector kubernetes.PodSelector, conf colorPicker: kubernetes.NewColorPicker(), stopWatcher: func() {}, events: make(chan kubernetes.PodEvent), + namespaces: namespaces, } } @@ -92,7 +94,7 @@ func (a *LogAggregator) SetSince(t time.Time) { // Start starts a logger that listens to pods and tail their logs // if they are matched by the `podSelector`. -func (a *LogAggregator) Start(ctx context.Context, out io.Writer, namespaces []string) error { +func (a *LogAggregator) Start(ctx context.Context, out io.Writer) error { if a == nil { // Logs are not activated. return nil @@ -101,7 +103,7 @@ func (a *LogAggregator) Start(ctx context.Context, out io.Writer, namespaces []s a.output = out a.podWatcher.Register(a.events) - stopWatcher, err := a.podWatcher.Start(namespaces) + stopWatcher, err := a.podWatcher.Start(*a.namespaces) a.stopWatcher = stopWatcher if err != nil { return err diff --git a/pkg/skaffold/kubernetes/logger/log_test.go b/pkg/skaffold/kubernetes/logger/log_test.go index 68fe4549d8b..7e43d751004 100644 --- a/pkg/skaffold/kubernetes/logger/log_test.go +++ b/pkg/skaffold/kubernetes/logger/log_test.go @@ -98,7 +98,7 @@ func TestLogAggregatorZeroValue(t *testing.T) { var m *LogAggregator // Should not raise a nil dereference - m.Start(context.Background(), ioutil.Discard, []string{}) + m.Start(context.Background(), ioutil.Discard) m.Mute() m.Unmute() m.Stop() @@ -157,7 +157,7 @@ func TestPrefix(t *testing.T) { } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - logger := NewLogAggregator(nil, nil, &mockConfig{log: latestV1.LogsConfig{ + logger := NewLogAggregator(nil, nil, nil, &mockConfig{log: latestV1.LogsConfig{ Prefix: test.prefix, }}) diff --git a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go index a6d3934566b..e02556c40e5 100644 --- a/pkg/skaffold/kubernetes/portforward/forwarder_manager.go +++ b/pkg/skaffold/kubernetes/portforward/forwarder_manager.go @@ -55,11 +55,13 @@ type ForwarderManager struct { entryManager *EntryManager label string - singleRun singleflight.Group + singleRun singleflight.Group + namespaces *[]string } // NewForwarderManager returns a new port manager which handles starting and stopping port forwarding -func NewForwarderManager(cli *kubectl.CLI, podSelector kubernetes.PodSelector, label string, runMode config.RunMode, options config.PortForwardOptions, userDefined []*latestV1.PortForwardResource) *ForwarderManager { +func NewForwarderManager(cli *kubectl.CLI, podSelector kubernetes.PodSelector, label string, runMode config.RunMode, namespaces *[]string, + options config.PortForwardOptions, userDefined []*latestV1.PortForwardResource) *ForwarderManager { if !options.Enabled() { return nil } @@ -84,6 +86,7 @@ func NewForwarderManager(cli *kubectl.CLI, podSelector kubernetes.PodSelector, l entryManager: entryManager, label: label, singleRun: singleflight.Group{}, + namespaces: namespaces, } } @@ -119,27 +122,28 @@ func debugPorts(pod *v1.Pod, c v1.Container) []v1.ContainerPort { return ports } -func (p *ForwarderManager) Start(ctx context.Context, out io.Writer, namespaces []string) error { +// Start begins all forwarders managed by the ForwarderManager +func (p *ForwarderManager) Start(ctx context.Context, out io.Writer) error { // Port forwarding is not enabled. if p == nil { return nil } _, err, _ := p.singleRun.Do(p.label, func() (interface{}, error) { - return struct{}{}, p.start(ctx, out, namespaces) + return struct{}{}, p.start(ctx, out) }) return err } // Start begins all forwarders managed by the ForwarderManager -func (p *ForwarderManager) start(ctx context.Context, out io.Writer, namespaces []string) error { +func (p *ForwarderManager) start(ctx context.Context, out io.Writer) error { eventV2.TaskInProgress(constants.PortForward, "Port forward URLs") ctx, endTrace := instrumentation.StartTrace(ctx, "Start") defer endTrace() p.entryManager.Start(out) for _, f := range p.forwarders { - if err := f.Start(ctx, out, namespaces); err != nil { + if err := f.Start(ctx, out, *p.namespaces); err != nil { eventV2.TaskFailed(constants.PortForward, err) endTrace(instrumentation.TraceEndError(err)) return err diff --git a/pkg/skaffold/kubernetes/portforward/forwarder_manager_test.go b/pkg/skaffold/kubernetes/portforward/forwarder_manager_test.go index 56ec4b4f3da..6ae94a6e215 100644 --- a/pkg/skaffold/kubernetes/portforward/forwarder_manager_test.go +++ b/pkg/skaffold/kubernetes/portforward/forwarder_manager_test.go @@ -61,6 +61,7 @@ func TestNewForwarderManager(t *testing.T) { &kubernetes.ImageList{}, "", "", + nil, options, nil) @@ -75,7 +76,7 @@ func TestForwarderManagerZeroValue(t *testing.T) { var m *ForwarderManager // Should not raise a nil dereference - m.Start(context.Background(), ioutil.Discard, nil) + m.Start(context.Background(), ioutil.Discard) m.Stop() } diff --git a/pkg/skaffold/kubernetes/status/status_check.go b/pkg/skaffold/kubernetes/status/status_check.go index 81acb612716..e4f360d7fbe 100644 --- a/pkg/skaffold/kubernetes/status/status_check.go +++ b/pkg/skaffold/kubernetes/status/status_check.go @@ -72,7 +72,6 @@ type counter struct { type Config interface { kubectl.Config - GetNamespaces() []string StatusCheckDeadlineSeconds() int Muted() config.Muted StatusCheck() *bool @@ -86,10 +85,11 @@ type Monitor struct { muteLogs bool seenResources resource.Group singleRun singleflight.Group + namespaces *[]string } // NewStatusMonitor returns a status monitor which runs checks on deployments and pods. -func NewStatusMonitor(cfg Config, labeller *label.DefaultLabeller) *Monitor { +func NewStatusMonitor(cfg Config, labeller *label.DefaultLabeller, namespaces *[]string) *Monitor { return &Monitor{ muteLogs: cfg.Muted().MuteStatusCheck(), cfg: cfg, @@ -97,6 +97,7 @@ func NewStatusMonitor(cfg Config, labeller *label.DefaultLabeller) *Monitor { deadlineSeconds: cfg.StatusCheckDeadlineSeconds(), seenResources: make(resource.Group), singleRun: singleflight.Group{}, + namespaces: namespaces, } } @@ -140,7 +141,7 @@ func (s *Monitor) statusCheck(ctx context.Context, out io.Writer) (proto.StatusC } deployments := make([]*resource.Deployment, 0) - for _, n := range s.cfg.GetNamespaces() { + for _, n := range *s.namespaces { newDeployments, err := getDeployments(ctx, client, n, s.labeller, getDeadline(s.deadlineSeconds)) if err != nil { diff --git a/pkg/skaffold/log/log.go b/pkg/skaffold/log/log.go index 455f5586021..9ae816519e4 100644 --- a/pkg/skaffold/log/log.go +++ b/pkg/skaffold/log/log.go @@ -28,7 +28,7 @@ import ( // Logger implementations are platform-specific, and are controlled by a single Deployer. type Logger interface { // Start starts the logger. - Start(context.Context, io.Writer, []string) error + Start(context.Context, io.Writer) error // Stop stops the logger. Stop() @@ -52,7 +52,7 @@ type Logger interface { // NoopLogger is used in tests. It will never retrieve any logs from any resources. type NoopLogger struct{} -func (n *NoopLogger) Start(context.Context, io.Writer, []string) error { return nil } +func (n *NoopLogger) Start(context.Context, io.Writer) error { return nil } func (n *NoopLogger) Stop() {} diff --git a/pkg/skaffold/log/logger_mux.go b/pkg/skaffold/log/logger_mux.go index 0d017e67a6a..0050f8e22e0 100644 --- a/pkg/skaffold/log/logger_mux.go +++ b/pkg/skaffold/log/logger_mux.go @@ -26,9 +26,9 @@ import ( type LoggerMux []Logger -func (l LoggerMux) Start(ctx context.Context, out io.Writer, namespaces []string) error { +func (l LoggerMux) Start(ctx context.Context, out io.Writer) error { for _, logger := range l { - if err := logger.Start(ctx, out, namespaces); err != nil { + if err := logger.Start(ctx, out); err != nil { return err } } diff --git a/pkg/skaffold/log/provider.go b/pkg/skaffold/log/provider.go deleted file mode 100644 index f3123926fdf..00000000000 --- a/pkg/skaffold/log/provider.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2021 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package log - -import ( - "sync" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/logger" -) - -type Provider interface { - GetKubernetesLogger(*kubernetes.ImageList, *kubectl.CLI) Logger - GetNoopLogger() Logger -} - -type fullProvider struct { - tail bool - - kubernetesLogger func(*kubernetes.ImageList, *kubectl.CLI) Logger - noopLogger func() Logger -} - -var ( - provider *fullProvider - once sync.Once -) - -func NewLogProvider(config logger.Config) Provider { - once.Do(func() { - provider = &fullProvider{ - tail: config.Tail(), - kubernetesLogger: func(podSelector *kubernetes.ImageList, cli *kubectl.CLI) Logger { - return logger.NewLogAggregator(cli, podSelector, config) - }, - noopLogger: func() Logger { - return &NoopLogger{} - }, - } - }) - return provider -} - -func (p *fullProvider) GetKubernetesLogger(s *kubernetes.ImageList, cli *kubectl.CLI) Logger { - if !p.tail { - return p.noopLogger() - } - return p.kubernetesLogger(s, cli) -} - -func (p *fullProvider) GetNoopLogger() Logger { - return p.noopLogger() -} - -// NoopProvider is used in tests -type NoopProvider struct{} - -func (p *NoopProvider) GetKubernetesLogger(*kubernetes.ImageList, *kubectl.CLI) Logger { - return &NoopLogger{} -} - -func (p *NoopProvider) GetNoopLogger() Logger { - return &NoopLogger{} -} diff --git a/pkg/skaffold/runner/deployer_test.go b/pkg/skaffold/runner/deployer_test.go index 5f526354a58..cddda239713 100644 --- a/pkg/skaffold/runner/deployer_test.go +++ b/pkg/skaffold/runner/deployer_test.go @@ -173,22 +173,22 @@ func TestGetDeployer(tOuter *testing.T) { func TestGetDefaultDeployer(tOuter *testing.T) { testutil.Run(tOuter, "TestGetDeployer", func(t *testutil.T) { - t.Override(&component.NewAccessor, func(portforward.Config, string, *pkgkubectl.CLI, kubernetes.PodSelector, label.Config) access.Accessor { + t.Override(&component.NewAccessor, func(portforward.Config, string, *pkgkubectl.CLI, kubernetes.PodSelector, label.Config, *[]string) access.Accessor { return &access.NoopAccessor{} }) - t.Override(&component.NewDebugger, func(config.RunMode, kubernetes.PodSelector) debug.Debugger { + t.Override(&component.NewDebugger, func(config.RunMode, kubernetes.PodSelector, *[]string) debug.Debugger { return &debug.NoopDebugger{} }) - t.Override(&component.NewMonitor, func(k8sstatus.Config, string, *label.DefaultLabeller) status.Monitor { + t.Override(&component.NewMonitor, func(k8sstatus.Config, string, *label.DefaultLabeller, *[]string) status.Monitor { return &status.NoopMonitor{} }) t.Override(&component.NewImageLoader, func(k8sloader.Config, *pkgkubectl.CLI) loader.ImageLoader { return &loader.NoopImageLoader{} }) - t.Override(&component.NewSyncer, func(sync.Config, *pkgkubectl.CLI) sync.Syncer { + t.Override(&component.NewSyncer, func(*pkgkubectl.CLI, *[]string) sync.Syncer { return &sync.NoopSyncer{} }) - t.Override(&component.NewLogger, func(k8slogger.Config, *pkgkubectl.CLI, kubernetes.PodSelector) log.Logger { + t.Override(&component.NewLogger, func(k8slogger.Config, *pkgkubectl.CLI, kubernetes.PodSelector, *[]string) log.Logger { return &log.NoopLogger{} }) tests := []struct { diff --git a/pkg/skaffold/runner/notification.go b/pkg/skaffold/runner/notification.go index 648d49b6129..63786877b0c 100644 --- a/pkg/skaffold/runner/notification.go +++ b/pkg/skaffold/runner/notification.go @@ -41,10 +41,10 @@ type withNotification struct { deploy.Deployer } -func (w withNotification) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) ([]string, error) { - ns, err := w.Deployer.Deploy(ctx, out, builds) +func (w withNotification) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error { + err := w.Deployer.Deploy(ctx, out, builds) if err != nil { fmt.Fprint(out, terminalBell) } - return ns, err + return err } diff --git a/pkg/skaffold/runner/runcontext/context.go b/pkg/skaffold/runner/runcontext/context.go index e9e852a2448..48f800b551e 100644 --- a/pkg/skaffold/runner/runcontext/context.go +++ b/pkg/skaffold/runner/runcontext/context.go @@ -25,21 +25,14 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" - runnerutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/runner/util" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" schemaUtil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" -) - -const ( - emptyNamespace = "" ) type RunContext struct { Opts config.SkaffoldOptions Pipelines Pipelines KubeContext string - Namespaces []string WorkingDir string InsecureRegistries map[string]bool Cluster config.Cluster @@ -155,7 +148,6 @@ func (rc *RunContext) StatusCheckDeadlineSeconds() int { func (rc *RunContext) DefaultPipeline() latestV1.Pipeline { return rc.Pipelines.Head() } func (rc *RunContext) GetKubeContext() string { return rc.KubeContext } -func (rc *RunContext) GetNamespaces() []string { return rc.Namespaces } func (rc *RunContext) GetPipelines() []latestV1.Pipeline { return rc.Pipelines.All() } func (rc *RunContext) GetInsecureRegistries() map[string]bool { return rc.InsecureRegistries } func (rc *RunContext) GetWorkingDir() string { return rc.WorkingDir } @@ -222,11 +214,6 @@ func GetRunContext(opts config.SkaffoldOptions, configs []schemaUtil.VersionedCo return nil, fmt.Errorf("finding current directory: %w", err) } - namespaces, err := runnerutil.GetAllPodNamespaces(opts.Namespace, pipelines) - if err != nil { - return nil, fmt.Errorf("getting namespace list: %w", err) - } - // combine all provided lists of insecure registries into a map cfgRegistries, err := config.GetInsecureRegistries(opts.GlobalConfig) if err != nil { @@ -259,19 +246,8 @@ func GetRunContext(opts config.SkaffoldOptions, configs []schemaUtil.VersionedCo Pipelines: ps, WorkingDir: cwd, KubeContext: kubeContext, - Namespaces: namespaces, InsecureRegistries: insecureRegistries, Cluster: cluster, RunID: runID, }, nil } - -func (rc *RunContext) UpdateNamespaces(ns []string) { - if len(ns) == 0 { - return - } - namespaces := util.NewStringSet() - namespaces.Insert(append(rc.Namespaces, ns...)...) - namespaces.Delete(emptyNamespace) - rc.Namespaces = namespaces.ToList() -} diff --git a/pkg/skaffold/runner/timings.go b/pkg/skaffold/runner/timings.go index d0db7cae340..43c5f45fb7e 100644 --- a/pkg/skaffold/runner/timings.go +++ b/pkg/skaffold/runner/timings.go @@ -79,16 +79,16 @@ func (w withTimings) Test(ctx context.Context, out io.Writer, builds []graph.Art return nil } -func (w withTimings) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) ([]string, error) { +func (w withTimings) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error { start := time.Now() output.Default.Fprintln(out, "Starting deploy...") - ns, err := w.Deployer.Deploy(ctx, out, builds) + err := w.Deployer.Deploy(ctx, out, builds) if err != nil { - return nil, err + return err } logrus.Infoln("Deploy completed in", util.ShowHumanizeTime(time.Since(start))) - return ns, err + return err } func (w withTimings) Cleanup(ctx context.Context, out io.Writer) error { diff --git a/pkg/skaffold/runner/timings_test.go b/pkg/skaffold/runner/timings_test.go index 05b7a1cbdfe..02eca44efb6 100644 --- a/pkg/skaffold/runner/timings_test.go +++ b/pkg/skaffold/runner/timings_test.go @@ -71,11 +71,11 @@ type mockDeployer struct { err bool } -func (m *mockDeployer) Deploy(context.Context, io.Writer, []graph.Artifact) ([]string, error) { +func (m *mockDeployer) Deploy(context.Context, io.Writer, []graph.Artifact) error { if m.err { - return nil, errors.New("Unable to deploy") + return errors.New("Unable to deploy") } - return nil, nil + return nil } func (m *mockDeployer) Cleanup(context.Context, io.Writer) error { @@ -220,7 +220,7 @@ func TestTimingsDeploy(t *testing.T) { _, _, deployer := WithTimings(nil, nil, d, false) var out bytes.Buffer - _, err := deployer.Deploy(context.Background(), &out, nil) + err := deployer.Deploy(context.Background(), &out, nil) t.CheckError(test.shouldErr, err) t.CheckMatches(test.shouldOutput, out.String()) diff --git a/pkg/skaffold/runner/util/util.go b/pkg/skaffold/runner/util/util.go deleted file mode 100644 index 47e36836cc7..00000000000 --- a/pkg/skaffold/runner/util/util.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2019 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "fmt" - "sort" - - kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" -) - -// GetAllPodNamespaces lists the namespaces that should be watched. -// + The namespace passed on the command line -// + Current kube context's namespace -// + Namespaces referenced in Helm releases -func GetAllPodNamespaces(configNamespace string, pipelines []latestV1.Pipeline) ([]string, error) { - nsMap := make(map[string]bool) - - if configNamespace == "" { - // Get current kube context's namespace - config, err := kubectx.CurrentConfig() - if err != nil { - return nil, fmt.Errorf("getting k8s configuration: %w", err) - } - - context, ok := config.Contexts[config.CurrentContext] - if ok { - nsMap[context.Namespace] = true - } else { - nsMap[""] = true - } - } else { - nsMap[configNamespace] = true - } - - // Set additional namespaces each helm release referenced - for _, namespace := range collectHelmReleasesNamespaces(pipelines) { - nsMap[namespace] = true - } - - // Collate the slice of namespaces. - namespaces := make([]string, 0, len(nsMap)) - for ns := range nsMap { - namespaces = append(namespaces, ns) - } - - sort.Strings(namespaces) - return namespaces, nil -} - -func collectHelmReleasesNamespaces(pipelines []latestV1.Pipeline) []string { - var namespaces []string - for _, cfg := range pipelines { - if cfg.Deploy.HelmDeploy != nil { - for _, release := range cfg.Deploy.HelmDeploy.Releases { - if release.Namespace != "" { - namespaces = append(namespaces, release.Namespace) - } - } - } - } - return namespaces -} diff --git a/pkg/skaffold/runner/util/util_test.go b/pkg/skaffold/runner/util/util_test.go deleted file mode 100644 index bdb36cea01d..00000000000 --- a/pkg/skaffold/runner/util/util_test.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2019 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "testing" - - "k8s.io/client-go/tools/clientcmd/api" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/testutil" -) - -func TestGetAllPodNamespaces(t *testing.T) { - tests := []struct { - description string - argNamespace string - currentContext string - cfg latestV1.Pipeline - expected []string - }{ - { - description: "namespace provided on the command line", - argNamespace: "ns", - expected: []string{"ns"}, - }, - { - description: "kube context's namespace", - currentContext: "prod-context", - expected: []string{"prod"}, - }, - { - description: "default namespace", - currentContext: "unknown context", - expected: []string{""}, - }, - { - description: "add namespaces for helm", - argNamespace: "ns", - cfg: latestV1.Pipeline{ - Deploy: latestV1.DeployConfig{ - DeployType: latestV1.DeployType{ - HelmDeploy: &latestV1.HelmDeploy{ - Releases: []latestV1.HelmRelease{ - {Namespace: "ns3"}, - {Namespace: ""}, - {Namespace: ""}, - {Namespace: "ns2"}, - }, - }, - }, - }, - }, - expected: []string{"ns", "ns2", "ns3"}, - }, - } - for _, test := range tests { - testutil.Run(t, "", func(t *testutil.T) { - t.Override(&context.CurrentConfig, func() (api.Config, error) { - return api.Config{ - CurrentContext: test.currentContext, - Contexts: map[string]*api.Context{ - "prod-context": {Namespace: "prod"}, - }, - }, nil - }) - - namespaces, err := GetAllPodNamespaces(test.argNamespace, []latestV1.Pipeline{test.cfg}) - - t.CheckNoError(err) - t.CheckDeepEqual(test.expected, namespaces) - }) - } -} diff --git a/pkg/skaffold/runner/v1/apply.go b/pkg/skaffold/runner/v1/apply.go index 43bfc6ec5c9..8714f2904c2 100644 --- a/pkg/skaffold/runner/v1/apply.go +++ b/pkg/skaffold/runner/v1/apply.go @@ -52,7 +52,7 @@ func (r *SkaffoldRunner) applyResources(ctx context.Context, out io.Writer, arti ctx, endTrace := instrumentation.StartTrace(ctx, "applyResources_Deploying") defer endTrace() r.deployer.RegisterLocalImages(localImages) - namespaces, err := r.deployer.Deploy(ctx, deployOut, artifacts) + err = r.deployer.Deploy(ctx, deployOut, artifacts) postDeployFn() if err != nil { event.DeployFailed(err) @@ -61,6 +61,5 @@ func (r *SkaffoldRunner) applyResources(ctx context.Context, out io.Writer, arti } r.hasDeployed = true event.DeployComplete() - r.runCtx.UpdateNamespaces(namespaces) return nil } diff --git a/pkg/skaffold/runner/v1/deploy.go b/pkg/skaffold/runner/v1/deploy.go index f11b0dc1c97..4d6d5619850 100644 --- a/pkg/skaffold/runner/v1/deploy.go +++ b/pkg/skaffold/runner/v1/deploy.go @@ -46,12 +46,12 @@ func (r *SkaffoldRunner) DeployAndLog(ctx context.Context, out io.Writer, artifa defer r.deployer.GetAccessor().Stop() - if err := r.deployer.GetAccessor().Start(ctx, out, r.runCtx.GetNamespaces()); err != nil { + if err := r.deployer.GetAccessor().Start(ctx, out); err != nil { logrus.Warnln("Error starting port forwarding:", err) } // Start printing the logs after deploy is finished - if err := r.deployer.GetLogger().Start(ctx, out, r.runCtx.GetNamespaces()); err != nil { + if err := r.deployer.GetLogger().Start(ctx, out); err != nil { return fmt.Errorf("starting logger: %w", err) } @@ -112,7 +112,7 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) } r.deployer.RegisterLocalImages(localAndBuiltImages) - namespaces, err := r.deployer.Deploy(ctx, deployOut, artifacts) + err = r.deployer.Deploy(ctx, deployOut, artifacts) postDeployFn() if err != nil { event.DeployFailed(err) @@ -132,7 +132,6 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) event.DeployComplete() eventV2.TaskSucceeded(constants.Deploy) - r.runCtx.UpdateNamespaces(namespaces) if !r.runCtx.Opts.IterativeStatusCheck { // run final aggregated status check only if iterative status check is turned off. return r.deployer.GetStatusMonitor().Check(ctx, statusCheckOut) diff --git a/pkg/skaffold/runner/v1/deploy_test.go b/pkg/skaffold/runner/v1/deploy_test.go index ca0e44e0b22..5e0d4002c05 100644 --- a/pkg/skaffold/runner/v1/deploy_test.go +++ b/pkg/skaffold/runner/v1/deploy_test.go @@ -68,50 +68,6 @@ func TestDeploy(t *testing.T) { } } -func TestDeployNamespace(t *testing.T) { - tests := []struct { - description string - Namespaces []string - testBench *TestBench - expected []string - }{ - { - description: "deploy shd add all namespaces to run Context", - Namespaces: []string{"test", "test-ns"}, - testBench: NewTestBench().WithDeployNamespaces([]string{"test-ns", "test-ns-1"}), - expected: []string{"test", "test-ns", "test-ns-1"}, - }, - { - description: "deploy without command opts namespace", - testBench: NewTestBench().WithDeployNamespaces([]string{"test-ns", "test-ns-1"}), - expected: []string{"test-ns", "test-ns-1"}, - }, - { - description: "deploy with no namespaces returned", - Namespaces: []string{"test"}, - testBench: &TestBench{}, - expected: []string{"test"}, - }, - } - - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - t.SetupFakeKubernetesContext(api.Config{CurrentContext: "cluster1"}) - t.Override(&client.Client, mockK8sClient) - - r := createRunner(t, test.testBench, nil, []*latestV1.Artifact{{ImageName: "img1"}, {ImageName: "img2"}}, nil) - r.runCtx.Namespaces = test.Namespaces - - err := r.Deploy(context.Background(), ioutil.Discard, []graph.Artifact{ - {ImageName: "img1", Tag: "img1:tag1"}, - {ImageName: "img2", Tag: "img2:tag2"}, - }) - t.CheckNoError(err) - t.CheckDeepEqual(test.expected, r.runCtx.GetNamespaces()) - }) - } -} - func TestSkaffoldDeployRenderOnly(t *testing.T) { testutil.Run(t, "does not make kubectl calls", func(t *testutil.T) { runCtx := &runcontext.RunContext{ diff --git a/pkg/skaffold/runner/v1/dev.go b/pkg/skaffold/runner/v1/dev.go index 00428113e1f..997a3cd170d 100644 --- a/pkg/skaffold/runner/v1/dev.go +++ b/pkg/skaffold/runner/v1/dev.go @@ -186,11 +186,11 @@ func (r *SkaffoldRunner) doDev(ctx context.Context, out io.Writer) error { return nil } - if err := r.deployer.GetAccessor().Start(childCtx, out, r.runCtx.GetNamespaces()); err != nil { + if err := r.deployer.GetAccessor().Start(childCtx, out); err != nil { logrus.Warnf("failed to start accessor: %v", err) } - if err := r.deployer.GetDebugger().Start(childCtx, r.runCtx.GetNamespaces()); err != nil { + if err := r.deployer.GetDebugger().Start(childCtx); err != nil { logrus.Warnf("failed to start debugger: %v", err) } @@ -336,14 +336,14 @@ func (r *SkaffoldRunner) Dev(ctx context.Context, out io.Writer, artifacts []*la defer r.deployer.GetAccessor().Stop() - if err := r.deployer.GetAccessor().Start(ctx, out, r.runCtx.GetNamespaces()); err != nil { + if err := r.deployer.GetAccessor().Start(ctx, out); err != nil { logrus.Warnln("Error starting resource accessor:", err) } - if err := r.deployer.GetDebugger().Start(ctx, r.runCtx.GetNamespaces()); err != nil { + if err := r.deployer.GetDebugger().Start(ctx); err != nil { logrus.Warnln("Error starting debug container notification:", err) } // Start printing the logs after deploy is finished - if err := r.deployer.GetLogger().Start(ctx, out, r.runCtx.GetNamespaces()); err != nil { + if err := r.deployer.GetLogger().Start(ctx, out); err != nil { return fmt.Errorf("starting logger: %w", err) } diff --git a/pkg/skaffold/runner/v1/runner_test.go b/pkg/skaffold/runner/v1/runner_test.go index a0df677b9ae..84cb757b783 100644 --- a/pkg/skaffold/runner/v1/runner_test.go +++ b/pkg/skaffold/runner/v1/runner_test.go @@ -187,17 +187,17 @@ func (t *TestBench) Test(_ context.Context, _ io.Writer, artifacts []graph.Artif return nil } -func (t *TestBench) Deploy(_ context.Context, _ io.Writer, artifacts []graph.Artifact) ([]string, error) { +func (t *TestBench) Deploy(_ context.Context, _ io.Writer, artifacts []graph.Artifact) error { if len(t.deployErrors) > 0 { err := t.deployErrors[0] t.deployErrors = t.deployErrors[1:] if err != nil { - return nil, err + return err } } t.currentActions.Deployed = findTags(artifacts) - return t.namespaces, nil + return nil } func (t *TestBench) Render(context.Context, io.Writer, []graph.Artifact, bool, string) error { diff --git a/pkg/skaffold/sync/sync.go b/pkg/skaffold/sync/sync.go index cba882243af..4603186000a 100644 --- a/pkg/skaffold/sync/sync.go +++ b/pkg/skaffold/sync/sync.go @@ -257,7 +257,7 @@ func (s *PodSyncer) Sync(ctx context.Context, out io.Writer, item *Item) error { if len(item.Copy) > 0 { logrus.Infoln("Copying files:", item.Copy, "to", item.Image) - if err := Perform(ctx, item.Image, item.Copy, s.copyFileFn, s.config.GetNamespaces()); err != nil { + if err := Perform(ctx, item.Image, item.Copy, s.copyFileFn, *s.namespaces); err != nil { return fmt.Errorf("copying files: %w", err) } } @@ -265,7 +265,7 @@ func (s *PodSyncer) Sync(ctx context.Context, out io.Writer, item *Item) error { if len(item.Delete) > 0 { logrus.Infoln("Deleting files:", item.Delete, "from", item.Image) - if err := Perform(ctx, item.Image, item.Delete, s.deleteFileFn, s.config.GetNamespaces()); err != nil { + if err := Perform(ctx, item.Image, item.Delete, s.deleteFileFn, *s.namespaces); err != nil { return fmt.Errorf("deleting files: %w", err) } } diff --git a/pkg/skaffold/sync/types.go b/pkg/skaffold/sync/types.go index 55f9f3a0450..48cca55a0cd 100644 --- a/pkg/skaffold/sync/types.go +++ b/pkg/skaffold/sync/types.go @@ -38,21 +38,17 @@ type Syncer interface { } type PodSyncer struct { - kubectl *pkgkubectl.CLI - config Config + kubectl *pkgkubectl.CLI + namespaces *[]string } -func NewPodSyncer(cli *pkgkubectl.CLI, config Config) *PodSyncer { +func NewPodSyncer(cli *pkgkubectl.CLI, namespaces *[]string) *PodSyncer { return &PodSyncer{ - kubectl: cli, - config: config, + kubectl: cli, + namespaces: namespaces, } } -type Config interface { - GetNamespaces() []string -} - type NoopSyncer struct{} func (s *NoopSyncer) Sync(context.Context, io.Writer, *Item) error { From 494c0417dc25342a891982714124ba2d78605523 Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Tue, 13 Jul 2021 22:12:01 -0700 Subject: [PATCH 083/103] Update feature maturities (#6202) --- docs/data/maturity.json | 61 +++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/docs/data/maturity.json b/docs/data/maturity.json index b79a14078ef..4a7aea2500d 100644 --- a/docs/data/maturity.json +++ b/docs/data/maturity.json @@ -11,14 +11,14 @@ "deploy": "x", "area": "Deploy", "feature": "Apply", - "maturity": "alpha", + "maturity": "beta", "description": "Use hydrated Kubernetes manifests to create resources on the cluster" }, "build.buildpacks": { "build": "x", "area": "Build", "feature": "Cloud Native Buildpacks support", - "maturity": "beta", + "maturity": "GA", "description": "Skaffold natively support for artifacts built with Cloud Native Buildpacks" }, "build.custom": { @@ -38,7 +38,7 @@ "debug": "x", "area": "Build", "feature": "Build Artifact Dependencies", - "maturity": "alpha", + "maturity": "beta", "description": "Define build artifact dependencies" }, "build": { @@ -59,7 +59,7 @@ "debug": { "debug": "x", "area": "Debug", - "maturity": "beta", + "maturity": "GA", "description": "Language-aware reconfiguration of containers on the fly to become debuggable ", "url": "/docs/workflows/debug" }, @@ -67,23 +67,30 @@ "debug": "x", "area": "Debug", "feature": "debug go apps", - "maturity": "alpha", + "maturity": "GA", "description": "debug go apps" }, "debug.java": { "debug": "x", "area": "Debug", "feature": "debug java apps", - "maturity": "beta", + "maturity": "GA", "description": "debug java apps" }, "debug.node": { "debug": "x", "area": "Debug", "feature": "debug node apps", - "maturity": "beta", + "maturity": "GA", "description": "debug node apps" }, + "debug.NET": { + "debug": "x", + "area": "Debug", + "feature": "debug .NET apps", + "maturity": "beta", + "description": "debug .NET apps" + }, "debug.python": { "debug": "x", "area": "Debug", @@ -99,7 +106,7 @@ "debug": "x", "render": "x", "area": "Default-repo", - "maturity": "beta", + "maturity": "GA", "description": "specify a default image repository & rewrite image names to default repo", "url": "/docs/environment/image-registries/" }, @@ -111,7 +118,7 @@ "debug": "x", "area": "Default-repo", "feature": "preconcatentation strategy", - "maturity": "beta", + "maturity": "GA", "description": "collision free rewriting strategy" }, "default_repo.simple_prefix": { @@ -122,7 +129,7 @@ "debug": "x", "area": "Default-repo", "feature": "simple prefix replace strategy", - "maturity": "alpha", + "maturity": "GA", "description": "more intuitive prefix replacement strategy" }, "cleanup": { @@ -152,7 +159,7 @@ "debug": "x", "area": "Deploy", "feature": "Status check", - "maturity": "beta", + "maturity": "GA", "description": "User can wait for deployments to stabilize " }, "dev": { @@ -181,44 +188,44 @@ "debug": "x", "render": "x", "area": "Global config", - "maturity": "beta", + "maturity": "GA", "description": "store user preferences in a separate preferences file", "url": "/docs/design/global-config/" }, "init": { "area": "Init", - "maturity": "alpha", + "maturity": "GA", "description": "Initialize a skaffold.yaml file based on the contents of the current directory", "url": "/docs/pipeline-stages/init" }, "init.dockerfiles": { "area": "Init", "feature": "init for Dockerfiles ", - "maturity": "alpha", + "maturity": "GA", "description": "skaffold init recognizes Dockerfiles" }, "init.interactive": { "area": "Init", "feature": "interactive", - "maturity": "alpha", + "maturity": "GA", "description": "skaffold init interactive for CLI users" }, "init.json_api": { "area": "Init", - "feature": "json based ", - "maturity": "alpha", + "feature": "JSON based", + "maturity": "beta", "description": "skaffold init JSON based API for IDE integrations" }, "init.k8s_manifests": { "area": "Init", - "feature": "init for k8s manifests", - "maturity": "alpha", - "description": "skaffold init recognizes k8s manifest and the image names in them" + "feature": "init for Kubernetes manifests", + "maturity": "GA", + "description": "skaffold init parses images from Kubernetes manifests" }, "init.generate_manifests": { "area": "Init", "feature": "generate manifests", - "maturity": "alpha", + "maturity": "beta", "description": "skaffold init will try to generate kubernetes manifests for your project" }, "insecure_registry": { @@ -263,7 +270,7 @@ "render": { "deploy": "x", "area": "Render", - "maturity": "beta", + "maturity": "GA", "description": "Produce hydrated Kubernetes manifests that reference the built resources" }, "run.cmd": { @@ -277,13 +284,13 @@ "dev": "x", "area": "Filesync", "feature": "sync.infer", - "maturity": "alpha", + "maturity": "beta", "description": "mark files as \"syncable\" - infer the destinations based on the Dockerfile" }, "sync": { "dev": "x", "area": "Filesync", - "maturity": "beta", + "maturity": "GA", "description": "Instead of rebuilding, copy the changed files in the running container", "url": "/docs/pipeline-stages/filesync" }, @@ -294,7 +301,7 @@ "debug": "x", "area": "Tagpolicy", "feature": "sha256 (== \"latest\") tagger", - "maturity": "beta", + "maturity": "GA", "description": "tag with latest, use image digest / image ID for deployment" }, "tagpolicy": { @@ -310,7 +317,7 @@ "templating": { "deploy": "x", "area": "Templating", - "maturity": "beta", + "maturity": "GA", "description": "certain fields of skaffold.yaml can be parametrized with environment and built-in variables", "url": "/docs/environment/templating/" }, @@ -351,7 +358,7 @@ }, "version": { "area": "version", - "maturity": "beta", + "maturity": "GA", "description": "get the version string of the current skaffold binary" } } From eee8a212420bf87cc9cbcc4ab77b68e28c8c8956 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 13 Jul 2021 22:59:08 -0700 Subject: [PATCH 084/103] add set command for survey ids (#6197) * add set command for survey ids * lint --- cmd/skaffold/app/cmd/config/flags.go | 7 +- cmd/skaffold/app/cmd/config/set.go | 106 +++++++++++++++++++----- cmd/skaffold/app/cmd/config/set_test.go | 27 ++++++ 3 files changed, 117 insertions(+), 23 deletions(-) diff --git a/cmd/skaffold/app/cmd/config/flags.go b/cmd/skaffold/app/cmd/config/flags.go index edce44b1b9c..36f6096523b 100644 --- a/cmd/skaffold/app/cmd/config/flags.go +++ b/cmd/skaffold/app/cmd/config/flags.go @@ -21,8 +21,8 @@ import ( ) var ( - configFile, kubecontext string - showAll, global, survey bool + configFile, kubecontext, surveyID string + showAll, global, survey bool ) func AddCommonFlags(f *pflag.FlagSet) { @@ -37,5 +37,8 @@ func AddListFlags(f *pflag.FlagSet) { func AddSetUnsetFlags(f *pflag.FlagSet) { f.BoolVarP(&global, "global", "g", false, "Set value for global config") f.BoolVarP(&survey, "survey", "s", false, "Set value for skaffold survey config") + f.StringVarP(&surveyID, "id", "i", "", "Set value for given survey config") + f.MarkHidden("survey") + f.MarkHidden("id") } diff --git a/cmd/skaffold/app/cmd/config/set.go b/cmd/skaffold/app/cmd/config/set.go index 2cce0bc68dc..5471af12db4 100644 --- a/cmd/skaffold/app/cmd/config/set.go +++ b/cmd/skaffold/app/cmd/config/set.go @@ -29,7 +29,8 @@ import ( ) const ( - surveyFieldName = "Survey" + surveyFieldName = "Survey" + userSurveysFieldName = "UserSurveys" ) type cfgStruct struct { @@ -52,46 +53,66 @@ func setConfigValue(name string, value string) error { return err } - fieldIdx, err := getFieldIndex(cfg, name) + fieldIdx, valI, err := getFieldIndex(cfg, name, value) if err != nil { return err } + lastIdx := 0 + if isUserSurvey() { + lastIdx = fieldIdx[len(fieldIdx)-1] + fieldIdx = fieldIdx[:len(fieldIdx)-1] + } field := reflect.Indirect(reflect.ValueOf(cfg)).FieldByIndex(fieldIdx) - val, err := parseAsType(value, field) + val, err := parseAsType(valI, field, lastIdx, value) if err != nil { return fmt.Errorf("%s is not a valid value for field %s", value, name) } - reflect.ValueOf(cfg).Elem().FieldByIndex(fieldIdx).Set(val) return writeConfig(cfg) } -func getFieldIndex(cfg *config.ContextConfig, name string) ([]int, error) { +func getFieldIndex(cfg *config.ContextConfig, name string, val string) ([]int, interface{}, error) { + valI := getValueInterface(cfg, val) cs, err := getConfigStructWithIndex(cfg) if err != nil { - return nil, err + return nil, nil, err } for i := 0; i < cs.value.NumField(); i++ { fieldType := cs.rType.Field(i) for _, tag := range strings.Split(fieldType.Tag.Get("yaml"), ",") { if tag == name { if f, ok := cs.rType.FieldByName(fieldType.Name); ok { - return append(cs.idx, f.Index...), nil + return append(cs.idx, f.Index...), valI, nil } - return nil, fmt.Errorf("could not find config field %s", name) + return nil, valI, fmt.Errorf("could not find config field %s", name) } } } - return nil, fmt.Errorf("%s is not a valid config field", name) + return nil, nil, fmt.Errorf("%s is not a valid config field", name) +} + +func getValueInterface(cfg *config.ContextConfig, value string) interface{} { + if !isUserSurvey() { + return value + } + if cfg.Survey == nil { + cfg.Survey = &config.SurveyConfig{} + } + if cfg.Survey.UserSurveys == nil { + cfg.Survey.UserSurveys = []*config.UserSurvey{} + } + return cfg.Survey.UserSurveys } func getConfigStructWithIndex(cfg *config.ContextConfig) (*cfgStruct, error) { t := reflect.TypeOf(*cfg) if survey { if cfg.Survey == nil { - cfg.Survey = &config.SurveyConfig{} + cfg.Survey = &config.SurveyConfig{ + UserSurveys: []*config.UserSurvey{}, + } } return surveyStruct(cfg.Survey, t) } @@ -103,18 +124,34 @@ func getConfigStructWithIndex(cfg *config.ContextConfig) (*cfgStruct, error) { } func surveyStruct(s *config.SurveyConfig, t reflect.Type) (*cfgStruct, error) { - surveyType := reflect.TypeOf(*s) - if surveyField, ok := t.FieldByName(surveyFieldName); ok { - return &cfgStruct{ - value: reflect.Indirect(reflect.ValueOf(s)), - rType: surveyType, - idx: surveyField.Index, - }, nil - } - return nil, fmt.Errorf("survey config field 'Survey' not found in config struct %s", t.Name()) + field, ok := t.FieldByName(surveyFieldName) + if !ok { + return nil, fmt.Errorf("survey config field %q not found in config struct %s", surveyFieldName, t.Name()) + } + rType := reflect.TypeOf(*s) + if isUserSurvey() { + return userSurveyStruct(&config.UserSurvey{}, rType, field.Index) + } + return &cfgStruct{ + value: reflect.Indirect(reflect.ValueOf(s)), + rType: rType, + idx: field.Index, + }, nil } -func parseAsType(value string, field reflect.Value) (reflect.Value, error) { +func userSurveyStruct(as *config.UserSurvey, t reflect.Type, idx []int) (*cfgStruct, error) { + field, ok := t.FieldByName(userSurveysFieldName) + if !ok { + return nil, fmt.Errorf("survey config field %q not found in config struct %s", userSurveysFieldName, t.Name()) + } + return &cfgStruct{ + value: reflect.Indirect(reflect.ValueOf(as)), + rType: reflect.TypeOf(*as), + idx: append(idx, field.Index...), + }, nil +} + +func parseAsType(value interface{}, field reflect.Value, childIdx int, childValue string) (reflect.Value, error) { fieldType := field.Type() switch fieldType.String() { case "string": @@ -128,16 +165,39 @@ func parseAsType(value string, field reflect.Value) (reflect.Value, error) { if value == "" { return reflect.Zero(fieldType), nil } - valBase, err := strconv.ParseBool(value) + valBase, err := strconv.ParseBool(value.(string)) if err != nil { return reflect.Value{}, err } return reflect.ValueOf(&valBase), nil + case "[]*config.UserSurvey": + us := field.Interface().([]*config.UserSurvey) + parentVal, parentIdx := hasUserSurvey(us) + childField := reflect.Indirect(parentVal).FieldByIndex([]int{childIdx}) + v1, err := parseAsType(childValue, childField, 0, "") + if err != nil { + return reflect.Value{}, err + } + childField.Set(v1) + if parentIdx == -1 { + return reflect.Append(field, parentVal), nil + } + field.Index(parentIdx).Set(parentVal) + return field, nil default: return reflect.Value{}, fmt.Errorf("unsupported type: %s", fieldType) } } +func hasUserSurvey(cs []*config.UserSurvey) (reflect.Value, int) { + for i, f := range cs { + if f.ID == surveyID { + return reflect.ValueOf(f), i + } + } + return reflect.ValueOf(&config.UserSurvey{ID: surveyID}), -1 +} + func writeConfig(cfg *config.ContextConfig) error { fullConfig, err := config.ReadConfigFile(configFile) if err != nil { @@ -167,3 +227,7 @@ func logSetConfigForUser(out io.Writer, key string, value string) { fmt.Fprintf(out, "set value %s to %s for context %s\n", key, value, kubecontext) } } + +func isUserSurvey() bool { + return survey && surveyID != "" +} diff --git a/cmd/skaffold/app/cmd/config/set_test.go b/cmd/skaffold/app/cmd/config/set_test.go index a89eb44b672..5db824b9b56 100644 --- a/cmd/skaffold/app/cmd/config/set_test.go +++ b/cmd/skaffold/app/cmd/config/set_test.go @@ -36,6 +36,7 @@ func TestSetAndUnsetConfig(t *testing.T) { key string value string kubecontext string + surveyID string global bool survey bool shouldErr bool @@ -301,6 +302,31 @@ func TestSetAndUnsetConfig(t *testing.T) { ContextConfigs: []*config.ContextConfig{}, }, }, + { + description: "set global survey id taken for a key", + key: "taken", + value: "true", + global: true, + survey: true, + surveyID: "helm", + expectedSetCfg: &config.GlobalConfig{ + Global: &config.ContextConfig{ + Survey: &config.SurveyConfig{ + UserSurveys: []*config.UserSurvey{ + {ID: "helm", Taken: util.BoolPtr(true)}}}, + }, + ContextConfigs: []*config.ContextConfig{}, + }, + expectedUnsetCfg: &config.GlobalConfig{ + Global: &config.ContextConfig{ + Survey: &config.SurveyConfig{ + UserSurveys: []*config.UserSurvey{ + {ID: "helm"}}, + }, + }, + ContextConfigs: []*config.ContextConfig{}, + }, + }, } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { @@ -311,6 +337,7 @@ func TestSetAndUnsetConfig(t *testing.T) { t.Override(&configFile, cfg) t.Override(&global, test.global) t.Override(&survey, test.survey) + t.Override(&surveyID, test.surveyID) if test.kubecontext != "" { t.Override(&kubecontext, test.kubecontext) } else { From 27271dfcaab56c38ecf41f4b7158101d44c454b6 Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Wed, 14 Jul 2021 14:25:12 +0530 Subject: [PATCH 085/103] release: v1.28.0 (#6204) --- CHANGELOG.md | 56 +++++++++++++++++++ examples/bazel/skaffold.yaml | 2 +- examples/buildpacks-java/skaffold.yaml | 2 +- examples/buildpacks-node/skaffold.yaml | 2 +- examples/buildpacks-python/skaffold.yaml | 2 +- examples/buildpacks/skaffold.yaml | 2 +- examples/custom-buildx/skaffold.yaml | 2 +- examples/custom-tests/skaffold.yaml | 2 +- examples/custom/skaffold.yaml | 2 +- examples/gcb-kaniko/skaffold.yaml | 2 +- examples/generate-pipeline/skaffold.yaml | 2 +- .../getting-started-kustomize/skaffold.yaml | 2 +- examples/getting-started/skaffold.yaml | 2 +- examples/google-cloud-build/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- examples/helm-deployment/skaffold.yaml | 2 +- examples/helm-remote-repo/skaffold.yaml | 2 +- examples/hot-reload/skaffold.yaml | 2 +- examples/jib-gradle/skaffold.yaml | 2 +- examples/jib-multimodule/skaffold.yaml | 2 +- examples/jib-sync/skaffold-gradle.yaml | 2 +- examples/jib-sync/skaffold-maven.yaml | 2 +- examples/jib/skaffold.yaml | 2 +- examples/kaniko/skaffold.yaml | 2 +- .../kustomize/skaffold-kustomize-args.yaml | 2 +- examples/kustomize/skaffold.yaml | 2 +- examples/microservices/skaffold.yaml | 2 +- .../base/skaffold.yaml | 2 +- .../leeroy-app/skaffold.yaml | 2 +- .../leeroy-web/skaffold.yaml | 2 +- .../multi-config-microservices/skaffold.yaml | 2 +- examples/nodejs/skaffold.yaml | 2 +- examples/profile-patches/skaffold.yaml | 2 +- examples/profiles/skaffold.yaml | 2 +- examples/react-reload/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- examples/ruby/skaffold.yaml | 2 +- .../simple-artifact-dependency/skaffold.yaml | 2 +- examples/structure-tests/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- examples/templated-fields/skaffold.yaml | 2 +- examples/typescript/skaffold.yaml | 2 +- pkg/skaffold/schema/latest/v1/config.go | 2 +- 43 files changed, 98 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9112757aeb2..f1227abbe5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,59 @@ +# v1.28.0 Release - 07/14/2021 +Note: This release comes with a new config version, `v2beta19`. To upgrade your skaffold.yaml, use `skaffold fix`. If you choose not to upgrade, skaffold will auto-upgrade as best as it can. + +Highlights: +* Skaffold healthchecks can now be run per deployer using the `--iterative-status-check=true` flag (fixes [5774](https://github.com/GoogleContainerTools/skaffold/issues/5774)). See docs [here](https://skaffold.dev/docs/workflows/ci-cd/#waiting-for-skaffold-deployments-using-healthcheck). +* If you use `helm` with `skaffold` you might see a new survey asking for feedback on an upcoming redesign of that integration. + +New Features: +* Allow iterative status checks [#6115](https://github.com/GoogleContainerTools/skaffold/pull/6115) +* Add survey config and framework to show feature surveys to skaffold users. [#6185](https://github.com/GoogleContainerTools/skaffold/pull/6185) + +Fixes: +* Make completion work again [#6138](https://github.com/GoogleContainerTools/skaffold/pull/6138) +* Propagate kaniko environment to GCB [#6181](https://github.com/GoogleContainerTools/skaffold/pull/6181) +* Fix couldn't start notify trigger in multi-config projects [#6114](https://github.com/GoogleContainerTools/skaffold/pull/6114) +* Fetch namespaces at time of sync [#6135](https://github.com/GoogleContainerTools/skaffold/pull/6135) +* Replace missing template values with empty string [#6136](https://github.com/GoogleContainerTools/skaffold/pull/6136) +* Fix survey active logic [#6194](https://github.com/GoogleContainerTools/skaffold/pull/6194) +* Don't update survey prompt if survey prompt is not shown to stdout [#6192](https://github.com/GoogleContainerTools/skaffold/pull/6192) +* change ptypes call to timestamppb to fix linters [#6164](https://github.com/GoogleContainerTools/skaffold/pull/6164) + +Updates and Refactors: +* Update Skaffold dependencies [#6155](https://github.com/GoogleContainerTools/skaffold/pull/6155) +* Simplify `--timestamps` output [#6146](https://github.com/GoogleContainerTools/skaffold/pull/6146) +* Update Jib build plugin versions after 3.1.2 release [#6168](https://github.com/GoogleContainerTools/skaffold/pull/6168) +* Update feature maturities [#6202](https://github.com/GoogleContainerTools/skaffold/pull/6202) +* Add logic to show user survey in DisplaySurveyPrompt flow. [#6196](https://github.com/GoogleContainerTools/skaffold/pull/6196) +* refactor: Read globalConfig instead of kubecontext config for survey config [#6191](https://github.com/GoogleContainerTools/skaffold/pull/6191) +* Add information about workspace and dockerfile to artifact metadata [#6111](https://github.com/GoogleContainerTools/skaffold/pull/6111) +* Added template expansion for helm chart version (#5709) [#6157](https://github.com/GoogleContainerTools/skaffold/pull/6157) +* add set command for survey ids [#6197](https://github.com/GoogleContainerTools/skaffold/pull/6197) +* Bump schema version to v2beta19 [#6116](https://github.com/GoogleContainerTools/skaffold/pull/6116) + +Docs, Test, and Release Updates: +* Create SECURITY.md [#6140](https://github.com/GoogleContainerTools/skaffold/pull/6140) +* Update Jib docs with some advanced usage examples [#6169](https://github.com/GoogleContainerTools/skaffold/pull/6169) +* Disable k3d integration tests [#6171](https://github.com/GoogleContainerTools/skaffold/pull/6171) +* Check release workflow [#6188](https://github.com/GoogleContainerTools/skaffold/pull/6188) +* design proposal to show user survey other than Hats [#6186](https://github.com/GoogleContainerTools/skaffold/pull/6186) +* Doc tweaks [#6176](https://github.com/GoogleContainerTools/skaffold/pull/6176) +* working cloud profiler export for skaffold [#6066](https://github.com/GoogleContainerTools/skaffold/pull/6066) +* Set specific permissions for workflows [#6139](https://github.com/GoogleContainerTools/skaffold/pull/6139) + +Huge thanks goes out to all of our contributors for this release: + +- Aaron Prindle +- Brian de Alwis +- Chanseok Oh +- Gaurav +- Hidenori Sugiyama +- Marlon Gamez +- Nick Kubala +- Pablo Caderno +- Tejal Desai +- Yuwen Ma + # v1.27.0 Release - 06/29/2021 Note: This release comes with a new config version, `v2beta18`. To upgrade your skaffold.yaml, use `skaffold fix`. If you choose not to upgrade, skaffold will auto-upgrade as best as it can. diff --git a/examples/bazel/skaffold.yaml b/examples/bazel/skaffold.yaml index 1b01fc1a31a..a5b0b6b5672 100644 --- a/examples/bazel/skaffold.yaml +++ b/examples/bazel/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/buildpacks-java/skaffold.yaml b/examples/buildpacks-java/skaffold.yaml index f81af0a96a2..4fdd8fcf341 100644 --- a/examples/buildpacks-java/skaffold.yaml +++ b/examples/buildpacks-java/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/buildpacks-node/skaffold.yaml b/examples/buildpacks-node/skaffold.yaml index 7a7ad961084..52af709cbba 100644 --- a/examples/buildpacks-node/skaffold.yaml +++ b/examples/buildpacks-node/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/buildpacks-python/skaffold.yaml b/examples/buildpacks-python/skaffold.yaml index 8c5f40a0b3e..6f94b11e235 100644 --- a/examples/buildpacks-python/skaffold.yaml +++ b/examples/buildpacks-python/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/buildpacks/skaffold.yaml b/examples/buildpacks/skaffold.yaml index d9a2f676412..d3588f362b8 100644 --- a/examples/buildpacks/skaffold.yaml +++ b/examples/buildpacks/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/custom-buildx/skaffold.yaml b/examples/custom-buildx/skaffold.yaml index 6b5e3091c3f..0ff38c3abb1 100644 --- a/examples/custom-buildx/skaffold.yaml +++ b/examples/custom-buildx/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: diff --git a/examples/custom-tests/skaffold.yaml b/examples/custom-tests/skaffold.yaml index 22d14182b38..ca824035cbd 100644 --- a/examples/custom-tests/skaffold.yaml +++ b/examples/custom-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/custom/skaffold.yaml b/examples/custom/skaffold.yaml index 0ec8861d220..dc96b26d7d0 100644 --- a/examples/custom/skaffold.yaml +++ b/examples/custom/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/gcb-kaniko/skaffold.yaml b/examples/gcb-kaniko/skaffold.yaml index e6686f61ddf..61dbb59c7eb 100644 --- a/examples/gcb-kaniko/skaffold.yaml +++ b/examples/gcb-kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: googleCloudBuild: diff --git a/examples/generate-pipeline/skaffold.yaml b/examples/generate-pipeline/skaffold.yaml index d47225948e8..fe6ce5e3b9b 100644 --- a/examples/generate-pipeline/skaffold.yaml +++ b/examples/generate-pipeline/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/getting-started-kustomize/skaffold.yaml b/examples/getting-started-kustomize/skaffold.yaml index 8ba8b8c79b4..92c39d9c50f 100644 --- a/examples/getting-started-kustomize/skaffold.yaml +++ b/examples/getting-started-kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: getting-started-kustomize diff --git a/examples/getting-started/skaffold.yaml b/examples/getting-started/skaffold.yaml index 641084e39f9..a0d647ceaeb 100644 --- a/examples/getting-started/skaffold.yaml +++ b/examples/getting-started/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/google-cloud-build/skaffold.yaml b/examples/google-cloud-build/skaffold.yaml index 810bf8cd801..a09b7b94e63 100644 --- a/examples/google-cloud-build/skaffold.yaml +++ b/examples/google-cloud-build/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: googleCloudBuild: diff --git a/examples/helm-deployment-dependencies/skaffold.yaml b/examples/helm-deployment-dependencies/skaffold.yaml index 97a0fbde30c..dd01304e03e 100644 --- a/examples/helm-deployment-dependencies/skaffold.yaml +++ b/examples/helm-deployment-dependencies/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: tagPolicy: diff --git a/examples/helm-deployment/skaffold.yaml b/examples/helm-deployment/skaffold.yaml index a3228ecc763..5e7b798b400 100644 --- a/examples/helm-deployment/skaffold.yaml +++ b/examples/helm-deployment/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/helm-remote-repo/skaffold.yaml b/examples/helm-remote-repo/skaffold.yaml index 6a5e31cd341..2c69f5d8895 100644 --- a/examples/helm-remote-repo/skaffold.yaml +++ b/examples/helm-remote-repo/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config deploy: helm: diff --git a/examples/hot-reload/skaffold.yaml b/examples/hot-reload/skaffold.yaml index 7a45aafff0b..ae087dda5e5 100644 --- a/examples/hot-reload/skaffold.yaml +++ b/examples/hot-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/jib-gradle/skaffold.yaml b/examples/jib-gradle/skaffold.yaml index f958c60c1e8..c1a538db90a 100644 --- a/examples/jib-gradle/skaffold.yaml +++ b/examples/jib-gradle/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/jib-multimodule/skaffold.yaml b/examples/jib-multimodule/skaffold.yaml index fc5c21c43f1..f5a643a86a2 100644 --- a/examples/jib-multimodule/skaffold.yaml +++ b/examples/jib-multimodule/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/jib-sync/skaffold-gradle.yaml b/examples/jib-sync/skaffold-gradle.yaml index b5111c07b70..e60a5adc12e 100644 --- a/examples/jib-sync/skaffold-gradle.yaml +++ b/examples/jib-sync/skaffold-gradle.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/jib-sync/skaffold-maven.yaml b/examples/jib-sync/skaffold-maven.yaml index d1e986475cd..90f4ed86844 100644 --- a/examples/jib-sync/skaffold-maven.yaml +++ b/examples/jib-sync/skaffold-maven.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/jib/skaffold.yaml b/examples/jib/skaffold.yaml index 2f8901388b7..d3a22ce5ce2 100644 --- a/examples/jib/skaffold.yaml +++ b/examples/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/kaniko/skaffold.yaml b/examples/kaniko/skaffold.yaml index 62166545be9..3090303406c 100644 --- a/examples/kaniko/skaffold.yaml +++ b/examples/kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/kustomize/skaffold-kustomize-args.yaml b/examples/kustomize/skaffold-kustomize-args.yaml index 815e8a664f7..5dc96089794 100644 --- a/examples/kustomize/skaffold-kustomize-args.yaml +++ b/examples/kustomize/skaffold-kustomize-args.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config deploy: kustomize: diff --git a/examples/kustomize/skaffold.yaml b/examples/kustomize/skaffold.yaml index 10480c65c8f..6b2216749e7 100644 --- a/examples/kustomize/skaffold.yaml +++ b/examples/kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config deploy: kustomize: {} diff --git a/examples/microservices/skaffold.yaml b/examples/microservices/skaffold.yaml index b4714d5aa6e..a9da68e7d7a 100644 --- a/examples/microservices/skaffold.yaml +++ b/examples/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/multi-config-microservices/base/skaffold.yaml b/examples/multi-config-microservices/base/skaffold.yaml index 9b6f530f97f..2436585792e 100644 --- a/examples/multi-config-microservices/base/skaffold.yaml +++ b/examples/multi-config-microservices/base/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/multi-config-microservices/leeroy-app/skaffold.yaml b/examples/multi-config-microservices/leeroy-app/skaffold.yaml index 456b33284fc..19a5e82a121 100644 --- a/examples/multi-config-microservices/leeroy-app/skaffold.yaml +++ b/examples/multi-config-microservices/leeroy-app/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: app-config diff --git a/examples/multi-config-microservices/leeroy-web/skaffold.yaml b/examples/multi-config-microservices/leeroy-web/skaffold.yaml index 6cabbd2ebc7..3d4c45c88a6 100644 --- a/examples/multi-config-microservices/leeroy-web/skaffold.yaml +++ b/examples/multi-config-microservices/leeroy-web/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: web-config diff --git a/examples/multi-config-microservices/skaffold.yaml b/examples/multi-config-microservices/skaffold.yaml index cf2172417fe..03a07b81ed3 100644 --- a/examples/multi-config-microservices/skaffold.yaml +++ b/examples/multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config requires: - path: ./leeroy-app diff --git a/examples/nodejs/skaffold.yaml b/examples/nodejs/skaffold.yaml index 3e423ee4117..065692d3087 100644 --- a/examples/nodejs/skaffold.yaml +++ b/examples/nodejs/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: diff --git a/examples/profile-patches/skaffold.yaml b/examples/profile-patches/skaffold.yaml index 89c5551995b..1757efe6229 100644 --- a/examples/profile-patches/skaffold.yaml +++ b/examples/profile-patches/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: # only build and deploy "base-service" on main profile diff --git a/examples/profiles/skaffold.yaml b/examples/profiles/skaffold.yaml index 88efd92dc79..152ae750aae 100644 --- a/examples/profiles/skaffold.yaml +++ b/examples/profiles/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: # only build and deploy "world-service" on main profile diff --git a/examples/react-reload/skaffold.yaml b/examples/react-reload/skaffold.yaml index 93b80760296..87caba6f0d8 100644 --- a/examples/react-reload/skaffold.yaml +++ b/examples/react-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/remote-multi-config-microservices/skaffold.yaml b/examples/remote-multi-config-microservices/skaffold.yaml index 78708e84bc3..01e29e70eb6 100644 --- a/examples/remote-multi-config-microservices/skaffold.yaml +++ b/examples/remote-multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config requires: - git: diff --git a/examples/ruby/skaffold.yaml b/examples/ruby/skaffold.yaml index 01752662caa..025a8a3966e 100644 --- a/examples/ruby/skaffold.yaml +++ b/examples/ruby/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/simple-artifact-dependency/skaffold.yaml b/examples/simple-artifact-dependency/skaffold.yaml index 9ef02451c1e..2e3f7c69d21 100644 --- a/examples/simple-artifact-dependency/skaffold.yaml +++ b/examples/simple-artifact-dependency/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/structure-tests/skaffold.yaml b/examples/structure-tests/skaffold.yaml index 004b3c52169..0837b660831 100644 --- a/examples/structure-tests/skaffold.yaml +++ b/examples/structure-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/tagging-with-environment-variables/skaffold.yaml b/examples/tagging-with-environment-variables/skaffold.yaml index 5e3e539f76f..9e2ec8042a1 100644 --- a/examples/tagging-with-environment-variables/skaffold.yaml +++ b/examples/tagging-with-environment-variables/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: artifacts: diff --git a/examples/templated-fields/skaffold.yaml b/examples/templated-fields/skaffold.yaml index 4f5c9a586d5..f9a969ddae9 100644 --- a/examples/templated-fields/skaffold.yaml +++ b/examples/templated-fields/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config metadata: name: my-app diff --git a/examples/typescript/skaffold.yaml b/examples/typescript/skaffold.yaml index f66439034a3..83b11c4e0e4 100644 --- a/examples/typescript/skaffold.yaml +++ b/examples/typescript/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta18 +apiVersion: skaffold/v2beta19 kind: Config build: diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index c67002d3685..bc8e324b6e3 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) -// This config version is not yet released, it is SAFE TO MODIFY the structs in this file. +// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file. const Version string = "skaffold/v2beta19" // NewSkaffoldConfig creates a SkaffoldConfig From 67d8c456ce2aa189e0468c02e2f1e0019a1ac8fe Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Wed, 14 Jul 2021 19:01:20 +0530 Subject: [PATCH 086/103] add new config version v2beta20 (#6206) --- docs/config.toml | 2 +- docs/content/en/docs/references/cli/_index.md | 2 +- docs/content/en/schemas/v2beta20.json | 3383 +++++++++++++++++ integration/examples/bazel/skaffold.yaml | 2 +- .../examples/buildpacks-java/skaffold.yaml | 2 +- .../examples/buildpacks-node/skaffold.yaml | 2 +- .../examples/buildpacks-python/skaffold.yaml | 2 +- integration/examples/buildpacks/skaffold.yaml | 2 +- .../examples/custom-buildx/skaffold.yaml | 2 +- .../examples/custom-tests/skaffold.yaml | 2 +- integration/examples/custom/skaffold.yaml | 2 +- integration/examples/gcb-kaniko/skaffold.yaml | 2 +- .../examples/generate-pipeline/skaffold.yaml | 2 +- .../getting-started-kustomize/skaffold.yaml | 2 +- .../examples/getting-started/skaffold.yaml | 2 +- .../examples/google-cloud-build/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- .../examples/helm-deployment/skaffold.yaml | 2 +- .../examples/helm-remote-repo/skaffold.yaml | 2 +- integration/examples/hot-reload/skaffold.yaml | 2 +- integration/examples/jib-gradle/skaffold.yaml | 2 +- .../examples/jib-multimodule/skaffold.yaml | 2 +- .../examples/jib-sync/skaffold-gradle.yaml | 2 +- .../examples/jib-sync/skaffold-maven.yaml | 2 +- integration/examples/jib/skaffold.yaml | 2 +- integration/examples/kaniko/skaffold.yaml | 2 +- .../kustomize/skaffold-kustomize-args.yaml | 2 +- integration/examples/kustomize/skaffold.yaml | 2 +- .../examples/microservices/skaffold.yaml | 2 +- .../base/skaffold.yaml | 2 +- .../leeroy-app/skaffold.yaml | 2 +- .../leeroy-web/skaffold.yaml | 2 +- .../multi-config-microservices/skaffold.yaml | 2 +- integration/examples/nodejs/skaffold.yaml | 2 +- .../examples/profile-patches/skaffold.yaml | 2 +- integration/examples/profiles/skaffold.yaml | 2 +- .../examples/react-reload/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- integration/examples/ruby/skaffold.yaml | 2 +- .../simple-artifact-dependency/skaffold.yaml | 2 +- .../examples/structure-tests/skaffold.yaml | 2 +- .../skaffold.yaml | 2 +- .../examples/templated-fields/skaffold.yaml | 2 +- integration/examples/typescript/skaffold.yaml | 2 +- .../testdata/build-dependencies/skaffold.yaml | 2 +- .../testdata/build/secret/skaffold.yaml | 2 +- integration/testdata/build/skaffold.yaml | 2 +- .../testdata/build/squash/skaffold.yaml | 2 +- integration/testdata/build/ssh/skaffold.yaml | 2 +- .../testdata/custom-test/skaffold.yaml | 2 +- integration/testdata/debug/skaffold.yaml | 2 +- .../testdata/deploy-multiple/skaffold.yaml | 2 +- integration/testdata/dev/skaffold.yaml | 2 +- .../diagnose/multi-config/diagnose.tmpl | 6 +- .../diagnose/multi-config/skaffold.yaml | 2 +- .../diagnose/multi-config/skaffold2.yaml | 2 +- .../diagnose/multi-config/skaffold3.yaml | 2 +- .../diagnose/temp-config/diagnose.tmpl | 2 +- .../diagnose/temp-config/skaffold.yaml | 2 +- .../testdata/gke_loadbalancer/skaffold.yaml | 2 +- integration/testdata/hello/skaffold.yaml | 2 +- .../testdata/init/compose/skaffold.yaml | 2 +- .../init/hello-with-manifest/skaffold.yaml | 2 +- .../inspect/cluster/skaffold.add.default.yaml | 2 +- .../inspect/cluster/skaffold.add.profile.yaml | 2 +- .../inspect/cluster/skaffold.cluster.yaml | 2 +- .../inspect/cluster/skaffold.local.yaml | 2 +- .../cluster/skaffold.modified.default.yaml | 2 +- .../cluster/skaffold.modified.profile.yaml | 2 +- .../inspect/gcb/skaffold.add.default.yaml | 2 +- .../inspect/gcb/skaffold.add.profile.yaml | 2 +- .../testdata/inspect/gcb/skaffold.gcb.yaml | 2 +- .../testdata/inspect/gcb/skaffold.local.yaml | 2 +- .../gcb/skaffold.modified.default.yaml | 2 +- .../gcb/skaffold.modified.profile.yaml | 2 +- integration/testdata/jib/skaffold.yaml | 2 +- .../kaniko-explicit-repo/skaffold.yaml | 2 +- .../app/skaffold.yaml | 2 +- .../kaniko-insecure-registry/skaffold.yaml | 2 +- .../kaniko-microservices/skaffold.yaml | 2 +- .../testdata/kaniko-sub-folder/skaffold.yaml | 2 +- .../testdata/kaniko-target/skaffold.yaml | 2 +- integration/testdata/tagPolicy/skaffold.yaml | 2 +- .../testdata/test-events/skaffold.yaml | 2 +- .../testdata/init/allcli/skaffold.yaml | 2 +- .../getting-started-kustomize/skaffold.yaml | 2 +- .../init/hello-no-manifest/skaffold.yaml | 2 +- .../testdata/init/hello/skaffold.yaml | 2 +- .../testdata/init/ignore-tags/skaffold.yaml | 2 +- .../testdata/init/microservices/skaffold.yaml | 2 +- .../testdata/init/windows/skaffold.yaml | 2 +- pkg/skaffold/schema/latest/v1/config.go | 4 +- pkg/skaffold/schema/v2beta18/upgrade.go | 2 +- pkg/skaffold/schema/v2beta18/upgrade_test.go | 2 +- pkg/skaffold/schema/v2beta19/config.go | 1564 ++++++++ pkg/skaffold/schema/v2beta19/upgrade.go | 38 + pkg/skaffold/schema/v2beta19/upgrade_test.go | 201 + pkg/skaffold/schema/versions.go | 2 + 98 files changed, 5284 insertions(+), 96 deletions(-) create mode 100755 docs/content/en/schemas/v2beta20.json create mode 100755 pkg/skaffold/schema/v2beta19/config.go create mode 100755 pkg/skaffold/schema/v2beta19/upgrade.go create mode 100755 pkg/skaffold/schema/v2beta19/upgrade_test.go diff --git a/docs/config.toml b/docs/config.toml index 0940cf57448..a5e9b1bb0c7 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -82,7 +82,7 @@ weight = 1 copyright = "Skaffold Authors" privacy_policy = "https://policies.google.com/privacy" github_repo = "https://github.com/GoogleContainerTools/skaffold" -skaffold_version = "skaffold/v2beta19" +skaffold_version = "skaffold/v2beta20" # Google Custom Search Engine ID. Remove or comment out to disable search. # gcs_engine_id = "013756393218025596041:3nojel67sum" diff --git a/docs/content/en/docs/references/cli/_index.md b/docs/content/en/docs/references/cli/_index.md index d8cb7c3ad6d..f8127785795 100644 --- a/docs/content/en/docs/references/cli/_index.md +++ b/docs/content/en/docs/references/cli/_index.md @@ -819,7 +819,7 @@ Options: -m, --module=[]: Filter Skaffold configs to only the provided named modules --overwrite=false: Overwrite original config with fixed config --remote-cache-dir='': Specify the location of the git repositories cache (default $HOME/.skaffold/repos) - --version='skaffold/v2beta19': Target schema version to upgrade to + --version='skaffold/v2beta20': Target schema version to upgrade to Usage: skaffold fix [options] diff --git a/docs/content/en/schemas/v2beta20.json b/docs/content/en/schemas/v2beta20.json new file mode 100755 index 00000000000..06a810c17e2 --- /dev/null +++ b/docs/content/en/schemas/v2beta20.json @@ -0,0 +1,3383 @@ +{ + "type": "object", + "anyOf": [ + { + "$ref": "#/definitions/SkaffoldConfig" + } + ], + "$schema": "http://json-schema-org/draft-07/schema#", + "definitions": { + "Activation": { + "properties": { + "command": { + "type": "string", + "description": "a Skaffold command for which the profile is auto-activated.", + "x-intellij-html-description": "a Skaffold command for which the profile is auto-activated.", + "examples": [ + "dev" + ] + }, + "env": { + "type": "string", + "description": "a `key=pattern` pair. The profile is auto-activated if an Environment Variable `key` matches the pattern. If the pattern starts with `!`, activation happens if the remaining pattern is _not_ matched. The pattern matches if the Environment Variable value is exactly `pattern`, or the regex `pattern` is found in it. An empty `pattern` (e.g. `env: \"key=\"`) always only matches if the Environment Variable is undefined or empty.", + "x-intellij-html-description": "a key=pattern pair. The profile is auto-activated if an Environment Variable key matches the pattern. If the pattern starts with !, activation happens if the remaining pattern is not matched. The pattern matches if the Environment Variable value is exactly pattern, or the regex pattern is found in it. An empty pattern (e.g. env: "key=") always only matches if the Environment Variable is undefined or empty.", + "examples": [ + "ENV=production" + ] + }, + "kubeContext": { + "type": "string", + "description": "a Kubernetes context for which the profile is auto-activated.", + "x-intellij-html-description": "a Kubernetes context for which the profile is auto-activated.", + "examples": [ + "minikube" + ] + } + }, + "preferredOrder": [ + "env", + "kubeContext", + "command" + ], + "additionalProperties": false, + "type": "object", + "description": "criteria by which a profile is auto-activated.", + "x-intellij-html-description": "criteria by which a profile is auto-activated." + }, + "Artifact": { + "required": [ + "image" + ], + "type": "object", + "anyOf": [ + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "docker": { + "$ref": "#/definitions/DockerArtifact", + "description": "*beta* describes an artifact built from a Dockerfile.", + "x-intellij-html-description": "beta describes an artifact built from a Dockerfile." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "docker" + ], + "additionalProperties": false + }, + { + "properties": { + "bazel": { + "$ref": "#/definitions/BazelArtifact", + "description": "*beta* requires bazel CLI to be installed and the sources to contain [Bazel](https://bazel.build/) configuration files.", + "x-intellij-html-description": "beta requires bazel CLI to be installed and the sources to contain Bazel configuration files." + }, + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "bazel" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "jib": { + "$ref": "#/definitions/JibArtifact", + "description": "builds images using the [Jib plugins for Maven or Gradle](https://github.com/GoogleContainerTools/jib/).", + "x-intellij-html-description": "builds images using the Jib plugins for Maven or Gradle." + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "jib" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "kaniko": { + "$ref": "#/definitions/KanikoArtifact", + "description": "builds images using [kaniko](https://github.com/GoogleContainerTools/kaniko).", + "x-intellij-html-description": "builds images using kaniko." + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "kaniko" + ], + "additionalProperties": false + }, + { + "properties": { + "buildpacks": { + "$ref": "#/definitions/BuildpackArtifact", + "description": "builds images using [Cloud Native Buildpacks](https://buildpacks.io/).", + "x-intellij-html-description": "builds images using Cloud Native Buildpacks." + }, + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "buildpacks" + ], + "additionalProperties": false + }, + { + "properties": { + "context": { + "type": "string", + "description": "directory containing the artifact's sources.", + "x-intellij-html-description": "directory containing the artifact's sources.", + "default": "." + }, + "custom": { + "$ref": "#/definitions/CustomArtifact", + "description": "*beta* builds images using a custom build script written by the user.", + "x-intellij-html-description": "beta builds images using a custom build script written by the user." + }, + "image": { + "type": "string", + "description": "name of the image to be built.", + "x-intellij-html-description": "name of the image to be built.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "requires": { + "items": { + "$ref": "#/definitions/ArtifactDependency" + }, + "type": "array", + "description": "describes build artifacts that this artifact depends on.", + "x-intellij-html-description": "describes build artifacts that this artifact depends on." + }, + "sync": { + "$ref": "#/definitions/Sync", + "description": "*beta* local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta local files synced to pods instead of triggering an image build when modified. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + } + }, + "preferredOrder": [ + "image", + "context", + "sync", + "requires", + "custom" + ], + "additionalProperties": false + } + ], + "description": "items that need to be built, along with the context in which they should be built.", + "x-intellij-html-description": "items that need to be built, along with the context in which they should be built." + }, + "ArtifactDependency": { + "required": [ + "image" + ], + "properties": { + "alias": { + "type": "string", + "description": "a token that is replaced with the image reference in the builder definition files. For example, the `docker` builder will use the alias as a build-arg key. Defaults to the value of `image`.", + "x-intellij-html-description": "a token that is replaced with the image reference in the builder definition files. For example, the docker builder will use the alias as a build-arg key. Defaults to the value of image." + }, + "image": { + "type": "string", + "description": "a reference to an artifact's image name.", + "x-intellij-html-description": "a reference to an artifact's image name." + } + }, + "preferredOrder": [ + "image", + "alias" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a specific build dependency for an artifact.", + "x-intellij-html-description": "describes a specific build dependency for an artifact." + }, + "BazelArtifact": { + "required": [ + "target" + ], + "properties": { + "args": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional args to pass to `bazel build`.", + "x-intellij-html-description": "additional args to pass to bazel build.", + "default": "[]", + "examples": [ + "[\"-flag\", \"--otherflag\"]" + ] + }, + "target": { + "type": "string", + "description": "`bazel build` target to run.", + "x-intellij-html-description": "bazel build target to run.", + "examples": [ + "//:skaffold_example.tar" + ] + } + }, + "preferredOrder": [ + "target", + "args" + ], + "additionalProperties": false, + "type": "object", + "description": "describes an artifact built with [Bazel](https://bazel.build/).", + "x-intellij-html-description": "describes an artifact built with Bazel." + }, + "BuildConfig": { + "type": "object", + "anyOf": [ + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy" + ], + "additionalProperties": false + }, + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "local": { + "$ref": "#/definitions/LocalBuild", + "description": "*beta* describes how to do a build on the local docker daemon and optionally push to a repository.", + "x-intellij-html-description": "beta describes how to do a build on the local docker daemon and optionally push to a repository." + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy", + "local" + ], + "additionalProperties": false + }, + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "googleCloudBuild": { + "$ref": "#/definitions/GoogleCloudBuild", + "description": "*beta* describes how to do a remote build on [Google Cloud Build](https://cloud.google.com/cloud-build/).", + "x-intellij-html-description": "beta describes how to do a remote build on Google Cloud Build." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy", + "googleCloudBuild" + ], + "additionalProperties": false + }, + { + "properties": { + "artifacts": { + "items": { + "$ref": "#/definitions/Artifact" + }, + "type": "array", + "description": "the images you're going to be building.", + "x-intellij-html-description": "the images you're going to be building." + }, + "cluster": { + "$ref": "#/definitions/ClusterDetails", + "description": "*beta* describes how to do an on-cluster build.", + "x-intellij-html-description": "beta describes how to do an on-cluster build." + }, + "insecureRegistries": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "x-intellij-html-description": "a list of registries declared by the user to be insecure. These registries will be connected to via HTTP instead of HTTPS.", + "default": "[]" + }, + "tagPolicy": { + "$ref": "#/definitions/TagPolicy", + "description": "*beta* determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to `gitCommit: {variant: Tags}`.", + "x-intellij-html-description": "beta determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! If not specified, it defaults to gitCommit: {variant: Tags}." + } + }, + "preferredOrder": [ + "artifacts", + "insecureRegistries", + "tagPolicy", + "cluster" + ], + "additionalProperties": false + } + ], + "description": "contains all the configuration for the build steps.", + "x-intellij-html-description": "contains all the configuration for the build steps." + }, + "BuildHooks": { + "properties": { + "after": { + "items": { + "$ref": "#/definitions/HostHook" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *after* each artifact build step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute after each artifact build step." + }, + "before": { + "items": { + "$ref": "#/definitions/HostHook" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *before* each artifact build step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before each artifact build step." + } + }, + "preferredOrder": [ + "before", + "after" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the list of lifecycle hooks to execute before and after each artifact build step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before and after each artifact build step." + }, + "BuildpackArtifact": { + "required": [ + "builder" + ], + "properties": { + "builder": { + "type": "string", + "description": "builder image used.", + "x-intellij-html-description": "builder image used." + }, + "buildpacks": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of strings, where each string is a specific buildpack to use with the builder. If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. Order matters.", + "x-intellij-html-description": "a list of strings, where each string is a specific buildpack to use with the builder. If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. Order matters.", + "default": "[]" + }, + "dependencies": { + "$ref": "#/definitions/BuildpackDependencies", + "description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact.", + "x-intellij-html-description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact." + }, + "env": { + "items": { + "type": "string" + }, + "type": "array", + "description": "environment variables, in the `key=value` form, passed to the build. Values can use the go template syntax.", + "x-intellij-html-description": "environment variables, in the key=value form, passed to the build. Values can use the go template syntax.", + "default": "[]", + "examples": [ + "[\"key1=value1\", \"key2=value2\", \"key3={{.ENV_VARIABLE}}\"]" + ] + }, + "projectDescriptor": { + "type": "string", + "description": "path to the project descriptor file.", + "x-intellij-html-description": "path to the project descriptor file.", + "default": "project.toml" + }, + "runImage": { + "type": "string", + "description": "overrides the stack's default run image.", + "x-intellij-html-description": "overrides the stack's default run image." + }, + "trustBuilder": { + "type": "boolean", + "description": "indicates that the builder should be trusted.", + "x-intellij-html-description": "indicates that the builder should be trusted.", + "default": "false" + }, + "volumes": { + "description": "support mounting host volumes into the container.", + "x-intellij-html-description": "support mounting host volumes into the container." + } + }, + "preferredOrder": [ + "builder", + "runImage", + "env", + "buildpacks", + "trustBuilder", + "projectDescriptor", + "dependencies", + "volumes" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* describes an artifact built using [Cloud Native Buildpacks](https://buildpacks.io/). It can be used to build images out of project's sources without any additional configuration.", + "x-intellij-html-description": "alpha describes an artifact built using Cloud Native Buildpacks. It can be used to build images out of project's sources without any additional configuration." + }, + "BuildpackDependencies": { + "properties": { + "ignore": { + "items": { + "type": "string" + }, + "type": "array", + "description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with `paths`.", + "x-intellij-html-description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both paths and in ignore, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with paths.", + "default": "[]" + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "x-intellij-html-description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "default": "[]" + } + }, + "preferredOrder": [ + "paths", + "ignore" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* used to specify dependencies for an artifact built by buildpacks.", + "x-intellij-html-description": "alpha used to specify dependencies for an artifact built by buildpacks." + }, + "BuildpackVolume": { + "required": [ + "host", + "target" + ], + "properties": { + "host": { + "type": "string", + "description": "local volume or absolute directory of the path to mount.", + "x-intellij-html-description": "local volume or absolute directory of the path to mount." + }, + "options": { + "type": "string", + "description": "specify a list of comma-separated mount options. Valid options are: `ro` (default): volume contents are read-only. `rw`: volume contents are readable and writable. `volume-opt==`: can be specified more than once, takes a key-value pair.", + "x-intellij-html-description": "specify a list of comma-separated mount options. Valid options are: ro (default): volume contents are read-only. rw: volume contents are readable and writable. volume-opt=<key>=<value>: can be specified more than once, takes a key-value pair." + }, + "target": { + "type": "string", + "description": "path where the file or directory is available in the container. It is strongly recommended to not specify locations under `/cnb` or `/layers`.", + "x-intellij-html-description": "path where the file or directory is available in the container. It is strongly recommended to not specify locations under /cnb or /layers." + } + }, + "preferredOrder": [ + "host", + "target", + "options" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* used to mount host volumes or directories in the build container.", + "x-intellij-html-description": "alpha used to mount host volumes or directories in the build container." + }, + "ClusterDetails": { + "properties": { + "HTTPS_PROXY": { + "type": "string", + "description": "for kaniko pod.", + "x-intellij-html-description": "for kaniko pod." + }, + "HTTP_PROXY": { + "type": "string", + "description": "for kaniko pod.", + "x-intellij-html-description": "for kaniko pod." + }, + "annotations": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "describes the Kubernetes annotations for the pod.", + "x-intellij-html-description": "describes the Kubernetes annotations for the pod.", + "default": "{}" + }, + "concurrency": { + "type": "integer", + "description": "how many artifacts can be built concurrently. 0 means \"no-limit\".", + "x-intellij-html-description": "how many artifacts can be built concurrently. 0 means "no-limit".", + "default": "0" + }, + "dockerConfig": { + "$ref": "#/definitions/DockerConfig", + "description": "describes how to mount the local Docker configuration into a pod.", + "x-intellij-html-description": "describes how to mount the local Docker configuration into a pod." + }, + "namespace": { + "type": "string", + "description": "Kubernetes namespace. Defaults to current namespace in Kubernetes configuration.", + "x-intellij-html-description": "Kubernetes namespace. Defaults to current namespace in Kubernetes configuration." + }, + "nodeSelector": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "describes the Kubernetes node selector for the pod.", + "x-intellij-html-description": "describes the Kubernetes node selector for the pod.", + "default": "{}" + }, + "pullSecretMountPath": { + "type": "string", + "description": "path the pull secret will be mounted at within the running container.", + "x-intellij-html-description": "path the pull secret will be mounted at within the running container." + }, + "pullSecretName": { + "type": "string", + "description": "name of the Kubernetes secret for pulling base images and pushing the final image. If given, the secret needs to contain the Google Cloud service account secret key under the key `kaniko-secret`.", + "x-intellij-html-description": "name of the Kubernetes secret for pulling base images and pushing the final image. If given, the secret needs to contain the Google Cloud service account secret key under the key kaniko-secret.", + "default": "kaniko-secret" + }, + "pullSecretPath": { + "type": "string", + "description": "path to the Google Cloud service account secret key file.", + "x-intellij-html-description": "path to the Google Cloud service account secret key file." + }, + "randomDockerConfigSecret": { + "type": "boolean", + "description": "adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "x-intellij-html-description": "adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "default": "false" + }, + "randomPullSecret": { + "type": "boolean", + "description": "adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "x-intellij-html-description": "adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85.", + "default": "false" + }, + "resources": { + "$ref": "#/definitions/ResourceRequirements", + "description": "define the resource requirements for the kaniko pod.", + "x-intellij-html-description": "define the resource requirements for the kaniko pod." + }, + "runAsUser": { + "type": "integer", + "description": "defines the UID to request for running the container. If omitted, no SecurityContext will be specified for the pod and will therefore be inherited from the service account.", + "x-intellij-html-description": "defines the UID to request for running the container. If omitted, no SecurityContext will be specified for the pod and will therefore be inherited from the service account." + }, + "serviceAccount": { + "type": "string", + "description": "describes the Kubernetes service account to use for the pod. Defaults to 'default'.", + "x-intellij-html-description": "describes the Kubernetes service account to use for the pod. Defaults to 'default'." + }, + "timeout": { + "type": "string", + "description": "amount of time (in seconds) that this build is allowed to run. Defaults to 20 minutes (`20m`).", + "x-intellij-html-description": "amount of time (in seconds) that this build is allowed to run. Defaults to 20 minutes (20m)." + }, + "tolerations": { + "items": {}, + "type": "array", + "description": "describes the Kubernetes tolerations for the pod.", + "x-intellij-html-description": "describes the Kubernetes tolerations for the pod.", + "default": "[]" + }, + "volumes": { + "items": {}, + "type": "array", + "description": "defines container mounts for ConfigMap and Secret resources.", + "x-intellij-html-description": "defines container mounts for ConfigMap and Secret resources.", + "default": "[]" + } + }, + "preferredOrder": [ + "HTTP_PROXY", + "HTTPS_PROXY", + "pullSecretPath", + "pullSecretName", + "pullSecretMountPath", + "namespace", + "timeout", + "dockerConfig", + "serviceAccount", + "tolerations", + "nodeSelector", + "annotations", + "runAsUser", + "resources", + "concurrency", + "volumes", + "randomPullSecret", + "randomDockerConfigSecret" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes how to do an on-cluster build.", + "x-intellij-html-description": "beta describes how to do an on-cluster build." + }, + "ConfigDependency": { + "properties": { + "activeProfiles": { + "items": { + "$ref": "#/definitions/ProfileDependency" + }, + "type": "array", + "description": "describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config.", + "x-intellij-html-description": "describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config." + }, + "configs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "includes specific named configs within the file path. If empty, then all configs in the file are included.", + "x-intellij-html-description": "includes specific named configs within the file path. If empty, then all configs in the file are included.", + "default": "[]" + }, + "git": { + "$ref": "#/definitions/GitInfo", + "description": "describes a remote git repository containing the required configs.", + "x-intellij-html-description": "describes a remote git repository containing the required configs." + }, + "path": { + "type": "string", + "description": "describes the path to the file containing the required configs.", + "x-intellij-html-description": "describes the path to the file containing the required configs." + } + }, + "preferredOrder": [ + "configs", + "path", + "git", + "activeProfiles" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a dependency on another skaffold configuration.", + "x-intellij-html-description": "describes a dependency on another skaffold configuration." + }, + "CustomArtifact": { + "properties": { + "buildCommand": { + "type": "string", + "description": "command executed to build the image.", + "x-intellij-html-description": "command executed to build the image." + }, + "dependencies": { + "$ref": "#/definitions/CustomDependencies", + "description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact.", + "x-intellij-html-description": "file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact." + } + }, + "preferredOrder": [ + "buildCommand", + "dependencies" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes an artifact built from a custom build script written by the user. It can be used to build images with builders that aren't directly integrated with skaffold.", + "x-intellij-html-description": "beta describes an artifact built from a custom build script written by the user. It can be used to build images with builders that aren't directly integrated with skaffold." + }, + "CustomDependencies": { + "properties": { + "command": { + "type": "string", + "description": "represents a custom command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array.", + "x-intellij-html-description": "represents a custom command that skaffold executes to obtain dependencies. The output of this command must be a valid JSON array." + }, + "dockerfile": { + "$ref": "#/definitions/DockerfileDependency", + "description": "should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies.", + "x-intellij-html-description": "should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies." + }, + "ignore": { + "items": { + "type": "string" + }, + "type": "array", + "description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with `paths`.", + "x-intellij-html-description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both paths and in ignore, it will be ignored, and will be excluded from both rebuilds and file synchronization. Will only work in conjunction with paths.", + "default": "[]" + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "x-intellij-html-description": "should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.", + "default": "[]" + } + }, + "preferredOrder": [ + "dockerfile", + "command", + "paths", + "ignore" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* used to specify dependencies for an artifact built by a custom build script. Either `dockerfile` or `paths` should be specified for file watching to work as expected.", + "x-intellij-html-description": "beta used to specify dependencies for an artifact built by a custom build script. Either dockerfile or paths should be specified for file watching to work as expected." + }, + "CustomTemplateTagger": { + "required": [ + "template" + ], + "properties": { + "components": { + "items": { + "$ref": "#/definitions/TaggerComponent" + }, + "type": "array", + "description": "TaggerComponents that the template (see field above) can be executed against.", + "x-intellij-html-description": "TaggerComponents that the template (see field above) can be executed against." + }, + "template": { + "type": "string", + "description": "used to produce the image name and tag. See golang [text/template](https://golang.org/pkg/text/template/). The template is executed against the provided components with those variables injected.", + "x-intellij-html-description": "used to produce the image name and tag. See golang text/template. The template is executed against the provided components with those variables injected.", + "examples": [ + "{{.DATE}}" + ] + } + }, + "preferredOrder": [ + "template", + "components" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "CustomTest": { + "required": [ + "command" + ], + "properties": { + "command": { + "type": "string", + "description": "custom command to be executed. If the command exits with a non-zero return code, the test will be considered to have failed.", + "x-intellij-html-description": "custom command to be executed. If the command exits with a non-zero return code, the test will be considered to have failed." + }, + "dependencies": { + "$ref": "#/definitions/CustomTestDependencies", + "description": "additional test-specific file dependencies; changes to these files will re-run this test.", + "x-intellij-html-description": "additional test-specific file dependencies; changes to these files will re-run this test." + }, + "timeoutSeconds": { + "type": "integer", + "description": "sets the wait time for skaffold for the command to complete. If unset or 0, Skaffold will wait until the command completes.", + "x-intellij-html-description": "sets the wait time for skaffold for the command to complete. If unset or 0, Skaffold will wait until the command completes." + } + }, + "preferredOrder": [ + "command", + "timeoutSeconds", + "dependencies" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the custom test command provided by the user. Custom tests are run after an image build whenever build or test dependencies are changed.", + "x-intellij-html-description": "describes the custom test command provided by the user. Custom tests are run after an image build whenever build or test dependencies are changed." + }, + "CustomTestDependencies": { + "properties": { + "command": { + "type": "string", + "description": "represents a command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array.", + "x-intellij-html-description": "represents a command that skaffold executes to obtain dependencies. The output of this command must be a valid JSON array." + }, + "ignore": { + "items": { + "type": "string" + }, + "type": "array", + "description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both retest and file synchronization. Will only work in conjunction with `paths`.", + "x-intellij-html-description": "specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both paths and in ignore, it will be ignored, and will be excluded from both retest and file synchronization. Will only work in conjunction with paths.", + "default": "[]" + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "locates the file dependencies for the command relative to workspace. Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization.", + "x-intellij-html-description": "locates the file dependencies for the command relative to workspace. Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization.", + "default": "[]", + "examples": [ + "[\"src/test/**\"]" + ] + } + }, + "preferredOrder": [ + "command", + "paths", + "ignore" + ], + "additionalProperties": false, + "type": "object", + "description": "used to specify dependencies for custom test command. `paths` should be specified for file watching to work as expected.", + "x-intellij-html-description": "used to specify dependencies for custom test command. paths should be specified for file watching to work as expected." + }, + "DateTimeTagger": { + "properties": { + "format": { + "type": "string", + "description": "formats the date and time. See [#Time.Format](https://golang.org/pkg/time/#Time.Format).", + "x-intellij-html-description": "formats the date and time. See #Time.Format.", + "default": "2006-01-02_15-04-05.999_MST" + }, + "timezone": { + "type": "string", + "description": "sets the timezone for the date and time. See [Time.LoadLocation](https://golang.org/pkg/time/#Time.LoadLocation). Defaults to the local timezone.", + "x-intellij-html-description": "sets the timezone for the date and time. See Time.LoadLocation. Defaults to the local timezone." + } + }, + "preferredOrder": [ + "format", + "timezone" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with the build timestamp.", + "x-intellij-html-description": "beta tags images with the build timestamp." + }, + "DeployConfig": { + "properties": { + "helm": { + "$ref": "#/definitions/HelmDeploy", + "description": "*beta* uses the `helm` CLI to apply the charts to the cluster.", + "x-intellij-html-description": "beta uses the helm CLI to apply the charts to the cluster." + }, + "kpt": { + "$ref": "#/definitions/KptDeploy", + "description": "*alpha* uses the `kpt` CLI to manage and deploy manifests.", + "x-intellij-html-description": "alpha uses the kpt CLI to manage and deploy manifests." + }, + "kubeContext": { + "type": "string", + "description": "Kubernetes context that Skaffold should deploy to.", + "x-intellij-html-description": "Kubernetes context that Skaffold should deploy to.", + "examples": [ + "minikube" + ] + }, + "kubectl": { + "$ref": "#/definitions/KubectlDeploy", + "description": "*beta* uses a client side `kubectl apply` to deploy manifests. You'll need a `kubectl` CLI version installed that's compatible with your cluster.", + "x-intellij-html-description": "beta uses a client side kubectl apply to deploy manifests. You'll need a kubectl CLI version installed that's compatible with your cluster." + }, + "kustomize": { + "$ref": "#/definitions/KustomizeDeploy", + "description": "*beta* uses the `kustomize` CLI to \"patch\" a deployment for a target environment.", + "x-intellij-html-description": "beta uses the kustomize CLI to "patch" a deployment for a target environment." + }, + "logs": { + "$ref": "#/definitions/LogsConfig", + "description": "configures how container logs are printed as a result of a deployment.", + "x-intellij-html-description": "configures how container logs are printed as a result of a deployment." + }, + "statusCheck": { + "type": "boolean", + "description": "*beta* enables waiting for deployments to stabilize.", + "x-intellij-html-description": "beta enables waiting for deployments to stabilize." + }, + "statusCheckDeadlineSeconds": { + "type": "integer", + "description": "*beta* deadline for deployments to stabilize in seconds.", + "x-intellij-html-description": "beta deadline for deployments to stabilize in seconds." + } + }, + "preferredOrder": [ + "helm", + "kpt", + "kubectl", + "kustomize", + "statusCheck", + "statusCheckDeadlineSeconds", + "kubeContext", + "logs" + ], + "additionalProperties": false, + "type": "object", + "description": "contains all the configuration needed by the deploy steps.", + "x-intellij-html-description": "contains all the configuration needed by the deploy steps." + }, + "DeployHookItem": { + "properties": { + "container": { + "$ref": "#/definitions/NamedContainerHook", + "description": "describes a single lifecycle hook to run on a container.", + "x-intellij-html-description": "describes a single lifecycle hook to run on a container." + }, + "host": { + "$ref": "#/definitions/HostHook", + "description": "describes a single lifecycle hook to run on the host machine.", + "x-intellij-html-description": "describes a single lifecycle hook to run on the host machine." + } + }, + "preferredOrder": [ + "host", + "container" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a single lifecycle hook to execute before or after each deployer step.", + "x-intellij-html-description": "describes a single lifecycle hook to execute before or after each deployer step." + }, + "DeployHooks": { + "properties": { + "after": { + "items": { + "$ref": "#/definitions/DeployHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *after* each deployer step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute after each deployer step." + }, + "before": { + "items": { + "$ref": "#/definitions/DeployHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *before* each deployer step. Container hooks will only run if the container exists from a previous deployment step (for instance the successive iterations of a dev-loop during `skaffold dev`).", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before each deployer step. Container hooks will only run if the container exists from a previous deployment step (for instance the successive iterations of a dev-loop during skaffold dev)." + } + }, + "preferredOrder": [ + "before", + "after" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the list of lifecycle hooks to execute before and after each deployer step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before and after each deployer step." + }, + "DockerArtifact": { + "properties": { + "addHost": { + "items": { + "type": "string" + }, + "type": "array", + "description": "add host.", + "x-intellij-html-description": "add host.", + "default": "[]", + "examples": [ + "[\"host1:ip1\", \"host2:ip2\"]" + ] + }, + "buildArgs": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "arguments passed to the docker build.", + "x-intellij-html-description": "arguments passed to the docker build.", + "default": "{}", + "examples": [ + "{\"key1\": \"value1\", \"key2\": \"{{ .ENV_VAR }}\"}" + ] + }, + "cacheFrom": { + "items": { + "type": "string" + }, + "type": "array", + "description": "the Docker images used as cache sources.", + "x-intellij-html-description": "the Docker images used as cache sources.", + "default": "[]", + "examples": [ + "[\"golang:1.10.1-alpine3.7\", \"alpine:3.7\"]" + ] + }, + "dockerfile": { + "type": "string", + "description": "locates the Dockerfile relative to workspace.", + "x-intellij-html-description": "locates the Dockerfile relative to workspace.", + "default": "Dockerfile" + }, + "network": { + "type": "string", + "description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are `host`: use the host's networking stack. `bridge`: use the bridged network configuration. `container:`: reuse another container's network stack. `none`: no networking in the container.", + "x-intellij-html-description": "passed through to docker and overrides the network configuration of docker builder. If unset, use whatever is configured in the underlying docker daemon. Valid modes are host: use the host's networking stack. bridge: use the bridged network configuration. container:<name|id>: reuse another container's network stack. none: no networking in the container.", + "enum": [ + "host", + "bridge", + "container:", + "none" + ] + }, + "noCache": { + "type": "boolean", + "description": "used to pass in --no-cache to docker build to prevent caching.", + "x-intellij-html-description": "used to pass in --no-cache to docker build to prevent caching.", + "default": "false" + }, + "secret": { + "$ref": "#/definitions/DockerSecret", + "description": "contains information about a local secret passed to `docker build`, along with optional destination information.", + "x-intellij-html-description": "contains information about a local secret passed to docker build, along with optional destination information." + }, + "squash": { + "type": "boolean", + "description": "used to pass in --squash to docker build to squash docker image layers into single layer.", + "x-intellij-html-description": "used to pass in --squash to docker build to squash docker image layers into single layer.", + "default": "false" + }, + "ssh": { + "type": "string", + "description": "used to pass in --ssh to docker build to use SSH agent. Format is \"default|[=|[,]]\".", + "x-intellij-html-description": "used to pass in --ssh to docker build to use SSH agent. Format is "default|[=|[,]]"." + }, + "target": { + "type": "string", + "description": "Dockerfile target name to build.", + "x-intellij-html-description": "Dockerfile target name to build." + } + }, + "preferredOrder": [ + "dockerfile", + "target", + "buildArgs", + "network", + "addHost", + "cacheFrom", + "noCache", + "squash", + "secret", + "ssh" + ], + "additionalProperties": false, + "type": "object", + "description": "describes an artifact built from a Dockerfile, usually using `docker build`.", + "x-intellij-html-description": "describes an artifact built from a Dockerfile, usually using docker build." + }, + "DockerConfig": { + "properties": { + "path": { + "type": "string", + "description": "path to the docker `config.json`.", + "x-intellij-html-description": "path to the docker config.json." + }, + "secretName": { + "type": "string", + "description": "Kubernetes secret that contains the `config.json` Docker configuration. Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'.", + "x-intellij-html-description": "Kubernetes secret that contains the config.json Docker configuration. Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'." + } + }, + "preferredOrder": [ + "path", + "secretName" + ], + "additionalProperties": false, + "type": "object", + "description": "contains information about the docker `config.json` to mount.", + "x-intellij-html-description": "contains information about the docker config.json to mount." + }, + "DockerSecret": { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "id of the secret.", + "x-intellij-html-description": "id of the secret." + }, + "src": { + "type": "string", + "description": "path to the secret on the host machine.", + "x-intellij-html-description": "path to the secret on the host machine." + } + }, + "preferredOrder": [ + "id", + "src" + ], + "additionalProperties": false, + "type": "object", + "description": "contains information about a local secret passed to `docker build`, along with optional destination information.", + "x-intellij-html-description": "contains information about a local secret passed to docker build, along with optional destination information." + }, + "DockerfileDependency": { + "properties": { + "buildArgs": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "key/value pairs used to resolve values of `ARG` instructions in a Dockerfile. Values can be constants or environment variables via the go template syntax.", + "x-intellij-html-description": "key/value pairs used to resolve values of ARG instructions in a Dockerfile. Values can be constants or environment variables via the go template syntax.", + "default": "{}", + "examples": [ + "{\"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"'{{.ENV_VARIABLE}}'\"}" + ] + }, + "path": { + "type": "string", + "description": "locates the Dockerfile relative to workspace.", + "x-intellij-html-description": "locates the Dockerfile relative to workspace." + } + }, + "preferredOrder": [ + "path", + "buildArgs" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile.", + "x-intellij-html-description": "beta used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile." + }, + "EnvTemplateTagger": { + "required": [ + "template" + ], + "properties": { + "template": { + "type": "string", + "description": "used to produce the image name and tag. See golang [text/template](https://golang.org/pkg/text/template/). The template is executed against the current environment, with those variables injected.", + "x-intellij-html-description": "used to produce the image name and tag. See golang text/template. The template is executed against the current environment, with those variables injected.", + "examples": [ + "{{.RELEASE}}" + ] + } + }, + "preferredOrder": [ + "template" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "GitInfo": { + "required": [ + "repo" + ], + "properties": { + "path": { + "type": "string", + "description": "relative path from the repo root to the skaffold configuration file. eg. `getting-started/skaffold.yaml`.", + "x-intellij-html-description": "relative path from the repo root to the skaffold configuration file. eg. getting-started/skaffold.yaml." + }, + "ref": { + "type": "string", + "description": "git ref the package should be cloned from. eg. `master` or `main`.", + "x-intellij-html-description": "git ref the package should be cloned from. eg. master or main." + }, + "repo": { + "type": "string", + "description": "git repository the package should be cloned from. e.g. `https://github.com/GoogleContainerTools/skaffold.git`.", + "x-intellij-html-description": "git repository the package should be cloned from. e.g. https://github.com/GoogleContainerTools/skaffold.git." + }, + "sync": { + "type": "boolean", + "description": "when set to `true` will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to `false`.", + "x-intellij-html-description": "when set to true will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to false." + } + }, + "preferredOrder": [ + "repo", + "path", + "ref", + "sync" + ], + "additionalProperties": false, + "type": "object", + "description": "contains information on the origin of skaffold configurations cloned from a git repository.", + "x-intellij-html-description": "contains information on the origin of skaffold configurations cloned from a git repository." + }, + "GitTagger": { + "properties": { + "ignoreChanges": { + "type": "boolean", + "description": "specifies whether to omit the `-dirty` postfix if there are uncommitted changes.", + "x-intellij-html-description": "specifies whether to omit the -dirty postfix if there are uncommitted changes.", + "default": "false" + }, + "prefix": { + "type": "string", + "description": "adds a fixed prefix to the tag.", + "x-intellij-html-description": "adds a fixed prefix to the tag." + }, + "variant": { + "type": "string", + "description": "determines the behavior of the git tagger. Valid variants are: `Tags` (default): use git tags or fall back to abbreviated commit hash. `CommitSha`: use the full git commit sha. `AbbrevCommitSha`: use the abbreviated git commit sha. `TreeSha`: use the full tree hash of the artifact workingdir. `AbbrevTreeSha`: use the abbreviated tree hash of the artifact workingdir.", + "x-intellij-html-description": "determines the behavior of the git tagger. Valid variants are: Tags (default): use git tags or fall back to abbreviated commit hash. CommitSha: use the full git commit sha. AbbrevCommitSha: use the abbreviated git commit sha. TreeSha: use the full tree hash of the artifact workingdir. AbbrevTreeSha: use the abbreviated tree hash of the artifact workingdir." + } + }, + "preferredOrder": [ + "variant", + "prefix", + "ignoreChanges" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* tags images with the git tag or commit of the artifact's workspace.", + "x-intellij-html-description": "beta tags images with the git tag or commit of the artifact's workspace." + }, + "GoogleCloudBuild": { + "properties": { + "concurrency": { + "type": "integer", + "description": "how many artifacts can be built concurrently. 0 means \"no-limit\".", + "x-intellij-html-description": "how many artifacts can be built concurrently. 0 means "no-limit".", + "default": "0" + }, + "diskSizeGb": { + "type": "integer", + "description": "disk size of the VM that runs the build. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions).", + "x-intellij-html-description": "disk size of the VM that runs the build. See Cloud Build Reference." + }, + "dockerImage": { + "type": "string", + "description": "image that runs a Docker build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Docker build. See Cloud Builders.", + "default": "gcr.io/cloud-builders/docker" + }, + "gradleImage": { + "type": "string", + "description": "image that runs a Gradle build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Gradle build. See Cloud Builders.", + "default": "gcr.io/cloud-builders/gradle" + }, + "kanikoImage": { + "type": "string", + "description": "image that runs a Kaniko build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Kaniko build. See Cloud Builders.", + "default": "gcr.io/kaniko-project/executor" + }, + "logStreamingOption": { + "type": "string", + "description": "specifies the behavior when writing build logs to Google Cloud Storage. Valid options are: `STREAM_DEFAULT`: Service may automatically determine build log streaming behavior. `STREAM_ON`: Build logs should be streamed to Google Cloud Storage. `STREAM_OFF`: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#logstreamingoption).", + "x-intellij-html-description": "specifies the behavior when writing build logs to Google Cloud Storage. Valid options are: STREAM_DEFAULT: Service may automatically determine build log streaming behavior. STREAM_ON: Build logs should be streamed to Google Cloud Storage. STREAM_OFF: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. See Cloud Build Reference." + }, + "logging": { + "type": "string", + "description": "specifies the logging mode. Valid modes are: `LOGGING_UNSPECIFIED`: The service determines the logging mode. `LEGACY`: Stackdriver logging and Cloud Storage logging are enabled (default). `GCS_ONLY`: Only Cloud Storage logging is enabled. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#loggingmode).", + "x-intellij-html-description": "specifies the logging mode. Valid modes are: LOGGING_UNSPECIFIED: The service determines the logging mode. LEGACY: Stackdriver logging and Cloud Storage logging are enabled (default). GCS_ONLY: Only Cloud Storage logging is enabled. See Cloud Build Reference." + }, + "machineType": { + "type": "string", + "description": "type of the VM that runs the build. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions).", + "x-intellij-html-description": "type of the VM that runs the build. See Cloud Build Reference." + }, + "mavenImage": { + "type": "string", + "description": "image that runs a Maven build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Maven build. See Cloud Builders.", + "default": "gcr.io/cloud-builders/mvn" + }, + "packImage": { + "type": "string", + "description": "image that runs a Cloud Native Buildpacks build. See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders).", + "x-intellij-html-description": "image that runs a Cloud Native Buildpacks build. See Cloud Builders.", + "default": "gcr.io/k8s-skaffold/pack" + }, + "projectId": { + "type": "string", + "description": "ID of your Cloud Platform Project. If it is not provided, Skaffold will guess it from the image name. For example, given the artifact image name `gcr.io/myproject/image`, Skaffold will use the `myproject` GCP project.", + "x-intellij-html-description": "ID of your Cloud Platform Project. If it is not provided, Skaffold will guess it from the image name. For example, given the artifact image name gcr.io/myproject/image, Skaffold will use the myproject GCP project." + }, + "timeout": { + "type": "string", + "description": "amount of time (in seconds) that this build should be allowed to run. See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build).", + "x-intellij-html-description": "amount of time (in seconds) that this build should be allowed to run. See Cloud Build Reference." + }, + "workerPool": { + "type": "string", + "description": "configures a pool of workers to run the build.", + "x-intellij-html-description": "configures a pool of workers to run the build." + } + }, + "preferredOrder": [ + "projectId", + "diskSizeGb", + "machineType", + "timeout", + "logging", + "logStreamingOption", + "dockerImage", + "kanikoImage", + "mavenImage", + "gradleImage", + "packImage", + "concurrency", + "workerPool" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes how to do a remote build on [Google Cloud Build](https://cloud.google.com/cloud-build/docs/). Docker and Jib artifacts can be built on Cloud Build. The `projectId` needs to be provided and the currently logged in user should be given permissions to trigger new builds.", + "x-intellij-html-description": "beta describes how to do a remote build on Google Cloud Build. Docker and Jib artifacts can be built on Cloud Build. The projectId needs to be provided and the currently logged in user should be given permissions to trigger new builds." + }, + "HelmConventionConfig": { + "properties": { + "explicitRegistry": { + "type": "boolean", + "description": "separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`.", + "x-intellij-html-description": "separates image.registry to the image config syntax. Useful for some charts e.g. postgresql.", + "default": "false" + } + }, + "preferredOrder": [ + "explicitRegistry" + ], + "additionalProperties": false, + "type": "object", + "description": "image config in the syntax of image.repository and image.tag.", + "x-intellij-html-description": "image config in the syntax of image.repository and image.tag." + }, + "HelmDeploy": { + "required": [ + "releases" + ], + "properties": { + "flags": { + "$ref": "#/definitions/HelmDeployFlags", + "description": "additional option flags that are passed on the command line to `helm`.", + "x-intellij-html-description": "additional option flags that are passed on the command line to helm." + }, + "releases": { + "items": { + "$ref": "#/definitions/HelmRelease" + }, + "type": "array", + "description": "a list of Helm releases.", + "x-intellij-html-description": "a list of Helm releases." + } + }, + "preferredOrder": [ + "releases", + "flags" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* uses the `helm` CLI to apply the charts to the cluster.", + "x-intellij-html-description": "beta uses the helm CLI to apply the charts to the cluster." + }, + "HelmDeployFlags": { + "properties": { + "global": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on every command.", + "x-intellij-html-description": "additional flags passed on every command.", + "default": "[]" + }, + "install": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed to (`helm install`).", + "x-intellij-html-description": "additional flags passed to (helm install).", + "default": "[]" + }, + "upgrade": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed to (`helm upgrade`).", + "x-intellij-html-description": "additional flags passed to (helm upgrade).", + "default": "[]" + } + }, + "preferredOrder": [ + "global", + "install", + "upgrade" + ], + "additionalProperties": false, + "type": "object", + "description": "additional option flags that are passed on the command line to `helm`.", + "x-intellij-html-description": "additional option flags that are passed on the command line to helm." + }, + "HelmFQNConfig": { + "properties": { + "property": { + "type": "string", + "description": "defines the image config.", + "x-intellij-html-description": "defines the image config." + } + }, + "preferredOrder": [ + "property" + ], + "additionalProperties": false, + "type": "object", + "description": "image config to use the FullyQualifiedImageName as param to set.", + "x-intellij-html-description": "image config to use the FullyQualifiedImageName as param to set." + }, + "HelmImageStrategy": { + "type": "object", + "anyOf": [ + { + "additionalProperties": false + }, + { + "properties": { + "fqn": { + "$ref": "#/definitions/HelmFQNConfig", + "description": "image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`.", + "x-intellij-html-description": "image configuration uses the syntax IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG." + } + }, + "preferredOrder": [ + "fqn" + ], + "additionalProperties": false + }, + { + "properties": { + "helm": { + "$ref": "#/definitions/HelmConventionConfig", + "description": "image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`.", + "x-intellij-html-description": "image configuration uses the syntax IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG." + } + }, + "preferredOrder": [ + "helm" + ], + "additionalProperties": false + } + ], + "description": "adds image configurations to the Helm `values` file.", + "x-intellij-html-description": "adds image configurations to the Helm values file." + }, + "HelmPackaged": { + "properties": { + "appVersion": { + "type": "string", + "description": "sets the `appVersion` on the chart to this version.", + "x-intellij-html-description": "sets the appVersion on the chart to this version." + }, + "version": { + "type": "string", + "description": "sets the `version` on the chart to this semver version.", + "x-intellij-html-description": "sets the version on the chart to this semver version." + } + }, + "preferredOrder": [ + "version", + "appVersion" + ], + "additionalProperties": false, + "type": "object", + "description": "parameters for packaging helm chart (`helm package`).", + "x-intellij-html-description": "parameters for packaging helm chart (helm package)." + }, + "HelmRelease": { + "required": [ + "name" + ], + "properties": { + "artifactOverrides": { + "description": "key value pairs where the key represents the parameter used in the `--set-string` Helm CLI flag to define a container image and the value corresponds to artifact i.e. `ImageName` defined in `Build.Artifacts` section. The resulting command-line is controlled by `ImageStrategy`.", + "x-intellij-html-description": "key value pairs where the key represents the parameter used in the --set-string Helm CLI flag to define a container image and the value corresponds to artifact i.e. ImageName defined in Build.Artifacts section. The resulting command-line is controlled by ImageStrategy." + }, + "chartPath": { + "type": "string", + "description": "local path to a packaged Helm chart or an unpacked Helm chart directory.", + "x-intellij-html-description": "local path to a packaged Helm chart or an unpacked Helm chart directory." + }, + "createNamespace": { + "type": "boolean", + "description": "if `true`, Skaffold will send `--create-namespace` flag to Helm CLI. `--create-namespace` flag is available in Helm since version 3.2. Defaults is `false`.", + "x-intellij-html-description": "if true, Skaffold will send --create-namespace flag to Helm CLI. --create-namespace flag is available in Helm since version 3.2. Defaults is false." + }, + "imageStrategy": { + "$ref": "#/definitions/HelmImageStrategy", + "description": "controls how an `ArtifactOverrides` entry is turned into `--set-string` Helm CLI flag or flags.", + "x-intellij-html-description": "controls how an ArtifactOverrides entry is turned into --set-string Helm CLI flag or flags." + }, + "name": { + "type": "string", + "description": "name of the Helm release. It accepts environment variables via the go template syntax.", + "x-intellij-html-description": "name of the Helm release. It accepts environment variables via the go template syntax." + }, + "namespace": { + "type": "string", + "description": "Kubernetes namespace.", + "x-intellij-html-description": "Kubernetes namespace." + }, + "overrides": { + "description": "key-value pairs. If present, Skaffold will build a Helm `values` file that overrides the original and use it to call Helm CLI (`--f` flag).", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will build a Helm values file that overrides the original and use it to call Helm CLI (--f flag)." + }, + "packaged": { + "$ref": "#/definitions/HelmPackaged", + "description": "parameters for packaging helm chart (`helm package`).", + "x-intellij-html-description": "parameters for packaging helm chart (helm package)." + }, + "recreatePods": { + "type": "boolean", + "description": "if `true`, Skaffold will send `--recreate-pods` flag to Helm CLI when upgrading a new version of a chart in subsequent dev loop deploy.", + "x-intellij-html-description": "if true, Skaffold will send --recreate-pods flag to Helm CLI when upgrading a new version of a chart in subsequent dev loop deploy.", + "default": "false" + }, + "remoteChart": { + "type": "string", + "description": "refers to a remote Helm chart reference or URL.", + "x-intellij-html-description": "refers to a remote Helm chart reference or URL." + }, + "repo": { + "type": "string", + "description": "specifies the helm repository for remote charts. If present, Skaffold will send `--repo` Helm CLI flag or flags.", + "x-intellij-html-description": "specifies the helm repository for remote charts. If present, Skaffold will send --repo Helm CLI flag or flags." + }, + "setFiles": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "key-value pairs. If present, Skaffold will send `--set-file` flag to Helm CLI and append all pairs after the flag.", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will send --set-file flag to Helm CLI and append all pairs after the flag.", + "default": "{}" + }, + "setValueTemplates": { + "description": "key-value pairs. If present, Skaffold will try to parse the value part of each key-value pair using environment variables in the system, then send `--set` flag to Helm CLI and append all parsed pairs after the flag.", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will try to parse the value part of each key-value pair using environment variables in the system, then send --set flag to Helm CLI and append all parsed pairs after the flag." + }, + "setValues": { + "description": "key-value pairs. If present, Skaffold will send `--set` flag to Helm CLI and append all pairs after the flag.", + "x-intellij-html-description": "key-value pairs. If present, Skaffold will send --set flag to Helm CLI and append all pairs after the flag." + }, + "skipBuildDependencies": { + "type": "boolean", + "description": "should build dependencies be skipped. Ignored for `remoteChart`.", + "x-intellij-html-description": "should build dependencies be skipped. Ignored for remoteChart.", + "default": "false" + }, + "upgradeOnChange": { + "type": "boolean", + "description": "specifies whether to upgrade helm chart on code changes. Default is `true` when helm chart is local (has `chartPath`). Default is `false` when helm chart is remote (has `remoteChart`).", + "x-intellij-html-description": "specifies whether to upgrade helm chart on code changes. Default is true when helm chart is local (has chartPath). Default is false when helm chart is remote (has remoteChart)." + }, + "useHelmSecrets": { + "type": "boolean", + "description": "instructs skaffold to use secrets plugin on deployment.", + "x-intellij-html-description": "instructs skaffold to use secrets plugin on deployment.", + "default": "false" + }, + "valuesFiles": { + "items": { + "type": "string" + }, + "type": "array", + "description": "paths to the Helm `values` files.", + "x-intellij-html-description": "paths to the Helm values files.", + "default": "[]" + }, + "version": { + "type": "string", + "description": "version of the chart.", + "x-intellij-html-description": "version of the chart." + }, + "wait": { + "type": "boolean", + "description": "if `true`, Skaffold will send `--wait` flag to Helm CLI.", + "x-intellij-html-description": "if true, Skaffold will send --wait flag to Helm CLI.", + "default": "false" + } + }, + "preferredOrder": [ + "name", + "chartPath", + "remoteChart", + "valuesFiles", + "artifactOverrides", + "namespace", + "version", + "setValues", + "setValueTemplates", + "setFiles", + "createNamespace", + "wait", + "recreatePods", + "skipBuildDependencies", + "useHelmSecrets", + "repo", + "upgradeOnChange", + "overrides", + "packaged", + "imageStrategy" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a helm release to be deployed.", + "x-intellij-html-description": "describes a helm release to be deployed." + }, + "HostHook": { + "required": [ + "command" + ], + "properties": { + "command": { + "items": { + "type": "string" + }, + "type": "array", + "description": "command to execute.", + "x-intellij-html-description": "command to execute.", + "default": "[]" + }, + "os": { + "items": { + "type": "string" + }, + "type": "array", + "description": "an optional slice of operating system names. If the host machine OS is different, then it skips execution.", + "x-intellij-html-description": "an optional slice of operating system names. If the host machine OS is different, then it skips execution.", + "default": "[]" + } + }, + "preferredOrder": [ + "command", + "os" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a lifecycle hook definition to execute on the host machine.", + "x-intellij-html-description": "describes a lifecycle hook definition to execute on the host machine." + }, + "InputDigest": { + "type": "object", + "description": "*beta* tags hashes the image content.", + "x-intellij-html-description": "beta tags hashes the image content." + }, + "JSONPatch": { + "required": [ + "path" + ], + "properties": { + "from": { + "type": "string", + "description": "source position in the yaml, used for `copy` or `move` operations.", + "x-intellij-html-description": "source position in the yaml, used for copy or move operations." + }, + "op": { + "type": "string", + "description": "operation carried by the patch: `add`, `remove`, `replace`, `move`, `copy` or `test`.", + "x-intellij-html-description": "operation carried by the patch: add, remove, replace, move, copy or test.", + "default": "replace" + }, + "path": { + "type": "string", + "description": "position in the yaml where the operation takes place. For example, this targets the `dockerfile` of the first artifact built.", + "x-intellij-html-description": "position in the yaml where the operation takes place. For example, this targets the dockerfile of the first artifact built.", + "examples": [ + "/build/artifacts/0/docker/dockerfile" + ] + }, + "value": { + "description": "value to apply. Can be any portion of yaml.", + "x-intellij-html-description": "value to apply. Can be any portion of yaml." + } + }, + "preferredOrder": [ + "op", + "path", + "from", + "value" + ], + "additionalProperties": false, + "type": "object", + "description": "patch to be applied by a profile.", + "x-intellij-html-description": "patch to be applied by a profile." + }, + "JibArtifact": { + "properties": { + "args": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional build flags passed to the builder.", + "x-intellij-html-description": "additional build flags passed to the builder.", + "default": "[]", + "examples": [ + "[\"--no-build-cache\"]" + ] + }, + "fromImage": { + "type": "string", + "description": "overrides the configured jib base image.", + "x-intellij-html-description": "overrides the configured jib base image." + }, + "project": { + "type": "string", + "description": "selects which sub-project to build for multi-module builds.", + "x-intellij-html-description": "selects which sub-project to build for multi-module builds." + }, + "type": { + "type": "string", + "description": "the Jib builder type; normally determined automatically. Valid types are `maven`: for Maven. `gradle`: for Gradle.", + "x-intellij-html-description": "the Jib builder type; normally determined automatically. Valid types are maven: for Maven. gradle: for Gradle.", + "enum": [ + "maven", + "gradle" + ] + } + }, + "preferredOrder": [ + "project", + "args", + "type", + "fromImage" + ], + "additionalProperties": false, + "type": "object", + "description": "builds images using the [Jib plugins for Maven and Gradle](https://github.com/GoogleContainerTools/jib/).", + "x-intellij-html-description": "builds images using the Jib plugins for Maven and Gradle." + }, + "KanikoArtifact": { + "properties": { + "buildArgs": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "arguments passed to the docker build. It also accepts environment variables and generated values via the go template syntax. Exposed generated values: IMAGE_REPO, IMAGE_NAME, IMAGE_TAG.", + "x-intellij-html-description": "arguments passed to the docker build. It also accepts environment variables and generated values via the go template syntax. Exposed generated values: IMAGEREPO, IMAGENAME, IMAGE_TAG.", + "default": "{}", + "examples": [ + "{\"key1\": \"value1\", \"key2\": \"value2\", \"key3\": \"'{{.ENV_VARIABLE}}'\"}" + ] + }, + "cache": { + "$ref": "#/definitions/KanikoCache", + "description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds.", + "x-intellij-html-description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds." + }, + "cleanup": { + "type": "boolean", + "description": "to clean the filesystem at the end of the build.", + "x-intellij-html-description": "to clean the filesystem at the end of the build.", + "default": "false" + }, + "digestFile": { + "type": "string", + "description": "to specify a file in the container. This file will receive the digest of a built image. This can be used to automatically track the exact image built by kaniko.", + "x-intellij-html-description": "to specify a file in the container. This file will receive the digest of a built image. This can be used to automatically track the exact image built by kaniko." + }, + "dockerfile": { + "type": "string", + "description": "locates the Dockerfile relative to workspace.", + "x-intellij-html-description": "locates the Dockerfile relative to workspace.", + "default": "Dockerfile" + }, + "env": { + "items": {}, + "type": "array", + "description": "environment variables passed to the kaniko pod. It also accepts environment variables via the go template syntax.", + "x-intellij-html-description": "environment variables passed to the kaniko pod. It also accepts environment variables via the go template syntax.", + "default": "[]", + "examples": [ + "[{\"name\": \"key1\", \"value\": \"value1\"}, {\"name\": \"key2\", \"value\": \"value2\"}, {\"name\": \"key3\", \"value\": \"'{{.ENV_VARIABLE}}'\"}]" + ] + }, + "force": { + "type": "boolean", + "description": "building outside of a container.", + "x-intellij-html-description": "building outside of a container.", + "default": "false" + }, + "image": { + "type": "string", + "description": "Docker image used by the Kaniko pod. Defaults to the latest released version of `gcr.io/kaniko-project/executor`.", + "x-intellij-html-description": "Docker image used by the Kaniko pod. Defaults to the latest released version of gcr.io/kaniko-project/executor." + }, + "imageNameWithDigestFile": { + "type": "string", + "description": "specify a file to save the image name with digest of the built image to.", + "x-intellij-html-description": "specify a file to save the image name with digest of the built image to." + }, + "initImage": { + "type": "string", + "description": "image used to run init container which mounts kaniko context.", + "x-intellij-html-description": "image used to run init container which mounts kaniko context." + }, + "insecure": { + "type": "boolean", + "description": "if you want to push images to a plain HTTP registry.", + "x-intellij-html-description": "if you want to push images to a plain HTTP registry.", + "default": "false" + }, + "insecurePull": { + "type": "boolean", + "description": "if you want to pull images from a plain HTTP registry.", + "x-intellij-html-description": "if you want to pull images from a plain HTTP registry.", + "default": "false" + }, + "insecureRegistry": { + "items": { + "type": "string" + }, + "type": "array", + "description": "to use plain HTTP requests when accessing a registry.", + "x-intellij-html-description": "to use plain HTTP requests when accessing a registry.", + "default": "[]" + }, + "label": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "key: value to set some metadata to the final image. This is equivalent as using the LABEL within the Dockerfile.", + "x-intellij-html-description": "key: value to set some metadata to the final image. This is equivalent as using the LABEL within the Dockerfile.", + "default": "{}" + }, + "logFormat": { + "type": "string", + "description": " to set the log format.", + "x-intellij-html-description": " to set the log format." + }, + "logTimestamp": { + "type": "boolean", + "description": "to add timestamps to log format.", + "x-intellij-html-description": "to add timestamps to log format.", + "default": "false" + }, + "noPush": { + "type": "boolean", + "description": "if you only want to build the image, without pushing to a registry.", + "x-intellij-html-description": "if you only want to build the image, without pushing to a registry.", + "default": "false" + }, + "ociLayoutPath": { + "type": "string", + "description": "to specify a directory in the container where the OCI image layout of a built image will be placed. This can be used to automatically track the exact image built by kaniko.", + "x-intellij-html-description": "to specify a directory in the container where the OCI image layout of a built image will be placed. This can be used to automatically track the exact image built by kaniko." + }, + "registryCertificate": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "description": "to provide a certificate for TLS communication with a given registry. my.registry.url: /path/to/the/certificate.cert is the expected format.", + "x-intellij-html-description": "to provide a certificate for TLS communication with a given registry. my.registry.url: /path/to/the/certificate.cert is the expected format.", + "default": "{}" + }, + "registryMirror": { + "type": "string", + "description": "if you want to use a registry mirror instead of default `index.docker.io`.", + "x-intellij-html-description": "if you want to use a registry mirror instead of default index.docker.io." + }, + "reproducible": { + "type": "boolean", + "description": "used to strip timestamps out of the built image.", + "x-intellij-html-description": "used to strip timestamps out of the built image.", + "default": "false" + }, + "singleSnapshot": { + "type": "boolean", + "description": "takes a single snapshot of the filesystem at the end of the build. So only one layer will be appended to the base image.", + "x-intellij-html-description": "takes a single snapshot of the filesystem at the end of the build. So only one layer will be appended to the base image.", + "default": "false" + }, + "skipTLS": { + "type": "boolean", + "description": "skips TLS certificate validation when pushing to a registry.", + "x-intellij-html-description": "skips TLS certificate validation when pushing to a registry.", + "default": "false" + }, + "skipTLSVerifyPull": { + "type": "boolean", + "description": "skips TLS certificate validation when pulling from a registry.", + "x-intellij-html-description": "skips TLS certificate validation when pulling from a registry.", + "default": "false" + }, + "skipTLSVerifyRegistry": { + "items": { + "type": "string" + }, + "type": "array", + "description": "skips TLS certificate validation when accessing a registry.", + "x-intellij-html-description": "skips TLS certificate validation when accessing a registry.", + "default": "[]" + }, + "skipUnusedStages": { + "type": "boolean", + "description": "builds only used stages if defined to true. Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile.", + "x-intellij-html-description": "builds only used stages if defined to true. Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile.", + "default": "false" + }, + "snapshotMode": { + "type": "string", + "description": "how Kaniko will snapshot the filesystem.", + "x-intellij-html-description": "how Kaniko will snapshot the filesystem." + }, + "tarPath": { + "type": "string", + "description": "path to save the image as a tarball at path instead of pushing the image.", + "x-intellij-html-description": "path to save the image as a tarball at path instead of pushing the image." + }, + "target": { + "type": "string", + "description": "to indicate which build stage is the target build stage.", + "x-intellij-html-description": "to indicate which build stage is the target build stage." + }, + "useNewRun": { + "type": "boolean", + "description": "to Use the experimental run implementation for detecting changes without requiring file system snapshots. In some cases, this may improve build performance by 75%.", + "x-intellij-html-description": "to Use the experimental run implementation for detecting changes without requiring file system snapshots. In some cases, this may improve build performance by 75%.", + "default": "false" + }, + "verbosity": { + "type": "string", + "description": " to set the logging level.", + "x-intellij-html-description": " to set the logging level." + }, + "volumeMounts": { + "items": {}, + "type": "array", + "description": "volume mounts passed to kaniko pod.", + "x-intellij-html-description": "volume mounts passed to kaniko pod.", + "default": "[]" + }, + "whitelistVarRun": { + "type": "boolean", + "description": "used to ignore `/var/run` when taking image snapshot. Set it to false to preserve /var/run/* in destination image.", + "x-intellij-html-description": "used to ignore /var/run when taking image snapshot. Set it to false to preserve /var/run/* in destination image.", + "default": "false" + } + }, + "preferredOrder": [ + "cleanup", + "insecure", + "insecurePull", + "noPush", + "force", + "logTimestamp", + "reproducible", + "singleSnapshot", + "skipTLS", + "skipTLSVerifyPull", + "skipUnusedStages", + "useNewRun", + "whitelistVarRun", + "dockerfile", + "target", + "initImage", + "image", + "digestFile", + "imageNameWithDigestFile", + "logFormat", + "ociLayoutPath", + "registryMirror", + "snapshotMode", + "tarPath", + "verbosity", + "insecureRegistry", + "skipTLSVerifyRegistry", + "env", + "cache", + "registryCertificate", + "label", + "buildArgs", + "volumeMounts" + ], + "additionalProperties": false, + "type": "object", + "description": "describes an artifact built from a Dockerfile, with kaniko.", + "x-intellij-html-description": "describes an artifact built from a Dockerfile, with kaniko." + }, + "KanikoCache": { + "properties": { + "hostPath": { + "type": "string", + "description": "specifies a path on the host that is mounted to each pod as read only cache volume containing base images. If set, must exist on each node and prepopulated with kaniko-warmer.", + "x-intellij-html-description": "specifies a path on the host that is mounted to each pod as read only cache volume containing base images. If set, must exist on each node and prepopulated with kaniko-warmer." + }, + "repo": { + "type": "string", + "description": "a remote repository to store cached layers. If none is specified, one will be inferred from the image name. See [Kaniko Caching](https://github.com/GoogleContainerTools/kaniko#caching).", + "x-intellij-html-description": "a remote repository to store cached layers. If none is specified, one will be inferred from the image name. See Kaniko Caching." + }, + "ttl": { + "type": "string", + "description": "Cache timeout in hours.", + "x-intellij-html-description": "Cache timeout in hours." + } + }, + "preferredOrder": [ + "repo", + "hostPath", + "ttl" + ], + "additionalProperties": false, + "type": "object", + "description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds.", + "x-intellij-html-description": "configures Kaniko caching. If a cache is specified, Kaniko will use a remote cache which will speed up builds." + }, + "KptApplyInventory": { + "properties": { + "dir": { + "type": "string", + "description": "equivalent to the dir in `kpt live apply `. If not provided, kpt deployer will create a hidden directory `.kpt-hydrated` to store the manipulated resource output and the kpt inventory-template.yaml file.", + "x-intellij-html-description": "equivalent to the dir in kpt live apply <dir>. If not provided, kpt deployer will create a hidden directory .kpt-hydrated to store the manipulated resource output and the kpt inventory-template.yaml file." + }, + "inventoryID": { + "type": "string", + "description": "*alpha* identifier for a group of applied resources. This value is only needed when the `kpt live` is working on a pre-applied cluster resources.", + "x-intellij-html-description": "alpha identifier for a group of applied resources. This value is only needed when the kpt live is working on a pre-applied cluster resources." + }, + "inventoryNamespace": { + "type": "string", + "description": "*alpha* sets the inventory namespace.", + "x-intellij-html-description": "alpha sets the inventory namespace." + } + }, + "preferredOrder": [ + "dir", + "inventoryID", + "inventoryNamespace" + ], + "additionalProperties": false, + "type": "object", + "description": "sets the kpt inventory directory.", + "x-intellij-html-description": "sets the kpt inventory directory." + }, + "KptApplyOptions": { + "properties": { + "pollPeriod": { + "type": "string", + "description": "sets for the polling period for resource statuses. Default to 2s.", + "x-intellij-html-description": "sets for the polling period for resource statuses. Default to 2s." + }, + "prunePropagationPolicy": { + "type": "string", + "description": "sets the propagation policy for pruning. Possible settings are Background, Foreground, Orphan. Default to \"Background\".", + "x-intellij-html-description": "sets the propagation policy for pruning. Possible settings are Background, Foreground, Orphan. Default to "Background"." + }, + "pruneTimeout": { + "type": "string", + "description": "sets the time threshold to wait for all pruned resources to be deleted.", + "x-intellij-html-description": "sets the time threshold to wait for all pruned resources to be deleted." + }, + "reconcileTimeout": { + "type": "string", + "description": "sets the time threshold to wait for all resources to reach the current status.", + "x-intellij-html-description": "sets the time threshold to wait for all resources to reach the current status." + } + }, + "preferredOrder": [ + "pollPeriod", + "prunePropagationPolicy", + "pruneTimeout", + "reconcileTimeout" + ], + "additionalProperties": false, + "type": "object", + "description": "adds additional configurations used when calling `kpt live apply`.", + "x-intellij-html-description": "adds additional configurations used when calling kpt live apply." + }, + "KptDeploy": { + "required": [ + "dir" + ], + "properties": { + "dir": { + "type": "string", + "description": "path to the config directory (Required). By default, the Dir contains the application configurations, [kustomize config files](https://kubectl.docs.kubernetes.io/pages/examples/kustomize.html) and [declarative kpt functions](https://googlecontainertools.github.io/kpt/guides/consumer/function/#declarative-run).", + "x-intellij-html-description": "path to the config directory (Required). By default, the Dir contains the application configurations, kustomize config files and declarative kpt functions." + }, + "fn": { + "$ref": "#/definitions/KptFn", + "description": "adds additional configurations for `kpt fn`.", + "x-intellij-html-description": "adds additional configurations for kpt fn." + }, + "live": { + "$ref": "#/definitions/KptLive", + "description": "adds additional configurations for `kpt live`.", + "x-intellij-html-description": "adds additional configurations for kpt live." + } + }, + "preferredOrder": [ + "dir", + "fn", + "live" + ], + "additionalProperties": false, + "type": "object", + "description": "*alpha* uses the `kpt` CLI to manage and deploy manifests.", + "x-intellij-html-description": "alpha uses the kpt CLI to manage and deploy manifests." + }, + "KptFn": { + "properties": { + "fnPath": { + "type": "string", + "description": "directory to discover the declarative kpt functions. If not provided, kpt deployer uses `kpt.Dir`.", + "x-intellij-html-description": "directory to discover the declarative kpt functions. If not provided, kpt deployer uses kpt.Dir." + }, + "globalScope": { + "type": "boolean", + "description": "sets the global scope for the kpt functions. see `kpt help fn run`.", + "x-intellij-html-description": "sets the global scope for the kpt functions. see kpt help fn run.", + "default": "false" + }, + "image": { + "type": "string", + "description": "a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath will be ignored.", + "x-intellij-html-description": "a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath will be ignored." + }, + "mount": { + "items": { + "type": "string" + }, + "type": "array", + "description": "a list of storage options to mount to the fn image.", + "x-intellij-html-description": "a list of storage options to mount to the fn image.", + "default": "[]" + }, + "network": { + "type": "boolean", + "description": "enables network access for the kpt function containers.", + "x-intellij-html-description": "enables network access for the kpt function containers.", + "default": "false" + }, + "networkName": { + "type": "string", + "description": "docker network name to run the kpt function containers (default \"bridge\").", + "x-intellij-html-description": "docker network name to run the kpt function containers (default "bridge")." + }, + "sinkDir": { + "type": "string", + "description": "directory to where the manipulated resource output is stored.", + "x-intellij-html-description": "directory to where the manipulated resource output is stored." + } + }, + "preferredOrder": [ + "fnPath", + "image", + "networkName", + "globalScope", + "network", + "mount", + "sinkDir" + ], + "additionalProperties": false, + "type": "object", + "description": "adds additional configurations used when calling `kpt fn`.", + "x-intellij-html-description": "adds additional configurations used when calling kpt fn." + }, + "KptLive": { + "properties": { + "apply": { + "$ref": "#/definitions/KptApplyInventory", + "description": "sets the kpt inventory directory.", + "x-intellij-html-description": "sets the kpt inventory directory." + }, + "options": { + "$ref": "#/definitions/KptApplyOptions", + "description": "adds additional configurations for `kpt live apply` commands.", + "x-intellij-html-description": "adds additional configurations for kpt live apply commands." + } + }, + "preferredOrder": [ + "apply", + "options" + ], + "additionalProperties": false, + "type": "object", + "description": "adds additional configurations used when calling `kpt live`.", + "x-intellij-html-description": "adds additional configurations used when calling kpt live." + }, + "KubectlDeploy": { + "properties": { + "defaultNamespace": { + "type": "string", + "description": "default namespace passed to kubectl on deployment if no other override is given.", + "x-intellij-html-description": "default namespace passed to kubectl on deployment if no other override is given." + }, + "flags": { + "$ref": "#/definitions/KubectlFlags", + "description": "additional flags passed to `kubectl`.", + "x-intellij-html-description": "additional flags passed to kubectl." + }, + "manifests": { + "items": { + "type": "string" + }, + "type": "array", + "description": "the Kubernetes yaml or json manifests.", + "x-intellij-html-description": "the Kubernetes yaml or json manifests.", + "default": "[\"k8s/*.yaml\"]" + }, + "remoteManifests": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Kubernetes manifests in remote clusters.", + "x-intellij-html-description": "Kubernetes manifests in remote clusters.", + "default": "[]" + } + }, + "preferredOrder": [ + "manifests", + "remoteManifests", + "flags", + "defaultNamespace" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* uses a client side `kubectl apply` to deploy manifests. You'll need a `kubectl` CLI version installed that's compatible with your cluster.", + "x-intellij-html-description": "beta uses a client side kubectl apply to deploy manifests. You'll need a kubectl CLI version installed that's compatible with your cluster." + }, + "KubectlFlags": { + "properties": { + "apply": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on creations (`kubectl apply`).", + "x-intellij-html-description": "additional flags passed on creations (kubectl apply).", + "default": "[]" + }, + "delete": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on deletions (`kubectl delete`).", + "x-intellij-html-description": "additional flags passed on deletions (kubectl delete).", + "default": "[]" + }, + "disableValidation": { + "type": "boolean", + "description": "passes the `--validate=false` flag to supported `kubectl` commands when enabled.", + "x-intellij-html-description": "passes the --validate=false flag to supported kubectl commands when enabled.", + "default": "false" + }, + "global": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional flags passed on every command.", + "x-intellij-html-description": "additional flags passed on every command.", + "default": "[]" + } + }, + "preferredOrder": [ + "global", + "apply", + "delete", + "disableValidation" + ], + "additionalProperties": false, + "type": "object", + "description": "additional flags passed on the command line to kubectl either on every command (Global), on creations (Apply) or deletions (Delete).", + "x-intellij-html-description": "additional flags passed on the command line to kubectl either on every command (Global), on creations (Apply) or deletions (Delete)." + }, + "KustomizeDeploy": { + "properties": { + "buildArgs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional args passed to `kustomize build`.", + "x-intellij-html-description": "additional args passed to kustomize build.", + "default": "[]" + }, + "defaultNamespace": { + "type": "string", + "description": "default namespace passed to kubectl on deployment if no other override is given.", + "x-intellij-html-description": "default namespace passed to kubectl on deployment if no other override is given." + }, + "flags": { + "$ref": "#/definitions/KubectlFlags", + "description": "additional flags passed to `kubectl`.", + "x-intellij-html-description": "additional flags passed to kubectl." + }, + "paths": { + "items": { + "type": "string" + }, + "type": "array", + "description": "path to Kustomization files.", + "x-intellij-html-description": "path to Kustomization files.", + "default": "[\".\"]" + } + }, + "preferredOrder": [ + "paths", + "flags", + "buildArgs", + "defaultNamespace" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* uses the `kustomize` CLI to \"patch\" a deployment for a target environment.", + "x-intellij-html-description": "beta uses the kustomize CLI to "patch" a deployment for a target environment." + }, + "LocalBuild": { + "properties": { + "concurrency": { + "type": "integer", + "description": "how many artifacts can be built concurrently. 0 means \"no-limit\".", + "x-intellij-html-description": "how many artifacts can be built concurrently. 0 means "no-limit".", + "default": "1" + }, + "push": { + "type": "boolean", + "description": "should images be pushed to a registry. If not specified, images are pushed only if the current Kubernetes context connects to a remote cluster.", + "x-intellij-html-description": "should images be pushed to a registry. If not specified, images are pushed only if the current Kubernetes context connects to a remote cluster." + }, + "tryImportMissing": { + "type": "boolean", + "description": "whether to attempt to import artifacts from Docker (either a local or remote registry) if not in the cache.", + "x-intellij-html-description": "whether to attempt to import artifacts from Docker (either a local or remote registry) if not in the cache.", + "default": "false" + }, + "useBuildkit": { + "type": "boolean", + "description": "use BuildKit to build Docker images.", + "x-intellij-html-description": "use BuildKit to build Docker images.", + "default": "false" + }, + "useDockerCLI": { + "type": "boolean", + "description": "use `docker` command-line interface instead of Docker Engine APIs.", + "x-intellij-html-description": "use docker command-line interface instead of Docker Engine APIs.", + "default": "false" + } + }, + "preferredOrder": [ + "push", + "tryImportMissing", + "useDockerCLI", + "useBuildkit", + "concurrency" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* describes how to do a build on the local docker daemon and optionally push to a repository.", + "x-intellij-html-description": "beta describes how to do a build on the local docker daemon and optionally push to a repository." + }, + "LogsConfig": { + "properties": { + "prefix": { + "type": "string", + "description": "defines the prefix shown on each log line. Valid values are `container`: prefix logs lines with the name of the container. `podAndContainer`: prefix logs lines with the names of the pod and of the container. `auto`: same as `podAndContainer` except that the pod name is skipped if it's the same as the container name. `none`: don't add a prefix.", + "x-intellij-html-description": "defines the prefix shown on each log line. Valid values are container: prefix logs lines with the name of the container. podAndContainer: prefix logs lines with the names of the pod and of the container. auto: same as podAndContainer except that the pod name is skipped if it's the same as the container name. none: don't add a prefix.", + "default": "auto", + "enum": [ + "container", + "podAndContainer", + "auto", + "none" + ] + } + }, + "preferredOrder": [ + "prefix" + ], + "additionalProperties": false, + "type": "object", + "description": "configures how container logs are printed as a result of a deployment.", + "x-intellij-html-description": "configures how container logs are printed as a result of a deployment." + }, + "Metadata": { + "properties": { + "name": { + "type": "string", + "description": "an identifier for the project.", + "x-intellij-html-description": "an identifier for the project." + } + }, + "preferredOrder": [ + "name" + ], + "additionalProperties": false, + "type": "object", + "description": "holds an optional name of the project.", + "x-intellij-html-description": "holds an optional name of the project." + }, + "NamedContainerHook": { + "required": [ + "podName", + "command" + ], + "properties": { + "command": { + "items": { + "type": "string" + }, + "type": "array", + "description": "command to execute.", + "x-intellij-html-description": "command to execute.", + "default": "[]" + }, + "containerName": { + "type": "string", + "description": "name of the container to execute the command in.", + "x-intellij-html-description": "name of the container to execute the command in." + }, + "podName": { + "type": "string", + "description": "name of the pod to execute the command in.", + "x-intellij-html-description": "name of the pod to execute the command in." + } + }, + "preferredOrder": [ + "command", + "podName", + "containerName" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a lifecycle hook definition to execute on a named container.", + "x-intellij-html-description": "describes a lifecycle hook definition to execute on a named container." + }, + "PortForwardResource": { + "properties": { + "address": { + "type": "string", + "description": "local address to bind to. Defaults to the loopback address 127.0.0.1.", + "x-intellij-html-description": "local address to bind to. Defaults to the loopback address 127.0.0.1." + }, + "localPort": { + "type": "integer", + "description": "local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. *Optional*.", + "x-intellij-html-description": "local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. Optional." + }, + "namespace": { + "type": "string", + "description": "namespace of the resource to port forward.", + "x-intellij-html-description": "namespace of the resource to port forward." + }, + "port": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "description": "resource port that will be forwarded.", + "x-intellij-html-description": "resource port that will be forwarded." + }, + "resourceName": { + "type": "string", + "description": "name of the Kubernetes resource to port forward.", + "x-intellij-html-description": "name of the Kubernetes resource to port forward." + }, + "resourceType": { + "type": "string", + "description": "Kubernetes type that should be port forwarded. Acceptable resource types include: `Service`, `Pod` and Controller resource type that has a pod spec: `ReplicaSet`, `ReplicationController`, `Deployment`, `StatefulSet`, `DaemonSet`, `Job`, `CronJob`.", + "x-intellij-html-description": "Kubernetes type that should be port forwarded. Acceptable resource types include: Service, Pod and Controller resource type that has a pod spec: ReplicaSet, ReplicationController, Deployment, StatefulSet, DaemonSet, Job, CronJob." + } + }, + "preferredOrder": [ + "resourceType", + "resourceName", + "namespace", + "port", + "address", + "localPort" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a resource to port forward.", + "x-intellij-html-description": "describes a resource to port forward." + }, + "Profile": { + "required": [ + "name" + ], + "properties": { + "activation": { + "items": { + "$ref": "#/definitions/Activation" + }, + "type": "array", + "description": "criteria by which a profile can be auto-activated. The profile is auto-activated if any one of the activations are triggered. An activation is triggered if all of the criteria (env, kubeContext, command) are triggered.", + "x-intellij-html-description": "criteria by which a profile can be auto-activated. The profile is auto-activated if any one of the activations are triggered. An activation is triggered if all of the criteria (env, kubeContext, command) are triggered." + }, + "build": { + "$ref": "#/definitions/BuildConfig", + "description": "describes how images are built.", + "x-intellij-html-description": "describes how images are built." + }, + "deploy": { + "$ref": "#/definitions/DeployConfig", + "description": "describes how images are deployed.", + "x-intellij-html-description": "describes how images are deployed." + }, + "name": { + "type": "string", + "description": "a unique profile name.", + "x-intellij-html-description": "a unique profile name.", + "examples": [ + "profile-prod" + ] + }, + "patches": { + "items": { + "$ref": "#/definitions/JSONPatch" + }, + "type": "array", + "description": "patches applied to the configuration. Patches use the JSON patch notation.", + "x-intellij-html-description": "patches applied to the configuration. Patches use the JSON patch notation." + }, + "portForward": { + "items": { + "$ref": "#/definitions/PortForwardResource" + }, + "type": "array", + "description": "describes user defined resources to port-forward.", + "x-intellij-html-description": "describes user defined resources to port-forward." + }, + "test": { + "items": { + "$ref": "#/definitions/TestCase" + }, + "type": "array", + "description": "describes how images are tested.", + "x-intellij-html-description": "describes how images are tested." + } + }, + "preferredOrder": [ + "name", + "activation", + "patches", + "build", + "test", + "deploy", + "portForward" + ], + "additionalProperties": false, + "type": "object", + "description": "used to override any `build`, `test` or `deploy` configuration.", + "x-intellij-html-description": "used to override any build, test or deploy configuration." + }, + "ProfileDependency": { + "required": [ + "name" + ], + "properties": { + "activatedBy": { + "items": { + "type": "string" + }, + "type": "array", + "description": "describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated.", + "x-intellij-html-description": "describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated.", + "default": "[]" + }, + "name": { + "type": "string", + "description": "describes name of the profile to activate in the dependency config. It should exist in the dependency config.", + "x-intellij-html-description": "describes name of the profile to activate in the dependency config. It should exist in the dependency config." + } + }, + "preferredOrder": [ + "name", + "activatedBy" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a mapping from referenced config profiles to the current config profiles. If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles.", + "x-intellij-html-description": "describes a mapping from referenced config profiles to the current config profiles. If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles." + }, + "ResourceRequirement": { + "properties": { + "cpu": { + "type": "string", + "description": "the number cores to be used.", + "x-intellij-html-description": "the number cores to be used.", + "examples": [ + "2`, `2.0` or `200m" + ] + }, + "ephemeralStorage": { + "type": "string", + "description": "the amount of Ephemeral storage to allocate to the pod.", + "x-intellij-html-description": "the amount of Ephemeral storage to allocate to the pod.", + "examples": [ + "1Gi` or `1000Mi" + ] + }, + "memory": { + "type": "string", + "description": "the amount of memory to allocate to the pod.", + "x-intellij-html-description": "the amount of memory to allocate to the pod.", + "examples": [ + "1Gi` or `1000Mi" + ] + }, + "resourceStorage": { + "type": "string", + "description": "the amount of resource storage to allocate to the pod.", + "x-intellij-html-description": "the amount of resource storage to allocate to the pod.", + "examples": [ + "1Gi` or `1000Mi" + ] + } + }, + "preferredOrder": [ + "cpu", + "memory", + "ephemeralStorage", + "resourceStorage" + ], + "additionalProperties": false, + "type": "object", + "description": "stores the CPU/Memory requirements for the pod.", + "x-intellij-html-description": "stores the CPU/Memory requirements for the pod." + }, + "ResourceRequirements": { + "properties": { + "limits": { + "$ref": "#/definitions/ResourceRequirement", + "description": "[resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod.", + "x-intellij-html-description": "resource limits for the Kaniko pod." + }, + "requests": { + "$ref": "#/definitions/ResourceRequirement", + "description": "[resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod.", + "x-intellij-html-description": "resource requests for the Kaniko pod." + } + }, + "preferredOrder": [ + "requests", + "limits" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the resource requirements for the kaniko pod.", + "x-intellij-html-description": "describes the resource requirements for the kaniko pod." + }, + "ResourceType": { + "type": "string", + "description": "describes the Kubernetes resource types used for port forwarding.", + "x-intellij-html-description": "describes the Kubernetes resource types used for port forwarding." + }, + "ShaTagger": { + "type": "object", + "description": "*beta* tags images with their sha256 digest.", + "x-intellij-html-description": "beta tags images with their sha256 digest." + }, + "SkaffoldConfig": { + "required": [ + "apiVersion", + "kind" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "version of the configuration.", + "x-intellij-html-description": "version of the configuration." + }, + "build": { + "$ref": "#/definitions/BuildConfig", + "description": "describes how images are built.", + "x-intellij-html-description": "describes how images are built." + }, + "deploy": { + "$ref": "#/definitions/DeployConfig", + "description": "describes how images are deployed.", + "x-intellij-html-description": "describes how images are deployed." + }, + "kind": { + "type": "string", + "description": "always `Config`.", + "x-intellij-html-description": "always Config.", + "default": "Config" + }, + "metadata": { + "$ref": "#/definitions/Metadata", + "description": "holds additional information about the config.", + "x-intellij-html-description": "holds additional information about the config." + }, + "portForward": { + "items": { + "$ref": "#/definitions/PortForwardResource" + }, + "type": "array", + "description": "describes user defined resources to port-forward.", + "x-intellij-html-description": "describes user defined resources to port-forward." + }, + "profiles": { + "items": { + "$ref": "#/definitions/Profile" + }, + "type": "array", + "description": "*beta* can override be used to `build`, `test` or `deploy` configuration.", + "x-intellij-html-description": "beta can override be used to build, test or deploy configuration." + }, + "requires": { + "items": { + "$ref": "#/definitions/ConfigDependency" + }, + "type": "array", + "description": "describes a list of other required configs for the current config.", + "x-intellij-html-description": "describes a list of other required configs for the current config." + }, + "test": { + "items": { + "$ref": "#/definitions/TestCase" + }, + "type": "array", + "description": "describes how images are tested.", + "x-intellij-html-description": "describes how images are tested." + } + }, + "preferredOrder": [ + "apiVersion", + "kind", + "metadata", + "requires", + "build", + "test", + "deploy", + "portForward", + "profiles" + ], + "additionalProperties": false, + "type": "object", + "description": "holds the fields parsed from the Skaffold configuration file (skaffold.yaml).", + "x-intellij-html-description": "holds the fields parsed from the Skaffold configuration file (skaffold.yaml)." + }, + "Sync": { + "properties": { + "auto": { + "type": "boolean", + "description": "delegates discovery of sync rules to the build system. Only available for jib and buildpacks.", + "x-intellij-html-description": "delegates discovery of sync rules to the build system. Only available for jib and buildpacks." + }, + "infer": { + "items": { + "type": "string" + }, + "type": "array", + "description": "file patterns which may be synced into the container The container destination is inferred by the builder based on the instructions of a Dockerfile. Available for docker and kaniko artifacts and custom artifacts that declare dependencies on a dockerfile.", + "x-intellij-html-description": "file patterns which may be synced into the container The container destination is inferred by the builder based on the instructions of a Dockerfile. Available for docker and kaniko artifacts and custom artifacts that declare dependencies on a dockerfile.", + "default": "[]" + }, + "manual": { + "items": { + "$ref": "#/definitions/SyncRule" + }, + "type": "array", + "description": "manual sync rules indicating the source and destination.", + "x-intellij-html-description": "manual sync rules indicating the source and destination." + } + }, + "preferredOrder": [ + "manual", + "infer", + "auto" + ], + "additionalProperties": false, + "type": "object", + "description": "*beta* specifies what files to sync into the container. This is a list of sync rules indicating the intent to sync for source files. If no files are listed, sync all the files and infer the destination.", + "x-intellij-html-description": "beta specifies what files to sync into the container. This is a list of sync rules indicating the intent to sync for source files. If no files are listed, sync all the files and infer the destination.", + "default": "infer: [\"**/*\"]" + }, + "SyncHookItem": { + "properties": { + "container": { + "$ref": "#/definitions/ContainerHook", + "description": "describes a single lifecycle hook to run on a container.", + "x-intellij-html-description": "describes a single lifecycle hook to run on a container." + }, + "host": { + "$ref": "#/definitions/HostHook", + "description": "describes a single lifecycle hook to run on the host machine.", + "x-intellij-html-description": "describes a single lifecycle hook to run on the host machine." + } + }, + "preferredOrder": [ + "host", + "container" + ], + "additionalProperties": false, + "type": "object", + "description": "describes a single lifecycle hook to execute before or after each artifact sync step.", + "x-intellij-html-description": "describes a single lifecycle hook to execute before or after each artifact sync step." + }, + "SyncHooks": { + "properties": { + "after": { + "items": { + "$ref": "#/definitions/SyncHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *after* each artifact sync step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute after each artifact sync step." + }, + "before": { + "items": { + "$ref": "#/definitions/SyncHookItem" + }, + "type": "array", + "description": "describes the list of lifecycle hooks to execute *before* each artifact sync step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before each artifact sync step." + } + }, + "preferredOrder": [ + "before", + "after" + ], + "additionalProperties": false, + "type": "object", + "description": "describes the list of lifecycle hooks to execute before and after each artifact sync step.", + "x-intellij-html-description": "describes the list of lifecycle hooks to execute before and after each artifact sync step." + }, + "SyncRule": { + "required": [ + "src", + "dest" + ], + "properties": { + "dest": { + "type": "string", + "description": "destination path in the container where the files should be synced to.", + "x-intellij-html-description": "destination path in the container where the files should be synced to.", + "examples": [ + "\"app/\"" + ] + }, + "src": { + "type": "string", + "description": "a glob pattern to match local paths against. Directories should be delimited by `/` on all platforms.", + "x-intellij-html-description": "a glob pattern to match local paths against. Directories should be delimited by / on all platforms.", + "examples": [ + "\"css/**/*.css\"" + ] + }, + "strip": { + "type": "string", + "description": "specifies the path prefix to remove from the source path when transplanting the files into the destination folder.", + "x-intellij-html-description": "specifies the path prefix to remove from the source path when transplanting the files into the destination folder.", + "examples": [ + "\"css/\"" + ] + } + }, + "preferredOrder": [ + "src", + "dest", + "strip" + ], + "additionalProperties": false, + "type": "object", + "description": "specifies which local files to sync to remote folders.", + "x-intellij-html-description": "specifies which local files to sync to remote folders." + }, + "TagPolicy": { + "properties": { + "customTemplate": { + "$ref": "#/definitions/CustomTemplateTagger", + "description": "*beta* tags images with a configurable template string *composed of other taggers*.", + "x-intellij-html-description": "beta tags images with a configurable template string composed of other taggers." + }, + "dateTime": { + "$ref": "#/definitions/DateTimeTagger", + "description": "*beta* tags images with the build timestamp.", + "x-intellij-html-description": "beta tags images with the build timestamp." + }, + "envTemplate": { + "$ref": "#/definitions/EnvTemplateTagger", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "gitCommit": { + "$ref": "#/definitions/GitTagger", + "description": "*beta* tags images with the git tag or commit of the artifact's workspace.", + "x-intellij-html-description": "beta tags images with the git tag or commit of the artifact's workspace." + }, + "inputDigest": { + "$ref": "#/definitions/InputDigest", + "description": "*beta* tags images with their sha256 digest of their content.", + "x-intellij-html-description": "beta tags images with their sha256 digest of their content." + }, + "sha256": { + "$ref": "#/definitions/ShaTagger", + "description": "*beta* tags images with their sha256 digest.", + "x-intellij-html-description": "beta tags images with their sha256 digest." + } + }, + "preferredOrder": [ + "gitCommit", + "sha256", + "envTemplate", + "dateTime", + "customTemplate", + "inputDigest" + ], + "additionalProperties": false, + "type": "object", + "description": "contains all the configuration for the tagging step.", + "x-intellij-html-description": "contains all the configuration for the tagging step." + }, + "TaggerComponent": { + "type": "object", + "anyOf": [ + { + "properties": { + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name" + ], + "additionalProperties": false + }, + { + "properties": { + "gitCommit": { + "$ref": "#/definitions/GitTagger", + "description": "*beta* tags images with the git tag or commit of the artifact's workspace.", + "x-intellij-html-description": "beta tags images with the git tag or commit of the artifact's workspace." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "gitCommit" + ], + "additionalProperties": false + }, + { + "properties": { + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + }, + "sha256": { + "$ref": "#/definitions/ShaTagger", + "description": "*beta* tags images with their sha256 digest.", + "x-intellij-html-description": "beta tags images with their sha256 digest." + } + }, + "preferredOrder": [ + "name", + "sha256" + ], + "additionalProperties": false + }, + { + "properties": { + "envTemplate": { + "$ref": "#/definitions/EnvTemplateTagger", + "description": "*beta* tags images with a configurable template string.", + "x-intellij-html-description": "beta tags images with a configurable template string." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "envTemplate" + ], + "additionalProperties": false + }, + { + "properties": { + "dateTime": { + "$ref": "#/definitions/DateTimeTagger", + "description": "*beta* tags images with the build timestamp.", + "x-intellij-html-description": "beta tags images with the build timestamp." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "dateTime" + ], + "additionalProperties": false + }, + { + "properties": { + "customTemplate": { + "$ref": "#/definitions/CustomTemplateTagger", + "description": "*beta* tags images with a configurable template string *composed of other taggers*.", + "x-intellij-html-description": "beta tags images with a configurable template string composed of other taggers." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "customTemplate" + ], + "additionalProperties": false + }, + { + "properties": { + "inputDigest": { + "$ref": "#/definitions/InputDigest", + "description": "*beta* tags images with their sha256 digest of their content.", + "x-intellij-html-description": "beta tags images with their sha256 digest of their content." + }, + "name": { + "type": "string", + "description": "an identifier for the component.", + "x-intellij-html-description": "an identifier for the component." + } + }, + "preferredOrder": [ + "name", + "inputDigest" + ], + "additionalProperties": false + } + ], + "description": "*beta* a component of CustomTemplateTagger.", + "x-intellij-html-description": "beta a component of CustomTemplateTagger." + }, + "TestCase": { + "required": [ + "image" + ], + "properties": { + "context": { + "type": "string", + "description": "directory containing the test sources.", + "x-intellij-html-description": "directory containing the test sources.", + "default": "." + }, + "custom": { + "items": { + "$ref": "#/definitions/CustomTest" + }, + "type": "array", + "description": "the set of custom tests to run after an artifact is built.", + "x-intellij-html-description": "the set of custom tests to run after an artifact is built." + }, + "image": { + "type": "string", + "description": "artifact on which to run those tests.", + "x-intellij-html-description": "artifact on which to run those tests.", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] + }, + "structureTests": { + "items": { + "type": "string" + }, + "type": "array", + "description": "the [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) to run on that artifact.", + "x-intellij-html-description": "the Container Structure Tests to run on that artifact.", + "default": "[]", + "examples": [ + "[\"./test/*\"]" + ] + }, + "structureTestsArgs": { + "items": { + "type": "string" + }, + "type": "array", + "description": "additional configuration arguments passed to `container-structure-test` binary.", + "x-intellij-html-description": "additional configuration arguments passed to container-structure-test binary.", + "default": "[]", + "examples": [ + "[\"--driver=tar\", \"--no-color\", \"-q\"]" + ] + } + }, + "preferredOrder": [ + "image", + "context", + "custom", + "structureTests", + "structureTestsArgs" + ], + "additionalProperties": false, + "type": "object", + "description": "a list of tests to run on images that Skaffold builds.", + "x-intellij-html-description": "a list of tests to run on images that Skaffold builds." + } + } +} diff --git a/integration/examples/bazel/skaffold.yaml b/integration/examples/bazel/skaffold.yaml index a5b0b6b5672..9b681e3be3a 100644 --- a/integration/examples/bazel/skaffold.yaml +++ b/integration/examples/bazel/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks-java/skaffold.yaml b/integration/examples/buildpacks-java/skaffold.yaml index 4fdd8fcf341..31a7c5ccb12 100644 --- a/integration/examples/buildpacks-java/skaffold.yaml +++ b/integration/examples/buildpacks-java/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks-node/skaffold.yaml b/integration/examples/buildpacks-node/skaffold.yaml index 52af709cbba..0cafe50e670 100644 --- a/integration/examples/buildpacks-node/skaffold.yaml +++ b/integration/examples/buildpacks-node/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks-python/skaffold.yaml b/integration/examples/buildpacks-python/skaffold.yaml index 6f94b11e235..a0bc157249a 100644 --- a/integration/examples/buildpacks-python/skaffold.yaml +++ b/integration/examples/buildpacks-python/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/buildpacks/skaffold.yaml b/integration/examples/buildpacks/skaffold.yaml index d3588f362b8..c8cb5b8f54e 100644 --- a/integration/examples/buildpacks/skaffold.yaml +++ b/integration/examples/buildpacks/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/custom-buildx/skaffold.yaml b/integration/examples/custom-buildx/skaffold.yaml index 0ff38c3abb1..e69d2a61e71 100644 --- a/integration/examples/custom-buildx/skaffold.yaml +++ b/integration/examples/custom-buildx/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: diff --git a/integration/examples/custom-tests/skaffold.yaml b/integration/examples/custom-tests/skaffold.yaml index ca824035cbd..39f5ae36aa9 100644 --- a/integration/examples/custom-tests/skaffold.yaml +++ b/integration/examples/custom-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/custom/skaffold.yaml b/integration/examples/custom/skaffold.yaml index dc96b26d7d0..b141a5c158f 100644 --- a/integration/examples/custom/skaffold.yaml +++ b/integration/examples/custom/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/gcb-kaniko/skaffold.yaml b/integration/examples/gcb-kaniko/skaffold.yaml index 61dbb59c7eb..7d05f3aee52 100644 --- a/integration/examples/gcb-kaniko/skaffold.yaml +++ b/integration/examples/gcb-kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: googleCloudBuild: diff --git a/integration/examples/generate-pipeline/skaffold.yaml b/integration/examples/generate-pipeline/skaffold.yaml index fe6ce5e3b9b..48121dd4d07 100644 --- a/integration/examples/generate-pipeline/skaffold.yaml +++ b/integration/examples/generate-pipeline/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/getting-started-kustomize/skaffold.yaml b/integration/examples/getting-started-kustomize/skaffold.yaml index 92c39d9c50f..96ad95c2a31 100644 --- a/integration/examples/getting-started-kustomize/skaffold.yaml +++ b/integration/examples/getting-started-kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: getting-started-kustomize diff --git a/integration/examples/getting-started/skaffold.yaml b/integration/examples/getting-started/skaffold.yaml index a0d647ceaeb..b42760be7f8 100644 --- a/integration/examples/getting-started/skaffold.yaml +++ b/integration/examples/getting-started/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/google-cloud-build/skaffold.yaml b/integration/examples/google-cloud-build/skaffold.yaml index a09b7b94e63..63d635fb236 100644 --- a/integration/examples/google-cloud-build/skaffold.yaml +++ b/integration/examples/google-cloud-build/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: googleCloudBuild: diff --git a/integration/examples/helm-deployment-dependencies/skaffold.yaml b/integration/examples/helm-deployment-dependencies/skaffold.yaml index dd01304e03e..1beeddbe0fa 100644 --- a/integration/examples/helm-deployment-dependencies/skaffold.yaml +++ b/integration/examples/helm-deployment-dependencies/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: tagPolicy: diff --git a/integration/examples/helm-deployment/skaffold.yaml b/integration/examples/helm-deployment/skaffold.yaml index 5e7b798b400..7c8d3201f8f 100644 --- a/integration/examples/helm-deployment/skaffold.yaml +++ b/integration/examples/helm-deployment/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/helm-remote-repo/skaffold.yaml b/integration/examples/helm-remote-repo/skaffold.yaml index 2c69f5d8895..fd85bc4490c 100644 --- a/integration/examples/helm-remote-repo/skaffold.yaml +++ b/integration/examples/helm-remote-repo/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config deploy: helm: diff --git a/integration/examples/hot-reload/skaffold.yaml b/integration/examples/hot-reload/skaffold.yaml index ae087dda5e5..8b2000cff3c 100644 --- a/integration/examples/hot-reload/skaffold.yaml +++ b/integration/examples/hot-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/jib-gradle/skaffold.yaml b/integration/examples/jib-gradle/skaffold.yaml index c1a538db90a..e45ee3eb3b2 100644 --- a/integration/examples/jib-gradle/skaffold.yaml +++ b/integration/examples/jib-gradle/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/jib-multimodule/skaffold.yaml b/integration/examples/jib-multimodule/skaffold.yaml index f5a643a86a2..0abca4d0364 100644 --- a/integration/examples/jib-multimodule/skaffold.yaml +++ b/integration/examples/jib-multimodule/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/jib-sync/skaffold-gradle.yaml b/integration/examples/jib-sync/skaffold-gradle.yaml index e60a5adc12e..ee55995d39d 100644 --- a/integration/examples/jib-sync/skaffold-gradle.yaml +++ b/integration/examples/jib-sync/skaffold-gradle.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/jib-sync/skaffold-maven.yaml b/integration/examples/jib-sync/skaffold-maven.yaml index 90f4ed86844..64913072233 100644 --- a/integration/examples/jib-sync/skaffold-maven.yaml +++ b/integration/examples/jib-sync/skaffold-maven.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/jib/skaffold.yaml b/integration/examples/jib/skaffold.yaml index d3a22ce5ce2..1a1b3ddce14 100644 --- a/integration/examples/jib/skaffold.yaml +++ b/integration/examples/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/kaniko/skaffold.yaml b/integration/examples/kaniko/skaffold.yaml index 3090303406c..bf57f772171 100644 --- a/integration/examples/kaniko/skaffold.yaml +++ b/integration/examples/kaniko/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/kustomize/skaffold-kustomize-args.yaml b/integration/examples/kustomize/skaffold-kustomize-args.yaml index 5dc96089794..a17ff2f3c7c 100644 --- a/integration/examples/kustomize/skaffold-kustomize-args.yaml +++ b/integration/examples/kustomize/skaffold-kustomize-args.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config deploy: kustomize: diff --git a/integration/examples/kustomize/skaffold.yaml b/integration/examples/kustomize/skaffold.yaml index 6b2216749e7..e7facf69257 100644 --- a/integration/examples/kustomize/skaffold.yaml +++ b/integration/examples/kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config deploy: kustomize: {} diff --git a/integration/examples/microservices/skaffold.yaml b/integration/examples/microservices/skaffold.yaml index a9da68e7d7a..949cc398daa 100644 --- a/integration/examples/microservices/skaffold.yaml +++ b/integration/examples/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/multi-config-microservices/base/skaffold.yaml b/integration/examples/multi-config-microservices/base/skaffold.yaml index 2436585792e..ed73efd2c37 100644 --- a/integration/examples/multi-config-microservices/base/skaffold.yaml +++ b/integration/examples/multi-config-microservices/base/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml b/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml index 19a5e82a121..447d6fa6d18 100644 --- a/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml +++ b/integration/examples/multi-config-microservices/leeroy-app/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: app-config diff --git a/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml b/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml index 3d4c45c88a6..c277e48e694 100644 --- a/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml +++ b/integration/examples/multi-config-microservices/leeroy-web/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: web-config diff --git a/integration/examples/multi-config-microservices/skaffold.yaml b/integration/examples/multi-config-microservices/skaffold.yaml index 03a07b81ed3..e6d4da19481 100644 --- a/integration/examples/multi-config-microservices/skaffold.yaml +++ b/integration/examples/multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config requires: - path: ./leeroy-app diff --git a/integration/examples/nodejs/skaffold.yaml b/integration/examples/nodejs/skaffold.yaml index 065692d3087..26d1d768767 100644 --- a/integration/examples/nodejs/skaffold.yaml +++ b/integration/examples/nodejs/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: diff --git a/integration/examples/profile-patches/skaffold.yaml b/integration/examples/profile-patches/skaffold.yaml index 1757efe6229..73a83e90cbc 100644 --- a/integration/examples/profile-patches/skaffold.yaml +++ b/integration/examples/profile-patches/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: # only build and deploy "base-service" on main profile diff --git a/integration/examples/profiles/skaffold.yaml b/integration/examples/profiles/skaffold.yaml index 152ae750aae..deb9daa9843 100644 --- a/integration/examples/profiles/skaffold.yaml +++ b/integration/examples/profiles/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: # only build and deploy "world-service" on main profile diff --git a/integration/examples/react-reload/skaffold.yaml b/integration/examples/react-reload/skaffold.yaml index 87caba6f0d8..dd92e3b22e3 100644 --- a/integration/examples/react-reload/skaffold.yaml +++ b/integration/examples/react-reload/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/remote-multi-config-microservices/skaffold.yaml b/integration/examples/remote-multi-config-microservices/skaffold.yaml index 01e29e70eb6..09d1e926a96 100644 --- a/integration/examples/remote-multi-config-microservices/skaffold.yaml +++ b/integration/examples/remote-multi-config-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config requires: - git: diff --git a/integration/examples/ruby/skaffold.yaml b/integration/examples/ruby/skaffold.yaml index 025a8a3966e..df65e0b13ce 100644 --- a/integration/examples/ruby/skaffold.yaml +++ b/integration/examples/ruby/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/simple-artifact-dependency/skaffold.yaml b/integration/examples/simple-artifact-dependency/skaffold.yaml index 2e3f7c69d21..6dc84438fcd 100644 --- a/integration/examples/simple-artifact-dependency/skaffold.yaml +++ b/integration/examples/simple-artifact-dependency/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/structure-tests/skaffold.yaml b/integration/examples/structure-tests/skaffold.yaml index 0837b660831..b6fb719f167 100644 --- a/integration/examples/structure-tests/skaffold.yaml +++ b/integration/examples/structure-tests/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/tagging-with-environment-variables/skaffold.yaml b/integration/examples/tagging-with-environment-variables/skaffold.yaml index 9e2ec8042a1..45e0fd69a4e 100644 --- a/integration/examples/tagging-with-environment-variables/skaffold.yaml +++ b/integration/examples/tagging-with-environment-variables/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/examples/templated-fields/skaffold.yaml b/integration/examples/templated-fields/skaffold.yaml index f9a969ddae9..6650a7a15e8 100644 --- a/integration/examples/templated-fields/skaffold.yaml +++ b/integration/examples/templated-fields/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: my-app diff --git a/integration/examples/typescript/skaffold.yaml b/integration/examples/typescript/skaffold.yaml index 83b11c4e0e4..e3b9b1a3917 100644 --- a/integration/examples/typescript/skaffold.yaml +++ b/integration/examples/typescript/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: diff --git a/integration/testdata/build-dependencies/skaffold.yaml b/integration/testdata/build-dependencies/skaffold.yaml index 448307119b4..b53d56b3598 100644 --- a/integration/testdata/build-dependencies/skaffold.yaml +++ b/integration/testdata/build-dependencies/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: tagPolicy: diff --git a/integration/testdata/build/secret/skaffold.yaml b/integration/testdata/build/secret/skaffold.yaml index 7955b73bc07..9c731008ef3 100644 --- a/integration/testdata/build/secret/skaffold.yaml +++ b/integration/testdata/build/secret/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: local: diff --git a/integration/testdata/build/skaffold.yaml b/integration/testdata/build/skaffold.yaml index 12a67f2732d..d6243e13f3c 100644 --- a/integration/testdata/build/skaffold.yaml +++ b/integration/testdata/build/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: local: diff --git a/integration/testdata/build/squash/skaffold.yaml b/integration/testdata/build/squash/skaffold.yaml index 6a08d2df6e8..914ec886bed 100644 --- a/integration/testdata/build/squash/skaffold.yaml +++ b/integration/testdata/build/squash/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/build/ssh/skaffold.yaml b/integration/testdata/build/ssh/skaffold.yaml index bc39442df92..5b82669b354 100644 --- a/integration/testdata/build/ssh/skaffold.yaml +++ b/integration/testdata/build/ssh/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: local: diff --git a/integration/testdata/custom-test/skaffold.yaml b/integration/testdata/custom-test/skaffold.yaml index 5ba5124a165..938c8da47fa 100644 --- a/integration/testdata/custom-test/skaffold.yaml +++ b/integration/testdata/custom-test/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/debug/skaffold.yaml b/integration/testdata/debug/skaffold.yaml index 2804b58d0bc..30f5786bdd8 100644 --- a/integration/testdata/debug/skaffold.yaml +++ b/integration/testdata/debug/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/deploy-multiple/skaffold.yaml b/integration/testdata/deploy-multiple/skaffold.yaml index 4dfceaa17b7..b81b5fee611 100644 --- a/integration/testdata/deploy-multiple/skaffold.yaml +++ b/integration/testdata/deploy-multiple/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/dev/skaffold.yaml b/integration/testdata/dev/skaffold.yaml index ff24bad8d3e..58a683d089e 100644 --- a/integration/testdata/dev/skaffold.yaml +++ b/integration/testdata/dev/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/diagnose/multi-config/diagnose.tmpl b/integration/testdata/diagnose/multi-config/diagnose.tmpl index 31ce9726fb6..04151ef4efe 100644 --- a/integration/testdata/diagnose/multi-config/diagnose.tmpl +++ b/integration/testdata/diagnose/multi-config/diagnose.tmpl @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: cfg2 @@ -19,7 +19,7 @@ deploy: logs: prefix: container --- -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: cfg3 @@ -40,7 +40,7 @@ deploy: logs: prefix: container --- -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/diagnose/multi-config/skaffold.yaml b/integration/testdata/diagnose/multi-config/skaffold.yaml index c24c805986b..ddf8761839f 100644 --- a/integration/testdata/diagnose/multi-config/skaffold.yaml +++ b/integration/testdata/diagnose/multi-config/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config requires: - path: ./skaffold2.yaml diff --git a/integration/testdata/diagnose/multi-config/skaffold2.yaml b/integration/testdata/diagnose/multi-config/skaffold2.yaml index ad7d463bd57..110288bafdf 100644 --- a/integration/testdata/diagnose/multi-config/skaffold2.yaml +++ b/integration/testdata/diagnose/multi-config/skaffold2.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: cfg2 diff --git a/integration/testdata/diagnose/multi-config/skaffold3.yaml b/integration/testdata/diagnose/multi-config/skaffold3.yaml index ce3d0ab1052..ce28bbf78f7 100644 --- a/integration/testdata/diagnose/multi-config/skaffold3.yaml +++ b/integration/testdata/diagnose/multi-config/skaffold3.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: cfg3 diff --git a/integration/testdata/diagnose/temp-config/diagnose.tmpl b/integration/testdata/diagnose/temp-config/diagnose.tmpl index 662b4eb9e27..20d5cf07fa6 100644 --- a/integration/testdata/diagnose/temp-config/diagnose.tmpl +++ b/integration/testdata/diagnose/temp-config/diagnose.tmpl @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/diagnose/temp-config/skaffold.yaml b/integration/testdata/diagnose/temp-config/skaffold.yaml index 5ceabd66cb8..9c083111fdf 100644 --- a/integration/testdata/diagnose/temp-config/skaffold.yaml +++ b/integration/testdata/diagnose/temp-config/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/gke_loadbalancer/skaffold.yaml b/integration/testdata/gke_loadbalancer/skaffold.yaml index 8c61bd245d9..20cbd8a569b 100644 --- a/integration/testdata/gke_loadbalancer/skaffold.yaml +++ b/integration/testdata/gke_loadbalancer/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/hello/skaffold.yaml b/integration/testdata/hello/skaffold.yaml index af3d8ee8a3e..3425ed254b7 100644 --- a/integration/testdata/hello/skaffold.yaml +++ b/integration/testdata/hello/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/init/compose/skaffold.yaml b/integration/testdata/init/compose/skaffold.yaml index 2438180086a..f12781300e8 100644 --- a/integration/testdata/init/compose/skaffold.yaml +++ b/integration/testdata/init/compose/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: compose diff --git a/integration/testdata/init/hello-with-manifest/skaffold.yaml b/integration/testdata/init/hello-with-manifest/skaffold.yaml index 7664c8e5037..6ee2ae02619 100644 --- a/integration/testdata/init/hello-with-manifest/skaffold.yaml +++ b/integration/testdata/init/hello-with-manifest/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: hello-with-manifest diff --git a/integration/testdata/inspect/cluster/skaffold.add.default.yaml b/integration/testdata/inspect/cluster/skaffold.add.default.yaml index d5e0c773e1d..368ecb97c01 100644 --- a/integration/testdata/inspect/cluster/skaffold.add.default.yaml +++ b/integration/testdata/inspect/cluster/skaffold.add.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.add.profile.yaml b/integration/testdata/inspect/cluster/skaffold.add.profile.yaml index ed6d1d4145a..efc9772b34f 100644 --- a/integration/testdata/inspect/cluster/skaffold.add.profile.yaml +++ b/integration/testdata/inspect/cluster/skaffold.add.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.cluster.yaml b/integration/testdata/inspect/cluster/skaffold.cluster.yaml index 490cba363cd..b5ff2f4ec5f 100644 --- a/integration/testdata/inspect/cluster/skaffold.cluster.yaml +++ b/integration/testdata/inspect/cluster/skaffold.cluster.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.local.yaml b/integration/testdata/inspect/cluster/skaffold.local.yaml index 496152e8a70..813d858f9ed 100644 --- a/integration/testdata/inspect/cluster/skaffold.local.yaml +++ b/integration/testdata/inspect/cluster/skaffold.local.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.modified.default.yaml b/integration/testdata/inspect/cluster/skaffold.modified.default.yaml index d30e55451fb..11e8e9ac67c 100644 --- a/integration/testdata/inspect/cluster/skaffold.modified.default.yaml +++ b/integration/testdata/inspect/cluster/skaffold.modified.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml b/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml index 5c98b568c6e..3ff24e0113f 100644 --- a/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml +++ b/integration/testdata/inspect/cluster/skaffold.modified.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.add.default.yaml b/integration/testdata/inspect/gcb/skaffold.add.default.yaml index 7968a1810a3..9a4cbea276b 100644 --- a/integration/testdata/inspect/gcb/skaffold.add.default.yaml +++ b/integration/testdata/inspect/gcb/skaffold.add.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.add.profile.yaml b/integration/testdata/inspect/gcb/skaffold.add.profile.yaml index 1bdce8f866a..96461871aba 100644 --- a/integration/testdata/inspect/gcb/skaffold.add.profile.yaml +++ b/integration/testdata/inspect/gcb/skaffold.add.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.gcb.yaml b/integration/testdata/inspect/gcb/skaffold.gcb.yaml index 3b1987ca21d..f3368852c97 100644 --- a/integration/testdata/inspect/gcb/skaffold.gcb.yaml +++ b/integration/testdata/inspect/gcb/skaffold.gcb.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.local.yaml b/integration/testdata/inspect/gcb/skaffold.local.yaml index db36bbcbb6a..328806b2008 100644 --- a/integration/testdata/inspect/gcb/skaffold.local.yaml +++ b/integration/testdata/inspect/gcb/skaffold.local.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.modified.default.yaml b/integration/testdata/inspect/gcb/skaffold.modified.default.yaml index c92008b7a9b..b2a045cebb7 100644 --- a/integration/testdata/inspect/gcb/skaffold.modified.default.yaml +++ b/integration/testdata/inspect/gcb/skaffold.modified.default.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml b/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml index aeb1cdbe3b5..a54f50e8a96 100644 --- a/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml +++ b/integration/testdata/inspect/gcb/skaffold.modified.profile.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/jib/skaffold.yaml b/integration/testdata/jib/skaffold.yaml index 0e37034ee3d..19a1e9bee15 100644 --- a/integration/testdata/jib/skaffold.yaml +++ b/integration/testdata/jib/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-explicit-repo/skaffold.yaml b/integration/testdata/kaniko-explicit-repo/skaffold.yaml index a04baf4b2c1..45934ba0b06 100644 --- a/integration/testdata/kaniko-explicit-repo/skaffold.yaml +++ b/integration/testdata/kaniko-explicit-repo/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml b/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml index a0d647ceaeb..b42760be7f8 100644 --- a/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml +++ b/integration/testdata/kaniko-insecure-registry/app/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-insecure-registry/skaffold.yaml b/integration/testdata/kaniko-insecure-registry/skaffold.yaml index b049683ee6a..d9276e95a65 100644 --- a/integration/testdata/kaniko-insecure-registry/skaffold.yaml +++ b/integration/testdata/kaniko-insecure-registry/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config profiles: - name: build-artifact diff --git a/integration/testdata/kaniko-microservices/skaffold.yaml b/integration/testdata/kaniko-microservices/skaffold.yaml index c5eb751b668..efb5949e7a4 100644 --- a/integration/testdata/kaniko-microservices/skaffold.yaml +++ b/integration/testdata/kaniko-microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-sub-folder/skaffold.yaml b/integration/testdata/kaniko-sub-folder/skaffold.yaml index 10aaad18a63..a5b612f33e9 100644 --- a/integration/testdata/kaniko-sub-folder/skaffold.yaml +++ b/integration/testdata/kaniko-sub-folder/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/kaniko-target/skaffold.yaml b/integration/testdata/kaniko-target/skaffold.yaml index f815d6440a0..7d7296f84d1 100644 --- a/integration/testdata/kaniko-target/skaffold.yaml +++ b/integration/testdata/kaniko-target/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/tagPolicy/skaffold.yaml b/integration/testdata/tagPolicy/skaffold.yaml index 93e2bdf3772..0f4a16d121f 100644 --- a/integration/testdata/tagPolicy/skaffold.yaml +++ b/integration/testdata/tagPolicy/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/integration/testdata/test-events/skaffold.yaml b/integration/testdata/test-events/skaffold.yaml index 28868437803..27714d21f0d 100644 --- a/integration/testdata/test-events/skaffold.yaml +++ b/integration/testdata/test-events/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: artifacts: diff --git a/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml index 92eee376be0..caf25cbecbb 100644 --- a/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/allcli/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: allcli diff --git a/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml index 853e108ac23..6c09401d6f6 100644 --- a/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/getting-started-kustomize/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: getting-started-kustomize diff --git a/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml index 038c48ced16..36a4a2c2594 100644 --- a/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/hello-no-manifest/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: hello diff --git a/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml index 599b9497af0..d8e86b9e2e3 100644 --- a/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/hello/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: hello diff --git a/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml index 0073704afc0..3ecfbd1a442 100644 --- a/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/ignore-tags/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: ignore-tags diff --git a/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml index 43d8ee718f4..511f91bdfe4 100644 --- a/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/microservices/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: microservices diff --git a/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml b/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml index af20c28494c..25a3cdbe329 100644 --- a/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml +++ b/pkg/skaffold/initializer/testdata/init/windows/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config metadata: name: windows diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index bc8e324b6e3..8a3f303fd73 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -25,8 +25,8 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" ) -// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file. -const Version string = "skaffold/v2beta19" +// This config version is not yet released, it is SAFE TO MODIFY the structs in this file. +const Version string = "skaffold/v2beta20" // NewSkaffoldConfig creates a SkaffoldConfig func NewSkaffoldConfig() util.VersionedConfig { diff --git a/pkg/skaffold/schema/v2beta18/upgrade.go b/pkg/skaffold/schema/v2beta18/upgrade.go index 5fe85b41d4a..6f7c7fe390d 100755 --- a/pkg/skaffold/schema/v2beta18/upgrade.go +++ b/pkg/skaffold/schema/v2beta18/upgrade.go @@ -17,8 +17,8 @@ limitations under the License. package v2beta18 import ( - next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta19" pkgutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" ) diff --git a/pkg/skaffold/schema/v2beta18/upgrade_test.go b/pkg/skaffold/schema/v2beta18/upgrade_test.go index 4f27c41f56a..951e729750c 100755 --- a/pkg/skaffold/schema/v2beta18/upgrade_test.go +++ b/pkg/skaffold/schema/v2beta18/upgrade_test.go @@ -19,7 +19,7 @@ package v2beta18 import ( "testing" - next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta19" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/schema/v2beta19/config.go b/pkg/skaffold/schema/v2beta19/config.go new file mode 100755 index 00000000000..68fba8059aa --- /dev/null +++ b/pkg/skaffold/schema/v2beta19/config.go @@ -0,0 +1,1564 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2beta19 + +import ( + "encoding/json" + + v1 "k8s.io/api/core/v1" + "sigs.k8s.io/kustomize/kyaml/yaml" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" +) + +// !!! WARNING !!! This config version is already released, please DO NOT MODIFY the structs in this file. +const Version string = "skaffold/v2beta19" + +// NewSkaffoldConfig creates a SkaffoldConfig +func NewSkaffoldConfig() util.VersionedConfig { + return new(SkaffoldConfig) +} + +// SkaffoldConfig holds the fields parsed from the Skaffold configuration file (skaffold.yaml). +type SkaffoldConfig struct { + // APIVersion is the version of the configuration. + APIVersion string `yaml:"apiVersion" yamltags:"required"` + + // Kind is always `Config`. Defaults to `Config`. + Kind string `yaml:"kind" yamltags:"required"` + + // Metadata holds additional information about the config. + Metadata Metadata `yaml:"metadata,omitempty"` + + // Dependencies describes a list of other required configs for the current config. + Dependencies []ConfigDependency `yaml:"requires,omitempty"` + + // Pipeline defines the Build/Test/Deploy phases. + Pipeline `yaml:",inline"` + + // Profiles *beta* can override be used to `build`, `test` or `deploy` configuration. + Profiles []Profile `yaml:"profiles,omitempty"` +} + +// Metadata holds an optional name of the project. +type Metadata struct { + // Name is an identifier for the project. + Name string `yaml:"name,omitempty"` +} + +// Pipeline describes a Skaffold pipeline. +type Pipeline struct { + // Build describes how images are built. + Build BuildConfig `yaml:"build,omitempty"` + + // Test describes how images are tested. + Test []*TestCase `yaml:"test,omitempty"` + + // Deploy describes how images are deployed. + Deploy DeployConfig `yaml:"deploy,omitempty"` + + // PortForward describes user defined resources to port-forward. + PortForward []*PortForwardResource `yaml:"portForward,omitempty"` +} + +// GitInfo contains information on the origin of skaffold configurations cloned from a git repository. +type GitInfo struct { + // Repo is the git repository the package should be cloned from. e.g. `https://github.com/GoogleContainerTools/skaffold.git`. + Repo string `yaml:"repo" yamltags:"required"` + + // Path is the relative path from the repo root to the skaffold configuration file. eg. `getting-started/skaffold.yaml`. + Path string `yaml:"path,omitempty"` + + // Ref is the git ref the package should be cloned from. eg. `master` or `main`. + Ref string `yaml:"ref,omitempty"` + + // Sync when set to `true` will reset the cached repository to the latest commit from remote on every run. To use the cached repository with uncommitted changes or unpushed commits, it needs to be set to `false`. + Sync *bool `yaml:"sync,omitempty"` +} + +// ConfigDependency describes a dependency on another skaffold configuration. +type ConfigDependency struct { + // Names includes specific named configs within the file path. If empty, then all configs in the file are included. + Names []string `yaml:"configs,omitempty"` + + // Path describes the path to the file containing the required configs. + Path string `yaml:"path,omitempty" skaffold:"filepath" yamltags:"oneOf=paths"` + + // GitRepo describes a remote git repository containing the required configs. + GitRepo *GitInfo `yaml:"git,omitempty" yamltags:"oneOf=paths"` + + // ActiveProfiles describes the list of profiles to activate when resolving the required configs. These profiles must exist in the imported config. + ActiveProfiles []ProfileDependency `yaml:"activeProfiles,omitempty"` +} + +// ProfileDependency describes a mapping from referenced config profiles to the current config profiles. +// If the current config is activated with a profile in this mapping then the dependency configs are also activated with the corresponding mapped profiles. +type ProfileDependency struct { + // Name describes name of the profile to activate in the dependency config. It should exist in the dependency config. + Name string `yaml:"name" yamltags:"required"` + + // ActivatedBy describes a list of profiles in the current config that when activated will also activate the named profile in the dependency config. If empty then the named profile is always activated. + ActivatedBy []string `yaml:"activatedBy,omitempty"` +} + +func (c *SkaffoldConfig) GetVersion() string { + return c.APIVersion +} + +// ResourceType describes the Kubernetes resource types used for port forwarding. +type ResourceType string + +// PortForwardResource describes a resource to port forward. +type PortForwardResource struct { + // Type is the Kubernetes type that should be port forwarded. + // Acceptable resource types include: `Service`, `Pod` and Controller resource type that has a pod spec: `ReplicaSet`, `ReplicationController`, `Deployment`, `StatefulSet`, `DaemonSet`, `Job`, `CronJob`. + Type ResourceType `yaml:"resourceType,omitempty"` + + // Name is the name of the Kubernetes resource to port forward. + Name string `yaml:"resourceName,omitempty"` + + // Namespace is the namespace of the resource to port forward. + Namespace string `yaml:"namespace,omitempty"` + + // Port is the resource port that will be forwarded. + Port util.IntOrString `yaml:"port,omitempty"` + + // Address is the local address to bind to. Defaults to the loopback address 127.0.0.1. + Address string `yaml:"address,omitempty"` + + // LocalPort is the local port to forward to. If the port is unavailable, Skaffold will choose a random open port to forward to. *Optional*. + LocalPort int `yaml:"localPort,omitempty"` +} + +// BuildConfig contains all the configuration for the build steps. +type BuildConfig struct { + // Artifacts lists the images you're going to be building. + Artifacts []*Artifact `yaml:"artifacts,omitempty"` + + // InsecureRegistries is a list of registries declared by the user to be insecure. + // These registries will be connected to via HTTP instead of HTTPS. + InsecureRegistries []string `yaml:"insecureRegistries,omitempty"` + + // TagPolicy *beta* determines how images are tagged. + // A few strategies are provided here, although you most likely won't need to care! + // If not specified, it defaults to `gitCommit: {variant: Tags}`. + TagPolicy TagPolicy `yaml:"tagPolicy,omitempty"` + + BuildType `yaml:",inline"` +} + +// TagPolicy contains all the configuration for the tagging step. +type TagPolicy struct { + // GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. + GitTagger *GitTagger `yaml:"gitCommit,omitempty" yamltags:"oneOf=tag"` + + // ShaTagger *beta* tags images with their sha256 digest. + ShaTagger *ShaTagger `yaml:"sha256,omitempty" yamltags:"oneOf=tag"` + + // EnvTemplateTagger *beta* tags images with a configurable template string. + EnvTemplateTagger *EnvTemplateTagger `yaml:"envTemplate,omitempty" yamltags:"oneOf=tag"` + + // DateTimeTagger *beta* tags images with the build timestamp. + DateTimeTagger *DateTimeTagger `yaml:"dateTime,omitempty" yamltags:"oneOf=tag"` + + // CustomTemplateTagger *beta* tags images with a configurable template string *composed of other taggers*. + CustomTemplateTagger *CustomTemplateTagger `yaml:"customTemplate,omitempty" yamltags:"oneOf=tag"` + + // InputDigest *beta* tags images with their sha256 digest of their content. + InputDigest *InputDigest `yaml:"inputDigest,omitempty" yamltags:"oneOf=tag"` +} + +// ShaTagger *beta* tags images with their sha256 digest. +type ShaTagger struct{} + +// InputDigest *beta* tags hashes the image content. +type InputDigest struct{} + +// GitTagger *beta* tags images with the git tag or commit of the artifact's workspace. +type GitTagger struct { + // Variant determines the behavior of the git tagger. Valid variants are: + // `Tags` (default): use git tags or fall back to abbreviated commit hash. + // `CommitSha`: use the full git commit sha. + // `AbbrevCommitSha`: use the abbreviated git commit sha. + // `TreeSha`: use the full tree hash of the artifact workingdir. + // `AbbrevTreeSha`: use the abbreviated tree hash of the artifact workingdir. + Variant string `yaml:"variant,omitempty"` + + // Prefix adds a fixed prefix to the tag. + Prefix string `yaml:"prefix,omitempty"` + + // IgnoreChanges specifies whether to omit the `-dirty` postfix if there are uncommitted changes. + IgnoreChanges bool `yaml:"ignoreChanges,omitempty"` +} + +// EnvTemplateTagger *beta* tags images with a configurable template string. +type EnvTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the current environment, + // with those variables injected. + // For example: `{{.RELEASE}}`. + Template string `yaml:"template,omitempty" yamltags:"required"` +} + +// DateTimeTagger *beta* tags images with the build timestamp. +type DateTimeTagger struct { + // Format formats the date and time. + // See [#Time.Format](https://golang.org/pkg/time/#Time.Format). + // Defaults to `2006-01-02_15-04-05.999_MST`. + Format string `yaml:"format,omitempty"` + + // TimeZone sets the timezone for the date and time. + // See [Time.LoadLocation](https://golang.org/pkg/time/#Time.LoadLocation). + // Defaults to the local timezone. + TimeZone string `yaml:"timezone,omitempty"` +} + +// CustomTemplateTagger *beta* tags images with a configurable template string. +type CustomTemplateTagger struct { + // Template used to produce the image name and tag. + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the provided components with those variables injected. + // For example: `{{.DATE}}` where DATE references a TaggerComponent. + Template string `yaml:"template,omitempty" yamltags:"required"` + + // Components lists TaggerComponents that the template (see field above) can be executed against. + Components []TaggerComponent `yaml:"components,omitempty"` +} + +// TaggerComponent *beta* is a component of CustomTemplateTagger. +type TaggerComponent struct { + // Name is an identifier for the component. + Name string `yaml:"name,omitempty"` + + // Component is a tagging strategy to be used in CustomTemplateTagger. + Component TagPolicy `yaml:",inline" yamltags:"skipTrim"` +} + +// BuildType contains the specific implementation and parameters needed +// for the build step. Only one field should be populated. +type BuildType struct { + // LocalBuild *beta* describes how to do a build on the local docker daemon + // and optionally push to a repository. + LocalBuild *LocalBuild `yaml:"local,omitempty" yamltags:"oneOf=build"` + + // GoogleCloudBuild *beta* describes how to do a remote build on + // [Google Cloud Build](https://cloud.google.com/cloud-build/). + GoogleCloudBuild *GoogleCloudBuild `yaml:"googleCloudBuild,omitempty" yamltags:"oneOf=build"` + + // Cluster *beta* describes how to do an on-cluster build. + Cluster *ClusterDetails `yaml:"cluster,omitempty" yamltags:"oneOf=build"` +} + +// LocalBuild *beta* describes how to do a build on the local docker daemon +// and optionally push to a repository. +type LocalBuild struct { + // Push should images be pushed to a registry. + // If not specified, images are pushed only if the current Kubernetes context + // connects to a remote cluster. + Push *bool `yaml:"push,omitempty"` + + // TryImportMissing whether to attempt to import artifacts from + // Docker (either a local or remote registry) if not in the cache. + TryImportMissing bool `yaml:"tryImportMissing,omitempty"` + + // UseDockerCLI use `docker` command-line interface instead of Docker Engine APIs. + UseDockerCLI bool `yaml:"useDockerCLI,omitempty"` + + // UseBuildkit use BuildKit to build Docker images. + UseBuildkit bool `yaml:"useBuildkit,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `1`. + Concurrency *int `yaml:"concurrency,omitempty"` +} + +// GoogleCloudBuild *beta* describes how to do a remote build on +// [Google Cloud Build](https://cloud.google.com/cloud-build/docs/). +// Docker and Jib artifacts can be built on Cloud Build. The `projectId` needs +// to be provided and the currently logged in user should be given permissions to trigger +// new builds. +type GoogleCloudBuild struct { + // ProjectID is the ID of your Cloud Platform Project. + // If it is not provided, Skaffold will guess it from the image name. + // For example, given the artifact image name `gcr.io/myproject/image`, Skaffold + // will use the `myproject` GCP project. + ProjectID string `yaml:"projectId,omitempty"` + + // DiskSizeGb is the disk size of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + DiskSizeGb int64 `yaml:"diskSizeGb,omitempty"` + + // MachineType is the type of the VM that runs the build. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions). + MachineType string `yaml:"machineType,omitempty"` + + // Timeout is the amount of time (in seconds) that this build should be allowed to run. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build). + Timeout string `yaml:"timeout,omitempty"` + + // Logging specifies the logging mode. + // Valid modes are: + // `LOGGING_UNSPECIFIED`: The service determines the logging mode. + // `LEGACY`: Stackdriver logging and Cloud Storage logging are enabled (default). + // `GCS_ONLY`: Only Cloud Storage logging is enabled. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#loggingmode). + Logging string `yaml:"logging,omitempty"` + + // LogStreamingOption specifies the behavior when writing build logs to Google Cloud Storage. + // Valid options are: + // `STREAM_DEFAULT`: Service may automatically determine build log streaming behavior. + // `STREAM_ON`: Build logs should be streamed to Google Cloud Storage. + // `STREAM_OFF`: Build logs should not be streamed to Google Cloud Storage; they will be written when the build is completed. + // See [Cloud Build Reference](https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#logstreamingoption). + LogStreamingOption string `yaml:"logStreamingOption,omitempty"` + + // DockerImage is the image that runs a Docker build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/docker`. + DockerImage string `yaml:"dockerImage,omitempty"` + + // KanikoImage is the image that runs a Kaniko build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/kaniko-project/executor`. + KanikoImage string `yaml:"kanikoImage,omitempty"` + + // MavenImage is the image that runs a Maven build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/mvn`. + MavenImage string `yaml:"mavenImage,omitempty"` + + // GradleImage is the image that runs a Gradle build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/cloud-builders/gradle`. + GradleImage string `yaml:"gradleImage,omitempty"` + + // PackImage is the image that runs a Cloud Native Buildpacks build. + // See [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders). + // Defaults to `gcr.io/k8s-skaffold/pack`. + PackImage string `yaml:"packImage,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // WorkerPool configures a pool of workers to run the build. + WorkerPool string `yaml:"workerPool,omitempty"` +} + +// KanikoCache configures Kaniko caching. If a cache is specified, Kaniko will +// use a remote cache which will speed up builds. +type KanikoCache struct { + // Repo is a remote repository to store cached layers. If none is specified, one will be + // inferred from the image name. See [Kaniko Caching](https://github.com/GoogleContainerTools/kaniko#caching). + Repo string `yaml:"repo,omitempty"` + // HostPath specifies a path on the host that is mounted to each pod as read only cache volume containing base images. + // If set, must exist on each node and prepopulated with kaniko-warmer. + HostPath string `yaml:"hostPath,omitempty"` + // TTL Cache timeout in hours. + TTL string `yaml:"ttl,omitempty"` +} + +// ClusterDetails *beta* describes how to do an on-cluster build. +type ClusterDetails struct { + // HTTPProxy for kaniko pod. + HTTPProxy string `yaml:"HTTP_PROXY,omitempty"` + + // HTTPSProxy for kaniko pod. + HTTPSProxy string `yaml:"HTTPS_PROXY,omitempty"` + + // PullSecretPath is the path to the Google Cloud service account secret key file. + PullSecretPath string `yaml:"pullSecretPath,omitempty"` + + // PullSecretName is the name of the Kubernetes secret for pulling base images + // and pushing the final image. If given, the secret needs to contain the Google Cloud + // service account secret key under the key `kaniko-secret`. + // Defaults to `kaniko-secret`. + PullSecretName string `yaml:"pullSecretName,omitempty"` + + // PullSecretMountPath is the path the pull secret will be mounted at within the running container. + PullSecretMountPath string `yaml:"pullSecretMountPath,omitempty"` + + // Namespace is the Kubernetes namespace. + // Defaults to current namespace in Kubernetes configuration. + Namespace string `yaml:"namespace,omitempty"` + + // Timeout is the amount of time (in seconds) that this build is allowed to run. + // Defaults to 20 minutes (`20m`). + Timeout string `yaml:"timeout,omitempty"` + + // DockerConfig describes how to mount the local Docker configuration into a pod. + DockerConfig *DockerConfig `yaml:"dockerConfig,omitempty"` + + // ServiceAccountName describes the Kubernetes service account to use for the pod. + // Defaults to 'default'. + ServiceAccountName string `yaml:"serviceAccount,omitempty"` + + // Tolerations describes the Kubernetes tolerations for the pod. + Tolerations []v1.Toleration `yaml:"tolerations,omitempty"` + + // NodeSelector describes the Kubernetes node selector for the pod. + NodeSelector map[string]string `yaml:"nodeSelector,omitempty"` + + // Annotations describes the Kubernetes annotations for the pod. + Annotations map[string]string `yaml:"annotations,omitempty"` + + // RunAsUser defines the UID to request for running the container. + // If omitted, no SecurityContext will be specified for the pod and will therefore be inherited + // from the service account. + RunAsUser *int64 `yaml:"runAsUser,omitempty"` + + // Resources define the resource requirements for the kaniko pod. + Resources *ResourceRequirements `yaml:"resources,omitempty"` + + // Concurrency is how many artifacts can be built concurrently. 0 means "no-limit". + // Defaults to `0`. + Concurrency int `yaml:"concurrency,omitempty"` + + // Volumes defines container mounts for ConfigMap and Secret resources. + Volumes []v1.Volume `yaml:"volumes,omitempty"` + + // RandomPullSecret adds a random UUID postfix to the default name of the pull secret to facilitate parallel builds, e.g. kaniko-secretdocker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomPullSecret bool `yaml:"randomPullSecret,omitempty"` + + // RandomDockerConfigSecret adds a random UUID postfix to the default name of the docker secret to facilitate parallel builds, e.g. docker-cfgfd154022-c761-416f-8eb3-cf8258450b85. + RandomDockerConfigSecret bool `yaml:"randomDockerConfigSecret,omitempty"` +} + +// DockerConfig contains information about the docker `config.json` to mount. +type DockerConfig struct { + // Path is the path to the docker `config.json`. + Path string `yaml:"path,omitempty"` + + // SecretName is the Kubernetes secret that contains the `config.json` Docker configuration. + // Note that the expected secret type is not 'kubernetes.io/dockerconfigjson' but 'Opaque'. + SecretName string `yaml:"secretName,omitempty"` +} + +// ResourceRequirements describes the resource requirements for the kaniko pod. +type ResourceRequirements struct { + // Requests [resource requests](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Requests *ResourceRequirement `yaml:"requests,omitempty"` + + // Limits [resource limits](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) for the Kaniko pod. + Limits *ResourceRequirement `yaml:"limits,omitempty"` +} + +// ResourceRequirement stores the CPU/Memory requirements for the pod. +type ResourceRequirement struct { + // CPU the number cores to be used. + // For example: `2`, `2.0` or `200m`. + CPU string `yaml:"cpu,omitempty"` + + // Memory the amount of memory to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + Memory string `yaml:"memory,omitempty"` + + // EphemeralStorage the amount of Ephemeral storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + EphemeralStorage string `yaml:"ephemeralStorage,omitempty"` + + // ResourceStorage the amount of resource storage to allocate to the pod. + // For example: `1Gi` or `1000Mi`. + ResourceStorage string `yaml:"resourceStorage,omitempty"` +} + +// TestCase is a list of tests to run on images that Skaffold builds. +type TestCase struct { + // ImageName is the artifact on which to run those tests. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image" yamltags:"required"` + + // Workspace is the directory containing the test sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // CustomTests lists the set of custom tests to run after an artifact is built. + CustomTests []CustomTest `yaml:"custom,omitempty"` + + // StructureTests lists the [Container Structure Tests](https://github.com/GoogleContainerTools/container-structure-test) + // to run on that artifact. + // For example: `["./test/*"]`. + StructureTests []string `yaml:"structureTests,omitempty" skaffold:"filepath"` + + // StructureTestArgs lists additional configuration arguments passed to `container-structure-test` binary. + // For example: `["--driver=tar", "--no-color", "-q"]`. + StructureTestArgs []string `yaml:"structureTestsArgs,omitempty"` +} + +// DeployConfig contains all the configuration needed by the deploy steps. +type DeployConfig struct { + DeployType `yaml:",inline"` + + // StatusCheck *beta* enables waiting for deployments to stabilize. + StatusCheck *bool `yaml:"statusCheck,omitempty"` + + // StatusCheckDeadlineSeconds *beta* is the deadline for deployments to stabilize in seconds. + StatusCheckDeadlineSeconds int `yaml:"statusCheckDeadlineSeconds,omitempty"` + + // KubeContext is the Kubernetes context that Skaffold should deploy to. + // For example: `minikube`. + KubeContext string `yaml:"kubeContext,omitempty"` + + // Logs configures how container logs are printed as a result of a deployment. + Logs LogsConfig `yaml:"logs,omitempty"` +} + +// DeployType contains the specific implementation and parameters needed +// for the deploy step. All three deployer types can be used at the same +// time for hybrid workflows. +type DeployType struct { + // HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. + HelmDeploy *HelmDeploy `yaml:"helm,omitempty"` + + // KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. + KptDeploy *KptDeploy `yaml:"kpt,omitempty"` + + // KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. + // You'll need a `kubectl` CLI version installed that's compatible with your cluster. + KubectlDeploy *KubectlDeploy `yaml:"kubectl,omitempty"` + + // KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. + KustomizeDeploy *KustomizeDeploy `yaml:"kustomize,omitempty"` +} + +// KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. +// You'll need a `kubectl` CLI version installed that's compatible with your cluster. +type KubectlDeploy struct { + // Manifests lists the Kubernetes yaml or json manifests. + // Defaults to `["k8s/*.yaml"]`. + Manifests []string `yaml:"manifests,omitempty" skaffold:"filepath"` + + // RemoteManifests lists Kubernetes manifests in remote clusters. + RemoteManifests []string `yaml:"remoteManifests,omitempty"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` +} + +// KubectlFlags are additional flags passed on the command +// line to kubectl either on every command (Global), on creations (Apply) +// or deletions (Delete). +type KubectlFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Apply are additional flags passed on creations (`kubectl apply`). + Apply []string `yaml:"apply,omitempty"` + + // Delete are additional flags passed on deletions (`kubectl delete`). + Delete []string `yaml:"delete,omitempty"` + + // DisableValidation passes the `--validate=false` flag to supported + // `kubectl` commands when enabled. + DisableValidation bool `yaml:"disableValidation,omitempty"` +} + +// HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. +type HelmDeploy struct { + // Releases is a list of Helm releases. + Releases []HelmRelease `yaml:"releases,omitempty" yamltags:"required"` + + // Flags are additional option flags that are passed on the command + // line to `helm`. + Flags HelmDeployFlags `yaml:"flags,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` +} + +// HelmDeployFlags are additional option flags that are passed on the command +// line to `helm`. +type HelmDeployFlags struct { + // Global are additional flags passed on every command. + Global []string `yaml:"global,omitempty"` + + // Install are additional flags passed to (`helm install`). + Install []string `yaml:"install,omitempty"` + + // Upgrade are additional flags passed to (`helm upgrade`). + Upgrade []string `yaml:"upgrade,omitempty"` +} + +// KustomizeDeploy *beta* uses the `kustomize` CLI to "patch" a deployment for a target environment. +type KustomizeDeploy struct { + // KustomizePaths is the path to Kustomization files. + // Defaults to `["."]`. + KustomizePaths []string `yaml:"paths,omitempty" skaffold:"filepath"` + + // Flags are additional flags passed to `kubectl`. + Flags KubectlFlags `yaml:"flags,omitempty"` + + // BuildArgs are additional args passed to `kustomize build`. + BuildArgs []string `yaml:"buildArgs,omitempty"` + + // DefaultNamespace is the default namespace passed to kubectl on deployment if no other override is given. + DefaultNamespace *string `yaml:"defaultNamespace,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` +} + +// KptDeploy *alpha* uses the `kpt` CLI to manage and deploy manifests. +type KptDeploy struct { + // Dir is the path to the config directory (Required). + // By default, the Dir contains the application configurations, + // [kustomize config files](https://kubectl.docs.kubernetes.io/pages/examples/kustomize.html) + // and [declarative kpt functions](https://googlecontainertools.github.io/kpt/guides/consumer/function/#declarative-run). + Dir string `yaml:"dir" yamltags:"required" skaffold:"filepath"` + + // Fn adds additional configurations for `kpt fn`. + Fn KptFn `yaml:"fn,omitempty"` + + // Live adds additional configurations for `kpt live`. + Live KptLive `yaml:"live,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after every deploy. + LifecycleHooks DeployHooks `yaml:"-"` +} + +// KptFn adds additional configurations used when calling `kpt fn`. +type KptFn struct { + // FnPath is the directory to discover the declarative kpt functions. + // If not provided, kpt deployer uses `kpt.Dir`. + FnPath string `yaml:"fnPath,omitempty" skaffold:"filepath"` + + // Image is a kpt function image to run the configs imperatively. If provided, kpt.fn.fnPath + // will be ignored. + Image string `yaml:"image,omitempty"` + + // NetworkName is the docker network name to run the kpt function containers (default "bridge"). + NetworkName string `yaml:"networkName,omitempty"` + + // GlobalScope sets the global scope for the kpt functions. see `kpt help fn run`. + GlobalScope bool `yaml:"globalScope,omitempty"` + + // Network enables network access for the kpt function containers. + Network bool `yaml:"network,omitempty"` + + // Mount is a list of storage options to mount to the fn image. + Mount []string `yaml:"mount,omitempty"` + + // SinkDir is the directory to where the manipulated resource output is stored. + SinkDir string `yaml:"sinkDir,omitempty" skaffold:"filepath"` +} + +// KptLive adds additional configurations used when calling `kpt live`. +type KptLive struct { + // Apply sets the kpt inventory directory. + Apply KptApplyInventory `yaml:"apply,omitempty"` + + // Options adds additional configurations for `kpt live apply` commands. + Options KptApplyOptions `yaml:"options,omitempty"` +} + +// KptApplyInventory sets the kpt inventory directory. +type KptApplyInventory struct { + // Dir is equivalent to the dir in `kpt live apply `. If not provided, + // kpt deployer will create a hidden directory `.kpt-hydrated` to store the manipulated + // resource output and the kpt inventory-template.yaml file. + Dir string `yaml:"dir,omitempty"` + + // InventoryID *alpha* is the identifier for a group of applied resources. + // This value is only needed when the `kpt live` is working on a pre-applied cluster resources. + InventoryID string `yaml:"inventoryID,omitempty"` + + // InventoryNamespace *alpha* sets the inventory namespace. + InventoryNamespace string `yaml:"inventoryNamespace,omitempty"` +} + +// KptApplyOptions adds additional configurations used when calling `kpt live apply`. +type KptApplyOptions struct { + // PollPeriod sets for the polling period for resource statuses. Default to 2s. + PollPeriod string `yaml:"pollPeriod,omitempty"` + + // PrunePropagationPolicy sets the propagation policy for pruning. + // Possible settings are Background, Foreground, Orphan. + // Default to "Background". + PrunePropagationPolicy string `yaml:"prunePropagationPolicy,omitempty"` + + // PruneTimeout sets the time threshold to wait for all pruned resources to be deleted. + PruneTimeout string `yaml:"pruneTimeout,omitempty"` + + // ReconcileTimeout sets the time threshold to wait for all resources to reach the current status. + ReconcileTimeout string `yaml:"reconcileTimeout,omitempty"` +} + +// HelmRelease describes a helm release to be deployed. +type HelmRelease struct { + // Name is the name of the Helm release. + // It accepts environment variables via the go template syntax. + Name string `yaml:"name,omitempty" yamltags:"required"` + + // ChartPath is the local path to a packaged Helm chart or an unpacked Helm chart directory. + ChartPath string `yaml:"chartPath,omitempty" yamltags:"oneOf=chartSource" skaffold:"filepath"` + + // RemoteChart refers to a remote Helm chart reference or URL. + RemoteChart string `yaml:"remoteChart,omitempty" yamltags:"oneOf=chartSource"` + + // ValuesFiles are the paths to the Helm `values` files. + ValuesFiles []string `yaml:"valuesFiles,omitempty" skaffold:"filepath"` + + // ArtifactOverrides are key value pairs where the + // key represents the parameter used in the `--set-string` Helm CLI flag to define a container + // image and the value corresponds to artifact i.e. `ImageName` defined in `Build.Artifacts` section. + // The resulting command-line is controlled by `ImageStrategy`. + ArtifactOverrides util.FlatMap `yaml:"artifactOverrides,omitempty"` + + // Namespace is the Kubernetes namespace. + Namespace string `yaml:"namespace,omitempty"` + + // Version is the version of the chart. + Version string `yaml:"version,omitempty"` + + // SetValues are key-value pairs. + // If present, Skaffold will send `--set` flag to Helm CLI and append all pairs after the flag. + SetValues util.FlatMap `yaml:"setValues,omitempty"` + + // SetValueTemplates are key-value pairs. + // If present, Skaffold will try to parse the value part of each key-value pair using + // environment variables in the system, then send `--set` flag to Helm CLI and append + // all parsed pairs after the flag. + SetValueTemplates util.FlatMap `yaml:"setValueTemplates,omitempty"` + + // SetFiles are key-value pairs. + // If present, Skaffold will send `--set-file` flag to Helm CLI and append all pairs after the flag. + SetFiles map[string]string `yaml:"setFiles,omitempty" skaffold:"filepath"` + + // CreateNamespace if `true`, Skaffold will send `--create-namespace` flag to Helm CLI. + // `--create-namespace` flag is available in Helm since version 3.2. + // Defaults is `false`. + CreateNamespace *bool `yaml:"createNamespace,omitempty"` + + // Wait if `true`, Skaffold will send `--wait` flag to Helm CLI. + // Defaults to `false`. + Wait bool `yaml:"wait,omitempty"` + + // RecreatePods if `true`, Skaffold will send `--recreate-pods` flag to Helm CLI + // when upgrading a new version of a chart in subsequent dev loop deploy. + // Defaults to `false`. + RecreatePods bool `yaml:"recreatePods,omitempty"` + + // SkipBuildDependencies should build dependencies be skipped. + // Ignored for `remoteChart`. + SkipBuildDependencies bool `yaml:"skipBuildDependencies,omitempty"` + + // UseHelmSecrets instructs skaffold to use secrets plugin on deployment. + UseHelmSecrets bool `yaml:"useHelmSecrets,omitempty"` + + // Repo specifies the helm repository for remote charts. + // If present, Skaffold will send `--repo` Helm CLI flag or flags. + Repo string `yaml:"repo,omitempty"` + + // UpgradeOnChange specifies whether to upgrade helm chart on code changes. + // Default is `true` when helm chart is local (has `chartPath`). + // Default is `false` when helm chart is remote (has `remoteChart`). + UpgradeOnChange *bool `yaml:"upgradeOnChange,omitempty"` + + // Overrides are key-value pairs. + // If present, Skaffold will build a Helm `values` file that overrides + // the original and use it to call Helm CLI (`--f` flag). + Overrides util.HelmOverrides `yaml:"overrides,omitempty"` + + // Packaged parameters for packaging helm chart (`helm package`). + Packaged *HelmPackaged `yaml:"packaged,omitempty"` + + // ImageStrategy controls how an `ArtifactOverrides` entry is + // turned into `--set-string` Helm CLI flag or flags. + ImageStrategy HelmImageStrategy `yaml:"imageStrategy,omitempty"` +} + +// HelmPackaged parameters for packaging helm chart (`helm package`). +type HelmPackaged struct { + // Version sets the `version` on the chart to this semver version. + Version string `yaml:"version,omitempty"` + + // AppVersion sets the `appVersion` on the chart to this version. + AppVersion string `yaml:"appVersion,omitempty"` +} + +// HelmImageStrategy adds image configurations to the Helm `values` file. +type HelmImageStrategy struct { + HelmImageConfig `yaml:",inline"` +} + +// HelmImageConfig describes an image configuration. +type HelmImageConfig struct { + // HelmFQNConfig is the image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`. + HelmFQNConfig *HelmFQNConfig `yaml:"fqn,omitempty" yamltags:"oneOf=helmImageStrategy"` + + // HelmConventionConfig is the image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`. + HelmConventionConfig *HelmConventionConfig `yaml:"helm,omitempty" yamltags:"oneOf=helmImageStrategy"` +} + +// HelmFQNConfig is the image config to use the FullyQualifiedImageName as param to set. +type HelmFQNConfig struct { + // Property defines the image config. + Property string `yaml:"property,omitempty"` +} + +// HelmConventionConfig is the image config in the syntax of image.repository and image.tag. +type HelmConventionConfig struct { + // ExplicitRegistry separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`. + ExplicitRegistry bool `yaml:"explicitRegistry,omitempty"` +} + +// LogsConfig configures how container logs are printed as a result of a deployment. +type LogsConfig struct { + // Prefix defines the prefix shown on each log line. Valid values are + // `container`: prefix logs lines with the name of the container. + // `podAndContainer`: prefix logs lines with the names of the pod and of the container. + // `auto`: same as `podAndContainer` except that the pod name is skipped if it's the same as the container name. + // `none`: don't add a prefix. + // Defaults to `auto`. + Prefix string `yaml:"prefix,omitempty"` +} + +// Artifact are the items that need to be built, along with the context in which +// they should be built. +type Artifact struct { + // ImageName is the name of the image to be built. + // For example: `gcr.io/k8s-skaffold/example`. + ImageName string `yaml:"image,omitempty" yamltags:"required"` + + // Workspace is the directory containing the artifact's sources. + // Defaults to `.`. + Workspace string `yaml:"context,omitempty" skaffold:"filepath"` + + // Sync *beta* lists local files synced to pods instead + // of triggering an image build when modified. + // If no files are listed, sync all the files and infer the destination. + // Defaults to `infer: ["**/*"]`. + Sync *Sync `yaml:"sync,omitempty"` + + // ArtifactType describes how to build an artifact. + ArtifactType `yaml:",inline"` + + // Dependencies describes build artifacts that this artifact depends on. + Dependencies []*ArtifactDependency `yaml:"requires,omitempty"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after each build of the target artifact. + LifecycleHooks BuildHooks `yaml:"-"` +} + +// Sync *beta* specifies what files to sync into the container. +// This is a list of sync rules indicating the intent to sync for source files. +// If no files are listed, sync all the files and infer the destination. +// Defaults to `infer: ["**/*"]`. +type Sync struct { + // Manual lists manual sync rules indicating the source and destination. + Manual []*SyncRule `yaml:"manual,omitempty" yamltags:"oneOf=sync"` + + // Infer lists file patterns which may be synced into the container + // The container destination is inferred by the builder + // based on the instructions of a Dockerfile. + // Available for docker and kaniko artifacts and custom + // artifacts that declare dependencies on a dockerfile. + Infer []string `yaml:"infer,omitempty" yamltags:"oneOf=sync"` + + // Auto delegates discovery of sync rules to the build system. + // Only available for jib and buildpacks. + Auto *bool `yaml:"auto,omitempty" yamltags:"oneOf=sync"` + + // LifecycleHooks describes a set of lifecycle hooks that are executed before and after each file sync action on the target artifact's containers. + LifecycleHooks SyncHooks `yaml:"-"` +} + +// SyncRule specifies which local files to sync to remote folders. +type SyncRule struct { + // Src is a glob pattern to match local paths against. + // Directories should be delimited by `/` on all platforms. + // For example: `"css/**/*.css"`. + Src string `yaml:"src,omitempty" yamltags:"required"` + + // Dest is the destination path in the container where the files should be synced to. + // For example: `"app/"` + Dest string `yaml:"dest,omitempty" yamltags:"required"` + + // Strip specifies the path prefix to remove from the source path when + // transplanting the files into the destination folder. + // For example: `"css/"` + Strip string `yaml:"strip,omitempty"` +} + +// Profile is used to override any `build`, `test` or `deploy` configuration. +type Profile struct { + // Name is a unique profile name. + // For example: `profile-prod`. + Name string `yaml:"name,omitempty" yamltags:"required"` + + // Activation criteria by which a profile can be auto-activated. + // The profile is auto-activated if any one of the activations are triggered. + // An activation is triggered if all of the criteria (env, kubeContext, command) are triggered. + Activation []Activation `yaml:"activation,omitempty"` + + // Patches lists patches applied to the configuration. + // Patches use the JSON patch notation. + Patches []JSONPatch `yaml:"patches,omitempty"` + + // Pipeline contains the definitions to replace the default skaffold pipeline. + Pipeline `yaml:",inline"` +} + +// JSONPatch patch to be applied by a profile. +type JSONPatch struct { + // Op is the operation carried by the patch: `add`, `remove`, `replace`, `move`, `copy` or `test`. + // Defaults to `replace`. + Op string `yaml:"op,omitempty"` + + // Path is the position in the yaml where the operation takes place. + // For example, this targets the `dockerfile` of the first artifact built. + // For example: `/build/artifacts/0/docker/dockerfile`. + Path string `yaml:"path,omitempty" yamltags:"required"` + + // From is the source position in the yaml, used for `copy` or `move` operations. + From string `yaml:"from,omitempty"` + + // Value is the value to apply. Can be any portion of yaml. + Value *util.YamlpatchNode `yaml:"value,omitempty"` +} + +// Activation criteria by which a profile is auto-activated. +type Activation struct { + // Env is a `key=pattern` pair. The profile is auto-activated if an Environment + // Variable `key` matches the pattern. If the pattern starts with `!`, activation + // happens if the remaining pattern is _not_ matched. The pattern matches if the + // Environment Variable value is exactly `pattern`, or the regex `pattern` is + // found in it. An empty `pattern` (e.g. `env: "key="`) always only matches if + // the Environment Variable is undefined or empty. + // For example: `ENV=production` + Env string `yaml:"env,omitempty"` + + // KubeContext is a Kubernetes context for which the profile is auto-activated. + // For example: `minikube`. + KubeContext string `yaml:"kubeContext,omitempty"` + + // Command is a Skaffold command for which the profile is auto-activated. + // For example: `dev`. + Command string `yaml:"command,omitempty"` +} + +// ArtifactType describes how to build an artifact. +type ArtifactType struct { + // DockerArtifact *beta* describes an artifact built from a Dockerfile. + DockerArtifact *DockerArtifact `yaml:"docker,omitempty" yamltags:"oneOf=artifact"` + + // BazelArtifact *beta* requires bazel CLI to be installed and the sources to + // contain [Bazel](https://bazel.build/) configuration files. + BazelArtifact *BazelArtifact `yaml:"bazel,omitempty" yamltags:"oneOf=artifact"` + + // JibArtifact builds images using the + // [Jib plugins for Maven or Gradle](https://github.com/GoogleContainerTools/jib/). + JibArtifact *JibArtifact `yaml:"jib,omitempty" yamltags:"oneOf=artifact"` + + // KanikoArtifact builds images using [kaniko](https://github.com/GoogleContainerTools/kaniko). + KanikoArtifact *KanikoArtifact `yaml:"kaniko,omitempty" yamltags:"oneOf=artifact"` + + // BuildpackArtifact builds images using [Cloud Native Buildpacks](https://buildpacks.io/). + BuildpackArtifact *BuildpackArtifact `yaml:"buildpacks,omitempty" yamltags:"oneOf=artifact"` + + // CustomArtifact *beta* builds images using a custom build script written by the user. + CustomArtifact *CustomArtifact `yaml:"custom,omitempty" yamltags:"oneOf=artifact"` +} + +// ArtifactDependency describes a specific build dependency for an artifact. +type ArtifactDependency struct { + // ImageName is a reference to an artifact's image name. + ImageName string `yaml:"image" yamltags:"required"` + // Alias is a token that is replaced with the image reference in the builder definition files. + // For example, the `docker` builder will use the alias as a build-arg key. + // Defaults to the value of `image`. + Alias string `yaml:"alias,omitempty"` +} + +// BuildpackArtifact *alpha* describes an artifact built using [Cloud Native Buildpacks](https://buildpacks.io/). +// It can be used to build images out of project's sources without any additional configuration. +type BuildpackArtifact struct { + // Builder is the builder image used. + Builder string `yaml:"builder" yamltags:"required"` + + // RunImage overrides the stack's default run image. + RunImage string `yaml:"runImage,omitempty"` + + // Env are environment variables, in the `key=value` form, passed to the build. + // Values can use the go template syntax. + // For example: `["key1=value1", "key2=value2", "key3={{.ENV_VARIABLE}}"]`. + Env []string `yaml:"env,omitempty"` + + // Buildpacks is a list of strings, where each string is a specific buildpack to use with the builder. + // If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. + // Order matters. + Buildpacks []string `yaml:"buildpacks,omitempty"` + + // TrustBuilder indicates that the builder should be trusted. + TrustBuilder bool `yaml:"trustBuilder,omitempty"` + + // ProjectDescriptor is the path to the project descriptor file. + // Defaults to `project.toml` if it exists. + ProjectDescriptor string `yaml:"projectDescriptor,omitempty"` + + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *BuildpackDependencies `yaml:"dependencies,omitempty"` + + // Volumes support mounting host volumes into the container. + Volumes *[]BuildpackVolume `yaml:"volumes,omitempty"` +} + +// BuildpackDependencies *alpha* is used to specify dependencies for an artifact built by buildpacks. +type BuildpackDependencies struct { + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// BuildpackVolume *alpha* is used to mount host volumes or directories in the build container. +type BuildpackVolume struct { + // Host is the local volume or absolute directory of the path to mount. + Host string `yaml:"host" skaffold:"filepath" yamltags:"required"` + + // Target is the path where the file or directory is available in the container. + // It is strongly recommended to not specify locations under `/cnb` or `/layers`. + Target string `yaml:"target" yamltags:"required"` + + // Options specify a list of comma-separated mount options. + // Valid options are: + // `ro` (default): volume contents are read-only. + // `rw`: volume contents are readable and writable. + // `volume-opt==`: can be specified more than once, takes a key-value pair. + Options string `yaml:"options,omitempty"` +} + +// CustomArtifact *beta* describes an artifact built from a custom build script +// written by the user. It can be used to build images with builders that aren't directly integrated with skaffold. +type CustomArtifact struct { + // BuildCommand is the command executed to build the image. + BuildCommand string `yaml:"buildCommand,omitempty"` + // Dependencies are the file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact. + Dependencies *CustomDependencies `yaml:"dependencies,omitempty"` +} + +// CustomDependencies *beta* is used to specify dependencies for an artifact built by a custom build script. +// Either `dockerfile` or `paths` should be specified for file watching to work as expected. +type CustomDependencies struct { + // Dockerfile should be set if the artifact is built from a Dockerfile, from which skaffold can determine dependencies. + Dockerfile *DockerfileDependency `yaml:"dockerfile,omitempty" yamltags:"oneOf=dependency"` + + // Command represents a custom command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization. + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both rebuilds and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// CustomTest describes the custom test command provided by the user. +// Custom tests are run after an image build whenever build or test dependencies are changed. +type CustomTest struct { + // Command is the custom command to be executed. If the command exits with a non-zero return + // code, the test will be considered to have failed. + Command string `yaml:"command" yamltags:"required"` + + // TimeoutSeconds sets the wait time for skaffold for the command to complete. + // If unset or 0, Skaffold will wait until the command completes. + TimeoutSeconds int `yaml:"timeoutSeconds,omitempty"` + + // Dependencies are additional test-specific file dependencies; changes to these files will re-run this test. + Dependencies *CustomTestDependencies `yaml:"dependencies,omitempty"` +} + +// CustomTestDependencies is used to specify dependencies for custom test command. +// `paths` should be specified for file watching to work as expected. +type CustomTestDependencies struct { + // Command represents a command that skaffold executes to obtain dependencies. The output of this command *must* be a valid JSON array. + Command string `yaml:"command,omitempty" yamltags:"oneOf=dependency"` + + // Paths locates the file dependencies for the command relative to workspace. + // Paths should be set to the file dependencies for this command, so that the skaffold file watcher knows when to retest and perform file synchronization. + // For example: `["src/test/**"]` + Paths []string `yaml:"paths,omitempty" yamltags:"oneOf=dependency"` + + // Ignore specifies the paths that should be ignored by skaffold's file watcher. If a file exists in both `paths` and in `ignore`, it will be ignored, and will be excluded from both retest and file synchronization. + // Will only work in conjunction with `paths`. + Ignore []string `yaml:"ignore,omitempty"` +} + +// DockerfileDependency *beta* is used to specify a custom build artifact that is built from a Dockerfile. This allows skaffold to determine dependencies from the Dockerfile. +type DockerfileDependency struct { + // Path locates the Dockerfile relative to workspace. + Path string `yaml:"path,omitempty"` + + // BuildArgs are key/value pairs used to resolve values of `ARG` instructions in a Dockerfile. + // Values can be constants or environment variables via the go template syntax. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` +} + +// KanikoArtifact describes an artifact built from a Dockerfile, +// with kaniko. +type KanikoArtifact struct { + + // Cleanup to clean the filesystem at the end of the build. + Cleanup bool `yaml:"cleanup,omitempty"` + + // Insecure if you want to push images to a plain HTTP registry. + Insecure bool `yaml:"insecure,omitempty"` + + // InsecurePull if you want to pull images from a plain HTTP registry. + InsecurePull bool `yaml:"insecurePull,omitempty"` + + // NoPush if you only want to build the image, without pushing to a registry. + NoPush bool `yaml:"noPush,omitempty"` + + // Force building outside of a container. + Force bool `yaml:"force,omitempty"` + + // LogTimestamp to add timestamps to log format. + LogTimestamp bool `yaml:"logTimestamp,omitempty"` + + // Reproducible is used to strip timestamps out of the built image. + Reproducible bool `yaml:"reproducible,omitempty"` + + // SingleSnapshot is takes a single snapshot of the filesystem at the end of the build. + // So only one layer will be appended to the base image. + SingleSnapshot bool `yaml:"singleSnapshot,omitempty"` + + // SkipTLS skips TLS certificate validation when pushing to a registry. + SkipTLS bool `yaml:"skipTLS,omitempty"` + + // SkipTLSVerifyPull skips TLS certificate validation when pulling from a registry. + SkipTLSVerifyPull bool `yaml:"skipTLSVerifyPull,omitempty"` + + // SkipUnusedStages builds only used stages if defined to true. + // Otherwise it builds by default all stages, even the unnecessaries ones until it reaches the target stage / end of Dockerfile. + SkipUnusedStages bool `yaml:"skipUnusedStages,omitempty"` + + // UseNewRun to Use the experimental run implementation for detecting changes without requiring file system snapshots. + // In some cases, this may improve build performance by 75%. + UseNewRun bool `yaml:"useNewRun,omitempty"` + + // WhitelistVarRun is used to ignore `/var/run` when taking image snapshot. + // Set it to false to preserve /var/run/* in destination image. + WhitelistVarRun bool `yaml:"whitelistVarRun,omitempty"` + + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is to indicate which build stage is the target build stage. + Target string `yaml:"target,omitempty"` + + // InitImage is the image used to run init container which mounts kaniko context. + InitImage string `yaml:"initImage,omitempty"` + + // Image is the Docker image used by the Kaniko pod. + // Defaults to the latest released version of `gcr.io/kaniko-project/executor`. + Image string `yaml:"image,omitempty"` + + // DigestFile to specify a file in the container. This file will receive the digest of a built image. + // This can be used to automatically track the exact image built by kaniko. + DigestFile string `yaml:"digestFile,omitempty"` + + // ImageNameWithDigestFile specify a file to save the image name with digest of the built image to. + ImageNameWithDigestFile string `yaml:"imageNameWithDigestFile,omitempty"` + + // LogFormat to set the log format. + LogFormat string `yaml:"logFormat,omitempty"` + + // OCILayoutPath is to specify a directory in the container where the OCI image layout of a built image will be placed. + // This can be used to automatically track the exact image built by kaniko. + OCILayoutPath string `yaml:"ociLayoutPath,omitempty"` + + // RegistryMirror if you want to use a registry mirror instead of default `index.docker.io`. + RegistryMirror string `yaml:"registryMirror,omitempty"` + + // SnapshotMode is how Kaniko will snapshot the filesystem. + SnapshotMode string `yaml:"snapshotMode,omitempty"` + + // TarPath is path to save the image as a tarball at path instead of pushing the image. + TarPath string `yaml:"tarPath,omitempty"` + + // Verbosity to set the logging level. + Verbosity string `yaml:"verbosity,omitempty"` + + // InsecureRegistry is to use plain HTTP requests when accessing a registry. + InsecureRegistry []string `yaml:"insecureRegistry,omitempty"` + + // SkipTLSVerifyRegistry skips TLS certificate validation when accessing a registry. + SkipTLSVerifyRegistry []string `yaml:"skipTLSVerifyRegistry,omitempty"` + + // Env are environment variables passed to the kaniko pod. + // It also accepts environment variables via the go template syntax. + // For example: `[{"name": "key1", "value": "value1"}, {"name": "key2", "value": "value2"}, {"name": "key3", "value": "'{{.ENV_VARIABLE}}'"}]`. + Env []v1.EnvVar `yaml:"env,omitempty"` + + // Cache configures Kaniko caching. If a cache is specified, Kaniko will + // use a remote cache which will speed up builds. + Cache *KanikoCache `yaml:"cache,omitempty"` + + // RegistryCertificate is to provide a certificate for TLS communication with a given registry. + // my.registry.url: /path/to/the/certificate.cert is the expected format. + RegistryCertificate map[string]*string `yaml:"registryCertificate,omitempty"` + + // Label key: value to set some metadata to the final image. + // This is equivalent as using the LABEL within the Dockerfile. + Label map[string]*string `yaml:"label,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // It also accepts environment variables and generated values via the go template syntax. + // Exposed generated values: IMAGE_REPO, IMAGE_NAME, IMAGE_TAG. + // For example: `{"key1": "value1", "key2": "value2", "key3": "'{{.ENV_VARIABLE}}'"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // VolumeMounts are volume mounts passed to kaniko pod. + VolumeMounts []v1.VolumeMount `yaml:"volumeMounts,omitempty"` +} + +// DockerArtifact describes an artifact built from a Dockerfile, +// usually using `docker build`. +type DockerArtifact struct { + // DockerfilePath locates the Dockerfile relative to workspace. + // Defaults to `Dockerfile`. + DockerfilePath string `yaml:"dockerfile,omitempty"` + + // Target is the Dockerfile target name to build. + Target string `yaml:"target,omitempty"` + + // BuildArgs are arguments passed to the docker build. + // For example: `{"key1": "value1", "key2": "{{ .ENV_VAR }}"}`. + BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` + + // NetworkMode is passed through to docker and overrides the + // network configuration of docker builder. If unset, use whatever + // is configured in the underlying docker daemon. Valid modes are + // `host`: use the host's networking stack. + // `bridge`: use the bridged network configuration. + // `container:`: reuse another container's network stack. + // `none`: no networking in the container. + NetworkMode string `yaml:"network,omitempty"` + + // AddHost lists add host. + // For example: `["host1:ip1", "host2:ip2"]`. + AddHost []string `yaml:"addHost,omitempty"` + + // CacheFrom lists the Docker images used as cache sources. + // For example: `["golang:1.10.1-alpine3.7", "alpine:3.7"]`. + CacheFrom []string `yaml:"cacheFrom,omitempty"` + + // NoCache used to pass in --no-cache to docker build to prevent caching. + NoCache bool `yaml:"noCache,omitempty"` + + // Squash is used to pass in --squash to docker build to squash docker image layers into single layer. + Squash bool `yaml:"squash,omitempty"` + + // Secret contains information about a local secret passed to `docker build`, + // along with optional destination information. + Secret *DockerSecret `yaml:"secret,omitempty"` + + // SSH is used to pass in --ssh to docker build to use SSH agent. Format is "default|[=|[,]]". + SSH string `yaml:"ssh,omitempty"` +} + +// DockerSecret contains information about a local secret passed to `docker build`, +// along with optional destination information. +type DockerSecret struct { + // ID is the id of the secret. + ID string `yaml:"id,omitempty" yamltags:"required"` + + // Source is the path to the secret on the host machine. + Source string `yaml:"src,omitempty"` +} + +// BazelArtifact describes an artifact built with [Bazel](https://bazel.build/). +type BazelArtifact struct { + // BuildTarget is the `bazel build` target to run. + // For example: `//:skaffold_example.tar`. + BuildTarget string `yaml:"target,omitempty" yamltags:"required"` + + // BuildArgs are additional args to pass to `bazel build`. + // For example: `["-flag", "--otherflag"]`. + BuildArgs []string `yaml:"args,omitempty"` +} + +// JibArtifact builds images using the +// [Jib plugins for Maven and Gradle](https://github.com/GoogleContainerTools/jib/). +type JibArtifact struct { + // Project selects which sub-project to build for multi-module builds. + Project string `yaml:"project,omitempty"` + + // Flags are additional build flags passed to the builder. + // For example: `["--no-build-cache"]`. + Flags []string `yaml:"args,omitempty"` + + // Type the Jib builder type; normally determined automatically. Valid types are + // `maven`: for Maven. + // `gradle`: for Gradle. + Type string `yaml:"type,omitempty"` + + // BaseImage overrides the configured jib base image. + BaseImage string `yaml:"fromImage,omitempty"` +} + +// BuildHooks describes the list of lifecycle hooks to execute before and after each artifact build step. +type BuildHooks struct { + // PreHooks describes the list of lifecycle hooks to execute *before* each artifact build step. + PreHooks []HostHook `yaml:"before,omitempty"` + // PostHooks describes the list of lifecycle hooks to execute *after* each artifact build step. + PostHooks []HostHook `yaml:"after,omitempty"` +} + +// SyncHookItem describes a single lifecycle hook to execute before or after each artifact sync step. +type SyncHookItem struct { + // HostHook describes a single lifecycle hook to run on the host machine. + HostHook *HostHook `yaml:"host,omitempty" yamltags:"oneOf=sync_hook"` + // ContainerHook describes a single lifecycle hook to run on a container. + ContainerHook *ContainerHook `yaml:"container,omitempty" yamltags:"oneOf=sync_hook"` +} + +// SyncHooks describes the list of lifecycle hooks to execute before and after each artifact sync step. +type SyncHooks struct { + // PreHooks describes the list of lifecycle hooks to execute *before* each artifact sync step. + PreHooks []SyncHookItem `yaml:"before,omitempty"` + // PostHooks describes the list of lifecycle hooks to execute *after* each artifact sync step. + PostHooks []SyncHookItem `yaml:"after,omitempty"` +} + +// DeployHookItem describes a single lifecycle hook to execute before or after each deployer step. +type DeployHookItem struct { + // HostHook describes a single lifecycle hook to run on the host machine. + HostHook *HostHook `yaml:"host,omitempty" yamltags:"oneOf=deploy_hook"` + // ContainerHook describes a single lifecycle hook to run on a container. + ContainerHook *NamedContainerHook `yaml:"container,omitempty" yamltags:"oneOf=deploy_hook"` +} + +// DeployHooks describes the list of lifecycle hooks to execute before and after each deployer step. +type DeployHooks struct { + // PreHooks describes the list of lifecycle hooks to execute *before* each deployer step. Container hooks will only run if the container exists from a previous deployment step (for instance the successive iterations of a dev-loop during `skaffold dev`). + PreHooks []DeployHookItem `yaml:"before,omitempty"` + // PostHooks describes the list of lifecycle hooks to execute *after* each deployer step. + PostHooks []DeployHookItem `yaml:"after,omitempty"` +} + +// HostHook describes a lifecycle hook definition to execute on the host machine. +type HostHook struct { + // Command is the command to execute. + Command []string `yaml:"command" yamltags:"required"` + // OS is an optional slice of operating system names. If the host machine OS is different, then it skips execution. + OS []string `yaml:"os,omitempty"` +} + +// ContainerHook describes a lifecycle hook definition to execute on a container. The container name is inferred from the scope in which this hook is defined. +type ContainerHook struct { + // Command is the command to execute. + Command []string `yaml:"command" yamltags:"required"` +} + +// NamedContainerHook describes a lifecycle hook definition to execute on a named container. +type NamedContainerHook struct { + // ContainerHook describes a lifecycle hook definition to execute on a container. + ContainerHook `yaml:",inline"` + // PodName is the name of the pod to execute the command in. + PodName string `yaml:"podName" yamltags:"required"` + // ContainerName is the name of the container to execute the command in. + ContainerName string `yaml:"containerName,omitempty"` +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type ClusterDetailsForUnmarshaling ClusterDetails + + volumes, remaining, err := util.UnmarshalClusterVolumes(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*ClusterDetailsForUnmarshaling)(clusterDetails) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + clusterDetails.Volumes = volumes + return nil +} + +// UnmarshalYAML provides a custom unmarshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) UnmarshalYAML(value *yaml.Node) error { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We unmarshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We deserialize the special fields as required. + type KanikoArtifactForUnmarshaling KanikoArtifact + + mounts, remaining, err := util.UnmarshalKanikoArtifact(value) + + if err != nil { + return err + } + + // Unmarshal the remaining values + aux := (*KanikoArtifactForUnmarshaling)(ka) + err = yaml.Unmarshal(remaining, aux) + + if err != nil { + return err + } + + ka.VolumeMounts = mounts + return nil +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (clusterDetails *ClusterDetails) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshall all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type ClusterDetailsForUnmarshaling ClusterDetails + + // Marshal volumes to a list. Use json because the Kubernetes resources have json annotations. + volumes := clusterDetails.Volumes + + j, err := json.Marshal(volumes) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of clusterDetails because we need to zero out volumes and we don't want to modify the + // current object. + aux := &ClusterDetailsForUnmarshaling{} + + b, err := json.Marshal(clusterDetails) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + + aux.Volumes = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumes"] = vList + } + return m, err +} + +// MarshalYAML provides a custom marshaller to deal with +// https://github.com/GoogleContainerTools/skaffold/issues/4175 +func (ka *KanikoArtifact) MarshalYAML() (interface{}, error) { + // We do this as follows + // 1. We zero out the fields in the node that require custom processing + // 2. We marshal all the non special fields using the aliased type resource + // we use an alias type to avoid recursion caused by invoking this function infinitely + // 3. We unmarshal to a map + // 4. We marshal the special fields to json and unmarshal to a map + // * This leverages the json struct annotations to marshal as expected + // 5. We combine the two maps and return + type KanikoArtifactForUnmarshaling KanikoArtifact + + // Marshal volumes to a map. User json because the Kubernetes resources have json annotations. + volumeMounts := ka.VolumeMounts + + j, err := json.Marshal(volumeMounts) + + if err != nil { + return err, nil + } + + vList := []interface{}{} + + if err := json.Unmarshal(j, &vList); err != nil { + return nil, err + } + + // Make a deep copy of kanikoArtifact because we need to zero out volumeMounts and we don't want to modify the + // current object. + aux := &KanikoArtifactForUnmarshaling{} + + b, err := json.Marshal(ka) + + if err != nil { + return nil, err + } + + if err := json.Unmarshal(b, aux); err != nil { + return nil, err + } + aux.VolumeMounts = nil + + marshaled, err := yaml.Marshal(aux) + + if err != nil { + return nil, err + } + + m := map[string]interface{}{} + + err = yaml.Unmarshal(marshaled, m) + + if len(vList) > 0 { + m["volumeMounts"] = vList + } + return m, err +} diff --git a/pkg/skaffold/schema/v2beta19/upgrade.go b/pkg/skaffold/schema/v2beta19/upgrade.go new file mode 100755 index 00000000000..ac04bd9ec8a --- /dev/null +++ b/pkg/skaffold/schema/v2beta19/upgrade.go @@ -0,0 +1,38 @@ +/* +Copyright 2020 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2beta19 + +import ( + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/util" + pkgutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +// Upgrade upgrades a configuration to the next version. +// Config changes from v2beta19 to v2beta20 +func (c *SkaffoldConfig) Upgrade() (util.VersionedConfig, error) { + var newConfig next.SkaffoldConfig + pkgutil.CloneThroughJSON(c, &newConfig) + newConfig.APIVersion = next.Version + + err := util.UpgradePipelines(c, &newConfig, upgradeOnePipeline) + return &newConfig, err +} + +func upgradeOnePipeline(oldPipeline, newPipeline interface{}) error { + return nil +} diff --git a/pkg/skaffold/schema/v2beta19/upgrade_test.go b/pkg/skaffold/schema/v2beta19/upgrade_test.go new file mode 100755 index 00000000000..297793d858c --- /dev/null +++ b/pkg/skaffold/schema/v2beta19/upgrade_test.go @@ -0,0 +1,201 @@ +/* +Copyright 2020 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v2beta19 + +import ( + "testing" + + next "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/yaml" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestUpgrade(t *testing.T) { + yaml := `apiVersion: skaffold/v2beta19 +kind: Config +build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + secret: + id: id + src: /file.txt + - image: gcr.io/k8s-skaffold/bazel + bazel: + target: //mytarget + - image: gcr.io/k8s-skaffold/jib-maven + jib: + args: ['-v', '--activate-profiles', 'prof'] + project: dir + - image: gcr.io/k8s-skaffold/jib-gradle + jib: + args: ['-v'] + - image: gcr.io/k8s-skaffold/buildpacks + buildpacks: + builder: gcr.io/buildpacks/builder:v1 + sync: + auto: true + googleCloudBuild: + projectId: test-project +test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* +deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-main +portForward: + - resourceType: deployment + resourceName: leeroy-app + port: 8080 + localPort: 9001 +profiles: + - name: test profile + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + kaniko: + cache: {} + cluster: + pullSecretName: e2esecret + pullSecretPath: secret.json + namespace: default + test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* + deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-test + - name: test local + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + local: + push: false + deploy: + kubectl: + manifests: + - k8s-* + kustomize: {} +` + expected := `apiVersion: skaffold/v2beta20 +kind: Config +build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + secret: + id: id + src: /file.txt + - image: gcr.io/k8s-skaffold/bazel + bazel: + target: //mytarget + - image: gcr.io/k8s-skaffold/jib-maven + jib: + args: ['-v', '--activate-profiles', 'prof'] + project: dir + - image: gcr.io/k8s-skaffold/jib-gradle + jib: + args: ['-v'] + - image: gcr.io/k8s-skaffold/buildpacks + buildpacks: + builder: gcr.io/buildpacks/builder:v1 + sync: + auto: true + googleCloudBuild: + projectId: test-project +test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* +deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-main +portForward: + - resourceType: deployment + resourceName: leeroy-app + port: 8080 + localPort: 9001 +profiles: + - name: test profile + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + kaniko: + cache: {} + cluster: + pullSecretName: e2esecret + pullSecretPath: secret.json + namespace: default + test: + - image: gcr.io/k8s-skaffold/skaffold-example + structureTests: + - ./test/* + deploy: + kubectl: + manifests: + - k8s-* + kustomize: + paths: + - kustomization-test + - name: test local + build: + artifacts: + - image: gcr.io/k8s-skaffold/skaffold-example + docker: + dockerfile: path/to/Dockerfile + local: + push: false + deploy: + kubectl: + manifests: + - k8s-* + kustomize: {} +` + verifyUpgrade(t, yaml, expected) +} + +func verifyUpgrade(t *testing.T, input, output string) { + config := NewSkaffoldConfig() + err := yaml.UnmarshalStrict([]byte(input), config) + testutil.CheckErrorAndDeepEqual(t, false, err, Version, config.GetVersion()) + + upgraded, err := config.Upgrade() + testutil.CheckError(t, false, err) + + expected := next.NewSkaffoldConfig() + err = yaml.UnmarshalStrict([]byte(output), expected) + + testutil.CheckErrorAndDeepEqual(t, false, err, expected, upgraded) +} diff --git a/pkg/skaffold/schema/versions.go b/pkg/skaffold/schema/versions.go index cbc4f279408..1620b4e3d28 100644 --- a/pkg/skaffold/schema/versions.go +++ b/pkg/skaffold/schema/versions.go @@ -70,6 +70,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta16" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta17" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta18" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta19" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta2" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta3" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/v2beta4" @@ -140,6 +141,7 @@ var SchemaVersionsV1 = Versions{ {v2beta16.Version, v2beta16.NewSkaffoldConfig}, {v2beta17.Version, v2beta17.NewSkaffoldConfig}, {v2beta18.Version, v2beta18.NewSkaffoldConfig}, + {v2beta19.Version, v2beta19.NewSkaffoldConfig}, {latestV1.Version, latestV1.NewSkaffoldConfig}, } From d4cee013fc78f54a833430bf761eebc2e5296bf3 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Wed, 14 Jul 2021 11:10:13 -0700 Subject: [PATCH 087/103] Update user_survey_hooks.md --- docs/design_proposals/user_survey_hooks.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/design_proposals/user_survey_hooks.md b/docs/design_proposals/user_survey_hooks.md index 8658cb1fafb..5cf1a54dfa2 100644 --- a/docs/design_proposals/user_survey_hooks.md +++ b/docs/design_proposals/user_survey_hooks.md @@ -3,7 +3,7 @@ * Author(s): Tejal Desai * Design Shepherd: Brian de Alwis * Date: 07/11/2021 -* Status: Proposed +* Status: Completed ## Background @@ -120,8 +120,8 @@ rate low on the NPS score. ## Implementation plan -- [ ] add survey config struct -- [ ] add `-id` flag to survey command with default as `hats` -- [ ] add `UserSurvey` struct to skaffold global config -- [ ] change prompt logic to show active relevant prompts -- [ ] Change set and unset command to set user survey fields. +- [X] add survey config struct +- [X] add `-id` flag to survey command with default as `hats` +- [X] add `UserSurvey` struct to skaffold global config +- [X] change prompt logic to show active relevant prompts +- [X] Change set and unset command to set user survey fields. From 969b7c944357e61554d828f73617a73616e821c5 Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Wed, 14 Jul 2021 13:07:00 -0700 Subject: [PATCH 088/103] Add initial Docker Deployer implementation (#6117) --- docs/content/en/schemas/v2beta19.json | 30 ++++ integration/diagnose_test.go | 3 +- integration/examples/docker-deploy/Dockerfile | 12 ++ integration/examples/docker-deploy/README.md | 7 + integration/examples/docker-deploy/main.go | 14 ++ .../examples/docker-deploy/skaffold.yaml | 10 ++ pkg/skaffold/deploy/docker/deploy.go | 160 ++++++++++++++++++ pkg/skaffold/docker/image.go | 81 +++++++++ pkg/skaffold/runner/deployer.go | 16 ++ pkg/skaffold/schema/latest/v1/config.go | 12 ++ .../schema/validation/samples_test.go | 6 +- 11 files changed, 349 insertions(+), 2 deletions(-) create mode 100644 integration/examples/docker-deploy/Dockerfile create mode 100644 integration/examples/docker-deploy/README.md create mode 100644 integration/examples/docker-deploy/main.go create mode 100644 integration/examples/docker-deploy/skaffold.yaml create mode 100644 pkg/skaffold/deploy/docker/deploy.go diff --git a/docs/content/en/schemas/v2beta19.json b/docs/content/en/schemas/v2beta19.json index 06a810c17e2..a4d96cf16ba 100755 --- a/docs/content/en/schemas/v2beta19.json +++ b/docs/content/en/schemas/v2beta19.json @@ -1335,6 +1335,36 @@ "description": "contains information about the docker `config.json` to mount.", "x-intellij-html-description": "contains information about the docker config.json to mount." }, + "DockerDeploy": { + "required": [ + "images" + ], + "properties": { + "images": { + "items": { + "type": "string" + }, + "type": "array", + "description": "container images to run in Docker.", + "x-intellij-html-description": "container images to run in Docker.", + "default": "[]" + }, + "useCompose": { + "type": "boolean", + "description": "tells skaffold whether or not to deploy using `docker-compose`.", + "x-intellij-html-description": "tells skaffold whether or not to deploy using docker-compose.", + "default": "false" + } + }, + "preferredOrder": [ + "useCompose", + "images" + ], + "additionalProperties": false, + "type": "object", + "description": "uses the `docker` CLI to create application containers in Docker.", + "x-intellij-html-description": "uses the docker CLI to create application containers in Docker." + }, "DockerSecret": { "required": [ "id" diff --git a/integration/diagnose_test.go b/integration/diagnose_test.go index fcd441da1d7..d9a35dca8c1 100644 --- a/integration/diagnose_test.go +++ b/integration/diagnose_test.go @@ -60,7 +60,8 @@ func folders(root string) ([]string, error) { } for _, f := range files { - if f.Mode().IsDir() { + // TODO(nkubala): remove once yaml is unhidden + if f.Mode().IsDir() && f.Name() != "docker-deploy" { folders = append(folders, f.Name()) } } diff --git a/integration/examples/docker-deploy/Dockerfile b/integration/examples/docker-deploy/Dockerfile new file mode 100644 index 00000000000..19becf9920c --- /dev/null +++ b/integration/examples/docker-deploy/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.15 as builder +COPY main.go . +# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations +ARG SKAFFOLD_GO_GCFLAGS +RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /app main.go + +FROM alpine:3.10 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single +CMD ["./app"] +COPY --from=builder /app . diff --git a/integration/examples/docker-deploy/README.md b/integration/examples/docker-deploy/README.md new file mode 100644 index 00000000000..ff9cd62afc0 --- /dev/null +++ b/integration/examples/docker-deploy/README.md @@ -0,0 +1,7 @@ +### Example: Deploying a simple go app to Docker + +This is a simple example based on: + +* **building** a single Go file app and with a multistage `Dockerfile` using local docker to build +* **tagging** using the default tagPolicy (`gitCommit`) +* **deploying** to docker by simply running a single container diff --git a/integration/examples/docker-deploy/main.go b/integration/examples/docker-deploy/main.go new file mode 100644 index 00000000000..5d05dcd2ff0 --- /dev/null +++ b/integration/examples/docker-deploy/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "fmt" + "time" +) + +func main() { + for { + fmt.Println("Hello Docker!") + + time.Sleep(time.Second * 1) + } +} diff --git a/integration/examples/docker-deploy/skaffold.yaml b/integration/examples/docker-deploy/skaffold.yaml new file mode 100644 index 00000000000..33b3659544a --- /dev/null +++ b/integration/examples/docker-deploy/skaffold.yaml @@ -0,0 +1,10 @@ +apiVersion: skaffold/v2beta19 +kind: Config +build: + local: + push: false + artifacts: + - image: skaffold-example +deploy: + docker: + images: [skaffold-example] diff --git a/pkg/skaffold/deploy/docker/deploy.go b/pkg/skaffold/deploy/docker/deploy.go new file mode 100644 index 00000000000..b0d00559f8d --- /dev/null +++ b/pkg/skaffold/deploy/docker/deploy.go @@ -0,0 +1,160 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package docker + +import ( + "context" + "fmt" + "io" + "sync" + + "github.com/google/uuid" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/access" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/debug" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" + dockerutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/status" + pkgsync "github.com/GoogleContainerTools/skaffold/pkg/skaffold/sync" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +type Deployer struct { + accessor access.Accessor + debugger debug.Debugger + logger log.Logger + monitor status.Monitor + syncer pkgsync.Syncer + + cfg *v1.DockerDeploy + client dockerutil.LocalDaemon + deployedContainers map[string]string // imageName -> containerID + network string + once sync.Once +} + +func NewDeployer(cfg dockerutil.Config, labeller *label.DefaultLabeller, d *v1.DockerDeploy, resources []*v1.PortForwardResource) (*Deployer, error) { + client, err := dockerutil.NewAPIClient(cfg) + if err != nil { + return nil, err + } + + return &Deployer{ + cfg: d, + client: client, + deployedContainers: make(map[string]string), + network: fmt.Sprintf("skaffold-network-%s", uuid.New().String()), + // TODO(nkubala): implement components + accessor: &access.NoopAccessor{}, + debugger: &debug.NoopDebugger{}, + logger: &log.NoopLogger{}, + monitor: &status.NoopMonitor{}, + syncer: &pkgsync.NoopSyncer{}, + }, nil +} + +func (d *Deployer) TrackBuildArtifacts(artifacts []graph.Artifact) { + // TODO(nkubala): implement with components +} + +func (d *Deployer) Deploy(ctx context.Context, out io.Writer, builds []graph.Artifact) error { + var err error + d.once.Do(func() { + err = d.client.NetworkCreate(ctx, d.network) + }) + if err != nil { + return fmt.Errorf("creating skaffold network %s: %w", d.network, err) + } + for _, b := range builds { + // TODO(nkubala): parallelize this + if !util.StrSliceContains(d.cfg.Images, b.ImageName) { + continue + } + if containerID, found := d.deployedContainers[b.ImageName]; found { + logrus.Debugf("removing old container %s for image %s", containerID, b.ImageName) + if err := d.client.Delete(ctx, out, containerID); err != nil { + return fmt.Errorf("failed to remove old container %s for image %s: %w", containerID, b.ImageName, err) + } + } + if d.cfg.UseCompose { + // TODO(nkubala): implement + return fmt.Errorf("docker compose not yet supported by skaffold") + } + opts := dockerutil.ContainerCreateOpts{ + Name: b.ImageName, + Image: b.Tag, + Network: d.network, + } + id, err := d.client.Run(ctx, out, opts) + if err != nil { + return errors.Wrap(err, "creating container in local docker") + } + d.deployedContainers[b.ImageName] = id + } + + return nil +} + +func (d *Deployer) Dependencies() ([]string, error) { + // noop since there is no deploy config + return nil, nil +} + +func (d *Deployer) Cleanup(ctx context.Context, out io.Writer) error { + for _, id := range d.deployedContainers { + if err := d.client.Delete(ctx, out, id); err != nil { + // TODO(nkubala): replace with actionable error + return errors.Wrap(err, "cleaning up deployed container") + } + } + + err := d.client.NetworkRemove(ctx, d.network) + return errors.Wrap(err, "cleaning up skaffold created network") +} + +func (d *Deployer) Render(context.Context, io.Writer, []graph.Artifact, bool, string) error { + return errors.New("render not implemented for docker deployer") +} + +func (d *Deployer) GetAccessor() access.Accessor { + return d.accessor +} + +func (d *Deployer) GetDebugger() debug.Debugger { + return d.debugger +} + +func (d *Deployer) GetLogger() log.Logger { + return d.logger +} + +func (d *Deployer) GetSyncer() pkgsync.Syncer { + return d.syncer +} + +func (d *Deployer) GetStatusMonitor() status.Monitor { + return d.monitor +} + +func (d *Deployer) RegisterLocalImages([]graph.Artifact) { + // all images are local, so this is a noop +} diff --git a/pkg/skaffold/docker/image.go b/pkg/skaffold/docker/image.go index 56eb2240625..fe662c1d59b 100644 --- a/pkg/skaffold/docker/image.go +++ b/pkg/skaffold/docker/image.go @@ -28,6 +28,7 @@ import ( "time" "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" @@ -58,16 +59,27 @@ type ContainerRun struct { BeforeStart func(context.Context, string) error } +type ContainerCreateOpts struct { + Name string + Image string + Network string + VolumesFrom []string + Wait bool +} + // LocalDaemon talks to a local Docker API. type LocalDaemon interface { Close() error ExtraEnv() []string ServerVersion(ctx context.Context) (types.Version, error) ConfigFile(ctx context.Context, image string) (*v1.ConfigFile, error) + ContainerLogs(ctx context.Context, out io.Writer, id string, muter chan bool) (io.ReadCloser, error) Build(ctx context.Context, out io.Writer, workspace string, artifact string, a *latestV1.DockerArtifact, opts BuildOptions) (string, error) Push(ctx context.Context, out io.Writer, ref string) (string, error) Pull(ctx context.Context, out io.Writer, ref string) error Load(ctx context.Context, out io.Writer, input io.Reader, ref string) (string, error) + Run(ctx context.Context, out io.Writer, opts ContainerCreateOpts) (string, error) + Delete(ctx context.Context, out io.Writer, id string) error Tag(ctx context.Context, image, ref string) error TagWithImageID(ctx context.Context, ref string, imageID string) (string, error) ImageID(ctx context.Context, ref string) (string, error) @@ -75,6 +87,8 @@ type LocalDaemon interface { ImageRemove(ctx context.Context, image string, opts types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) ImageExists(ctx context.Context, ref string) bool ImageList(ctx context.Context, ref string) ([]types.ImageSummary, error) + NetworkCreate(ctx context.Context, name string) error + NetworkRemove(ctx context.Context, name string) error Prune(ctx context.Context, images []string, pruneChildren bool) ([]string, error) DiskUsage(ctx context.Context) (uint64, error) RawClient() client.CommonAPIClient @@ -132,6 +146,73 @@ func (l *localDaemon) Close() error { return l.apiClient.Close() } +func (l *localDaemon) ContainerLogs(ctx context.Context, out io.Writer, id string, muter chan bool) (io.ReadCloser, error) { + return l.apiClient.ContainerLogs(ctx, id, types.ContainerLogsOptions{ShowStdout: true, ShowStderr: true, Follow: true}) +} + +// Delete stops, removes, and prunes a running container +func (l *localDaemon) Delete(ctx context.Context, out io.Writer, id string) error { + if err := l.apiClient.ContainerStop(ctx, id, nil); err != nil { + logrus.Warnf("unable to stop running container: %s", err.Error()) + } + if err := l.apiClient.ContainerRemove(ctx, id, types.ContainerRemoveOptions{}); err != nil { + return fmt.Errorf("removing stopped container: %w", err) + } + _, err := l.apiClient.ContainersPrune(ctx, filters.Args{}) + if err != nil { + return fmt.Errorf("pruning removed container: %w", err) + } + return nil +} + +// Run creates a container from a given image reference, and returns then container ID. +func (l *localDaemon) Run(ctx context.Context, out io.Writer, opts ContainerCreateOpts) (string, error) { + cfg := &container.Config{ + Image: opts.Image, + } + + hCfg := &container.HostConfig{ + NetworkMode: container.NetworkMode(opts.Network), + VolumesFrom: opts.VolumesFrom, + } + c, err := l.apiClient.ContainerCreate(ctx, cfg, hCfg, nil, nil, opts.Name) + if err != nil { + return "", err + } + if err := l.apiClient.ContainerStart(ctx, c.ID, types.ContainerStartOptions{}); err != nil { + return "", err + } + if opts.Wait { + l.apiClient.ContainerWait(ctx, c.ID, container.WaitConditionNotRunning) + } + return c.ID, nil +} + +func (l *localDaemon) NetworkCreate(ctx context.Context, name string) error { + nr, err := l.apiClient.NetworkList(ctx, types.NetworkListOptions{}) + if err != nil { + return err + } + for _, network := range nr { + if network.Name == name { + return nil + } + } + + r, err := l.apiClient.NetworkCreate(ctx, name, types.NetworkCreate{}) + if err != nil { + return err + } + if r.Warning != "" { + logrus.Warnln(r.Warning) + } + return nil +} + +func (l *localDaemon) NetworkRemove(ctx context.Context, name string) error { + return l.apiClient.NetworkRemove(ctx, name) +} + // ServerVersion retrieves the version information from the server. func (l *localDaemon) ServerVersion(ctx context.Context) (types.Version, error) { return l.apiClient.ServerVersion(ctx) diff --git a/pkg/skaffold/runner/deployer.go b/pkg/skaffold/runner/deployer.go index 294c845de6a..8b1199bc636 100644 --- a/pkg/skaffold/runner/deployer.go +++ b/pkg/skaffold/runner/deployer.go @@ -22,6 +22,7 @@ import ( "strconv" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/docker" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/helm" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kpt" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/kubectl" @@ -62,9 +63,20 @@ func GetDeployer(runCtx *runcontext.RunContext, labeller *label.DefaultLabeller) } deployerCfg := runCtx.Deployers() + localDeploy := false + remoteDeploy := false var deployers []deploy.Deployer for _, d := range deployerCfg { + if d.DockerDeploy != nil { + localDeploy = true + d, err := docker.NewDeployer(runCtx, labeller, d.DockerDeploy, runCtx.PortForwardResources()) + if err != nil { + return nil, err + } + deployers = append(deployers, d) + } + dCtx := &deployerCtx{runCtx, d} if d.HelmDeploy != nil { h, err := helm.NewDeployer(dCtx, labeller, d.HelmDeploy) @@ -96,6 +108,10 @@ func GetDeployer(runCtx *runcontext.RunContext, labeller *label.DefaultLabeller) } } + if localDeploy && remoteDeploy { + return nil, errors.New("docker deployment not supported alongside cluster deployments") + } + return deploy.NewDeployerMux(deployers, runCtx.IterativeStatusCheck()), nil } diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index 8a3f303fd73..09a8e999a67 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -522,6 +522,9 @@ type DeployConfig struct { // for the deploy step. All three deployer types can be used at the same // time for hybrid workflows. type DeployType struct { + // DockerDeploy *alpha* uses the `docker` CLI to create application containers in Docker. + DockerDeploy *DockerDeploy `yaml:"-,omitempty"` + // HelmDeploy *beta* uses the `helm` CLI to apply the charts to the cluster. HelmDeploy *HelmDeploy `yaml:"helm,omitempty"` @@ -536,6 +539,15 @@ type DeployType struct { KustomizeDeploy *KustomizeDeploy `yaml:"kustomize,omitempty"` } +// DockerDeploy uses the `docker` CLI to create application containers in Docker. +type DockerDeploy struct { + // UseCompose tells skaffold whether or not to deploy using `docker-compose`. + UseCompose bool `yaml:"useCompose,omitempty"` + + // Images are the container images to run in Docker. + Images []string `yaml:"images" yamltags:"required"` +} + // KubectlDeploy *beta* uses a client side `kubectl apply` to deploy manifests. // You'll need a `kubectl` CLI version installed that's compatible with your cluster. type KubectlDeploy struct { diff --git a/pkg/skaffold/schema/validation/samples_test.go b/pkg/skaffold/schema/validation/samples_test.go index 71ab6965f8e..4b8621eec24 100644 --- a/pkg/skaffold/schema/validation/samples_test.go +++ b/pkg/skaffold/schema/validation/samples_test.go @@ -38,7 +38,8 @@ const ( ) var ( - ignoredSamples = []string{"structureTest.yaml", "build.sh", "globalConfig.yaml", "Dockerfile.app", "Dockerfile.base"} + ignoredExamples = []string{"docker-deploy"} + ignoredSamples = []string{"structureTest.yaml", "build.sh", "globalConfig.yaml", "Dockerfile.app", "Dockerfile.base"} ) // Test that every example can be parsed and produces a valid @@ -103,6 +104,9 @@ func parseConfigFiles(t *testing.T, root string) { } for base, paths := range groupedPaths { name := filepath.Base(base) + if util.StrSliceContains(ignoredExamples, name) { + continue + } testutil.Run(t, name, func(t *testutil.T) { var data []string for _, path := range paths { From e02a80d8d6f87408d77a8e63724ed01df674abee Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Wed, 14 Jul 2021 16:36:59 -0700 Subject: [PATCH 089/103] Bump docker deploy config version to v2beta20 (#6214) * Bump docker deploy config version to v2beta20 * update schemas --- docs/content/en/schemas/v2beta19.json | 30 ------------------- docs/content/en/schemas/v2beta20.json | 30 +++++++++++++++++++ .../examples/docker-deploy/skaffold.yaml | 2 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/content/en/schemas/v2beta19.json b/docs/content/en/schemas/v2beta19.json index a4d96cf16ba..06a810c17e2 100755 --- a/docs/content/en/schemas/v2beta19.json +++ b/docs/content/en/schemas/v2beta19.json @@ -1335,36 +1335,6 @@ "description": "contains information about the docker `config.json` to mount.", "x-intellij-html-description": "contains information about the docker config.json to mount." }, - "DockerDeploy": { - "required": [ - "images" - ], - "properties": { - "images": { - "items": { - "type": "string" - }, - "type": "array", - "description": "container images to run in Docker.", - "x-intellij-html-description": "container images to run in Docker.", - "default": "[]" - }, - "useCompose": { - "type": "boolean", - "description": "tells skaffold whether or not to deploy using `docker-compose`.", - "x-intellij-html-description": "tells skaffold whether or not to deploy using docker-compose.", - "default": "false" - } - }, - "preferredOrder": [ - "useCompose", - "images" - ], - "additionalProperties": false, - "type": "object", - "description": "uses the `docker` CLI to create application containers in Docker.", - "x-intellij-html-description": "uses the docker CLI to create application containers in Docker." - }, "DockerSecret": { "required": [ "id" diff --git a/docs/content/en/schemas/v2beta20.json b/docs/content/en/schemas/v2beta20.json index 06a810c17e2..a4d96cf16ba 100755 --- a/docs/content/en/schemas/v2beta20.json +++ b/docs/content/en/schemas/v2beta20.json @@ -1335,6 +1335,36 @@ "description": "contains information about the docker `config.json` to mount.", "x-intellij-html-description": "contains information about the docker config.json to mount." }, + "DockerDeploy": { + "required": [ + "images" + ], + "properties": { + "images": { + "items": { + "type": "string" + }, + "type": "array", + "description": "container images to run in Docker.", + "x-intellij-html-description": "container images to run in Docker.", + "default": "[]" + }, + "useCompose": { + "type": "boolean", + "description": "tells skaffold whether or not to deploy using `docker-compose`.", + "x-intellij-html-description": "tells skaffold whether or not to deploy using docker-compose.", + "default": "false" + } + }, + "preferredOrder": [ + "useCompose", + "images" + ], + "additionalProperties": false, + "type": "object", + "description": "uses the `docker` CLI to create application containers in Docker.", + "x-intellij-html-description": "uses the docker CLI to create application containers in Docker." + }, "DockerSecret": { "required": [ "id" diff --git a/integration/examples/docker-deploy/skaffold.yaml b/integration/examples/docker-deploy/skaffold.yaml index 33b3659544a..af98978fdb6 100644 --- a/integration/examples/docker-deploy/skaffold.yaml +++ b/integration/examples/docker-deploy/skaffold.yaml @@ -1,4 +1,4 @@ -apiVersion: skaffold/v2beta19 +apiVersion: skaffold/v2beta20 kind: Config build: local: From 0baf27b762bdb3cc02cfb9eb6a9ccb04acc21b6b Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Thu, 15 Jul 2021 10:05:46 +0530 Subject: [PATCH 090/103] hooks: implement build lifecycle hooks (#6177) * hooks: implement build hooks * update example * fix tests * merge windows and non-windows tests * add windows example * address PR feedback * fix config version --- docs/content/en/schemas/v2beta20.json | 44 ++++- .../examples/lifecycle-hooks/Dockerfile | 12 ++ .../examples/lifecycle-hooks/README.md | 10 ++ integration/examples/lifecycle-hooks/hook.bat | 12 ++ integration/examples/lifecycle-hooks/hook.sh | 15 ++ .../examples/lifecycle-hooks/k8s-pod.yaml | 8 + integration/examples/lifecycle-hooks/main.go | 14 ++ .../examples/lifecycle-hooks/skaffold.yaml | 20 +++ pkg/skaffold/build/builder_mux.go | 18 +- pkg/skaffold/hooks/build.go | 89 ++++++++++ pkg/skaffold/hooks/build_test.go | 161 ++++++++++++++++++ pkg/skaffold/hooks/host.go | 63 +++++++ pkg/skaffold/hooks/host_test.go | 95 +++++++++++ pkg/skaffold/hooks/types.go | 48 ++++++ pkg/skaffold/schema/latest/v1/config.go | 2 +- 15 files changed, 608 insertions(+), 3 deletions(-) create mode 100644 integration/examples/lifecycle-hooks/Dockerfile create mode 100644 integration/examples/lifecycle-hooks/README.md create mode 100644 integration/examples/lifecycle-hooks/hook.bat create mode 100755 integration/examples/lifecycle-hooks/hook.sh create mode 100644 integration/examples/lifecycle-hooks/k8s-pod.yaml create mode 100644 integration/examples/lifecycle-hooks/main.go create mode 100644 integration/examples/lifecycle-hooks/skaffold.yaml create mode 100644 pkg/skaffold/hooks/build.go create mode 100644 pkg/skaffold/hooks/build_test.go create mode 100644 pkg/skaffold/hooks/host.go create mode 100644 pkg/skaffold/hooks/host_test.go create mode 100644 pkg/skaffold/hooks/types.go diff --git a/docs/content/en/schemas/v2beta20.json b/docs/content/en/schemas/v2beta20.json index a4d96cf16ba..fe68cb33c2b 100755 --- a/docs/content/en/schemas/v2beta20.json +++ b/docs/content/en/schemas/v2beta20.json @@ -58,6 +58,11 @@ "x-intellij-html-description": "directory containing the artifact's sources.", "default": "." }, + "hooks": { + "$ref": "#/definitions/BuildHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact." + }, "image": { "type": "string", "description": "name of the image to be built.", @@ -85,7 +90,8 @@ "image", "context", "sync", - "requires" + "requires", + "hooks" ], "additionalProperties": false }, @@ -102,6 +108,11 @@ "description": "*beta* describes an artifact built from a Dockerfile.", "x-intellij-html-description": "beta describes an artifact built from a Dockerfile." }, + "hooks": { + "$ref": "#/definitions/BuildHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact." + }, "image": { "type": "string", "description": "name of the image to be built.", @@ -130,6 +141,7 @@ "context", "sync", "requires", + "hooks", "docker" ], "additionalProperties": false @@ -147,6 +159,11 @@ "x-intellij-html-description": "directory containing the artifact's sources.", "default": "." }, + "hooks": { + "$ref": "#/definitions/BuildHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact." + }, "image": { "type": "string", "description": "name of the image to be built.", @@ -175,6 +192,7 @@ "context", "sync", "requires", + "hooks", "bazel" ], "additionalProperties": false @@ -187,6 +205,11 @@ "x-intellij-html-description": "directory containing the artifact's sources.", "default": "." }, + "hooks": { + "$ref": "#/definitions/BuildHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact." + }, "image": { "type": "string", "description": "name of the image to be built.", @@ -220,6 +243,7 @@ "context", "sync", "requires", + "hooks", "jib" ], "additionalProperties": false @@ -232,6 +256,11 @@ "x-intellij-html-description": "directory containing the artifact's sources.", "default": "." }, + "hooks": { + "$ref": "#/definitions/BuildHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact." + }, "image": { "type": "string", "description": "name of the image to be built.", @@ -265,6 +294,7 @@ "context", "sync", "requires", + "hooks", "kaniko" ], "additionalProperties": false @@ -282,6 +312,11 @@ "x-intellij-html-description": "directory containing the artifact's sources.", "default": "." }, + "hooks": { + "$ref": "#/definitions/BuildHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact." + }, "image": { "type": "string", "description": "name of the image to be built.", @@ -310,6 +345,7 @@ "context", "sync", "requires", + "hooks", "buildpacks" ], "additionalProperties": false @@ -327,6 +363,11 @@ "description": "*beta* builds images using a custom build script written by the user.", "x-intellij-html-description": "beta builds images using a custom build script written by the user." }, + "hooks": { + "$ref": "#/definitions/BuildHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each build of the target artifact." + }, "image": { "type": "string", "description": "name of the image to be built.", @@ -355,6 +396,7 @@ "context", "sync", "requires", + "hooks", "custom" ], "additionalProperties": false diff --git a/integration/examples/lifecycle-hooks/Dockerfile b/integration/examples/lifecycle-hooks/Dockerfile new file mode 100644 index 00000000000..415a8456f21 --- /dev/null +++ b/integration/examples/lifecycle-hooks/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.15 as builder +COPY main.go . +# `skaffold debug` sets SKAFFOLD_GO_GCFLAGS to disable compiler optimizations +ARG SKAFFOLD_GO_GCFLAGS +RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -o /app main.go + +FROM alpine:3 +# Define GOTRACEBACK to mark this container as using the Go language runtime +# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). +ENV GOTRACEBACK=single +CMD ["./app"] +COPY --from=builder /app . diff --git a/integration/examples/lifecycle-hooks/README.md b/integration/examples/lifecycle-hooks/README.md new file mode 100644 index 00000000000..f4d10697a16 --- /dev/null +++ b/integration/examples/lifecycle-hooks/README.md @@ -0,0 +1,10 @@ +### Example: Running skaffold lifecycle hooks + +This is a simple example to show how to inject skaffold lifecycles with user-defined hooks. + +Run: +``` +skaffold build --cache-artifacts=false +``` + + diff --git a/integration/examples/lifecycle-hooks/hook.bat b/integration/examples/lifecycle-hooks/hook.bat new file mode 100644 index 00000000000..9d2bf1aec79 --- /dev/null +++ b/integration/examples/lifecycle-hooks/hook.bat @@ -0,0 +1,12 @@ +@echo off + +echo Build specification: +echo DefaultRepo: %SKAFFOLD_DEFAULT_REPO% +echo RPCPort: %SKAFFOLD_RPC_PORT% +echo HTTPPort: %SKAFFOLD_HTTP_PORT% +echo WorkDir: %SKAFFOLD_WORK_DIR% +echo Image: %SKAFFOLD_IMAGE% +echo PushImage: %SKAFFOLD_PUSH_IMAGE% +echo ImageRepo: %SKAFFOLD_IMAGE_REPO% +echo ImageTag: %SKAFFOLD_IMAGE_TAG% +echo BuildContext: %SKAFFOLD_BUILD_CONTEXT% diff --git a/integration/examples/lifecycle-hooks/hook.sh b/integration/examples/lifecycle-hooks/hook.sh new file mode 100755 index 00000000000..6af910241e8 --- /dev/null +++ b/integration/examples/lifecycle-hooks/hook.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +cat << EOF +Build specification: + DefaultRepo: $SKAFFOLD_DEFAULT_REPO + RPCPort: $SKAFFOLD_RPC_PORT + HTTPPort: $SKAFFOLD_HTTP_PORT + WorkDir: $SKAFFOLD_WORK_DIR + Image: $SKAFFOLD_IMAGE + PushImage: $SKAFFOLD_PUSH_IMAGE + ImageRepo: $SKAFFOLD_IMAGE_REPO + ImageTag: $SKAFFOLD_IMAGE_TAG + BuildContext: $SKAFFOLD_BUILD_CONTEXT +EOF + diff --git a/integration/examples/lifecycle-hooks/k8s-pod.yaml b/integration/examples/lifecycle-hooks/k8s-pod.yaml new file mode 100644 index 00000000000..2f6fbb6ed60 --- /dev/null +++ b/integration/examples/lifecycle-hooks/k8s-pod.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Pod +metadata: + name: hooks-example-pod +spec: + containers: + - name: hooks-example + image: hooks-example diff --git a/integration/examples/lifecycle-hooks/main.go b/integration/examples/lifecycle-hooks/main.go new file mode 100644 index 00000000000..593721cfe2e --- /dev/null +++ b/integration/examples/lifecycle-hooks/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "fmt" + "time" +) + +func main() { + for { + fmt.Println("Hello world!") + + time.Sleep(time.Second * 1) + } +} diff --git a/integration/examples/lifecycle-hooks/skaffold.yaml b/integration/examples/lifecycle-hooks/skaffold.yaml new file mode 100644 index 00000000000..fb1a45f7908 --- /dev/null +++ b/integration/examples/lifecycle-hooks/skaffold.yaml @@ -0,0 +1,20 @@ +apiVersion: skaffold/v2beta20 +kind: Config +build: + artifacts: + - image: hooks-example + hooks: + before: + - command: ["sh", "-c", "./hook.sh"] + os: [darwin, linux] + - command: ["cmd.exe", "/C", "hook.bat"] + os: [windows] + after: + - command: ["sh", "-c", "docker images $SKAFFOLD_IMAGE --digests"] + os: [darwin, linux] + - command: ["cmd.exe", "/C", "docker images %SKAFFOLD_IMAGE% --digests"] + os: [windows] +deploy: + kubectl: + manifests: + - k8s-pod.yaml diff --git a/pkg/skaffold/build/builder_mux.go b/pkg/skaffold/build/builder_mux.go index a413ea313c2..f9e2574d5ad 100644 --- a/pkg/skaffold/build/builder_mux.go +++ b/pkg/skaffold/build/builder_mux.go @@ -25,6 +25,7 @@ import ( "github.com/sirupsen/logrus" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/hooks" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" ) @@ -99,7 +100,22 @@ func (b *BuilderMux) Build(ctx context.Context, out io.Writer, tags tag.ImageTag builder := func(ctx context.Context, out io.Writer, artifact *latestV1.Artifact, tag string) (string, error) { p := b.byImageName[artifact.ImageName] artifactBuilder := p.Build(ctx, out, artifact) - return artifactBuilder(ctx, out, artifact, tag) + hooksOpts, err := hooks.NewBuildEnvOpts(artifact, tag, p.PushImages()) + if err != nil { + return "", err + } + r := hooks.BuildRunner(artifact.LifecycleHooks, hooksOpts) + var built string + if err = r.RunPreHooks(ctx, out); err != nil { + return "", err + } + if built, err = artifactBuilder(ctx, out, artifact, tag); err != nil { + return "", err + } + if err = r.RunPostHooks(ctx, out); err != nil { + return "", err + } + return built, nil } ar, err := InOrder(ctx, out, tags, artifacts, builder, b.concurrency, b.store) if err != nil { diff --git a/pkg/skaffold/hooks/build.go b/pkg/skaffold/hooks/build.go new file mode 100644 index 00000000000..594238149f9 --- /dev/null +++ b/pkg/skaffold/hooks/build.go @@ -0,0 +1,89 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "context" + "fmt" + "io" + "path/filepath" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" +) + +// BuildRunner creates a new runner for pre-build and post-build lifecycle hooks +func BuildRunner(d v1.BuildHooks, opts BuildEnvOpts) Runner { + return buildRunner{BuildHooks: d, opts: opts} +} + +// NewBuildEnvOpts returns `BuildEnvOpts` required to create a `Runner` for build lifecycle hooks +func NewBuildEnvOpts(a *v1.Artifact, image string, pushImage bool) (BuildEnvOpts, error) { + ref, err := docker.ParseReference(image) + if err != nil { + return BuildEnvOpts{}, fmt.Errorf("parsing image %v: %w", image, err) + } + + w, err := filepath.Abs(a.Workspace) + if err != nil { + return BuildEnvOpts{}, fmt.Errorf("determining build workspace directory for image %v: %w", a.ImageName, err) + } + return BuildEnvOpts{ + Image: image, + PushImage: pushImage, + ImageRepo: ref.Repo, + ImageTag: ref.Tag, + BuildContext: w, + }, nil +} + +type buildRunner struct { + v1.BuildHooks + opts BuildEnvOpts +} + +func (r buildRunner) RunPreHooks(ctx context.Context, out io.Writer) error { + return r.run(ctx, out, r.PreHooks, phases.PreBuild) +} + +func (r buildRunner) RunPostHooks(ctx context.Context, out io.Writer) error { + return r.run(ctx, out, r.PostHooks, phases.PostBuild) +} + +func (r buildRunner) getEnv() []string { + common := getEnv(staticEnvOpts) + build := getEnv(r.opts) + return append(common, build...) +} + +func (r buildRunner) run(ctx context.Context, out io.Writer, hooks []v1.HostHook, phase phase) error { + if len(hooks) > 0 { + output.Default.Fprintln(out, fmt.Sprintf("Starting %s hooks...", phase)) + } + env := r.getEnv() + for _, h := range hooks { + hook := hostHook{h, env} + if err := hook.run(ctx, out); err != nil { + return err + } + } + if len(hooks) > 0 { + output.Default.Fprintln(out, fmt.Sprintf("Completed %s hooks", phase)) + } + return nil +} diff --git a/pkg/skaffold/hooks/build_test.go b/pkg/skaffold/hooks/build_test.go new file mode 100644 index 00000000000..90fca2d599c --- /dev/null +++ b/pkg/skaffold/hooks/build_test.go @@ -0,0 +1,161 @@ +// +build !windows + +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "bytes" + "context" + "fmt" + "path/filepath" + "runtime" + "testing" + + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestBuildHooks(t *testing.T) { + workDir, _ := filepath.Abs("./foo") + tests := []struct { + description string + artifact v1.Artifact + image string + pushImage bool + requiresWindowsOS bool + preHookOut string + postHookOut string + }{ + { + description: "linux/darwin build hook on matching host", + artifact: v1.Artifact{ + ImageName: "img1", + Workspace: "./foo", + LifecycleHooks: v1.BuildHooks{ + PreHooks: []v1.HostHook{ + { + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo pre-hook running with SKAFFOLD_IMAGE=$SKAFFOLD_IMAGE,SKAFFOLD_PUSH_IMAGE=$SKAFFOLD_PUSH_IMAGE,SKAFFOLD_IMAGE_REPO=$SKAFFOLD_IMAGE_REPO,SKAFFOLD_IMAGE_TAG=$SKAFFOLD_IMAGE_TAG,SKAFFOLD_BUILD_CONTEXT=$SKAFFOLD_BUILD_CONTEXT"}, + }, + }, + PostHooks: []v1.HostHook{ + { + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo post-hook running with SKAFFOLD_IMAGE=$SKAFFOLD_IMAGE,SKAFFOLD_PUSH_IMAGE=$SKAFFOLD_PUSH_IMAGE,SKAFFOLD_IMAGE_REPO=$SKAFFOLD_IMAGE_REPO,SKAFFOLD_IMAGE_TAG=$SKAFFOLD_IMAGE_TAG,SKAFFOLD_BUILD_CONTEXT=$SKAFFOLD_BUILD_CONTEXT"}, + }, + }, + }, + }, + image: "gcr.io/foo/img1:latest", + pushImage: true, + preHookOut: fmt.Sprintf("pre-hook running with SKAFFOLD_IMAGE=gcr.io/foo/img1:latest,SKAFFOLD_PUSH_IMAGE=true,SKAFFOLD_IMAGE_REPO=gcr.io/foo,SKAFFOLD_IMAGE_TAG=latest,SKAFFOLD_BUILD_CONTEXT=%s\n", workDir), + postHookOut: fmt.Sprintf("post-hook running with SKAFFOLD_IMAGE=gcr.io/foo/img1:latest,SKAFFOLD_PUSH_IMAGE=true,SKAFFOLD_IMAGE_REPO=gcr.io/foo,SKAFFOLD_IMAGE_TAG=latest,SKAFFOLD_BUILD_CONTEXT=%s\n", workDir), + }, + { + description: "linux/darwin build hook on non-matching host", + requiresWindowsOS: true, + artifact: v1.Artifact{ + ImageName: "img1", + Workspace: "./foo", + LifecycleHooks: v1.BuildHooks{ + PreHooks: []v1.HostHook{ + { + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo pre-hook running with SKAFFOLD_IMAGE=$SKAFFOLD_IMAGE,SKAFFOLD_PUSH_IMAGE=$SKAFFOLD_PUSH_IMAGE,SKAFFOLD_IMAGE_REPO=$SKAFFOLD_IMAGE_REPO,SKAFFOLD_IMAGE_TAG=$SKAFFOLD_IMAGE_TAG,SKAFFOLD_BUILD_CONTEXT=$SKAFFOLD_BUILD_CONTEXT"}, + }, + }, + PostHooks: []v1.HostHook{ + { + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo post-hook running with SKAFFOLD_IMAGE=$SKAFFOLD_IMAGE,SKAFFOLD_PUSH_IMAGE=$SKAFFOLD_PUSH_IMAGE,SKAFFOLD_IMAGE_REPO=$SKAFFOLD_IMAGE_REPO,SKAFFOLD_IMAGE_TAG=$SKAFFOLD_IMAGE_TAG,SKAFFOLD_BUILD_CONTEXT=$SKAFFOLD_BUILD_CONTEXT"}, + }, + }, + }, + }, + image: "gcr.io/foo/img1:latest", + pushImage: true, + }, + { + description: "windows build hook on matching host", + requiresWindowsOS: true, + artifact: v1.Artifact{ + ImageName: "img1", + Workspace: "./foo", + LifecycleHooks: v1.BuildHooks{ + PreHooks: []v1.HostHook{ + { + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo pre-hook running with SKAFFOLD_IMAGE=%SKAFFOLD_IMAGE%,SKAFFOLD_PUSH_IMAGE=%SKAFFOLD_PUSH_IMAGE%,SKAFFOLD_IMAGE_REPO=%SKAFFOLD_IMAGE_REPO%,SKAFFOLD_IMAGE_TAG=%SKAFFOLD_IMAGE_TAG%,SKAFFOLD_BUILD_CONTEXT=%SKAFFOLD_BUILD_CONTEXT%"}, + }, + }, + PostHooks: []v1.HostHook{ + { + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo post-hook running with SKAFFOLD_IMAGE=%SKAFFOLD_IMAGE%,SKAFFOLD_PUSH_IMAGE=%SKAFFOLD_PUSH_IMAGE%,SKAFFOLD_IMAGE_REPO=%SKAFFOLD_IMAGE_REPO%,SKAFFOLD_IMAGE_TAG=%SKAFFOLD_IMAGE_TAG%,SKAFFOLD_BUILD_CONTEXT=%SKAFFOLD_BUILD_CONTEXT%"}, + }, + }, + }, + }, + image: "gcr.io/foo/img1:latest", + pushImage: true, + preHookOut: fmt.Sprintf("pre-hook running with SKAFFOLD_IMAGE=gcr.io/foo/img1:latest,SKAFFOLD_PUSH_IMAGE=true,SKAFFOLD_IMAGE_REPO=gcr.io/foo,SKAFFOLD_IMAGE_TAG=latest,SKAFFOLD_BUILD_CONTEXT=%s\r\n", workDir), + postHookOut: fmt.Sprintf("post-hook running with SKAFFOLD_IMAGE=gcr.io/foo/img1:latest,SKAFFOLD_PUSH_IMAGE=true,SKAFFOLD_IMAGE_REPO=gcr.io/foo,SKAFFOLD_IMAGE_TAG=latest,SKAFFOLD_BUILD_CONTEXT=%s\r\n", workDir), + }, + { + description: "windows build hook on non-matching host", + artifact: v1.Artifact{ + ImageName: "img1", + Workspace: "./foo", + LifecycleHooks: v1.BuildHooks{ + PreHooks: []v1.HostHook{ + { + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo pre-hook running with SKAFFOLD_IMAGE=%SKAFFOLD_IMAGE%,SKAFFOLD_PUSH_IMAGE=%SKAFFOLD_PUSH_IMAGE%,SKAFFOLD_IMAGE_REPO=%SKAFFOLD_IMAGE_REPO%,SKAFFOLD_IMAGE_TAG=%SKAFFOLD_IMAGE_TAG%,SKAFFOLD_BUILD_CONTEXT=%SKAFFOLD_BUILD_CONTEXT%"}, + }, + }, + PostHooks: []v1.HostHook{ + { + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo post-hook running with SKAFFOLD_IMAGE=%SKAFFOLD_IMAGE%,SKAFFOLD_PUSH_IMAGE=%SKAFFOLD_PUSH_IMAGE%,SKAFFOLD_IMAGE_REPO=%SKAFFOLD_IMAGE_REPO%,SKAFFOLD_IMAGE_TAG=%SKAFFOLD_IMAGE_TAG%,SKAFFOLD_BUILD_CONTEXT=%SKAFFOLD_BUILD_CONTEXT%"}, + }, + }, + }, + }, + image: "gcr.io/foo/img1:latest", + pushImage: true, + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + if test.requiresWindowsOS != (runtime.GOOS == "windows") { + t.Skip() + } + opts, err := NewBuildEnvOpts(&test.artifact, test.image, test.pushImage) + t.CheckNoError(err) + runner := BuildRunner(test.artifact.LifecycleHooks, opts) + var preOut, postOut bytes.Buffer + err = runner.RunPreHooks(context.Background(), &preOut) + t.CheckNoError(err) + t.CheckContains(test.preHookOut, preOut.String()) + err = runner.RunPostHooks(context.Background(), &postOut) + t.CheckNoError(err) + t.CheckContains(test.postHookOut, postOut.String()) + }) + } +} diff --git a/pkg/skaffold/hooks/host.go b/pkg/skaffold/hooks/host.go new file mode 100644 index 00000000000..d64a6785547 --- /dev/null +++ b/pkg/skaffold/hooks/host.go @@ -0,0 +1,63 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "context" + "fmt" + "io" + "os/exec" + "runtime" + "strings" + + "github.com/sirupsen/logrus" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/misc" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +// hostHook represents a lifecycle hook to be executed on the host machine +type hostHook struct { + cfg v1.HostHook + env []string // environment variables to set in the hook process +} + +// run executes the lifecycle hook on the host machine +func (h hostHook) run(ctx context.Context, out io.Writer) error { + if len(h.cfg.OS) > 0 && !util.StrSliceContains(h.cfg.OS, runtime.GOOS) { + logrus.Infof("host hook execution skipped due to OS criteria %s not matched for commands:\n%s\n", strings.Join(h.cfg.OS, ","), strings.Join(h.cfg.Command, "\n")) + return nil + } + cmd := h.retrieveCmd(ctx, out) + + logrus.Debugf("Running command: %s", cmd.Args) + if err := cmd.Start(); err != nil { + return fmt.Errorf("starting cmd: %w", err) + } + return misc.HandleGracefulTermination(ctx, cmd) +} + +func (h hostHook) retrieveCmd(ctx context.Context, out io.Writer) *exec.Cmd { + cmd := exec.CommandContext(ctx, h.cfg.Command[0], h.cfg.Command[1:]...) + cmd.Stdout = out + cmd.Stderr = out + cmd.Env = append(cmd.Env, h.env...) + cmd.Env = append(cmd.Env, util.OSEnviron()...) + + return cmd +} diff --git a/pkg/skaffold/hooks/host_test.go b/pkg/skaffold/hooks/host_test.go new file mode 100644 index 00000000000..11f0f974e21 --- /dev/null +++ b/pkg/skaffold/hooks/host_test.go @@ -0,0 +1,95 @@ +// +build !windows + +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "bytes" + "context" + "runtime" + "testing" + + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestRun(t *testing.T) { + tests := []struct { + description string + requiresWindowsOS bool + hook hostHook + expected string + }{ + { + description: "linux/darwin host hook on matching host", + hook: hostHook{ + cfg: v1.HostHook{ + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo FOO=$FOO"}, + }, + env: []string{"FOO=bar"}, + }, + expected: "FOO=bar\n", + }, + { + description: "windows host hook on non-matching host", + hook: hostHook{ + cfg: v1.HostHook{ + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo %FOO%"}, + }, + env: []string{"FOO=bar"}, + }, + }, + { + description: "linux/darwin host hook on non-matching host", + requiresWindowsOS: true, + hook: hostHook{ + cfg: v1.HostHook{ + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo FOO=$FOO"}, + }, + env: []string{"FOO=bar"}, + }, + }, + { + description: "windows host hook on matching host", + requiresWindowsOS: true, + hook: hostHook{ + cfg: v1.HostHook{ + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo %FOO%"}, + }, + env: []string{"FOO=bar"}, + }, + expected: "FOO=bar\r\n", + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + if test.requiresWindowsOS != (runtime.GOOS == "windows") { + t.Skip() + } + var buf bytes.Buffer + err := test.hook.run(context.Background(), &buf) + t.CheckNoError(err) + t.CheckDeepEqual(test.expected, buf.String()) + }) + } +} diff --git a/pkg/skaffold/hooks/types.go b/pkg/skaffold/hooks/types.go new file mode 100644 index 00000000000..667e853ef3f --- /dev/null +++ b/pkg/skaffold/hooks/types.go @@ -0,0 +1,48 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "context" + "io" +) + +// Runner represents a lifecycle hooks runner +type Runner interface { + // RunPreHooks executes all pre-step hooks defined by the `Runner` + RunPreHooks(ctx context.Context, out io.Writer) error + // RunPostHooks executes all post-step hooks defined by the `Runner` + RunPostHooks(ctx context.Context, out io.Writer) error +} + +type phase string + +var phases = struct { + PreBuild phase + PostBuild phase + PreSync phase + PostSync phase + PreDeploy phase + PostDeploy phase +}{ + PreBuild: "pre-build", + PostBuild: "post-build", + PreSync: "pre-sync", + PostSync: "post-sync", + PreDeploy: "pre-deploy", + PostDeploy: "post-deploy", +} diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index 09a8e999a67..af18a5b73c7 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -870,7 +870,7 @@ type Artifact struct { Dependencies []*ArtifactDependency `yaml:"requires,omitempty"` // LifecycleHooks describes a set of lifecycle hooks that are executed before and after each build of the target artifact. - LifecycleHooks BuildHooks `yaml:"-"` + LifecycleHooks BuildHooks `yaml:"hooks,omitempty"` } // Sync *beta* specifies what files to sync into the container. From 5b954207b255ea888caa236a41424eb52677ac00 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Thu, 15 Jul 2021 10:49:19 -0700 Subject: [PATCH 091/103] =?UTF-8?q?Remove=20Status=20Check=20task=20event,?= =?UTF-8?q?=20have=20Deploy=20task=20event=20contain=20status=E2=80=A6=20(?= =?UTF-8?q?#6221)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove Status Check task event, have Deploy task event contain status check phase * fix status check issue --- pkg/skaffold/kubernetes/status/status_check.go | 4 ---- pkg/skaffold/runner/v1/deploy.go | 7 +++++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/skaffold/kubernetes/status/status_check.go b/pkg/skaffold/kubernetes/status/status_check.go index e4f360d7fbe..eb6cbad9748 100644 --- a/pkg/skaffold/kubernetes/status/status_check.go +++ b/pkg/skaffold/kubernetes/status/status_check.go @@ -33,7 +33,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/diag" "github.com/GoogleContainerTools/skaffold/pkg/diag/validator" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/label" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/deploy/resource" sErrors "github.com/GoogleContainerTools/skaffold/pkg/skaffold/errors" @@ -111,7 +110,6 @@ func (s *Monitor) Check(ctx context.Context, out io.Writer) error { func (s *Monitor) check(ctx context.Context, out io.Writer) error { event.StatusCheckEventStarted() - eventV2.TaskInProgress(constants.StatusCheck, "Verify service availability") ctx, endTrace := instrumentation.StartTrace(ctx, "performStatusCheck_WaitForDeploymentToStabilize") defer endTrace() @@ -121,12 +119,10 @@ func (s *Monitor) check(ctx context.Context, out io.Writer) error { errCode, err := s.statusCheck(ctx, out) event.StatusCheckEventEnded(errCode, err) if err != nil { - eventV2.TaskFailed(constants.StatusCheck, err) return err } output.Default.Fprintln(out, "Deployments stabilized in", util.ShowHumanizeTime(time.Since(start))) - eventV2.TaskSucceeded(constants.StatusCheck) return nil } diff --git a/pkg/skaffold/runner/v1/deploy.go b/pkg/skaffold/runner/v1/deploy.go index 4d6d5619850..c389484a611 100644 --- a/pkg/skaffold/runner/v1/deploy.go +++ b/pkg/skaffold/runner/v1/deploy.go @@ -131,11 +131,14 @@ See https://skaffold.dev/docs/pipeline-stages/taggers/#how-tagging-works`) } event.DeployComplete() - eventV2.TaskSucceeded(constants.Deploy) if !r.runCtx.Opts.IterativeStatusCheck { // run final aggregated status check only if iterative status check is turned off. - return r.deployer.GetStatusMonitor().Check(ctx, statusCheckOut) + if err = r.deployer.GetStatusMonitor().Check(ctx, statusCheckOut); err != nil { + eventV2.TaskFailed(constants.Deploy, err) + return err + } } + eventV2.TaskSucceeded(constants.Deploy) return nil } From 91a4c73d93ae97f1a437ae28a4171b76c6980b95 Mon Sep 17 00:00:00 2001 From: Aaron Prindle Date: Thu, 15 Jul 2021 13:10:34 -0700 Subject: [PATCH 092/103] Add --wait=false flag to skaffold cleanup kubectl delete to speedup the phase (#6213) What is the problem being solved? Fixes #6123, Skaffold process takes a long time to terminate after ctrl-c. This PR: - adds `--wait=false` flag to kubectl delete that is used during skaffold's Cleanup phase Why is this the best approach? This is the best approach because it makes the cleanup phase take considerably less time which is good from a UX perpective and more in line with what a user expects when sending a SIGTERM (Ctl-c). Before this change the Cleanup phase could take from ~800ms -> ~10s. With this change, the Cleanup phase is consistently ~600ms for the same app and skaffold.yaml. What other approaches did you consider? The alternative approach would be to add a line to stdout that explain to the user what skaffold is deleting items which can sometimes take a bit (vs making this change). Currently w/o no explanation skaffold hanging can be a bit confusing. . What side effects will this approach have? If users rely on skaffold waiting for the kubectl delete to finish, then this approach might alter/break those use cases. What future work remains to be done? N/A. --- pkg/skaffold/deploy/kubectl/cli.go | 2 +- pkg/skaffold/deploy/kubectl/kubectl_test.go | 12 ++++++------ pkg/skaffold/deploy/kustomize/kustomize_test.go | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/skaffold/deploy/kubectl/cli.go b/pkg/skaffold/deploy/kubectl/cli.go index 778c2b1f8c1..52d4e431cac 100644 --- a/pkg/skaffold/deploy/kubectl/cli.go +++ b/pkg/skaffold/deploy/kubectl/cli.go @@ -74,7 +74,7 @@ func NewCLI(cfg Config, flags latestV1.KubectlFlags, defaultNamespace string) CL // Delete runs `kubectl delete` on a list of manifests. func (c *CLI) Delete(ctx context.Context, out io.Writer, manifests manifest.ManifestList) error { - args := c.args(c.Flags.Delete, "--ignore-not-found=true", "-f", "-") + args := c.args(c.Flags.Delete, "--ignore-not-found=true", "--wait=false", "-f", "-") if err := c.Run(ctx, manifests.Reader(), out, "delete", args...); err != nil { return deployerr.CleanupErr(fmt.Errorf("kubectl delete: %w", err)) } diff --git a/pkg/skaffold/deploy/kubectl/kubectl_test.go b/pkg/skaffold/deploy/kubectl/kubectl_test.go index b1504ae3e2d..b013bb60c35 100644 --- a/pkg/skaffold/deploy/kubectl/kubectl_test.go +++ b/pkg/skaffold/deploy/kubectl/kubectl_test.go @@ -270,7 +270,7 @@ func TestKubectlCleanup(t *testing.T) { commands: testutil. CmdRunOut("kubectl version --client -ojson", KubectlVersion112). AndRunOut("kubectl --context kubecontext --namespace testNamespace create --dry-run -oyaml -f deployment.yaml", DeploymentWebYAML). - AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -"), + AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -"), }, { description: "cleanup success (kubectl v1.18)", @@ -280,7 +280,7 @@ func TestKubectlCleanup(t *testing.T) { commands: testutil. CmdRunOut("kubectl version --client -ojson", KubectlVersion118). AndRunOut("kubectl --context kubecontext --namespace testNamespace create --dry-run=client -oyaml -f deployment.yaml", DeploymentWebYAML). - AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -"), + AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -"), }, { description: "cleanup error", @@ -290,7 +290,7 @@ func TestKubectlCleanup(t *testing.T) { commands: testutil. CmdRunOut("kubectl version --client -ojson", KubectlVersion112). AndRunOut("kubectl --context kubecontext --namespace testNamespace create --dry-run -oyaml -f deployment.yaml", DeploymentWebYAML). - AndRunErr("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -", errors.New("BUG")), + AndRunErr("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -", errors.New("BUG")), shouldErr: true, }, { @@ -306,7 +306,7 @@ func TestKubectlCleanup(t *testing.T) { commands: testutil. CmdRunOut("kubectl version --client -ojson", KubectlVersion112). AndRunOut("kubectl --context kubecontext --namespace testNamespace create -v=0 --dry-run -oyaml -f deployment.yaml", DeploymentWebYAML). - AndRun("kubectl --context kubecontext --namespace testNamespace delete -v=0 --grace-period=1 --ignore-not-found=true -f -"), + AndRun("kubectl --context kubecontext --namespace testNamespace delete -v=0 --grace-period=1 --ignore-not-found=true --wait=false -f -"), }, } for _, test := range tests { @@ -342,7 +342,7 @@ func TestKubectlDeployerRemoteCleanup(t *testing.T) { }, commands: testutil. CmdRun("kubectl --context kubecontext --namespace testNamespace get pod/leeroy-web -o yaml"). - AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -"). + AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -"). AndRunInput("kubectl --context kubecontext --namespace testNamespace apply -f -", DeploymentWebYAML), }, { @@ -352,7 +352,7 @@ func TestKubectlDeployerRemoteCleanup(t *testing.T) { }, commands: testutil. CmdRun("kubectl --context kubecontext --namespace anotherNamespace get pod/leeroy-web -o yaml"). - AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -"). + AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -"). AndRunInput("kubectl --context kubecontext --namespace anotherNamespace apply -f -", DeploymentWebYAML), }, } diff --git a/pkg/skaffold/deploy/kustomize/kustomize_test.go b/pkg/skaffold/deploy/kustomize/kustomize_test.go index d728109d4a1..353a06ca9a6 100644 --- a/pkg/skaffold/deploy/kustomize/kustomize_test.go +++ b/pkg/skaffold/deploy/kustomize/kustomize_test.go @@ -215,7 +215,7 @@ func TestKustomizeCleanup(t *testing.T) { }, commands: testutil. CmdRunOut("kustomize build "+tmpDir.Root(), kubectl.DeploymentWebYAML). - AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -"), + AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -"), }, { description: "cleanup success with multiple kustomizations", @@ -225,7 +225,7 @@ func TestKustomizeCleanup(t *testing.T) { commands: testutil. CmdRunOut("kustomize build "+tmpDir.Path("a"), kubectl.DeploymentWebYAML). AndRunOut("kustomize build "+tmpDir.Path("b"), kubectl.DeploymentAppYAML). - AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -"), + AndRun("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -"), }, { description: "cleanup error", @@ -234,7 +234,7 @@ func TestKustomizeCleanup(t *testing.T) { }, commands: testutil. CmdRunOut("kustomize build "+tmpDir.Root(), kubectl.DeploymentWebYAML). - AndRunErr("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true -f -", errors.New("BUG")), + AndRunErr("kubectl --context kubecontext --namespace testNamespace delete --ignore-not-found=true --wait=false -f -", errors.New("BUG")), shouldErr: true, }, { From c132df0b4b61c255c5b875daee010bf6992f555d Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Thu, 15 Jul 2021 14:39:50 -0700 Subject: [PATCH 093/103] Add prefix field to `ApplicationLogEvent`s (#6226) * switch to add color to ApplicationLogEvents * include skaffold generated prefix in ApplicationLogEvents * send conditionally colored prefix --- pkg/skaffold/event/v2/application_logs.go | 3 +- pkg/skaffold/log/stream/stream.go | 13 +- pkg/skaffold/log/stream/stream_test.go | 2 +- proto/v2/skaffold.pb.go | 309 +++++++++++----------- proto/v2/skaffold.proto | 5 +- 5 files changed, 174 insertions(+), 158 deletions(-) diff --git a/pkg/skaffold/event/v2/application_logs.go b/pkg/skaffold/event/v2/application_logs.go index 710ae6b5bc8..1bdeba698e4 100644 --- a/pkg/skaffold/event/v2/application_logs.go +++ b/pkg/skaffold/event/v2/application_logs.go @@ -18,10 +18,11 @@ package v2 import proto "github.com/GoogleContainerTools/skaffold/proto/v2" -func ApplicationLog(podName, containerName, message, formattedMessage string) { +func ApplicationLog(podName, containerName, prefix, message, formattedMessage string) { handler.handleApplicationLogEvent(&proto.ApplicationLogEvent{ ContainerName: podName, PodName: containerName, + Prefix: prefix, Message: message, RichFormattedMessage: formattedMessage, }) diff --git a/pkg/skaffold/log/stream/stream.go b/pkg/skaffold/log/stream/stream.go index 683ee513e2d..01cbe0675d7 100644 --- a/pkg/skaffold/log/stream/stream.go +++ b/pkg/skaffold/log/stream/stream.go @@ -49,14 +49,19 @@ func StreamRequest(ctx context.Context, out io.Writer, headerColor output.Color, return fmt.Errorf("reading bytes from log stream: %w", err) } - formattedLine := headerColor.Sprintf("%s ", prefix) + line - printLogLine(headerColor, out, isMuted, lock, prefix, line) - eventV2.ApplicationLog(podName, containerName, line, formattedLine) + printLogLine(headerColor, out, isMuted, lock, podName, containerName, prefix, line) } } } -func printLogLine(headerColor output.Color, out io.Writer, isMuted func() bool, lock sync.Locker, prefix, text string) { +func printLogLine(headerColor output.Color, out io.Writer, isMuted func() bool, lock sync.Locker, podName, containerName, prefix, text string) { + formattedPrefix := prefix + if output.IsColorable(out) { + formattedPrefix = headerColor.Sprintf("%s", prefix) + } + formattedLine := fmt.Sprintf("%s %s", formattedPrefix, text) + eventV2.ApplicationLog(podName, containerName, formattedPrefix, text, formattedLine) + if !isMuted() { lock.Lock() diff --git a/pkg/skaffold/log/stream/stream_test.go b/pkg/skaffold/log/stream/stream_test.go index adb60f3b2c1..2da22f225b4 100644 --- a/pkg/skaffold/log/stream/stream_test.go +++ b/pkg/skaffold/log/stream/stream_test.go @@ -42,7 +42,7 @@ func TestPrintLogLine(t *testing.T) { go func() { for i := 0; i < linesPerGroup; i++ { - printLogLine(output.Default, &buf, func() bool { return false }, &lock, "PREFIX", "TEXT\n") + printLogLine(output.Default, &buf, func() bool { return false }, &lock, "PODNAME", "CONTAINERNAME", "PREFIX", "TEXT\n") } wg.Done() }() diff --git a/proto/v2/skaffold.pb.go b/proto/v2/skaffold.pb.go index 58432a34eee..9ac8a22dd34 100644 --- a/proto/v2/skaffold.pb.go +++ b/proto/v2/skaffold.pb.go @@ -1838,8 +1838,9 @@ func (m *SkaffoldLogEvent) GetMessage() string { type ApplicationLogEvent struct { ContainerName string `protobuf:"bytes,1,opt,name=containerName,proto3" json:"containerName,omitempty"` PodName string `protobuf:"bytes,2,opt,name=podName,proto3" json:"podName,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - RichFormattedMessage string `protobuf:"bytes,4,opt,name=richFormattedMessage,proto3" json:"richFormattedMessage,omitempty"` + Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + RichFormattedMessage string `protobuf:"bytes,5,opt,name=richFormattedMessage,proto3" json:"richFormattedMessage,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1884,6 +1885,13 @@ func (m *ApplicationLogEvent) GetPodName() string { return "" } +func (m *ApplicationLogEvent) GetPrefix() string { + if m != nil { + return m.Prefix + } + return "" +} + func (m *ApplicationLogEvent) GetMessage() string { if m != nil { return m.Message @@ -3015,154 +3023,155 @@ func init() { func init() { proto.RegisterFile("v2/skaffold.proto", fileDescriptor_39088757fd9c8e40) } var fileDescriptor_39088757fd9c8e40 = []byte{ - // 2349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x6f, 0x1b, 0xc9, - 0xf1, 0xf7, 0x90, 0x1a, 0x92, 0x53, 0x14, 0x69, 0xa9, 0x65, 0x5b, 0xfc, 0xd3, 0xb2, 0xd7, 0x9e, - 0xdd, 0xfd, 0xc7, 0xfb, 0x22, 0x6d, 0x3a, 0x59, 0x2f, 0x8c, 0x78, 0x37, 0xf2, 0x53, 0x8a, 0x5f, - 0xeb, 0x96, 0x76, 0x81, 0x3c, 0x36, 0xc6, 0x68, 0xa6, 0x45, 0x0f, 0x44, 0xce, 0x30, 0x33, 0x4d, - 0xed, 0xf2, 0x16, 0xe4, 0x10, 0xe4, 0x90, 0x53, 0xb2, 0xa7, 0x9c, 0x16, 0xc8, 0x29, 0xf7, 0x7c, - 0x83, 0x00, 0xf9, 0x02, 0x01, 0xf2, 0x01, 0x82, 0x1c, 0x82, 0x20, 0xe7, 0x9c, 0x83, 0x7e, 0xcd, - 0x74, 0xcf, 0x90, 0x96, 0x65, 0xc7, 0x48, 0x2e, 0xd2, 0x74, 0xf7, 0xaf, 0xaa, 0xab, 0xab, 0x7f, - 0x5d, 0x5d, 0xd5, 0x84, 0xd5, 0xc3, 0x41, 0x3f, 0x3d, 0xf0, 0xf6, 0xf7, 0xe3, 0x51, 0xd0, 0x9b, - 0x24, 0x31, 0x8d, 0x51, 0x83, 0xff, 0xeb, 0x1d, 0x0e, 0xba, 0x1b, 0xc3, 0x38, 0x1e, 0x8e, 0x48, - 0xdf, 0x9b, 0x84, 0x7d, 0x2f, 0x8a, 0x62, 0xea, 0xd1, 0x30, 0x8e, 0x52, 0x81, 0xeb, 0xbe, 0x21, - 0x47, 0x79, 0x6b, 0x6f, 0xba, 0xdf, 0xa7, 0xe1, 0x98, 0xa4, 0xd4, 0x1b, 0x4f, 0x24, 0xe0, 0x6c, - 0x11, 0x40, 0xc6, 0x13, 0x3a, 0x93, 0x83, 0xab, 0x24, 0x9a, 0x8e, 0xd3, 0x3e, 0xff, 0x2b, 0xba, - 0xdc, 0x0f, 0xa1, 0xb5, 0x43, 0x3d, 0x4a, 0x30, 0x49, 0x27, 0x71, 0x94, 0x12, 0xf4, 0x36, 0xd8, - 0x29, 0xeb, 0xe8, 0x58, 0x17, 0xac, 0x4b, 0xcd, 0xc1, 0xc9, 0x9e, 0xb2, 0xac, 0x27, 0x70, 0x62, - 0xd4, 0xdd, 0x80, 0x46, 0x26, 0xb2, 0x02, 0xd5, 0x71, 0x3a, 0xe4, 0x02, 0x0e, 0x66, 0x9f, 0xee, - 0x39, 0xa8, 0x63, 0xf2, 0xd3, 0x29, 0x49, 0x29, 0x42, 0xb0, 0x14, 0x79, 0x63, 0x22, 0x47, 0xf9, - 0xb7, 0xfb, 0x5b, 0x1b, 0x6c, 0xae, 0x0d, 0x7d, 0x1b, 0x60, 0x6f, 0x1a, 0x8e, 0x82, 0x1d, 0x6d, - 0xca, 0x53, 0xf9, 0x94, 0x37, 0xb3, 0x31, 0xac, 0xe1, 0xd0, 0x35, 0x68, 0x06, 0x64, 0x32, 0x8a, - 0x67, 0x42, 0xac, 0xc2, 0xc5, 0x4e, 0xe7, 0x62, 0xb7, 0xf3, 0x41, 0xac, 0x23, 0xd1, 0x7d, 0x68, - 0xef, 0xc7, 0xc9, 0x97, 0x5e, 0x12, 0x90, 0xe0, 0xd3, 0x38, 0xa1, 0x69, 0xa7, 0x7a, 0xa1, 0x7a, - 0xa9, 0x39, 0x78, 0xb3, 0xb0, 0xca, 0xde, 0x5d, 0x03, 0x75, 0x27, 0xa2, 0xc9, 0x0c, 0x17, 0x44, - 0xd1, 0x5d, 0x58, 0x61, 0xbe, 0x98, 0xa6, 0xb7, 0x9e, 0x11, 0xff, 0x40, 0x98, 0xb2, 0xc4, 0x4d, - 0xe9, 0x9a, 0xea, 0x74, 0x04, 0x2e, 0xc9, 0xa0, 0x1b, 0xd0, 0xda, 0x0f, 0x47, 0x64, 0x67, 0x16, - 0xf9, 0x42, 0x89, 0xcd, 0x95, 0xac, 0xe7, 0x4a, 0xee, 0xea, 0xc3, 0xd8, 0x44, 0xa3, 0x1d, 0x58, - 0x0b, 0xc8, 0xde, 0x74, 0x38, 0x0c, 0xa3, 0xe1, 0xad, 0x38, 0xa2, 0x5e, 0x18, 0x91, 0x24, 0xed, - 0xd4, 0xf8, 0xc2, 0x2e, 0xea, 0x4e, 0x29, 0x82, 0xee, 0x1c, 0x92, 0x88, 0xe2, 0x79, 0xd2, 0xa8, - 0x07, 0x8d, 0x31, 0xa1, 0x5e, 0xe0, 0x51, 0xaf, 0x53, 0xe7, 0xe6, 0xa0, 0x5c, 0xd3, 0x43, 0x39, - 0x82, 0x33, 0x0c, 0xba, 0x02, 0x0e, 0x25, 0x29, 0x15, 0xf6, 0x37, 0xb8, 0xc0, 0x5a, 0x2e, 0xb0, - 0xab, 0x86, 0x70, 0x8e, 0x62, 0x9b, 0x98, 0x90, 0x28, 0x20, 0x89, 0x10, 0x72, 0x8a, 0x9b, 0x88, - 0xf3, 0x41, 0xac, 0x23, 0xbb, 0x5f, 0xc0, 0xda, 0x9c, 0xed, 0x61, 0x2c, 0x3c, 0x20, 0x33, 0xce, - 0x21, 0x1b, 0xb3, 0x4f, 0x74, 0x19, 0xec, 0x43, 0x6f, 0x34, 0x55, 0x04, 0xd1, 0x76, 0x85, 0x89, - 0x49, 0x1d, 0xc2, 0x09, 0x02, 0x78, 0xbd, 0xf2, 0x91, 0xe5, 0xfe, 0xb5, 0x02, 0x0d, 0xb5, 0x42, - 0xf4, 0x01, 0xd8, 0x9c, 0x77, 0x92, 0x9a, 0xeb, 0x05, 0x6a, 0x66, 0x9e, 0x10, 0x28, 0x74, 0x19, - 0x6a, 0x82, 0x6e, 0x72, 0xca, 0x4e, 0x91, 0x93, 0x99, 0x80, 0xc4, 0xa1, 0x77, 0x61, 0x89, 0xb9, - 0xa4, 0x53, 0xe5, 0xf8, 0x33, 0xa6, 0xcf, 0x32, 0x34, 0xc7, 0xa0, 0x53, 0x60, 0x27, 0xd3, 0x68, - 0xfb, 0x36, 0x67, 0x99, 0x83, 0x45, 0x83, 0xcd, 0x29, 0xbc, 0x23, 0x79, 0xd3, 0x29, 0xba, 0x30, - 0x9f, 0x53, 0xe0, 0xd0, 0x4d, 0x00, 0x2f, 0x08, 0x42, 0x16, 0x57, 0xbc, 0x51, 0xc7, 0xe7, 0x44, - 0x71, 0xcb, 0xdb, 0xdb, 0xdb, 0xcc, 0x40, 0xe2, 0x00, 0x68, 0x52, 0xdd, 0x1b, 0x70, 0xb2, 0x30, - 0xac, 0x6f, 0x80, 0x23, 0x36, 0xe0, 0x94, 0xbe, 0x01, 0x8e, 0xee, 0xe4, 0x5f, 0x55, 0xa1, 0x65, - 0x78, 0x10, 0x7d, 0x0c, 0x8e, 0x97, 0xd0, 0x70, 0xdf, 0xf3, 0x69, 0xda, 0xb1, 0xb8, 0x4d, 0x17, - 0x16, 0x78, 0xbb, 0xb7, 0x29, 0x81, 0x38, 0x17, 0xe1, 0x8e, 0x9c, 0x4d, 0xc4, 0x54, 0xed, 0xcc, - 0x91, 0x22, 0xd4, 0x71, 0xe9, 0xdd, 0xd9, 0x84, 0x60, 0x8e, 0x41, 0xf7, 0xe6, 0x38, 0xe0, 0x5b, - 0x0b, 0x27, 0x7b, 0x8e, 0x17, 0x7e, 0x61, 0x41, 0x43, 0x19, 0x83, 0xde, 0x97, 0x16, 0x58, 0xdc, - 0x82, 0x4e, 0xd9, 0x02, 0x92, 0x68, 0x36, 0xa8, 0xb8, 0x58, 0xc9, 0xe3, 0x22, 0xea, 0x40, 0xdd, - 0x8f, 0x23, 0x4a, 0xbe, 0x12, 0x7c, 0x70, 0xb0, 0x6a, 0xa2, 0xf3, 0x00, 0x41, 0xec, 0x1f, 0x90, - 0x84, 0x9d, 0x7d, 0xb9, 0xff, 0x5a, 0xcf, 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xdc, 0x0b, 0x42, 0xd3, 0x75, 0x79, 0x60, 0x50, - 0x00, 0xce, 0xe6, 0x94, 0xc6, 0x3c, 0xbd, 0x45, 0x9d, 0xd2, 0xe1, 0x38, 0x4a, 0xf7, 0xdb, 0x5c, - 0xf7, 0x1b, 0xdd, 0x33, 0x4c, 0x37, 0xe7, 0x7b, 0xdf, 0x9b, 0xd2, 0xf8, 0xa9, 0x9a, 0x46, 0x1c, - 0x2b, 0xb4, 0x07, 0x0d, 0x36, 0x0b, 0xbb, 0x3d, 0x5e, 0x62, 0x92, 0xb7, 0xf8, 0x24, 0xe7, 0xbb, - 0xa7, 0xb9, 0x73, 0x66, 0x91, 0x3f, 0x77, 0x8e, 0x7d, 0x00, 0x36, 0x87, 0x48, 0xdb, 0x5e, 0x62, - 0x96, 0xff, 0xe7, 0xb3, 0x5c, 0xe8, 0xae, 0xb3, 0x59, 0xc4, 0x79, 0x9c, 0x3b, 0xcf, 0x63, 0xa8, - 0x6d, 0x79, 0x51, 0x30, 0x22, 0xa8, 0xb8, 0x8b, 0x0b, 0x55, 0x6f, 0x70, 0xd5, 0x67, 0xdc, 0xd5, - 0x9c, 0x87, 0xfd, 0x67, 0x5c, 0xc7, 0x75, 0xeb, 0xdd, 0x9b, 0x57, 0x7f, 0x78, 0x65, 0x18, 0xd2, - 0x67, 0xd3, 0xbd, 0x9e, 0x1f, 0x8f, 0xfb, 0xf7, 0xb8, 0x86, 0x2c, 0xe0, 0xee, 0xc6, 0xf1, 0x28, - 0xcd, 0x18, 0x21, 0x7e, 0x84, 0xef, 0x1f, 0x0e, 0x3e, 0xad, 0xee, 0xd5, 0xf8, 0xf7, 0xd5, 0x7f, - 0x07, 0x00, 0x00, 0xff, 0xff, 0x90, 0x22, 0x13, 0xf6, 0xfc, 0x1f, 0x00, 0x00, + // 2356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b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 0xa3, 0x6d, 0x58, 0x0d, 0xc8, + 0xee, 0x64, 0x30, 0x08, 0xa3, 0xc1, 0xad, 0x38, 0xa2, 0x5e, 0x18, 0x91, 0x24, 0x6d, 0xd7, 0xf8, + 0xc6, 0x2e, 0xea, 0x46, 0x29, 0x82, 0xee, 0x1c, 0x90, 0x88, 0xe2, 0x59, 0xdc, 0xa8, 0x0b, 0x8d, + 0x11, 0xa1, 0x5e, 0xe0, 0x51, 0xaf, 0x5d, 0xe7, 0xea, 0xa0, 0x5c, 0xd2, 0x43, 0x39, 0x83, 0x33, + 0x0c, 0xba, 0x02, 0x0e, 0x25, 0x29, 0x15, 0xfa, 0x37, 0x38, 0xc3, 0x6a, 0xce, 0xb0, 0xa3, 0xa6, + 0x70, 0x8e, 0x62, 0x87, 0x98, 0x90, 0x28, 0x20, 0x89, 0x60, 0x72, 0x8a, 0x87, 0x88, 0xf3, 0x49, + 0xac, 0x23, 0x3b, 0x5f, 0xc0, 0xea, 0x8c, 0xe3, 0x61, 0x5e, 0xb8, 0x4f, 0xa6, 0xdc, 0x87, 0x6c, + 0xcc, 0x3e, 0xd1, 0x65, 0xb0, 0x0f, 0xbc, 0xe1, 0x44, 0x39, 0x88, 0x76, 0x2a, 0x8c, 0x4d, 0xca, + 0x10, 0x46, 0x10, 0xc0, 0xeb, 0x95, 0x8f, 0x2c, 0xf7, 0xef, 0x15, 0x68, 0xa8, 0x1d, 0xa2, 0x0f, + 0xc0, 0xe6, 0x7e, 0x27, 0x5d, 0x73, 0xad, 0xe0, 0x9a, 0x99, 0x25, 0x04, 0x0a, 0x5d, 0x86, 0x9a, + 0x70, 0x37, 0xb9, 0x64, 0xbb, 0xe8, 0x93, 0x19, 0x83, 0xc4, 0xa1, 0x77, 0x61, 0x81, 0x99, 0xa4, + 0x5d, 0xe5, 0xf8, 0x33, 0xa6, 0xcd, 0x32, 0x34, 0xc7, 0xa0, 0x53, 0x60, 0x27, 0x93, 0x68, 0xeb, + 0x36, 0xf7, 0x32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0x32, 0xb4, + 0xb5, 0x73, 0xd9, 0xf0, 0x79, 0xb5, 0xb7, 0x3b, 0x24, 0x77, 0x92, 0x04, 0x33, 0x0c, 0x2b, 0xe3, + 0x96, 0x8c, 0x61, 0x74, 0x05, 0xea, 0x24, 0x49, 0x78, 0x82, 0xb4, 0x5e, 0x9c, 0x20, 0x15, 0x8e, + 0x15, 0xa1, 0x23, 0x92, 0xa6, 0xde, 0x40, 0xe5, 0x3e, 0x45, 0xa2, 0x0f, 0xa1, 0x99, 0x4e, 0x06, + 0x03, 0x92, 0xf2, 0x17, 0x09, 0xd9, 0x3a, 0x6b, 0xdd, 0xfa, 0x76, 0x36, 0x89, 0x75, 0xa0, 0xfb, + 0x04, 0x9c, 0x2c, 0x0f, 0xb1, 0xc4, 0x4a, 0x58, 0xce, 0x95, 0xbb, 0x14, 0x84, 0xd1, 0x6f, 0x56, + 0x0e, 0xef, 0x37, 0xdd, 0x3f, 0xb0, 0x1b, 0xa7, 0x98, 0x8b, 0xd6, 0xa0, 0xce, 0xec, 0xff, 0x34, + 0x0c, 0x94, 0x09, 0x19, 0xb9, 0x15, 0xa0, 0x73, 0x00, 0xa9, 0x38, 0x1b, 0x36, 0x27, 0x76, 0xe5, + 0xc8, 0x91, 0xad, 0x80, 0x59, 0x3e, 0x4e, 0xc2, 0x41, 0x18, 0xc9, 0xaa, 0x5b, 0x52, 0xe8, 0x3d, + 0xb0, 0x87, 0xe4, 0x80, 0x0c, 0x79, 0x36, 0x6b, 0x65, 0xbd, 0xa9, 0x30, 0xdd, 0x83, 0x78, 0xf0, + 0x80, 0x4d, 0x62, 0x81, 0xd1, 0xcd, 0x66, 0x1b, 0x66, 0x73, 0xff, 0x64, 0xc1, 0xea, 0x8c, 0xf4, + 0x87, 0xde, 0x82, 0x25, 0x5f, 0x39, 0xfb, 0xa3, 0xfc, 0x89, 0xc4, 0x1c, 0x64, 0x72, 0xc7, 0x71, + 0xf0, 0x28, 0x6f, 0x15, 0x14, 0xc9, 0xd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 0x8b, 0xda, + 0xa5, 0xe0, 0x38, 0x4c, 0xf6, 0xdb, 0x5c, 0xf6, 0x1b, 0x9d, 0x33, 0x4c, 0x36, 0xf7, 0xf7, 0x9e, + 0x37, 0xa1, 0xf1, 0x53, 0xb5, 0x8c, 0x08, 0x2b, 0xb4, 0x0b, 0x0d, 0xb6, 0x0a, 0xbb, 0x3d, 0x5e, + 0x62, 0x91, 0xb7, 0xf8, 0x22, 0xe7, 0x3b, 0xa7, 0xb9, 0x71, 0xa6, 0x91, 0x3f, 0x73, 0x8d, 0x3d, + 0x00, 0xb6, 0x86, 0x28, 0xdb, 0x5e, 0x62, 0x95, 0x6f, 0xf3, 0x55, 0x2e, 0x74, 0xd6, 0xd8, 0x2a, + 0x22, 0x1e, 0x67, 0xae, 0xf3, 0x18, 0x6a, 0x9b, 0x5e, 0x14, 0x0c, 0x09, 0x2a, 0x9e, 0xe2, 0x5c, + 0xd1, 0xeb, 0x5c, 0xf4, 0x19, 0x77, 0x25, 0xf7, 0xc3, 0xde, 0x33, 0x2e, 0xe3, 0xba, 0xf5, 0xee, + 0xcd, 0xab, 0x3f, 0xbe, 0x32, 0x08, 0xe9, 0xb3, 0xc9, 0x6e, 0xd7, 0x8f, 0x47, 0xbd, 0x7b, 0x5c, + 0x42, 0x96, 0x70, 0x77, 0xe2, 0x78, 0x98, 0x66, 0x1e, 0x21, 0x7e, 0x9c, 0xef, 0x1d, 0xf4, 0x3f, + 0xad, 0xee, 0xd6, 0xf8, 0xf7, 0xd5, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xe0, 0xbb, 0x70, + 0x14, 0x20, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/v2/skaffold.proto b/proto/v2/skaffold.proto index 7e09a168c9b..bf30f68c88b 100644 --- a/proto/v2/skaffold.proto +++ b/proto/v2/skaffold.proto @@ -196,8 +196,9 @@ message SkaffoldLogEvent { message ApplicationLogEvent { string containerName = 1; // container that the log came from string podName = 2; // pod that the log came from - string message = 3; // contents of the log - string richFormattedMessage = 4; // full message that skaffold writes, with format and color + string prefix = 3; + string message = 4; // contents of the log + string richFormattedMessage = 5; // full message that skaffold writes, with format and color } // `TaskEvent` represent the different larger phases of a skaffold session, for example Build, Deploy, etc. From 8f312c8dd28a5f2ac7e4cf7ca9760b146543d07c Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Thu, 15 Jul 2021 15:33:15 -0700 Subject: [PATCH 094/103] Select color from ColorPicker using image instead of pod (#6222) --- cmd/skaffold/app/cmd/util.go | 2 +- .../initializer/build/builders_test.go | 2 +- pkg/skaffold/initializer/build/util.go | 2 +- pkg/skaffold/kubernetes/colorpicker.go | 84 ---------------- pkg/skaffold/kubernetes/colorpicker_test.go | 96 ------------------- pkg/skaffold/kubernetes/logger/log.go | 25 +++-- pkg/skaffold/kubernetes/logger/log_test.go | 72 ++++++++++++++ pkg/skaffold/output/color.go | 14 +++ pkg/skaffold/output/colorpicker.go | 60 ++++++++++++ pkg/skaffold/tag/{ => util}/util.go | 0 pkg/skaffold/tag/{ => util}/util_test.go | 0 11 files changed, 168 insertions(+), 189 deletions(-) delete mode 100644 pkg/skaffold/kubernetes/colorpicker.go delete mode 100644 pkg/skaffold/kubernetes/colorpicker_test.go create mode 100644 pkg/skaffold/output/colorpicker.go rename pkg/skaffold/tag/{ => util}/util.go (100%) rename pkg/skaffold/tag/{ => util}/util_test.go (100%) diff --git a/cmd/skaffold/app/cmd/util.go b/cmd/skaffold/app/cmd/util.go index 2890b7a68be..d77638e7a48 100644 --- a/cmd/skaffold/app/cmd/util.go +++ b/cmd/skaffold/app/cmd/util.go @@ -22,7 +22,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" + tag "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" ) // DefaultRepoFn takes an image tag and returns either a new tag with the default repo prefixed, or the original tag if diff --git a/pkg/skaffold/initializer/build/builders_test.go b/pkg/skaffold/initializer/build/builders_test.go index 3a5b8c79fb4..6e967a70795 100644 --- a/pkg/skaffold/initializer/build/builders_test.go +++ b/pkg/skaffold/initializer/build/builders_test.go @@ -25,7 +25,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/jib" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/initializer/prompt" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" + tag "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/warnings" "github.com/GoogleContainerTools/skaffold/testutil" ) diff --git a/pkg/skaffold/initializer/build/util.go b/pkg/skaffold/initializer/build/util.go index da91f1e5227..1012b9e6978 100644 --- a/pkg/skaffold/initializer/build/util.go +++ b/pkg/skaffold/initializer/build/util.go @@ -20,7 +20,7 @@ import ( "path/filepath" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" + tag "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" ) func matchBuildersToImages(builders []InitBuilder, images []string) ([]ArtifactInfo, []InitBuilder, []string) { diff --git a/pkg/skaffold/kubernetes/colorpicker.go b/pkg/skaffold/kubernetes/colorpicker.go deleted file mode 100644 index 2db6e0f36ac..00000000000 --- a/pkg/skaffold/kubernetes/colorpicker.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2019 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package kubernetes - -import ( - v1 "k8s.io/api/core/v1" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" -) - -var colorCodes = []output.Color{ - output.LightRed, - output.LightGreen, - output.LightYellow, - output.LightBlue, - output.LightPurple, - output.Red, - output.Green, - output.Yellow, - output.Blue, - output.Purple, - output.Cyan, -} - -// ColorPicker is used to associate colors for with pods so that the container logs -// can be output to the terminal with a consistent color being used to identify logs -// from each pod. -type ColorPicker interface { - Pick(pod *v1.Pod) output.Color - AddImage(image string) -} - -type colorPicker struct { - imageColors map[string]output.Color -} - -// NewColorPicker creates a new ColorPicker. For each artifact, a color will be selected -// sequentially from `colorCodes`. If all colors are used, the first color will be used -// again. The formatter for the associated color will then be returned by `Pick` each -// time it is called for the artifact and can be used to write to out in that color. -func NewColorPicker() ColorPicker { - imageColors := make(map[string]output.Color) - - return &colorPicker{ - imageColors: imageColors, - } -} - -func (p *colorPicker) AddImage(image string) { - imageName := tag.StripTag(image, false) - if _, ok := p.imageColors[imageName]; ok { - return - } - p.imageColors[imageName] = colorCodes[len(p.imageColors)%len(colorCodes)] -} - -// Pick will return the color that was associated with pod when `NewColorPicker` was called. -// If no color was associated with the pod, the none color will be returned, which will -// write with no formatting. -func (p *colorPicker) Pick(pod *v1.Pod) output.Color { - for _, container := range pod.Spec.Containers { - if c, present := p.imageColors[tag.StripTag(container.Image, false)]; present { - return c - } - } - - // If no mapping is found, don't add any color formatting - return output.None -} diff --git a/pkg/skaffold/kubernetes/colorpicker_test.go b/pkg/skaffold/kubernetes/colorpicker_test.go deleted file mode 100644 index 7a8d9dcacb4..00000000000 --- a/pkg/skaffold/kubernetes/colorpicker_test.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 2019 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package kubernetes - -import ( - "testing" - - v1 "k8s.io/api/core/v1" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" - "github.com/GoogleContainerTools/skaffold/testutil" -) - -func TestColorPicker(t *testing.T) { - tests := []struct { - description string - pod *v1.Pod - expectedColor output.Color - }{ - { - description: "not found", - pod: &v1.Pod{}, - expectedColor: output.None, - }, - { - description: "found", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "image"}, - }, - }, - }, - expectedColor: colorCodes[0], - }, - { - description: "ignore tag", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "image:tag"}, - }, - }, - }, - expectedColor: colorCodes[0], - }, - { - description: "second image", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "second:tag"}, - }, - }, - }, - expectedColor: colorCodes[1], - }, - { - description: "accept image with digest", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "second:tag@sha256:d3f4dd1541ee34b96850efc46955bada1a415b0594dc9948607c0197d2d16749"}, - }, - }, - }, - expectedColor: colorCodes[1], - }, - } - - picker := NewColorPicker() - picker.AddImage("image:ignored") - picker.AddImage("second") - - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - color := picker.Pick(test.pod) - - t.CheckTrue(test.expectedColor == color) - }) - } -} diff --git a/pkg/skaffold/kubernetes/logger/log.go b/pkg/skaffold/kubernetes/logger/log.go index 37da9aa1958..ae01af5d2d9 100644 --- a/pkg/skaffold/kubernetes/logger/log.go +++ b/pkg/skaffold/kubernetes/logger/log.go @@ -33,7 +33,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log/stream" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag" + tagutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" ) // LogAggregator aggregates the logs for all the deployed pods. @@ -43,7 +43,7 @@ type LogAggregator struct { config Config podSelector kubernetes.PodSelector podWatcher kubernetes.PodWatcher - colorPicker kubernetes.ColorPicker + colorPicker output.ColorPicker muted int32 stopWatcher func() @@ -67,7 +67,7 @@ func NewLogAggregator(cli *kubectl.CLI, podSelector kubernetes.PodSelector, name config: config, podSelector: podSelector, podWatcher: kubernetes.NewPodWatcher(podSelector), - colorPicker: kubernetes.NewColorPicker(), + colorPicker: output.NewColorPicker(), stopWatcher: func() {}, events: make(chan kubernetes.PodEvent), namespaces: namespaces, @@ -77,7 +77,9 @@ func NewLogAggregator(cli *kubectl.CLI, podSelector kubernetes.PodSelector, name // RegisterArtifacts tracks the provided build artifacts in the colorpicker func (a *LogAggregator) RegisterArtifacts(artifacts []graph.Artifact) { // image tags are added to the podSelector by the deployer, which are picked up by the podWatcher - // we just need to make sure the colorPicker knows about them. + // we just need to make sure the colorPicker knows about the base images. + // artifact.ImageName does not have a default repo substitution applied to it, so we use artifact.Tag. + // TODO(nkubala) [07/15/22]: can we apply default repo to artifact.Image and avoid stripping tags? for _, artifact := range artifacts { a.colorPicker.AddImage(artifact.Tag) } @@ -183,18 +185,29 @@ func (a *LogAggregator) streamContainerLogs(ctx context.Context, pod *v1.Pod, co _ = tw.Close() }() - headerColor := a.colorPicker.Pick(pod) + headerColor := a.PodColor(pod) prefix := a.prefix(pod, container) if err := stream.StreamRequest(ctx, a.output, headerColor, prefix, pod.Name, container.Name, make(chan bool), &a.outputLock, a.IsMuted, tr); err != nil { logrus.Errorf("streaming request %s", err) } } +func (a *LogAggregator) PodColor(pod *v1.Pod) output.Color { + for _, container := range pod.Spec.Containers { + if c := a.colorPicker.Pick(container.Image); c != output.None { + return c + } + } + + // If no mapping is found, don't add any color formatting + return output.None +} + func (a *LogAggregator) prefix(pod *v1.Pod, container v1.ContainerStatus) string { var c latestV1.Pipeline var present bool for _, container := range pod.Spec.Containers { - if c, present = a.config.PipelineForImage(tag.StripTag(container.Image, false)); present { + if c, present = a.config.PipelineForImage(tagutil.StripTag(container.Image, false)); present { break } } diff --git a/pkg/skaffold/kubernetes/logger/log_test.go b/pkg/skaffold/kubernetes/logger/log_test.go index 7e43d751004..3d14becb3cc 100644 --- a/pkg/skaffold/kubernetes/logger/log_test.go +++ b/pkg/skaffold/kubernetes/logger/log_test.go @@ -25,11 +25,83 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) +func TestColorForPod(t *testing.T) { + tests := []struct { + description string + pod *v1.Pod + expectedColor output.Color + }{ + { + description: "not found", + pod: &v1.Pod{}, + expectedColor: output.None, + }, + { + description: "found", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "image"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[0], + }, + { + description: "ignore tag", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "image:tag"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[0], + }, + { + description: "second image", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "second:tag"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[1], + }, + { + description: "accept image with digest", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "second:tag@sha256:d3f4dd1541ee34b96850efc46955bada1a415b0594dc9948607c0197d2d16749"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[1], + }, + } + + l := NewLogAggregator(nil, nil, nil, nil) + // artifacts are registered using their tag, since these have default repo substitutions applied + l.RegisterArtifacts([]graph.Artifact{{Tag: "image"}, {Tag: "second"}}) + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + color := l.PodColor(test.pod) + + t.CheckTrue(test.expectedColor == color) + }) + } +} + func TestSinceSeconds(t *testing.T) { tests := []struct { description string diff --git a/pkg/skaffold/output/color.go b/pkg/skaffold/output/color.go index aa69187b212..b73c410792b 100644 --- a/pkg/skaffold/output/color.go +++ b/pkg/skaffold/output/color.go @@ -36,6 +36,20 @@ func init() { colors.Disable(true) } +var DefaultColorCodes = []Color{ + LightRed, + LightGreen, + LightYellow, + LightBlue, + LightPurple, + Red, + Green, + Yellow, + Blue, + Purple, + Cyan, +} + // SetupColors conditionally wraps the input `Writer` with a color enabled `Writer`. func SetupColors(out io.Writer, defaultColor int, forceColors bool) io.Writer { _, isTerm := util.IsTerminal(out) diff --git a/pkg/skaffold/output/colorpicker.go b/pkg/skaffold/output/colorpicker.go new file mode 100644 index 00000000000..fe78a5f9e8f --- /dev/null +++ b/pkg/skaffold/output/colorpicker.go @@ -0,0 +1,60 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package output + +import ( + tag "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" +) + +// ColorPicker associates colors with images such that container logs can be output to +// the terminal with a consistent color being used to identify individual log streams. +type ColorPicker struct { + imageColors map[string]Color +} + +// NewColorPicker creates a new ColorPicker. +func NewColorPicker() ColorPicker { + imageColors := make(map[string]Color) + + return ColorPicker{ + imageColors: imageColors, + } +} + +// AddImage adds an image to the ColorPicker. Each image added will be paired with a color +// selected sequentially from `DefaultColorCodes`. If all colors are used, the first color +// will be used again. The formatter for the associated color will then be returned by `Pick` +// each time it is called for the artifact and can be used to write to out in that color. +func (p *ColorPicker) AddImage(image string) { + imageName := tag.StripTag(image, false) + if _, ok := p.imageColors[imageName]; ok { + return + } + p.imageColors[imageName] = DefaultColorCodes[len(p.imageColors)%len(DefaultColorCodes)] +} + +// Pick will return the color that was associated with the image when it was added to the +// ColorPicker. If no color was associated with the image, the none color will be returned, +// which will write with no formatting. +func (p *ColorPicker) Pick(image string) Color { + if c, present := p.imageColors[tag.StripTag(image, false)]; present { + return c + } + + // If no mapping is found, don't add any color formatting + return None +} diff --git a/pkg/skaffold/tag/util.go b/pkg/skaffold/tag/util/util.go similarity index 100% rename from pkg/skaffold/tag/util.go rename to pkg/skaffold/tag/util/util.go diff --git a/pkg/skaffold/tag/util_test.go b/pkg/skaffold/tag/util/util_test.go similarity index 100% rename from pkg/skaffold/tag/util_test.go rename to pkg/skaffold/tag/util/util_test.go From b2d3d99d542932689d0476004897a773f7f8aa81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:50:53 -0400 Subject: [PATCH 095/103] Bump github.com/cenkalti/backoff/v4 from 4.0.2 to 4.1.1 (#6183) --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d759fb4631d..ca7c8e4c051 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/buildpacks/imgutil v0.0.0-20210209163614-30601e371ce3 github.com/buildpacks/lifecycle v0.10.2 github.com/buildpacks/pack v0.18.1 - github.com/cenkalti/backoff/v4 v4.0.2 + github.com/cenkalti/backoff/v4 v4.1.1 github.com/docker/cli v20.10.0-beta1.0.20201117192004-5cc239616494+incompatible github.com/docker/distribution v2.7.1+incompatible github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible diff --git a/go.sum b/go.sum index 5eaba5e033b..1cf9698e2a8 100644 --- a/go.sum +++ b/go.sum @@ -280,6 +280,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEe github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.0.2 h1:JIufpQLbh4DkbQoii76ItQIUFzevQSqOLZca4eamEDs= github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= +github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= From ed14a125f614cc561caf2af134b7f2e75ffa962f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jul 2021 22:12:27 -0400 Subject: [PATCH 096/103] Bump github.com/karrick/godirwalk from 1.15.6 to 1.16.1 (#6151) --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index ca7c8e4c051..4db23674789 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.14.8 github.com/heroku/color v0.0.6 github.com/imdario/mergo v0.3.9 - github.com/karrick/godirwalk v1.15.6 + github.com/karrick/godirwalk v1.16.1 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/krishicks/yaml-patch v0.0.10 github.com/mattn/go-colorable v0.1.8 diff --git a/go.sum b/go.sum index 1cf9698e2a8..3013311e720 100644 --- a/go.sum +++ b/go.sum @@ -875,6 +875,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karrick/godirwalk v1.15.6 h1:Yf2mmR8TJy+8Fa0SuQVto5SYap6IF7lNVX4Jdl8G1qA= github.com/karrick/godirwalk v1.15.6/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= +github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA9iw= +github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= From 7f3637b13cf34590443a1c49ffb8432d715e752b Mon Sep 17 00:00:00 2001 From: elnoro Date: Fri, 16 Jul 2021 07:42:26 +0500 Subject: [PATCH 097/103] added support for kaniko pushretry (#6211) * added support for kaniko pushretry * lint, docs fixes --- docs/content/en/schemas/v2beta20.json | 6 ++++++ pkg/skaffold/build/gcb/kaniko_test.go | 10 ++++++++++ pkg/skaffold/build/kaniko/args.go | 4 ++++ pkg/skaffold/build/kaniko/types.go | 2 ++ pkg/skaffold/schema/latest/v1/config.go | 3 +++ 5 files changed, 25 insertions(+) diff --git a/docs/content/en/schemas/v2beta20.json b/docs/content/en/schemas/v2beta20.json index fe68cb33c2b..7c203ccbe62 100755 --- a/docs/content/en/schemas/v2beta20.json +++ b/docs/content/en/schemas/v2beta20.json @@ -2185,6 +2185,11 @@ "description": "to specify a directory in the container where the OCI image layout of a built image will be placed. This can be used to automatically track the exact image built by kaniko.", "x-intellij-html-description": "to specify a directory in the container where the OCI image layout of a built image will be placed. This can be used to automatically track the exact image built by kaniko." }, + "pushRetry": { + "type": "string", + "description": "Set this flag to the number of retries that should happen for the push of an image to a remote destination.", + "x-intellij-html-description": "Set this flag to the number of retries that should happen for the push of an image to a remote destination." + }, "registryCertificate": { "additionalProperties": { "type": "string" @@ -2302,6 +2307,7 @@ "ociLayoutPath", "registryMirror", "snapshotMode", + "pushRetry", "tarPath", "verbosity", "insecureRegistry", diff --git a/pkg/skaffold/build/gcb/kaniko_test.go b/pkg/skaffold/build/gcb/kaniko_test.go index 3be57595826..8238fbc55ac 100644 --- a/pkg/skaffold/build/gcb/kaniko_test.go +++ b/pkg/skaffold/build/gcb/kaniko_test.go @@ -300,6 +300,16 @@ func TestKanikoBuildSpec(t *testing.T) { "--snapshotMode", "redo", }, }, + { + description: "with PushRetry", + artifact: &latestV1.KanikoArtifact{ + DockerfilePath: "Dockerfile", + PushRetry: "9", + }, + expectedArgs: []string{ + "--push-retry", "9", + }, + }, { description: "with TarPath", artifact: &latestV1.KanikoArtifact{ diff --git a/pkg/skaffold/build/kaniko/args.go b/pkg/skaffold/build/kaniko/args.go index d5e4fec2ed6..5c88466918b 100644 --- a/pkg/skaffold/build/kaniko/args.go +++ b/pkg/skaffold/build/kaniko/args.go @@ -134,6 +134,10 @@ func Args(artifact *latestV1.KanikoArtifact, tag, context string) ([]string, err args = append(args, SnapshotModeFlag, artifact.SnapshotMode) } + if artifact.PushRetry != "" { + args = append(args, PushRetryFlag, artifact.PushRetry) + } + if artifact.TarPath != "" { args = append(args, TarPathFlag, artifact.TarPath) } diff --git a/pkg/skaffold/build/kaniko/types.go b/pkg/skaffold/build/kaniko/types.go index 36edc30bdd1..7ae76eb6c0b 100644 --- a/pkg/skaffold/build/kaniko/types.go +++ b/pkg/skaffold/build/kaniko/types.go @@ -71,6 +71,8 @@ const ( SkipUnusedStagesFlag = "--skip-unused-stages" // SnapshotModeFlag additional flag SnapshotModeFlag = "--snapshotMode" + // PushRetryFlag additional flag + PushRetryFlag = "--push-retry" // TarPathFlag additional flag TarPathFlag = "--tarPath" // UseNewRunFlag additional flag diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index af18a5b73c7..4825c7520cf 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -1212,6 +1212,9 @@ type KanikoArtifact struct { // SnapshotMode is how Kaniko will snapshot the filesystem. SnapshotMode string `yaml:"snapshotMode,omitempty"` + // PushRetry Set this flag to the number of retries that should happen for the push of an image to a remote destination. + PushRetry string `yaml:"pushRetry,omitempty"` + // TarPath is path to save the image as a tarball at path instead of pushing the image. TarPath string `yaml:"tarPath,omitempty"` From c8fec77621b29a3fd9f20ae08905cefbcda7f47d Mon Sep 17 00:00:00 2001 From: Nick Kubala Date: Fri, 16 Jul 2021 04:03:09 -0700 Subject: [PATCH 098/103] Strip all formatting logic from LogAggregator into Formatter interface (#6227) * Strip all formatting logic from LogAggregator into Formatter interface * fix linters Co-authored-by: gsquared94 --- pkg/skaffold/kubernetes/logger/formatter.go | 132 +++++++++++ .../kubernetes/logger/formatter_test.go | 224 ++++++++++++++++++ pkg/skaffold/kubernetes/logger/log.go | 63 +---- pkg/skaffold/kubernetes/logger/log_test.go | 157 ------------ pkg/skaffold/log/formatter.go | 25 ++ pkg/skaffold/log/stream/stream.go | 30 +-- pkg/skaffold/log/stream/stream_test.go | 57 ----- pkg/skaffold/output/colorpicker.go | 13 +- 8 files changed, 397 insertions(+), 304 deletions(-) create mode 100644 pkg/skaffold/kubernetes/logger/formatter.go create mode 100644 pkg/skaffold/kubernetes/logger/formatter_test.go create mode 100644 pkg/skaffold/log/formatter.go delete mode 100644 pkg/skaffold/log/stream/stream_test.go diff --git a/pkg/skaffold/kubernetes/logger/formatter.go b/pkg/skaffold/kubernetes/logger/formatter.go new file mode 100644 index 00000000000..237a3b8dadc --- /dev/null +++ b/pkg/skaffold/kubernetes/logger/formatter.go @@ -0,0 +1,132 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package logger + +import ( + "fmt" + "io" + "sync" + + v1 "k8s.io/api/core/v1" + + eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + tagutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" +) + +type kubernetesLogFormatter struct { + colorPicker output.ColorPicker + prefix string + + pod *v1.Pod + container v1.ContainerStatus + + lock sync.Mutex + isMuted func() bool +} + +func NewKubernetesLogFormatter(config Config, colorPicker output.ColorPicker, isMuted func() bool, pod *v1.Pod, container v1.ContainerStatus) log.Formatter { + return newKubernetesLogFormatter(config, colorPicker, isMuted, pod, container) +} + +func newKubernetesLogFormatter(config Config, colorPicker output.ColorPicker, isMuted func() bool, pod *v1.Pod, container v1.ContainerStatus) *kubernetesLogFormatter { + return &kubernetesLogFormatter{ + colorPicker: colorPicker, + pod: pod, + container: container, + prefix: prefix(config, pod, container), + isMuted: isMuted, + } +} + +func (k *kubernetesLogFormatter) Name() string { return k.prefix } + +func (k *kubernetesLogFormatter) PrintLine(out io.Writer, line string) { + formattedPrefix := k.prefix + if output.IsColorable(out) { + formattedPrefix = k.color().Sprintf("%s", k.prefix) + // if our original prefix was empty, don't prepend a space to the line, + // but keep the color prefix we just added. + if k.prefix != "" { + formattedPrefix = fmt.Sprintf("%s ", formattedPrefix) + } + } + formattedLine := fmt.Sprintf("%s%s", formattedPrefix, line) + eventV2.ApplicationLog(k.pod.Name, k.container.Name, formattedPrefix, line, formattedLine) + + if !k.isMuted() { + k.lock.Lock() + defer k.lock.Unlock() + fmt.Fprint(out, formattedLine) + } +} + +func (k *kubernetesLogFormatter) color() output.Color { + for _, container := range k.pod.Spec.Containers { + if c := k.colorPicker.Pick(container.Image); c != output.None { + return c + } + } + + // If no mapping is found, don't add any color formatting + return output.None +} + +func prefix(config Config, pod *v1.Pod, container v1.ContainerStatus) string { + var c latestV1.Pipeline + var present bool + for _, container := range pod.Spec.Containers { + if c, present = config.PipelineForImage(tagutil.StripTag(container.Image, false)); present { + break + } + } + if !present { + c = config.DefaultPipeline() + } + switch c.Deploy.Logs.Prefix { + case "auto": + if pod.Name != container.Name { + return podAndContainerPrefix(pod, container) + } + return autoPrefix(pod, container) + case "container": + return containerPrefix(container) + case "podAndContainer": + return podAndContainerPrefix(pod, container) + case "none": + return "" + default: + panic("unsupported prefix: " + c.Deploy.Logs.Prefix) + } +} + +func autoPrefix(pod *v1.Pod, container v1.ContainerStatus) string { + if pod.Name != container.Name { + return fmt.Sprintf("[%s %s]", pod.Name, container.Name) + } + return fmt.Sprintf("[%s]", container.Name) +} + +func containerPrefix(container v1.ContainerStatus) string { + return fmt.Sprintf("[%s]", container.Name) +} + +func podAndContainerPrefix(pod *v1.Pod, container v1.ContainerStatus) string { + return fmt.Sprintf("[%s %s]", pod.Name, container.Name) +} diff --git a/pkg/skaffold/kubernetes/logger/formatter_test.go b/pkg/skaffold/kubernetes/logger/formatter_test.go new file mode 100644 index 00000000000..0207a07866f --- /dev/null +++ b/pkg/skaffold/kubernetes/logger/formatter_test.go @@ -0,0 +1,224 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package logger + +import ( + "bytes" + "strings" + "sync" + "testing" + + v1 "k8s.io/api/core/v1" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +type mockColorPicker struct{} + +func (m *mockColorPicker) Pick(image string) output.Color { + return output.Default +} + +func (m *mockColorPicker) AddImage(string) {} + +type mockConfig struct { + log latestV1.LogsConfig +} + +func (c *mockConfig) Tail() bool { + return true +} + +func (c *mockConfig) PipelineForImage(string) (latestV1.Pipeline, bool) { + var pipeline latestV1.Pipeline + pipeline.Deploy.Logs = c.log + return pipeline, true +} + +func (c *mockConfig) DefaultPipeline() latestV1.Pipeline { + var pipeline latestV1.Pipeline + pipeline.Deploy.Logs = c.log + return pipeline +} + +func TestPrintLogLine(t *testing.T) { + testutil.Run(t, "verify lines are not intermixed", func(t *testutil.T) { + var ( + buf bytes.Buffer + wg sync.WaitGroup + + linesPerGroup = 100 + groups = 5 + ) + + f := NewKubernetesLogFormatter(&mockConfig{log: latestV1.LogsConfig{Prefix: "none"}}, &mockColorPicker{}, func() bool { return false }, &v1.Pod{}, v1.ContainerStatus{}) + + for i := 0; i < groups; i++ { + wg.Add(1) + + go func() { + for i := 0; i < linesPerGroup; i++ { + f.PrintLine(&buf, "TEXT\n") + } + wg.Done() + }() + } + wg.Wait() + + lines := strings.Split(buf.String(), "\n") + for i := 0; i < groups*linesPerGroup; i++ { + t.CheckDeepEqual("TEXT", lines[i]) + } + }) +} + +func TestColorForPod(t *testing.T) { + tests := []struct { + description string + pod *v1.Pod + expectedColor output.Color + }{ + { + description: "not found", + pod: &v1.Pod{}, + expectedColor: output.None, + }, + { + description: "found", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "image"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[0], + }, + { + description: "ignore tag", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "image:tag"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[0], + }, + { + description: "second image", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "second:tag"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[1], + }, + { + description: "accept image with digest", + pod: &v1.Pod{ + Spec: v1.PodSpec{ + Containers: []v1.Container{ + {Image: "second:tag@sha256:d3f4dd1541ee34b96850efc46955bada1a415b0594dc9948607c0197d2d16749"}, + }, + }, + }, + expectedColor: output.DefaultColorCodes[1], + }, + } + + // artifacts are registered using their tag, since these have default repo substitutions applied + p := output.NewColorPicker() + p.AddImage("image") + p.AddImage("second") + + for _, test := range tests { + f := newKubernetesLogFormatter(&mockConfig{log: latestV1.LogsConfig{Prefix: "none"}}, p, func() bool { return false }, test.pod, v1.ContainerStatus{}) + + testutil.Run(t, test.description, func(t *testutil.T) { + color := f.color() + + t.CheckTrue(test.expectedColor == color) + }) + } +} + +func TestPrefix(t *testing.T) { + tests := []struct { + description string + prefix string + pod v1.Pod + container v1.ContainerStatus + expectedPrefix string + }{ + { + description: "auto (different names)", + prefix: "auto", + pod: podWithName("pod"), + container: containerWithName("container"), + expectedPrefix: "[pod container]", + }, + { + description: "auto (same names)", + prefix: "auto", + pod: podWithName("hello"), + container: containerWithName("hello"), + expectedPrefix: "[hello]", + }, + { + description: "container", + prefix: "container", + pod: podWithName("pod"), + container: containerWithName("container"), + expectedPrefix: "[container]", + }, + { + description: "podAndContainer (different names)", + prefix: "podAndContainer", + pod: podWithName("pod"), + container: containerWithName("container"), + expectedPrefix: "[pod container]", + }, + { + description: "podAndContainer (same names)", + prefix: "podAndContainer", + pod: podWithName("hello"), + container: containerWithName("hello"), + expectedPrefix: "[hello hello]", + }, + { + description: "none", + prefix: "none", + pod: podWithName("hello"), + container: containerWithName("hello"), + expectedPrefix: "", + }, + } + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + f := newKubernetesLogFormatter(&mockConfig{log: latestV1.LogsConfig{ + Prefix: test.prefix, + }}, &mockColorPicker{}, func() bool { return false }, &test.pod, test.container) + + t.CheckDeepEqual(test.expectedPrefix, f.prefix) + }) + } +} diff --git a/pkg/skaffold/kubernetes/logger/log.go b/pkg/skaffold/kubernetes/logger/log.go index ae01af5d2d9..2b527432658 100644 --- a/pkg/skaffold/kubernetes/logger/log.go +++ b/pkg/skaffold/kubernetes/logger/log.go @@ -33,7 +33,6 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log/stream" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" - tagutil "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" ) // LogAggregator aggregates the logs for all the deployed pods. @@ -50,7 +49,6 @@ type LogAggregator struct { sinceTime time.Time events chan kubernetes.PodEvent trackedContainers trackedContainers - outputLock sync.Mutex namespaces *[]string } @@ -185,67 +183,12 @@ func (a *LogAggregator) streamContainerLogs(ctx context.Context, pod *v1.Pod, co _ = tw.Close() }() - headerColor := a.PodColor(pod) - prefix := a.prefix(pod, container) - if err := stream.StreamRequest(ctx, a.output, headerColor, prefix, pod.Name, container.Name, make(chan bool), &a.outputLock, a.IsMuted, tr); err != nil { + formatter := NewKubernetesLogFormatter(a.config, a.colorPicker, a.IsMuted, pod, container) + if err := stream.StreamRequest(ctx, a.output, formatter, tr); err != nil { logrus.Errorf("streaming request %s", err) } } -func (a *LogAggregator) PodColor(pod *v1.Pod) output.Color { - for _, container := range pod.Spec.Containers { - if c := a.colorPicker.Pick(container.Image); c != output.None { - return c - } - } - - // If no mapping is found, don't add any color formatting - return output.None -} - -func (a *LogAggregator) prefix(pod *v1.Pod, container v1.ContainerStatus) string { - var c latestV1.Pipeline - var present bool - for _, container := range pod.Spec.Containers { - if c, present = a.config.PipelineForImage(tagutil.StripTag(container.Image, false)); present { - break - } - } - if !present { - c = a.config.DefaultPipeline() - } - switch c.Deploy.Logs.Prefix { - case "auto": - if pod.Name != container.Name { - return podAndContainerPrefix(pod, container) - } - return autoPrefix(pod, container) - case "container": - return containerPrefix(container) - case "podAndContainer": - return podAndContainerPrefix(pod, container) - case "none": - return "" - default: - panic("unsupported prefix: " + c.Deploy.Logs.Prefix) - } -} - -func autoPrefix(pod *v1.Pod, container v1.ContainerStatus) string { - if pod.Name != container.Name { - return fmt.Sprintf("[%s %s]", pod.Name, container.Name) - } - return fmt.Sprintf("[%s]", container.Name) -} - -func containerPrefix(container v1.ContainerStatus) string { - return fmt.Sprintf("[%s]", container.Name) -} - -func podAndContainerPrefix(pod *v1.Pod, container v1.ContainerStatus) string { - return fmt.Sprintf("[%s %s]", pod.Name, container.Name) -} - // Mute mutes the logs. func (a *LogAggregator) Mute() { if a == nil { @@ -280,12 +223,12 @@ type trackedContainers struct { // was already tracked. func (t *trackedContainers) add(id string) bool { t.Lock() + defer t.Unlock() alreadyTracked := t.ids[id] if t.ids == nil { t.ids = map[string]bool{} } t.ids[id] = true - t.Unlock() return alreadyTracked } diff --git a/pkg/skaffold/kubernetes/logger/log_test.go b/pkg/skaffold/kubernetes/logger/log_test.go index 3d14becb3cc..aa9da94563d 100644 --- a/pkg/skaffold/kubernetes/logger/log_test.go +++ b/pkg/skaffold/kubernetes/logger/log_test.go @@ -25,83 +25,10 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" - latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/testutil" ) -func TestColorForPod(t *testing.T) { - tests := []struct { - description string - pod *v1.Pod - expectedColor output.Color - }{ - { - description: "not found", - pod: &v1.Pod{}, - expectedColor: output.None, - }, - { - description: "found", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "image"}, - }, - }, - }, - expectedColor: output.DefaultColorCodes[0], - }, - { - description: "ignore tag", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "image:tag"}, - }, - }, - }, - expectedColor: output.DefaultColorCodes[0], - }, - { - description: "second image", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "second:tag"}, - }, - }, - }, - expectedColor: output.DefaultColorCodes[1], - }, - { - description: "accept image with digest", - pod: &v1.Pod{ - Spec: v1.PodSpec{ - Containers: []v1.Container{ - {Image: "second:tag@sha256:d3f4dd1541ee34b96850efc46955bada1a415b0594dc9948607c0197d2d16749"}, - }, - }, - }, - expectedColor: output.DefaultColorCodes[1], - }, - } - - l := NewLogAggregator(nil, nil, nil, nil) - // artifacts are registered using their tag, since these have default repo substitutions applied - l.RegisterArtifacts([]graph.Artifact{{Tag: "image"}, {Tag: "second"}}) - - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - color := l.PodColor(test.pod) - - t.CheckTrue(test.expectedColor == color) - }) - } -} - func TestSinceSeconds(t *testing.T) { tests := []struct { description string @@ -176,70 +103,6 @@ func TestLogAggregatorZeroValue(t *testing.T) { m.Stop() } -func TestPrefix(t *testing.T) { - tests := []struct { - description string - prefix string - pod v1.Pod - container v1.ContainerStatus - expectedPrefix string - }{ - { - description: "auto (different names)", - prefix: "auto", - pod: podWithName("pod"), - container: containerWithName("container"), - expectedPrefix: "[pod container]", - }, - { - description: "auto (same names)", - prefix: "auto", - pod: podWithName("hello"), - container: containerWithName("hello"), - expectedPrefix: "[hello]", - }, - { - description: "container", - prefix: "container", - pod: podWithName("pod"), - container: containerWithName("container"), - expectedPrefix: "[container]", - }, - { - description: "podAndContainer (different names)", - prefix: "podAndContainer", - pod: podWithName("pod"), - container: containerWithName("container"), - expectedPrefix: "[pod container]", - }, - { - description: "podAndContainer (same names)", - prefix: "podAndContainer", - pod: podWithName("hello"), - container: containerWithName("hello"), - expectedPrefix: "[hello hello]", - }, - { - description: "none", - prefix: "none", - pod: podWithName("hello"), - container: containerWithName("hello"), - expectedPrefix: "", - }, - } - for _, test := range tests { - testutil.Run(t, test.description, func(t *testutil.T) { - logger := NewLogAggregator(nil, nil, nil, &mockConfig{log: latestV1.LogsConfig{ - Prefix: test.prefix, - }}) - - p := logger.prefix(&test.pod, test.container) - - t.CheckDeepEqual(test.expectedPrefix, p) - }) - } -} - func podWithName(n string) v1.Pod { return v1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -253,23 +116,3 @@ func containerWithName(n string) v1.ContainerStatus { Name: n, } } - -type mockConfig struct { - log latestV1.LogsConfig -} - -func (c *mockConfig) Tail() bool { - return true -} - -func (c *mockConfig) PipelineForImage(string) (latestV1.Pipeline, bool) { - var pipeline latestV1.Pipeline - pipeline.Deploy.Logs = c.log - return pipeline, true -} - -func (c *mockConfig) DefaultPipeline() latestV1.Pipeline { - var pipeline latestV1.Pipeline - pipeline.Deploy.Logs = c.log - return pipeline -} diff --git a/pkg/skaffold/log/formatter.go b/pkg/skaffold/log/formatter.go new file mode 100644 index 00000000000..dc5c6a8287d --- /dev/null +++ b/pkg/skaffold/log/formatter.go @@ -0,0 +1,25 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package log + +import "io" + +type Formatter interface { + Name() string + + PrintLine(io.Writer, string) +} diff --git a/pkg/skaffold/log/stream/stream.go b/pkg/skaffold/log/stream/stream.go index 01cbe0675d7..efde790756b 100644 --- a/pkg/skaffold/log/stream/stream.go +++ b/pkg/skaffold/log/stream/stream.go @@ -21,23 +21,19 @@ import ( "context" "fmt" "io" - "sync" "github.com/sirupsen/logrus" - eventV2 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event/v2" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/log" ) //nolint:golint -func StreamRequest(ctx context.Context, out io.Writer, headerColor output.Color, prefix, podName, containerName string, stopper chan bool, lock sync.Locker, isMuted func() bool, rc io.Reader) error { +func StreamRequest(ctx context.Context, out io.Writer, formatter log.Formatter, rc io.Reader) error { r := bufio.NewReader(rc) for { select { case <-ctx.Done(): - logrus.Infof("%s interrupted", prefix) - return nil - case <-stopper: + logrus.Infof("%s interrupted", formatter.Name()) return nil default: // Read up to newline @@ -49,25 +45,7 @@ func StreamRequest(ctx context.Context, out io.Writer, headerColor output.Color, return fmt.Errorf("reading bytes from log stream: %w", err) } - printLogLine(headerColor, out, isMuted, lock, podName, containerName, prefix, line) + formatter.PrintLine(out, line) } } } - -func printLogLine(headerColor output.Color, out io.Writer, isMuted func() bool, lock sync.Locker, podName, containerName, prefix, text string) { - formattedPrefix := prefix - if output.IsColorable(out) { - formattedPrefix = headerColor.Sprintf("%s", prefix) - } - formattedLine := fmt.Sprintf("%s %s", formattedPrefix, text) - eventV2.ApplicationLog(podName, containerName, formattedPrefix, text, formattedLine) - - if !isMuted() { - lock.Lock() - - headerColor.Fprintf(out, "%s ", prefix) - fmt.Fprint(out, text) - - lock.Unlock() - } -} diff --git a/pkg/skaffold/log/stream/stream_test.go b/pkg/skaffold/log/stream/stream_test.go deleted file mode 100644 index 2da22f225b4..00000000000 --- a/pkg/skaffold/log/stream/stream_test.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2021 The Skaffold Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package stream - -import ( - "bytes" - "strings" - "sync" - "testing" - - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" - "github.com/GoogleContainerTools/skaffold/testutil" -) - -func TestPrintLogLine(t *testing.T) { - testutil.Run(t, "verify lines are not intermixed", func(t *testutil.T) { - var ( - buf bytes.Buffer - wg sync.WaitGroup - lock sync.Mutex - - linesPerGroup = 100 - groups = 5 - ) - - for i := 0; i < groups; i++ { - wg.Add(1) - - go func() { - for i := 0; i < linesPerGroup; i++ { - printLogLine(output.Default, &buf, func() bool { return false }, &lock, "PODNAME", "CONTAINERNAME", "PREFIX", "TEXT\n") - } - wg.Done() - }() - } - wg.Wait() - - lines := strings.Split(buf.String(), "\n") - for i := 0; i < groups*linesPerGroup; i++ { - t.CheckDeepEqual("PREFIX TEXT", lines[i]) - } - }) -} diff --git a/pkg/skaffold/output/colorpicker.go b/pkg/skaffold/output/colorpicker.go index fe78a5f9e8f..b99f4aefe3a 100644 --- a/pkg/skaffold/output/colorpicker.go +++ b/pkg/skaffold/output/colorpicker.go @@ -20,9 +20,14 @@ import ( tag "github.com/GoogleContainerTools/skaffold/pkg/skaffold/tag/util" ) +type ColorPicker interface { + AddImage(string) + Pick(string) Color +} + // ColorPicker associates colors with images such that container logs can be output to // the terminal with a consistent color being used to identify individual log streams. -type ColorPicker struct { +type colorPicker struct { imageColors map[string]Color } @@ -30,7 +35,7 @@ type ColorPicker struct { func NewColorPicker() ColorPicker { imageColors := make(map[string]Color) - return ColorPicker{ + return &colorPicker{ imageColors: imageColors, } } @@ -39,7 +44,7 @@ func NewColorPicker() ColorPicker { // selected sequentially from `DefaultColorCodes`. If all colors are used, the first color // will be used again. The formatter for the associated color will then be returned by `Pick` // each time it is called for the artifact and can be used to write to out in that color. -func (p *ColorPicker) AddImage(image string) { +func (p *colorPicker) AddImage(image string) { imageName := tag.StripTag(image, false) if _, ok := p.imageColors[imageName]; ok { return @@ -50,7 +55,7 @@ func (p *ColorPicker) AddImage(image string) { // Pick will return the color that was associated with the image when it was added to the // ColorPicker. If no color was associated with the image, the none color will be returned, // which will write with no formatting. -func (p *ColorPicker) Pick(image string) Color { +func (p *colorPicker) Pick(image string) Color { if c, present := p.imageColors[tag.StripTag(image, false)]; present { return c } From 7ea01d159f23b09edd05b39a5189627377a578c4 Mon Sep 17 00:00:00 2001 From: Marlon Gamez Date: Fri, 16 Jul 2021 11:21:36 -0700 Subject: [PATCH 099/103] Remove unneeded `Origin` field from `SkaffoldLogEvent` (#6208) * remove unneeded origin field from SkaffoldLogEvent * proto numbering --- pkg/skaffold/build/scheduler.go | 2 +- pkg/skaffold/deploy/deploy_mux.go | 2 +- pkg/skaffold/event/v2/logger.go | 5 +- pkg/skaffold/event/v2/logger_test.go | 1 - pkg/skaffold/output/output.go | 6 +- pkg/skaffold/output/output_test.go | 8 +- pkg/skaffold/runner/build.go | 2 +- pkg/skaffold/runner/v1/deploy.go | 2 +- proto/v2/skaffold.pb.go | 311 +++++++++++++-------------- proto/v2/skaffold.proto | 3 +- 10 files changed, 165 insertions(+), 177 deletions(-) diff --git a/pkg/skaffold/build/scheduler.go b/pkg/skaffold/build/scheduler.go index ab1234789a5..e51e1e509d1 100644 --- a/pkg/skaffold/build/scheduler.go +++ b/pkg/skaffold/build/scheduler.go @@ -108,7 +108,7 @@ func (s *scheduler) build(ctx context.Context, tags tag.ImageTags, i int) error } defer closeFn() - w = output.WithEventContext(w, constants.Build, a.ImageName, "skaffold") + w = output.WithEventContext(w, constants.Build, a.ImageName) finalTag, err := performBuild(ctx, w, tags, a, s.artifactBuilder) if err != nil { event.BuildFailed(a.ImageName, err) diff --git a/pkg/skaffold/deploy/deploy_mux.go b/pkg/skaffold/deploy/deploy_mux.go index 5a2234018d9..db3506aa1df 100644 --- a/pkg/skaffold/deploy/deploy_mux.go +++ b/pkg/skaffold/deploy/deploy_mux.go @@ -102,7 +102,7 @@ func (m DeployerMux) RegisterLocalImages(images []graph.Artifact) { func (m DeployerMux) Deploy(ctx context.Context, w io.Writer, as []graph.Artifact) error { for i, deployer := range m.deployers { eventV2.DeployInProgress(i) - w = output.WithEventContext(w, constants.Deploy, strconv.Itoa(i), "skaffold") + w = output.WithEventContext(w, constants.Deploy, strconv.Itoa(i)) ctx, endTrace := instrumentation.StartTrace(ctx, "Deploy") if err := deployer.Deploy(ctx, w, as); err != nil { diff --git a/pkg/skaffold/event/v2/logger.go b/pkg/skaffold/event/v2/logger.go index 1b0e1ceba52..4507b2865b7 100644 --- a/pkg/skaffold/event/v2/logger.go +++ b/pkg/skaffold/event/v2/logger.go @@ -27,14 +27,12 @@ import ( type logger struct { Phase constants.Phase SubtaskID string - Origin string } -func NewLogger(phase constants.Phase, subtaskID, origin string) io.Writer { +func NewLogger(phase constants.Phase, subtaskID string) io.Writer { return logger{ Phase: phase, SubtaskID: subtaskID, - Origin: origin, } } @@ -42,7 +40,6 @@ func (l logger) Write(p []byte) (int, error) { handler.handleSkaffoldLogEvent(&proto.SkaffoldLogEvent{ TaskId: fmt.Sprintf("%s-%d", l.Phase, handler.iteration), SubtaskId: l.SubtaskID, - Origin: l.Origin, Level: 0, Message: string(p), }) diff --git a/pkg/skaffold/event/v2/logger_test.go b/pkg/skaffold/event/v2/logger_test.go index 0f0f03fa908..5f03226a63b 100644 --- a/pkg/skaffold/event/v2/logger_test.go +++ b/pkg/skaffold/event/v2/logger_test.go @@ -40,7 +40,6 @@ func TestHandleSkaffoldLogEvent(t *testing.T) { testHandler.handleSkaffoldLogEvent(&proto.SkaffoldLogEvent{ TaskId: "Test-0", SubtaskId: "1", - Origin: "skaffold-test", Level: enums.LogLevel_INFO, Message: message, }) diff --git a/pkg/skaffold/output/output.go b/pkg/skaffold/output/output.go index 001c96b5cde..e76382a3daa 100644 --- a/pkg/skaffold/output/output.go +++ b/pkg/skaffold/output/output.go @@ -67,7 +67,7 @@ func GetWriter(out io.Writer, defaultColor int, forceColors bool, timestamps boo return skaffoldWriter{ MainWriter: SetupColors(out, defaultColor, forceColors), - EventWriter: eventV2.NewLogger(constants.DevLoop, "-1", "skaffold"), + EventWriter: eventV2.NewLogger(constants.DevLoop, "-1"), timestamps: timestamps, } } @@ -99,11 +99,11 @@ func GetUnderlyingWriter(out io.Writer) io.Writer { // WithEventContext will return a new skaffoldWriter with the given parameters to be used for the event writer. // If the passed io.Writer is not a skaffoldWriter, then it is simply returned. -func WithEventContext(out io.Writer, phase constants.Phase, subtaskID, origin string) io.Writer { +func WithEventContext(out io.Writer, phase constants.Phase, subtaskID string) io.Writer { if sw, isSW := out.(skaffoldWriter); isSW { return skaffoldWriter{ MainWriter: sw.MainWriter, - EventWriter: eventV2.NewLogger(phase, subtaskID, origin), + EventWriter: eventV2.NewLogger(phase, subtaskID), timestamps: sw.timestamps, } } diff --git a/pkg/skaffold/output/output_test.go b/pkg/skaffold/output/output_test.go index 594be95006d..079c0f5fd20 100644 --- a/pkg/skaffold/output/output_test.go +++ b/pkg/skaffold/output/output_test.go @@ -127,7 +127,6 @@ func TestWithEventContext(t *testing.T) { writer io.Writer phase constants.Phase subtaskID string - origin string expected io.Writer }{ @@ -135,14 +134,13 @@ func TestWithEventContext(t *testing.T) { name: "skaffoldWriter update info", writer: skaffoldWriter{ MainWriter: ioutil.Discard, - EventWriter: eventV2.NewLogger(constants.Build, "1", "skaffold-test"), + EventWriter: eventV2.NewLogger(constants.Build, "1"), }, phase: constants.Test, subtaskID: "2", - origin: "skaffold-test-change", expected: skaffoldWriter{ MainWriter: ioutil.Discard, - EventWriter: eventV2.NewLogger(constants.Test, "2", "skaffold-test-change"), + EventWriter: eventV2.NewLogger(constants.Test, "2"), }, }, { @@ -154,7 +152,7 @@ func TestWithEventContext(t *testing.T) { for _, test := range tests { testutil.Run(t, test.name, func(t *testutil.T) { - got := WithEventContext(test.writer, test.phase, test.subtaskID, test.origin) + got := WithEventContext(test.writer, test.phase, test.subtaskID) t.CheckDeepEqual(test.expected, got, cmpopts.IgnoreTypes(false)) }) } diff --git a/pkg/skaffold/runner/build.go b/pkg/skaffold/runner/build.go index 65e12f2c257..e892d0173f8 100644 --- a/pkg/skaffold/runner/build.go +++ b/pkg/skaffold/runner/build.go @@ -65,7 +65,7 @@ func (r *Builder) GetBuilds() []graph.Artifact { // Build builds a list of artifacts. func (r *Builder) Build(ctx context.Context, out io.Writer, artifacts []*latestV1.Artifact) ([]graph.Artifact, error) { eventV2.TaskInProgress(constants.Build, "Build containers") - out = output.WithEventContext(out, constants.Build, eventV2.SubtaskIDNone, "skaffold") + out = output.WithEventContext(out, constants.Build, eventV2.SubtaskIDNone) // Use tags directly from the Kubernetes manifests. if r.runCtx.DigestSource() == NoneDigestSource { diff --git a/pkg/skaffold/runner/v1/deploy.go b/pkg/skaffold/runner/v1/deploy.go index c389484a611..bd0cf8f94f6 100644 --- a/pkg/skaffold/runner/v1/deploy.go +++ b/pkg/skaffold/runner/v1/deploy.go @@ -69,7 +69,7 @@ func (r *SkaffoldRunner) Deploy(ctx context.Context, out io.Writer, artifacts [] } defer r.deployer.GetStatusMonitor().Reset() - out = output.WithEventContext(out, constants.Deploy, eventV2.SubtaskIDNone, "skaffold") + out = output.WithEventContext(out, constants.Deploy, eventV2.SubtaskIDNone) output.Default.Fprintln(out, "Tags used in deployment:") diff --git a/proto/v2/skaffold.pb.go b/proto/v2/skaffold.pb.go index 9ac8a22dd34..f56a8c531a4 100644 --- a/proto/v2/skaffold.pb.go +++ b/proto/v2/skaffold.pb.go @@ -1764,9 +1764,9 @@ func (m *MetaEvent) GetMetadata() *Metadata { // `SkaffoldLogEvent` represents a piece of output that comes from a skaffold run, for example: "Generating tags...", "Step 1/3 : FROM gcr.io/distroless/base" type SkaffoldLogEvent struct { - TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - SubtaskId string `protobuf:"bytes,2,opt,name=subtask_id,json=subtaskId,proto3" json:"subtask_id,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + SubtaskId string `protobuf:"bytes,2,opt,name=subtask_id,json=subtaskId,proto3" json:"subtask_id,omitempty"` + // string origin = 3; // REMOVED: which tool the output came from ex: skaffold, docker Level enums.LogLevel `protobuf:"varint,4,opt,name=level,proto3,enum=proto.enums.LogLevel" json:"level,omitempty"` Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1813,13 +1813,6 @@ func (m *SkaffoldLogEvent) GetSubtaskId() string { return "" } -func (m *SkaffoldLogEvent) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - func (m *SkaffoldLogEvent) GetLevel() enums.LogLevel { if m != nil { return m.Level @@ -3023,155 +3016,155 @@ func init() { func init() { proto.RegisterFile("v2/skaffold.proto", fileDescriptor_39088757fd9c8e40) } var fileDescriptor_39088757fd9c8e40 = []byte{ - // 2356 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x73, 0x1b, 0xc7, - 0x11, 0xd6, 0x02, 0x5c, 0x00, 0xdb, 0x20, 0x21, 0x72, 0x28, 0x89, 0x08, 0x44, 0xc9, 0xd2, 0xda, - 0x4e, 0xe4, 0x17, 0x20, 0x41, 0x89, 0xe5, 0x52, 0x45, 0x76, 0xa8, 0x27, 0x19, 0xbd, 0xac, 0x21, - 0xed, 0xaa, 0x3c, 0x1c, 0xd5, 0x72, 0x77, 0x08, 0x6d, 0x11, 0xd8, 0x45, 0x76, 0x07, 0xb4, 0x70, - 0x4b, 0xe5, 0x90, 0xca, 0x21, 0xa7, 0xc4, 0xa7, 0x9c, 0x7c, 0xcd, 0x3d, 0xb7, 0x1c, 0x53, 0x95, - 0x3f, 0x90, 0xaa, 0xfc, 0x80, 0x54, 0x0e, 0xa9, 0x54, 0xce, 0x39, 0xa7, 0xe6, 0xb5, 0x3b, 0xb3, - 0x0b, 0x88, 0xa4, 0x14, 0x55, 0x7c, 0x21, 0xb7, 0x67, 0xbe, 0xee, 0xe9, 0xe9, 0xe9, 0xee, 0xe9, - 0x1e, 0xc0, 0xca, 0x41, 0xbf, 0x97, 0xee, 0x7b, 0x7b, 0x7b, 0xf1, 0x30, 0xe8, 0x8e, 0x93, 0x98, - 0xc6, 0xa8, 0xc1, 0xff, 0x75, 0x0f, 0xfa, 0x9d, 0xf5, 0x41, 0x1c, 0x0f, 0x86, 0xa4, 0xe7, 0x8d, - 0xc3, 0x9e, 0x17, 0x45, 0x31, 0xf5, 0x68, 0x18, 0x47, 0xa9, 0xc0, 0x75, 0xde, 0x90, 0xb3, 0x9c, - 0xda, 0x9d, 0xec, 0xf5, 0x68, 0x38, 0x22, 0x29, 0xf5, 0x46, 0x63, 0x09, 0x38, 0x5b, 0x04, 0x90, - 0xd1, 0x98, 0x4e, 0xe5, 0xe4, 0x0a, 0x89, 0x26, 0xa3, 0xb4, 0xc7,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x2e, 0xea, 0x3c, 0x37, 0x8d, 0xbc, 0x03, 0x55, 0x92, 0x24, 0x32, 0xb4, - 0xb5, 0x73, 0xd9, 0xf0, 0x79, 0xb5, 0xb7, 0x3b, 0x24, 0x77, 0x92, 0x04, 0x33, 0x0c, 0x2b, 0xe3, - 0x96, 0x8c, 0x61, 0x74, 0x05, 0xea, 0x24, 0x49, 0x78, 0x82, 0xb4, 0x5e, 0x9c, 0x20, 0x15, 0x8e, - 0x15, 0xa1, 0x23, 0x92, 0xa6, 0xde, 0x40, 0xe5, 0x3e, 0x45, 0xa2, 0x0f, 0xa1, 0x99, 0x4e, 0x06, - 0x03, 0x92, 0xf2, 0x17, 0x09, 0xd9, 0x3a, 0x6b, 0xdd, 0xfa, 0x76, 0x36, 0x89, 0x75, 0xa0, 0xfb, - 0x04, 0x9c, 0x2c, 0x0f, 0xb1, 0xc4, 0x4a, 0x58, 0xce, 0x95, 0xbb, 0x14, 0x84, 0xd1, 0x6f, 0x56, - 0x0e, 0xef, 0x37, 0xdd, 0x3f, 0xb0, 0x1b, 0xa7, 0x98, 0x8b, 0xd6, 0xa0, 0xce, 0xec, 0xff, 0x34, - 0x0c, 0x94, 0x09, 0x19, 0xb9, 0x15, 0xa0, 0x73, 0x00, 0xa9, 0x38, 0x1b, 0x36, 0x27, 0x76, 0xe5, - 0xc8, 0x91, 0xad, 0x80, 0x59, 0x3e, 0x4e, 0xc2, 0x41, 0x18, 0xc9, 0xaa, 0x5b, 0x52, 0xe8, 0x3d, - 0xb0, 0x87, 0xe4, 0x80, 0x0c, 0x79, 0x36, 0x6b, 0x65, 0xbd, 0xa9, 0x30, 0xdd, 0x83, 0x78, 0xf0, - 0x80, 0x4d, 0x62, 0x81, 0xd1, 0xcd, 0x66, 0x1b, 0x66, 0x73, 0xff, 0x64, 0xc1, 0xea, 0x8c, 0xf4, - 0x87, 0xde, 0x82, 0x25, 0x5f, 0x39, 0xfb, 0xa3, 0xfc, 0x89, 0xc4, 0x1c, 0x64, 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x65, 0xc0, 0xa0, 0x00, 0x9c, 0x8d, 0x09, 0x8d, 0x79, 0x79, 0x8b, 0xda, - 0xa5, 0xe0, 0x38, 0x4c, 0xf6, 0xdb, 0x5c, 0xf6, 0x1b, 0x9d, 0x33, 0x4c, 0x36, 0xf7, 0xf7, 0x9e, - 0x37, 0xa1, 0xf1, 0x53, 0xb5, 0x8c, 0x08, 0x2b, 0xb4, 0x0b, 0x0d, 0xb6, 0x0a, 0xbb, 0x3d, 0x5e, - 0x62, 0x91, 0xb7, 0xf8, 0x22, 0xe7, 0x3b, 0xa7, 0xb9, 0x71, 0xa6, 0x91, 0x3f, 0x73, 0x8d, 0x3d, - 0x00, 0xb6, 0x86, 0x28, 0xdb, 0x5e, 0x62, 0x95, 0x6f, 0xf3, 0x55, 0x2e, 0x74, 0xd6, 0xd8, 0x2a, - 0x22, 0x1e, 0x67, 0xae, 0xf3, 0x18, 0x6a, 0x9b, 0x5e, 0x14, 0x0c, 0x09, 0x2a, 0x9e, 0xe2, 0x5c, - 0xd1, 0xeb, 0x5c, 0xf4, 0x19, 0x77, 0x25, 0xf7, 0xc3, 0xde, 0x33, 0x2e, 0xe3, 0xba, 0xf5, 0xee, - 0xcd, 0xab, 0x3f, 0xbe, 0x32, 0x08, 0xe9, 0xb3, 0xc9, 0x6e, 0xd7, 0x8f, 0x47, 0xbd, 0x7b, 0x5c, - 0x42, 0x96, 0x70, 0x77, 0xe2, 0x78, 0x98, 0x66, 0x1e, 0x21, 0x7e, 0x9c, 0xef, 0x1d, 0xf4, 0x3f, - 0xad, 0xee, 0xd6, 0xf8, 0xf7, 0xd5, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xe0, 0xbb, 0x70, - 0x14, 0x20, 0x00, 0x00, + // 2353 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x6f, 0x1b, 0xc9, + 0x11, 0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, + 0x64, 0x77, 0x32, 0x18, 0x84, 0xd1, 0xe0, 0x56, 0x1c, 0x51, 0x2f, 0x8c, 0x48, 0x92, 0xb6, 0x6b, + 0x7c, 0x61, 0x17, 0x75, 0xa7, 0x14, 0x41, 0x77, 0x0e, 0x48, 0x44, 0xf1, 0x2c, 0x69, 0xd4, 0x85, + 0xc6, 0x88, 0x50, 0x2f, 0xf0, 0xa8, 0xd7, 0xae, 0x73, 0x73, 0x50, 0xae, 0xe9, 0xa1, 0x1c, 0xc1, + 0x19, 0x06, 0x5d, 0x01, 0x87, 0x92, 0x94, 0x0a, 0xfb, 0x1b, 0x5c, 0x60, 0x35, 0x17, 0xd8, 0x51, + 0x43, 0x38, 0x47, 0xb1, 0x4d, 0x4c, 0x48, 0x14, 0x90, 0x44, 0x08, 0x39, 0xc5, 0x4d, 0xc4, 0xf9, + 0x20, 0xd6, 0x91, 0x9d, 0x2f, 0x61, 0x75, 0xc6, 0xf6, 0x30, 0x16, 0xee, 0x93, 0x29, 0xe7, 0x90, + 0x8d, 0xd9, 0x27, 0xba, 0x0c, 0xf6, 0x81, 0x37, 0x9c, 0x28, 0x82, 0x68, 0xbb, 0xc2, 0xc4, 0xa4, + 0x0e, 0xe1, 0x04, 0x01, 0xbc, 0x5e, 0xf9, 0xc8, 0x72, 0xff, 0x56, 0x81, 0x86, 0x5a, 0x21, 0xfa, + 0x00, 0x6c, 0xce, 0x3b, 0x49, 0xcd, 0xb5, 0x02, 0x35, 0x33, 0x4f, 0x08, 0x14, 0xba, 0x0c, 0x35, + 0x41, 0x37, 0x39, 0x65, 0xbb, 0xc8, 0xc9, 0x4c, 0x40, 0xe2, 0xd0, 0xbb, 0xb0, 0xc0, 0x5c, 0xd2, + 0xae, 0x72, 0xfc, 0x19, 0xd3, 0x67, 0x19, 0x9a, 0x63, 0xd0, 0x29, 0xb0, 0x93, 0x49, 0xb4, 0x75, + 0x9b, 0xb3, 0xcc, 0xc1, 0xa2, 0xc1, 0xe6, 0x14, 0xde, 0x91, 0xbc, 0x69, 0x17, 0x5d, 0x98, 0xcf, + 0x29, 0x70, 0xe8, 0x26, 0x80, 0x17, 0x04, 0x21, 0x8b, 0x2b, 0xde, 0xb0, 0xed, 0x73, 0xa2, 0xb8, + 0xe5, 0xed, 0xed, 0x6e, 0x64, 0x20, 0x71, 0x00, 0x34, 0xa9, 0xce, 0x0d, 0x38, 0x59, 0x18, 0xd6, + 0x37, 0xc0, 0x11, 0x1b, 0x70, 0x4a, 0xdf, 0x00, 0x47, 0x77, 0xf2, 0xaf, 0xab, 0xb0, 0x64, 0x78, + 0x10, 0x7d, 0x0c, 0x8e, 0x97, 0xd0, 0x70, 0xcf, 0xf3, 0x69, 0xda, 0xb6, 0xb8, 0x4d, 0x17, 0xe6, + 0x78, 0xbb, 0xbb, 0x21, 0x81, 0x38, 0x17, 0xe1, 0x8e, 0x9c, 0x8e, 0xc5, 0x54, 0xad, 0xcc, 0x91, + 0x22, 0xd4, 0x71, 0xe9, 0x9d, 0xe9, 0x98, 0x60, 0x8e, 0x41, 0xf7, 0x66, 0x38, 0xe0, 0x3b, 0x73, + 0x27, 0x7b, 0x81, 0x17, 0x7e, 0x69, 0x41, 0x43, 0x19, 0x83, 0xde, 0x97, 0x16, 0x58, 0xdc, 0x82, + 0x76, 0xd9, 0x02, 0x92, 0x68, 0x36, 0xa8, 0xb8, 0x58, 0xc9, 0xe3, 0x22, 0x6a, 0x43, 0xdd, 0x8f, + 0x23, 0x4a, 0x9e, 0x0b, 0x3e, 0x38, 0x58, 0x35, 0xd1, 0x79, 0x80, 0x20, 0xf6, 0xf7, 0x49, 0xc2, + 0xce, 0xbe, 0xdc, 0x7f, 0xad, 0xe7, 0x55, 0xb7, 0xe3, 0x6b, 0x0b, 0x16, 0x75, 0xc2, 0xa1, 0x6b, + 0x50, 0x67, 0x6d, 0x16, 0x48, 0xc4, 0x5e, 0x9c, 0x9b, 0xcd, 0xcc, 0xae, 0x40, 0x61, 0x85, 0xee, + 0xdc, 0x87, 0x9a, 0xf8, 0x44, 0xef, 0x19, 0xee, 0x58, 0x33, 0xdc, 0x21, 0x20, 0x9a, 0x37, 0x4e, + 0x81, 0xed, 0xc7, 0x93, 0x88, 0x72, 0xd3, 0x6c, 0x2c, 0x1a, 0xee, 0x37, 0x16, 0xb4, 0x4c, 0x0e, + 0xa3, 0x4f, 0xc0, 0x11, 0x3d, 0xb9, 0x69, 0x17, 0xe7, 0x11, 0xbe, 0xab, 0x90, 0x38, 0x97, 0xe9, + 0x3c, 0x64, 0x17, 0x97, 0x68, 0xbc, 0xd0, 0x44, 0x01, 0x3a, 0xd4, 0xc4, 0xbf, 0x5a, 0xd0, 0x32, + 0x8f, 0x36, 0x33, 0x51, 0x1c, 0xee, 0x99, 0x26, 0x9a, 0x60, 0xd9, 0x64, 0x26, 0x66, 0x32, 0xa8, + 0x0f, 0x75, 0x7f, 0x38, 0x61, 0x1e, 0x92, 0x6c, 0x36, 0xb9, 0x74, 0x4b, 0x8c, 0x71, 0xd3, 0x14, + 0xb0, 0xf3, 0x18, 0x1a, 0x4a, 0x15, 0xfa, 0xc0, 0x58, 0xd6, 0xb7, 0x0c, 0x61, 0x05, 0x3a, 0x74, + 0x61, 0xff, 0xb0, 0x00, 0xf2, 0xeb, 0x17, 0x6d, 0x94, 0x8f, 0xe7, 0x9b, 0xb3, 0xee, 0xe9, 0xec, + 0x6c, 0xca, 0x4b, 0x53, 0x3b, 0xa1, 0x17, 0xa0, 0xe9, 0x4d, 0x68, 0xbc, 0x93, 0x84, 0x83, 0x81, + 0x5c, 0x5a, 0x03, 0xeb, 0x5d, 0xe8, 0x1a, 0x80, 0xbc, 0x1d, 0xe3, 0x80, 0xf0, 0x23, 0x50, 0xdc, + 0x95, 0xed, 0x6c, 0x18, 0x6b, 0xd0, 0xce, 0xf7, 0xa1, 0x65, 0xce, 0x7b, 0x2c, 0xf6, 0xff, 0x04, + 0x9c, 0xec, 0x86, 0x42, 0x67, 0xa0, 0x26, 0x14, 0x4b, 0x59, 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x46, 0xe7, 0x0c, 0xd3, 0xcd, 0xf9, 0xde, 0xf3, 0x26, 0x34, 0x7e, + 0xaa, 0xa6, 0x11, 0xc7, 0x0a, 0xed, 0x42, 0x83, 0xcd, 0xc2, 0x6e, 0x8f, 0x97, 0x98, 0xe4, 0x2d, + 0x3e, 0xc9, 0xf9, 0xce, 0x69, 0xee, 0x9c, 0x69, 0xe4, 0xcf, 0x9c, 0x63, 0x0f, 0x80, 0xcd, 0x21, + 0xd2, 0xb6, 0x97, 0x98, 0xe5, 0xdb, 0x7c, 0x96, 0x0b, 0x9d, 0x35, 0x36, 0x8b, 0x38, 0x8f, 0x33, + 0xe7, 0x79, 0x0c, 0xb5, 0x4d, 0x2f, 0x0a, 0x86, 0x04, 0x15, 0x77, 0x71, 0xae, 0xea, 0x75, 0xae, + 0xfa, 0x8c, 0xbb, 0x92, 0xf3, 0xb0, 0xf7, 0x8c, 0xeb, 0xb8, 0x6e, 0xbd, 0x7b, 0xf3, 0xea, 0x8f, + 0xae, 0x0c, 0x42, 0xfa, 0x6c, 0xb2, 0xdb, 0xf5, 0xe3, 0x51, 0xef, 0x1e, 0xd7, 0x90, 0x05, 0xdc, + 0x9d, 0x38, 0x1e, 0xa6, 0x19, 0x23, 0xc4, 0x4f, 0xf1, 0xbd, 0x83, 0xfe, 0x67, 0xd5, 0xdd, 0x1a, + 0xff, 0xbe, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0xbb, 0xf5, 0xeb, 0x02, 0x20, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/v2/skaffold.proto b/proto/v2/skaffold.proto index bf30f68c88b..e7a05e64536 100644 --- a/proto/v2/skaffold.proto +++ b/proto/v2/skaffold.proto @@ -185,9 +185,10 @@ message MetaEvent { // `SkaffoldLogEvent` represents a piece of output that comes from a skaffold run, for example: "Generating tags...", "Step 1/3 : FROM gcr.io/distroless/base" message SkaffoldLogEvent { + reserved 3; string task_id = 1; // id of the task of skaffold that this log came from string subtask_id = 2; // id of the subtask that the log came from - string origin = 3; // which tool the output came from ex: skaffold, docker + // string origin = 3; // REMOVED: which tool the output came from ex: skaffold, docker enums.LogLevel level = 4; // log level string message = 5; // contents of the log } From 0d785ea99fd10bc3fa73e339eb2a3c1ce0314a02 Mon Sep 17 00:00:00 2001 From: Gaurav <39389231+gsquared94@users.noreply.github.com> Date: Sat, 17 Jul 2021 01:59:02 +0530 Subject: [PATCH 100/103] hooks: implement sync phase lifecycle hooks (host and container) (#6220) * hooks: implement sync phase hooks * remove unnecessary buildtags * fix windows test * improve example address PR feedback * revert extra `!` * improve error message * address PR feedback --- docs/content/en/schemas/v2beta20.json | 8 +- .../examples/lifecycle-hooks/Dockerfile | 1 + .../examples/lifecycle-hooks/README.md | 32 ++++ .../examples/lifecycle-hooks/hello.txt | 1 + integration/examples/lifecycle-hooks/main.go | 22 ++- .../examples/lifecycle-hooks/skaffold.yaml | 15 ++ pkg/skaffold/hooks/build_test.go | 2 - pkg/skaffold/hooks/container.go | 101 +++++++++++++ pkg/skaffold/hooks/container_test.go | 137 +++++++++++++++++ pkg/skaffold/hooks/host_test.go | 6 +- pkg/skaffold/hooks/sync.go | 100 +++++++++++++ pkg/skaffold/hooks/sync_test.go | 138 ++++++++++++++++++ pkg/skaffold/schema/latest/v1/config.go | 2 +- pkg/skaffold/sync/sync.go | 31 ++++ 14 files changed, 586 insertions(+), 10 deletions(-) create mode 100644 integration/examples/lifecycle-hooks/hello.txt create mode 100644 pkg/skaffold/hooks/container.go create mode 100644 pkg/skaffold/hooks/container_test.go create mode 100644 pkg/skaffold/hooks/sync.go create mode 100644 pkg/skaffold/hooks/sync_test.go diff --git a/docs/content/en/schemas/v2beta20.json b/docs/content/en/schemas/v2beta20.json index 7c203ccbe62..99efa80560f 100755 --- a/docs/content/en/schemas/v2beta20.json +++ b/docs/content/en/schemas/v2beta20.json @@ -3093,6 +3093,11 @@ "description": "delegates discovery of sync rules to the build system. Only available for jib and buildpacks.", "x-intellij-html-description": "delegates discovery of sync rules to the build system. Only available for jib and buildpacks." }, + "hooks": { + "$ref": "#/definitions/SyncHooks", + "description": "describes a set of lifecycle hooks that are executed before and after each file sync action on the target artifact's containers.", + "x-intellij-html-description": "describes a set of lifecycle hooks that are executed before and after each file sync action on the target artifact's containers." + }, "infer": { "items": { "type": "string" @@ -3114,7 +3119,8 @@ "preferredOrder": [ "manual", "infer", - "auto" + "auto", + "hooks" ], "additionalProperties": false, "type": "object", diff --git a/integration/examples/lifecycle-hooks/Dockerfile b/integration/examples/lifecycle-hooks/Dockerfile index 415a8456f21..58c97be53b1 100644 --- a/integration/examples/lifecycle-hooks/Dockerfile +++ b/integration/examples/lifecycle-hooks/Dockerfile @@ -9,4 +9,5 @@ FROM alpine:3 # for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). ENV GOTRACEBACK=single CMD ["./app"] +COPY hello.txt . COPY --from=builder /app . diff --git a/integration/examples/lifecycle-hooks/README.md b/integration/examples/lifecycle-hooks/README.md index f4d10697a16..d806855a69d 100644 --- a/integration/examples/lifecycle-hooks/README.md +++ b/integration/examples/lifecycle-hooks/README.md @@ -7,4 +7,36 @@ Run: skaffold build --cache-artifacts=false ``` +You should see the artifact `hooks-example` being built along with the execution of a `pre-build` hook trigger and a `post-build` hook trigger. +Now with an active kubernetes cluster, run: +``` +skaffold dev +``` + +This will start a pod running the `hooks-example` image. The app simply reads the contents of `hello.txt` file once and stores it and repeatedly prints it out. +``` +[hooks-example] Hello World! +[hooks-example] Hello World! +[hooks-example] Hello World! +... +``` +If you change the text of `hello.txt` file, say to `Hello World!!`, Skaffold will `sync` it into the running container. +You should also see a `pre-sync` hook that just echoes the filename that has changed, and a `post-sync` hook that sends a `SIGHUP` signal to the app. The app responds accordingly by reloading the modified `hello.txt` file and printing it to the console. +``` +[hooks-example] Hello World! +[hooks-example] Hello World! +[hooks-example] Hello World! +Syncing 1 files for hooks-example:e3c03bbaf0830afb79d586c5a0d5ce7510a027585fb0cbc88db9bd14bfbad139 +Starting pre-sync hooks for artifact "hooks-example"... +file changes detected: hello.txt +Completed pre-sync hooks for artifact "hooks-example" +Starting post-sync hooks for artifact "hooks-example"... +Running command kill -HUP 1 +Completed post-sync hooks for artifact "hooks-example" +Watching for changes... +[hooks-example] Hello World!! +[hooks-example] Hello World!! +[hooks-example] Hello World!! +... +``` \ No newline at end of file diff --git a/integration/examples/lifecycle-hooks/hello.txt b/integration/examples/lifecycle-hooks/hello.txt new file mode 100644 index 00000000000..c57eff55ebc --- /dev/null +++ b/integration/examples/lifecycle-hooks/hello.txt @@ -0,0 +1 @@ +Hello World! \ No newline at end of file diff --git a/integration/examples/lifecycle-hooks/main.go b/integration/examples/lifecycle-hooks/main.go index 593721cfe2e..4f79d72d15d 100644 --- a/integration/examples/lifecycle-hooks/main.go +++ b/integration/examples/lifecycle-hooks/main.go @@ -2,13 +2,31 @@ package main import ( "fmt" + "io/ioutil" + "os" + "os/signal" + "syscall" "time" ) func main() { + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGHUP) + data, err := ioutil.ReadFile("hello.txt") + if err != nil { + fmt.Printf("failed to read file hello.txt: %v", err) + } + go func() { + for range sigs { + fmt.Printf("received SIGHUP signal. Reloading file hello.txt\n") + data, err = ioutil.ReadFile("hello.txt") + if err != nil { + fmt.Printf("failed to read file hello.txt: %v", err) + } + } + }() for { - fmt.Println("Hello world!") - + fmt.Println(string(data)) time.Sleep(time.Second * 1) } } diff --git a/integration/examples/lifecycle-hooks/skaffold.yaml b/integration/examples/lifecycle-hooks/skaffold.yaml index fb1a45f7908..b68bfb33c24 100644 --- a/integration/examples/lifecycle-hooks/skaffold.yaml +++ b/integration/examples/lifecycle-hooks/skaffold.yaml @@ -14,6 +14,21 @@ build: os: [darwin, linux] - command: ["cmd.exe", "/C", "docker images %SKAFFOLD_IMAGE% --digests"] os: [windows] + sync: + manual: + - src: 'hello.txt' + dest: . + hooks: + before: + - host: + command: ["sh", "-c", "echo file changes detected: $SKAFFOLD_FILES_ADDED_OR_MODIFIED"] + os: [darwin, linux] + - host: + command: ["cmd.exe", "/C", "echo file changes detected: %SKAFFOLD_FILES_ADDED_OR_MODIFIED%"] + os: [windows] + after: + - container: + command: ["sh", "-c", "echo Running command 'kill -HUP 1'; kill -HUP 1"] deploy: kubectl: manifests: diff --git a/pkg/skaffold/hooks/build_test.go b/pkg/skaffold/hooks/build_test.go index 90fca2d599c..7f2fad50455 100644 --- a/pkg/skaffold/hooks/build_test.go +++ b/pkg/skaffold/hooks/build_test.go @@ -1,5 +1,3 @@ -// +build !windows - /* Copyright 2021 The Skaffold Authors diff --git a/pkg/skaffold/hooks/container.go b/pkg/skaffold/hooks/container.go new file mode 100644 index 00000000000..72d938d40fa --- /dev/null +++ b/pkg/skaffold/hooks/container.go @@ -0,0 +1,101 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "context" + "fmt" + "io" + + "golang.org/x/sync/errgroup" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" + latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +// containerSelector represents a policy for selecting target containers for running a particular lifecycle hook +type containerSelector func(v1.Pod, v1.Container) (bool, error) + +// runningImageSelector chooses containers that run the given image name +func runningImageSelector(image string) containerSelector { + return func(p v1.Pod, c v1.Container) (bool, error) { + if p.Status.Phase != v1.PodRunning { + return false, nil + } + for _, status := range p.Status.ContainerStatuses { + if status.Name == c.Name && status.State.Running == nil { + return false, nil + } + } + + return c.Image == image, nil + } +} + +// containerHook represents a lifecycle hook to be executed inside a running container +type containerHook struct { + cfg latestV1.ContainerHook + cli *kubectl.CLI + selector containerSelector + namespaces []string +} + +// run executes the lifecycle hook inside the target container +func (h containerHook) run(ctx context.Context, out io.Writer) error { + errs, ctx := errgroup.WithContext(ctx) + + client, err := kubernetesclient.Client() + if err != nil { + return fmt.Errorf("getting Kubernetes client: %w", err) + } + + for _, ns := range h.namespaces { + pods, err := client.CoreV1().Pods(ns).List(ctx, metav1.ListOptions{}) + if err != nil { + return fmt.Errorf("getting pods for namespace %q: %w", ns, err) + } + + for _, p := range pods.Items { + for _, c := range p.Spec.Containers { + if matched, err := h.selector(p, c); err != nil { + return err + } else if !matched { + continue + } + args := []string{p.Name, "--namespace", p.Namespace, "-c", c.Name, "--"} + args = append(args, h.cfg.Command...) + cmd := h.cli.Command(ctx, "exec", args...) + cmd.Stderr = out + cmd.Stdout = out + podName := p.Name + containerName := c.Name + errs.Go(func() error { + err := util.RunCmd(cmd) + if err != nil { + return fmt.Errorf("hook execution failed for pod %q container %q: %w", podName, containerName, err) + } + return nil + }) + } + } + } + return errs.Wait() +} diff --git a/pkg/skaffold/hooks/container_test.go b/pkg/skaffold/hooks/container_test.go new file mode 100644 index 00000000000..580a4e027f7 --- /dev/null +++ b/pkg/skaffold/hooks/container_test.go @@ -0,0 +1,137 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "bytes" + "context" + "errors" + "testing" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes" + fakeclient "k8s.io/client-go/kubernetes/fake" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestContainerRun(t *testing.T) { + tests := []struct { + description string + objects []runtime.Object + cmd *testutil.FakeCmd + hook v1.ContainerHook + kubeContext string + selector containerSelector + namespaces []string + expected string + shouldErr bool + }{ + { + description: "image selector; single matching pod", + objects: []runtime.Object{ + createPodObject("gcr.io/foo/img1:latest", "pod1", "container1", "np1"), + createPodObject("gcr.io/foo/img2:latest", "pod2", "container2", "np2"), + }, + cmd: testutil.CmdRunWithOutput("kubectl --context context1 exec pod1 --namespace np1 -c container1 -- foo hook", "hook success"), + hook: v1.ContainerHook{Command: []string{"foo", "hook"}}, + kubeContext: "context1", + selector: runningImageSelector("gcr.io/foo/img1:latest"), + namespaces: []string{"np1", "np2"}, + expected: "hook success", + }, + { + description: "image selector; pod image different", + objects: []runtime.Object{ + createPodObject("gcr.io/foo/img2:latest", "pod1", "container1", "np1"), + }, + hook: v1.ContainerHook{Command: []string{"foo", "hook"}}, + kubeContext: "context1", + selector: runningImageSelector("gcr.io/foo/img1:latest"), + namespaces: []string{"np1", "np2"}, + }, + { + description: "image selector; pod namespace different", + objects: []runtime.Object{ + createPodObject("gcr.io/foo/img1:latest", "pod1", "container1", "np3"), + }, + hook: v1.ContainerHook{Command: []string{"foo", "hook"}}, + kubeContext: "context1", + selector: runningImageSelector("gcr.io/foo/img1:latest"), + namespaces: []string{"np1", "np2"}, + }, + { + description: "image selector; command error", + objects: []runtime.Object{ + createPodObject("gcr.io/foo/img1:latest", "pod1", "container1", "np1"), + }, + cmd: testutil.CmdRunErr("kubectl --context context1 exec pod1 --namespace np1 -c container1 -- foo hook", errors.New("error")), + hook: v1.ContainerHook{Command: []string{"foo", "hook"}}, + kubeContext: "context1", + selector: runningImageSelector("gcr.io/foo/img1:latest"), + namespaces: []string{"np1", "np2"}, + shouldErr: true, + }, + } + + for _, test := range tests { + testutil.Run(t, test.description, func(t *testutil.T) { + t.Override(&util.DefaultExecCommand, test.cmd) + t.Override(&kubernetesclient.Client, func() (kubernetes.Interface, error) { + return fakeclient.NewSimpleClientset(test.objects...), nil + }) + h := containerHook{ + cfg: test.hook, + cli: &kubectl.CLI{KubeContext: test.kubeContext}, + selector: test.selector, + namespaces: test.namespaces, + } + var output bytes.Buffer + + err := h.run(context.Background(), &output) + t.CheckErrorAndDeepEqual(test.shouldErr, err, test.expected, output.String()) + }) + } +} + +func createPodObject(image, podName, containerName, namespace string) *corev1.Pod { + return &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: podName, + Namespace: namespace, + OwnerReferences: []metav1.OwnerReference{ + { + Name: "rs", + Kind: "ReplicaSet", + }, + }, + }, + Status: corev1.PodStatus{Phase: corev1.PodRunning}, + Spec: corev1.PodSpec{Containers: []corev1.Container{ + { + Name: containerName, + Image: image, + }, + }}, + } +} diff --git a/pkg/skaffold/hooks/host_test.go b/pkg/skaffold/hooks/host_test.go index 11f0f974e21..7e9cc98f770 100644 --- a/pkg/skaffold/hooks/host_test.go +++ b/pkg/skaffold/hooks/host_test.go @@ -1,5 +1,3 @@ -// +build !windows - /* Copyright 2021 The Skaffold Authors @@ -51,7 +49,7 @@ func TestRun(t *testing.T) { hook: hostHook{ cfg: v1.HostHook{ OS: []string{"windows"}, - Command: []string{"cmd.exe", "/C", "echo %FOO%"}, + Command: []string{"cmd.exe", "/C", "echo FOO=%FOO%"}, }, env: []string{"FOO=bar"}, }, @@ -73,7 +71,7 @@ func TestRun(t *testing.T) { hook: hostHook{ cfg: v1.HostHook{ OS: []string{"windows"}, - Command: []string{"cmd.exe", "/C", "echo %FOO%"}, + Command: []string{"cmd.exe", "/C", "echo FOO=%FOO%"}, }, env: []string{"FOO=bar"}, }, diff --git a/pkg/skaffold/hooks/sync.go b/pkg/skaffold/hooks/sync.go new file mode 100644 index 00000000000..6a24f28789e --- /dev/null +++ b/pkg/skaffold/hooks/sync.go @@ -0,0 +1,100 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "context" + "fmt" + "io" + "path/filepath" + "strings" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/output" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" +) + +func NewSyncRunner(cli *kubectl.CLI, imageName, imageRef string, namespaces []string, d v1.SyncHooks, opts SyncEnvOpts) Runner { + return syncRunner{d, cli, imageName, imageRef, namespaces, opts} +} +func NewSyncEnvOpts(a *v1.Artifact, image string, addOrModifyFiles []string, deleteFiles []string, namespaces []string, kubeContext string) (SyncEnvOpts, error) { + workDir, err := filepath.Abs(a.Workspace) + if err != nil { + return SyncEnvOpts{}, fmt.Errorf("determining build workspace directory for image %v: %w", a.ImageName, err) + } + return SyncEnvOpts{ + Image: image, + BuildContext: workDir, + FilesAddedOrModified: util.StringPtr(strings.Join(addOrModifyFiles, ";")), + FilesDeleted: util.StringPtr(strings.Join(deleteFiles, ";")), + KubeContext: kubeContext, + Namespaces: strings.Join(namespaces, ","), + }, nil +} + +type syncRunner struct { + v1.SyncHooks + cli *kubectl.CLI + imageName string + imageRef string + namespaces []string + opts SyncEnvOpts +} + +func (r syncRunner) RunPreHooks(ctx context.Context, out io.Writer) error { + return r.run(ctx, out, r.PreHooks, phases.PreSync) +} + +func (r syncRunner) RunPostHooks(ctx context.Context, out io.Writer) error { + return r.run(ctx, out, r.PostHooks, phases.PostSync) +} + +func (r syncRunner) getEnv() []string { + common := getEnv(staticEnvOpts) + sync := getEnv(r.opts) + return append(common, sync...) +} + +func (r syncRunner) run(ctx context.Context, out io.Writer, hooks []v1.SyncHookItem, phase phase) error { + if len(hooks) > 0 { + output.Default.Fprintf(out, "Starting %s hooks for artifact %q...\n", phase, r.imageName) + } + env := r.getEnv() + for i, h := range hooks { + if h.HostHook != nil { + hook := hostHook{*h.HostHook, env} + if err := hook.run(ctx, out); err != nil { + return fmt.Errorf("failed to execute host %s hook %d for artifact %q: %w", phase, i+1, r.imageName, err) + } + } else if h.ContainerHook != nil { + hook := containerHook{ + cfg: *h.ContainerHook, + cli: r.cli, + selector: runningImageSelector(r.imageRef), + namespaces: r.namespaces, + } + if err := hook.run(ctx, out); err != nil { + return fmt.Errorf("failed to execute container %s hook %d for artifact %q: %w", phase, i+1, r.imageName, err) + } + } + } + if len(hooks) > 0 { + output.Default.Fprintf(out, "Completed %s hooks for artifact %q\n", phase, r.imageName) + } + return nil +} diff --git a/pkg/skaffold/hooks/sync_test.go b/pkg/skaffold/hooks/sync_test.go new file mode 100644 index 00000000000..c55d8d126b1 --- /dev/null +++ b/pkg/skaffold/hooks/sync_test.go @@ -0,0 +1,138 @@ +/* +Copyright 2021 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "bytes" + "context" + "fmt" + "path/filepath" + "strings" + "testing" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + fakeclient "k8s.io/client-go/kubernetes/fake" + + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubectl" + kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" + v1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" + "github.com/GoogleContainerTools/skaffold/testutil" +) + +func TestSyncHooks(t *testing.T) { + testutil.Run(t, "TestSyncHooks", func(t *testutil.T) { + workDir, _ := filepath.Abs("./foo") + hooks := v1.SyncHooks{ + PreHooks: []v1.SyncHookItem{ + { + HostHook: &v1.HostHook{ + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo pre-hook running with SKAFFOLD_IMAGE=$SKAFFOLD_IMAGE,SKAFFOLD_BUILD_CONTEXT=$SKAFFOLD_BUILD_CONTEXT,SKAFFOLD_FILES_ADDED_OR_MODIFIED=$SKAFFOLD_FILES_ADDED_OR_MODIFIED,SKAFFOLD_FILES_DELETED=$SKAFFOLD_FILES_DELETED,SKAFFOLD_KUBE_CONTEXT=$SKAFFOLD_KUBE_CONTEXT,SKAFFOLD_NAMESPACES=$SKAFFOLD_NAMESPACES"}, + }, + }, + { + HostHook: &v1.HostHook{ + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo pre-hook running with SKAFFOLD_IMAGE=%SKAFFOLD_IMAGE%,SKAFFOLD_BUILD_CONTEXT=%SKAFFOLD_BUILD_CONTEXT%,SKAFFOLD_FILES_ADDED_OR_MODIFIED=%SKAFFOLD_FILES_ADDED_OR_MODIFIED%,SKAFFOLD_FILES_DELETED=%SKAFFOLD_FILES_DELETED%,SKAFFOLD_KUBE_CONTEXT=%SKAFFOLD_KUBE_CONTEXT%,SKAFFOLD_NAMESPACES=%SKAFFOLD_NAMESPACES%"}, + }, + }, + { + ContainerHook: &v1.ContainerHook{ + Command: []string{"foo", "pre-hook"}, + }, + }, + }, + PostHooks: []v1.SyncHookItem{ + { + HostHook: &v1.HostHook{ + OS: []string{"linux", "darwin"}, + Command: []string{"sh", "-c", "echo post-hook running with SKAFFOLD_IMAGE=$SKAFFOLD_IMAGE,SKAFFOLD_BUILD_CONTEXT=$SKAFFOLD_BUILD_CONTEXT,SKAFFOLD_FILES_ADDED_OR_MODIFIED=$SKAFFOLD_FILES_ADDED_OR_MODIFIED,SKAFFOLD_FILES_DELETED=$SKAFFOLD_FILES_DELETED,SKAFFOLD_KUBE_CONTEXT=$SKAFFOLD_KUBE_CONTEXT,SKAFFOLD_NAMESPACES=$SKAFFOLD_NAMESPACES"}, + }, + }, + { + HostHook: &v1.HostHook{ + OS: []string{"windows"}, + Command: []string{"cmd.exe", "/C", "echo post-hook running with SKAFFOLD_IMAGE=%SKAFFOLD_IMAGE%,SKAFFOLD_BUILD_CONTEXT=%SKAFFOLD_BUILD_CONTEXT%,SKAFFOLD_FILES_ADDED_OR_MODIFIED=%SKAFFOLD_FILES_ADDED_OR_MODIFIED%,SKAFFOLD_FILES_DELETED=%SKAFFOLD_FILES_DELETED%,SKAFFOLD_KUBE_CONTEXT=%SKAFFOLD_KUBE_CONTEXT%,SKAFFOLD_NAMESPACES=%SKAFFOLD_NAMESPACES%"}, + }, + }, + { + ContainerHook: &v1.ContainerHook{ + Command: []string{"foo", "post-hook"}, + }, + }, + }, + } + preHostHookOut := fmt.Sprintf("pre-hook running with SKAFFOLD_IMAGE=gcr.io/foo/img1:latest,SKAFFOLD_BUILD_CONTEXT=%s,SKAFFOLD_FILES_ADDED_OR_MODIFIED=foo1;bar1,SKAFFOLD_FILES_DELETED=foo2;bar2,SKAFFOLD_KUBE_CONTEXT=context1,SKAFFOLD_NAMESPACES=np1,np2", workDir) + preContainerHookOut := "container pre-hook succeeded" + postHostHookOut := fmt.Sprintf("post-hook running with SKAFFOLD_IMAGE=gcr.io/foo/img1:latest,SKAFFOLD_BUILD_CONTEXT=%s,SKAFFOLD_FILES_ADDED_OR_MODIFIED=foo1;bar1,SKAFFOLD_FILES_DELETED=foo2;bar2,SKAFFOLD_KUBE_CONTEXT=context1,SKAFFOLD_NAMESPACES=np1,np2", workDir) + postContainerHookOut := "container post-hook succeeded" + + artifact := &v1.Artifact{ + ImageName: "img1", + Workspace: workDir, + Sync: &v1.Sync{ + LifecycleHooks: hooks, + }, + } + image := "gcr.io/foo/img1:latest" + namespaces := []string{"np1", "np2"} + kubeContext := "context1" + opts, err := NewSyncEnvOpts(artifact, image, []string{"foo1", "bar1"}, []string{"foo2", "bar2"}, namespaces, kubeContext) + t.CheckNoError(err) + runner := NewSyncRunner(&kubectl.CLI{KubeContext: kubeContext}, artifact.ImageName, image, namespaces, artifact.Sync.LifecycleHooks, opts) + + t.Override(&util.DefaultExecCommand, + testutil.CmdRunWithOutput("kubectl --context context1 exec pod1 --namespace np1 -c container1 -- foo pre-hook", preContainerHookOut). + AndRunWithOutput("kubectl --context context1 exec pod1 --namespace np1 -c container1 -- foo post-hook", postContainerHookOut)) + t.Override(&kubernetesclient.Client, fakeKubernetesClient) + var preOut, postOut bytes.Buffer + err = runner.RunPreHooks(context.Background(), &preOut) + t.CheckNoError(err) + t.CheckContains(preHostHookOut, preOut.String()) + t.CheckContains(preContainerHookOut, strings.TrimRight(preOut.String(), "\r\n")) + err = runner.RunPostHooks(context.Background(), &postOut) + t.CheckNoError(err) + t.CheckContains(postHostHookOut, postOut.String()) + t.CheckContains(postContainerHookOut, postOut.String()) + }) +} + +func fakeKubernetesClient() (kubernetes.Interface, error) { + pod := &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod1", + Namespace: "np1", + OwnerReferences: []metav1.OwnerReference{ + { + Name: "rs", + Kind: "ReplicaSet", + }, + }, + }, + Status: corev1.PodStatus{Phase: corev1.PodRunning}, + Spec: corev1.PodSpec{Containers: []corev1.Container{ + { + Name: "container1", + Image: "gcr.io/foo/img1:latest", + }, + }}, + } + return fakeclient.NewSimpleClientset(pod), nil +} diff --git a/pkg/skaffold/schema/latest/v1/config.go b/pkg/skaffold/schema/latest/v1/config.go index 4825c7520cf..859233c080b 100644 --- a/pkg/skaffold/schema/latest/v1/config.go +++ b/pkg/skaffold/schema/latest/v1/config.go @@ -893,7 +893,7 @@ type Sync struct { Auto *bool `yaml:"auto,omitempty" yamltags:"oneOf=sync"` // LifecycleHooks describes a set of lifecycle hooks that are executed before and after each file sync action on the target artifact's containers. - LifecycleHooks SyncHooks `yaml:"-"` + LifecycleHooks SyncHooks `yaml:"hooks,omitempty"` } // SyncRule specifies which local files to sync to remote folders. diff --git a/pkg/skaffold/sync/sync.go b/pkg/skaffold/sync/sync.go index 4603186000a..2781b8d594c 100644 --- a/pkg/skaffold/sync/sync.go +++ b/pkg/skaffold/sync/sync.go @@ -38,6 +38,7 @@ import ( "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/filemon" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/graph" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/hooks" kubernetesclient "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/client" latestV1 "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest/v1" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" @@ -254,6 +255,36 @@ func matchSyncRules(syncRules []*latestV1.SyncRule, relPath, containerWd string) } func (s *PodSyncer) Sync(ctx context.Context, out io.Writer, item *Item) error { + if !item.HasChanges() { + return nil + } + + var copy, delete []string + for k := range item.Copy { + copy = append(copy, k) + } + for k := range item.Delete { + delete = append(delete, k) + } + + opts, err := hooks.NewSyncEnvOpts(item.Artifact, item.Image, copy, delete, *s.namespaces, s.kubectl.KubeContext) + if err != nil { + return err + } + hooksRunner := hooks.NewSyncRunner(s.kubectl, item.Artifact.ImageName, item.Image, *s.namespaces, item.Artifact.Sync.LifecycleHooks, opts) + if err := hooksRunner.RunPreHooks(ctx, out); err != nil { + return fmt.Errorf("pre-sync hooks failed for artifact %q: %w", item.Artifact.ImageName, err) + } + if err := s.sync(ctx, item); err != nil { + return err + } + if err := hooksRunner.RunPostHooks(ctx, out); err != nil { + return fmt.Errorf("post-sync hooks failed for artifact %q: %w", item.Artifact.ImageName, err) + } + return nil +} + +func (s *PodSyncer) sync(ctx context.Context, item *Item) error { if len(item.Copy) > 0 { logrus.Infoln("Copying files:", item.Copy, "to", item.Image) From 10e6b23b027088238794d1a5b6513559b3b0f16b Mon Sep 17 00:00:00 2001 From: "Benjamin P. Jung" Date: Sun, 18 Jul 2021 04:44:01 +0200 Subject: [PATCH 101/103] Strip `out/` prefix from SHA checksum files. (#6218) Fixes #6217 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d1f67a71cc6..0731a72fb77 100644 --- a/Makefile +++ b/Makefile @@ -101,7 +101,7 @@ $(BUILD_DIR)/$(PROJECT)-%: $(STATIK_FILES) $(GO_FILES) $(BUILD_DIR) deploy/cross . docker run --rm skaffold/cross cat /build/skaffold > $@ - shasum -a 256 $@ | tee $@.sha256 + (cd `dirname $@`; shasum -a 256 `basename $@`) | tee $@.sha256 file $@ || true .PHONY: $(BUILD_DIR)/VERSION From bb21b383e92467cedd5abf97ebd4dd6e7889362d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jul 2021 13:17:47 -0700 Subject: [PATCH 102/103] Bump github.com/AlecAivazis/survey/v2 from 2.2.7 to 2.2.14 (#6161) Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.2.7 to 2.2.14. - [Release notes](https://github.com/AlecAivazis/survey/releases) - [Commits](https://github.com/AlecAivazis/survey/compare/v2.2.7...v2.2.14) --- updated-dependencies: - dependency-name: github.com/AlecAivazis/survey/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 4db23674789..ec471be99d7 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( 4d63.com/tz v1.2.0 cloud.google.com/go v0.84.0 cloud.google.com/go/storage v1.10.0 - github.com/AlecAivazis/survey/v2 v2.2.7 + github.com/AlecAivazis/survey/v2 v2.2.14 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.20.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v0.20.0 github.com/aws/aws-sdk-go v1.36.30 // indirect @@ -80,7 +80,7 @@ require ( golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sys v0.0.0-20210603125802-9665404d3644 - golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 + golang.org/x/term v0.0.0-20210503060354-a79de5458b56 google.golang.org/api v0.48.0 google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d google.golang.org/grpc v1.38.0 diff --git a/go.sum b/go.sum index 3013311e720..790a51979dd 100644 --- a/go.sum +++ b/go.sum @@ -75,6 +75,8 @@ github.com/360EntSecGroup-Skylar/excelize v1.4.1/go.mod h1:vnax29X2usfl7HHkBrX5E github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8= github.com/AlecAivazis/survey/v2 v2.2.7 h1:5NbxkF4RSKmpywYdcRgUmos1o+roJY8duCLZXbVjoig= github.com/AlecAivazis/survey/v2 v2.2.7/go.mod h1:9DYvHgXtiXm6nCn+jXnOXLKbH+Yo9u8fAS/SduGdoPk= +github.com/AlecAivazis/survey/v2 v2.2.14 h1:aTYTaCh1KLd+YWilkeJ65Ph78g48NVQ3ay9xmaNIyhk= +github.com/AlecAivazis/survey/v2 v2.2.14/go.mod h1:TH2kPCDU3Kqq7pLbnCWwZXDBjnhZtmsCle5EiYDJ2fg= github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= @@ -1700,6 +1702,8 @@ golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w= +golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From f89e4d894cc4dc7288b3b753c6b222521b3d9ea6 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Mon, 19 Jul 2021 15:58:52 -0700 Subject: [PATCH 103/103] [cherry-pick] [v2] Update UX naming based on the feedback. (#6230) (#6237) --- pkg/skaffold/render/renderer/renderer_test.go | 43 +++++++++++++++++++ pkg/skaffold/render/transform/transform.go | 12 +++--- .../render/transform/transform_test.go | 4 +- pkg/skaffold/schema/latest/v2/config.go | 10 ++--- pkg/skaffold/schema/v3alpha1/config.go | 10 ++--- 5 files changed, 61 insertions(+), 18 deletions(-) diff --git a/pkg/skaffold/render/renderer/renderer_test.go b/pkg/skaffold/render/renderer/renderer_test.go index a1eb0b21879..0def3d5b8ac 100644 --- a/pkg/skaffold/render/renderer/renderer_test.go +++ b/pkg/skaffold/render/renderer/renderer_test.go @@ -115,6 +115,49 @@ metadata: pipeline: validators: - image: gcr.io/kpt-fn/kubeval:v0.1 +`, + }, + { + description: "manifests with transformation rule.", + renderConfig: &latestV2.RenderConfig{ + Generate: latestV2.Generate{RawK8s: []string{"pod.yaml"}}, + Transform: &[]latestV2.Transformer{{Name: "set-labels", ConfigMap: []string{"owner:tester"}}}, + }, + originalKptfile: initKptfile, + updatedKptfile: `apiVersion: kpt.dev/v1alpha2 +kind: Kptfile +metadata: + name: skaffold +pipeline: + mutators: + - image: gcr.io/kpt-fn/set-labels:v0.1 + configMap: + owner: tester +`, + }, + { + description: "manifests with updated transformation rule.", + renderConfig: &latestV2.RenderConfig{ + Generate: latestV2.Generate{RawK8s: []string{"pod.yaml"}}, + Transform: &[]latestV2.Transformer{{Name: "set-labels", ConfigMap: []string{"owner:tester"}}}, + }, + originalKptfile: `apiVersion: kpt.dev/v1alpha2 +kind: Kptfile +metadata: + name: skaffold +pipeline: + mutators: + - image: gcr.io/kpt-fn/SOME-OTHER-FUNC +`, + updatedKptfile: `apiVersion: kpt.dev/v1alpha2 +kind: Kptfile +metadata: + name: skaffold +pipeline: + mutators: + - image: gcr.io/kpt-fn/set-labels:v0.1 + configMap: + owner: tester `, }, } diff --git a/pkg/skaffold/render/transform/transform.go b/pkg/skaffold/render/transform/transform.go index 4848a202feb..31e89afb8c7 100644 --- a/pkg/skaffold/render/transform/transform.go +++ b/pkg/skaffold/render/transform/transform.go @@ -26,10 +26,10 @@ import ( ) var ( - allowListedTransformer = []string{"set-label"} + allowListedTransformer = []string{"set-labels"} transformerAllowlist = map[string]kptfile.Function{ - "set-label": { - Image: "gcr.io/kpt-functions/set-namespace", + "set-labels": { + Image: "gcr.io/kpt-fn/set-labels:v0.1", ConfigMap: map[string]string{}, }, } @@ -84,9 +84,9 @@ func validateTransformers(config []latestV2.Transformer) ([]kptfile.Function, er }, }) } - if c.ConfigMapData != nil { - for _, stringifiedData := range c.ConfigMapData { - items := strings.Split(stringifiedData, "=") + if c.ConfigMap != nil { + for _, stringifiedData := range c.ConfigMap { + items := strings.Split(stringifiedData, ":") if len(items) != 2 { return nil, sErrors.NewErrorWithStatusCode( proto.ActionableErr{ diff --git a/pkg/skaffold/render/transform/transform_test.go b/pkg/skaffold/render/transform/transform_test.go index b6158728056..240839d4250 100644 --- a/pkg/skaffold/render/transform/transform_test.go +++ b/pkg/skaffold/render/transform/transform_test.go @@ -32,9 +32,9 @@ func TestNewTransformer(t *testing.T) { config: []latestV2.Transformer{}, }, { - description: "set-label", + description: "set-labels", config: []latestV2.Transformer{ - {Name: "set-label"}, + {Name: "set-labels", ConfigMap: []string{"owner:skaffold-test"}}, }, }, } diff --git a/pkg/skaffold/schema/latest/v2/config.go b/pkg/skaffold/schema/latest/v2/config.go index 412d2545022..3aa6b2b119d 100644 --- a/pkg/skaffold/schema/latest/v2/config.go +++ b/pkg/skaffold/schema/latest/v2/config.go @@ -518,7 +518,7 @@ type RenderConfig struct { // Generate defines the dry manifests from a variety of sources. type Generate struct { - RawK8s []string `yaml:"rawYaml/k8s,omitempty"` + RawK8s []string `yaml:"rawYaml,omitempty"` Kustomize []string `yaml:"kustomize,omitempty"` Helm Helm `yaml:"helm,omitempty"` Kpt []string `yaml:"kpt,omitempty"` @@ -538,16 +538,16 @@ type GenerateType struct { type Transformer struct { // Name is the transformer name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` - // ConfigMapData allows users to provide additional config data to the kpt function. - ConfigMapData []string `yaml:"configMapData,omitempty"` + // ConfigMap allows users to provide additional config data to the kpt function. + ConfigMap []string `yaml:"configMap,omitempty"` } // Validator describes the supported kpt validators. type Validator struct { // Name is the Validator name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` - // ConfigMapData allows users to provide additional config data to the kpt function. - ConfigMapData []string `yaml:"configMapData,omitempty"` + // ConfigMap allows users to provide additional config data to the kpt function. + ConfigMap []string `yaml:"configMap,omitempty"` } // KptV2Deploy contains all the configuration needed by the deploy steps. diff --git a/pkg/skaffold/schema/v3alpha1/config.go b/pkg/skaffold/schema/v3alpha1/config.go index 47cf78ee8b8..e8f6c2c83c5 100644 --- a/pkg/skaffold/schema/v3alpha1/config.go +++ b/pkg/skaffold/schema/v3alpha1/config.go @@ -517,7 +517,7 @@ type RenderConfig struct { // Generate defines the dry manifests from a variety of sources. type Generate struct { - RawK8s []string `yaml:"rawYaml/k8s,omitempty"` + RawK8s []string `yaml:"rawYaml,omitempty"` Kustomize []string `yaml:"kustomize,omitempty"` Helm Helm `yaml:"helm,omitempty"` Kpt []string `yaml:"kpt,omitempty"` @@ -537,16 +537,16 @@ type GenerateType struct { type Transformer struct { // Name is the transformer name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` - // ConfigMapData allows users to provide additional config data to the kpt function. - ConfigMapData []string `yaml:"configMapData,omitempty"` + // ConfigMap allows users to provide additional config data to the kpt function. + ConfigMap []string `yaml:"configMap,omitempty"` } // Validator describes the supported kpt validators. type Validator struct { // Name is the Validator name. Can only accept skaffold whitelisted tools. Name string `yaml:"name" yamltags:"required"` - // ConfigMapData allows users to provide additional config data to the kpt function. - ConfigMapData []string `yaml:"configMapData,omitempty"` + // ConfigMap allows users to provide additional config data to the kpt function. + ConfigMap []string `yaml:"configMap,omitempty"` } // KptV2Deploy contains all the configuration needed by the deploy steps.