diff --git a/pkg/skaffold/schema/latest/config.go b/pkg/skaffold/schema/latest/config.go index 3e757827351..f123bd41e45 100644 --- a/pkg/skaffold/schema/latest/config.go +++ b/pkg/skaffold/schema/latest/config.go @@ -29,8 +29,11 @@ func NewSkaffoldPipeline() util.VersionedConfig { } type SkaffoldPipeline struct { + // APIVersion is the version of the configuration. APIVersion string `yaml:"apiVersion"` - Kind string `yaml:"kind"` + + // Kind is always `Config`. Defaults to `Config`. + Kind string `yaml:"kind"` // Build describes how images are built. Build BuildConfig `yaml:"build,omitempty"` @@ -60,6 +63,8 @@ type BuildConfig struct { // If not specified, it defaults to `gitCommit: {}`. TagPolicy TagPolicy `yaml:"tagPolicy,omitempty"` + // ExecutionEnvironment is the environment in which the build + // should run. Possible values: googleCloudBuild. ExecutionEnvironment *ExecutionEnvironment `yaml:"executionEnvironment,omitempty"` BuildType `yaml:",inline"` @@ -67,54 +72,60 @@ type BuildConfig struct { type ExecEnvironment string -// ExecutionEnvironment is the environment in which the build should run (ex. local or in-cluster, etc.) +// ExecutionEnvironment is the environment in which the build should run (ex. local or in-cluster, etc.). type ExecutionEnvironment struct { - Name ExecEnvironment `yaml:"name,omitempty"` + // Name is the name of the environment. + Name ExecEnvironment `yaml:"name,omitempty"` + + // Properties are key-value pairs passed to the environment. Properties map[string]interface{} `yaml:"properties,omitempty"` } -// BuilderPlugin contains all fields necessary for specifying a build plugin +// BuilderPlugin contains all fields necessary for specifying a build plugin. type BuilderPlugin struct { - // Name of the build plugin + // Name is the name of the build plugin. Name string `yaml:"name,omitempty"` - // Properties associated with the plugin + + // Properties are key-value pairs passed to the plugin. Properties map[string]interface{} `yaml:"properties,omitempty"` - Contents []byte `yaml:",omitempty"` + + // Contents + Contents []byte `yaml:",omitempty"` } // TagPolicy contains all the configuration for the tagging step. type TagPolicy struct { - // GitTagger tags images with the git tag or git commit of the artifact workspace directory. + // GitTagger (beta) tags images with the git tag or git commit of the artifact workspace directory. GitTagger *GitTagger `yaml:"gitCommit,omitempty" yamltags:"oneOf=tag"` - // ShaTagger tags images with their sha256 digest. + // ShaTagger (beta) tags images with their sha256 digest. ShaTagger *ShaTagger `yaml:"sha256,omitempty" yamltags:"oneOf=tag"` - // EnvTemplateTagger tags images with a configurable template string. + // EnvTemplateTagger (beta) tags images with a configurable template string. EnvTemplateTagger *EnvTemplateTagger `yaml:"envTemplate,omitempty" yamltags:"oneOf=tag"` - // DateTimeTagger tags images with the build timestamp. + // DateTimeTagger (beta) tags images with the build timestamp. DateTimeTagger *DateTimeTagger `yaml:"dateTime,omitempty" yamltags:"oneOf=tag"` } -// ShaTagger contains the configuration for the SHA tagger. +// ShaTagger (beta) tags images with their sha256 digest. type ShaTagger struct{} -// GitTagger contains the configuration for the git tagger. +// GitTagger (beta) tags images with the git tag or git commit of the artifact workspace directory. type GitTagger struct{} -// EnvTemplateTagger tags images with a configurable template string. +// 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/) syntax. - // The template is compiled and executed against the current environment, + // See golang [text/template](https://golang.org/pkg/text/template/). + // The template is executed against the current environment, // with those variables injected: // IMAGE_NAME | Name of the image being built, as supplied in the artifacts section. // For example: `{{.RELEASE}}-{{.IMAGE_NAME}}`. Template string `yaml:"template,omitempty" yamltags:"required"` } -// DateTimeTagger tags images with the build timestamp. +// 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). @@ -130,20 +141,20 @@ type DateTimeTagger struct { // BuildType contains the specific implementation and parameters needed // for the build step. Only one field should be populated. type BuildType struct { - // LocalBuild describes how to do a build on the local docker daemon + // 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 describes how to do a remote build on + // 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"` - // KanikoBuild describes how to do an on-cluster build using + // KanikoBuild (beta) describes how to do an on-cluster build using // [Kaniko](https://github.com/GoogleContainerTools/kaniko). KanikoBuild *KanikoBuild `yaml:"kaniko,omitempty" yamltags:"oneOf=build"` } -// LocalBuild describes how to do a build on the local docker daemon +// 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. @@ -158,7 +169,7 @@ type LocalBuild struct { UseBuildkit bool `yaml:"useBuildkit,omitempty"` } -// GoogleCloudBuild describes how to do a remote build on +// 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 @@ -220,7 +231,7 @@ type KanikoCache struct { Repo string `yaml:"repo,omitempty"` } -// KanikoBuild describes how to do an on-cluster build using +// KanikoBuild (beta) describes how to do an on-cluster build using // [Kaniko](https://github.com/GoogleContainerTools/kaniko). type KanikoBuild struct { // BuildContext defines where Kaniko gets the sources from. @@ -290,17 +301,19 @@ type DeployConfig struct { // DeployType contains the specific implementation and parameters needed // for the deploy step. Only one field should be populated. type DeployType struct { + // HelmDeploy (beta) uses the `helm` CLI to apply the charts to the cluster. HelmDeploy *HelmDeploy `yaml:"helm,omitempty" yamltags:"oneOf=deploy"` - // KubectlDeploy uses a client side `kubectl apply` to apply the manifests to the cluster. - // You'll need a kubectl CLI version installed that's compatible with your cluster. + // 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" yamltags:"oneOf=deploy"` - // KustomizeDeploy uses the `kustomize` CLI to "patch" a deployment for a target environment. + // KustomizeDeploy (beta) uses the `kustomize` CLI to "patch" a deployment for a target environment. KustomizeDeploy *KustomizeDeploy `yaml:"kustomize,omitempty" yamltags:"oneOf=deploy"` } -// KubectlDeploy contains the configuration needed for deploying with `kubectl apply`. +// 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"]`. @@ -327,13 +340,13 @@ type KubectlFlags struct { Delete []string `yaml:"delete,omitempty"` } -// HelmDeploy contains the configuration needed for deploying with `helm`. +// 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"` } -// KustomizeDeploy contains the configuration needed for deploying with `kustomize`. +// KustomizeDeploy (beta) uses the `kustomize` CLI to "patch" a deployment for a target environment. type KustomizeDeploy struct { // KustomizePath is the path to Kustomization files. // Defaults to `.`. @@ -380,6 +393,7 @@ type HelmRelease struct { // Defaults to `false`. RecreatePods bool `yaml:"recreatePods,omitempty"` + // SkipBuildDependencies should build dependencies be skipped. SkipBuildDependencies bool `yaml:"skipBuildDependencies,omitempty"` // Overrides are key-value pairs. @@ -418,6 +432,7 @@ type HelmImageConfig struct { // 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"` } @@ -429,27 +444,29 @@ type HelmConventionConfig struct { // 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 where the artifact's sources are to be found. // Defaults to `.`. Workspace string `yaml:"context,omitempty"` - // Sync lists local files that can be synced to remote pods (alpha) instead + // Sync (alpha) lists local files that can be synced to remote pods instead // of triggering an image build when modified. // This is a mapping of local files to sync to remote folders. - // For example: `{'*.py': .}`. + // For example: `{"*.py": ".", "css/**/*.css": "app/css"}`. Sync map[string]string `yaml:"sync,omitempty"` ArtifactType `yaml:",inline"` - // The plugin used to build this artifact + // BuilderPlugin is the plugin used to build this artifact. BuilderPlugin *BuilderPlugin `yaml:"plugin,omitempty"` } // Profile (beta) profiles are 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"` // Build replaces the main `build` configuration. @@ -461,12 +478,12 @@ type Profile struct { // Deploy replaces the main `deploy` configuration. Deploy DeployConfig `yaml:"deploy,omitempty"` - // Patches is a list of patches that will modify the default configuration. - // This is used to not replace a whole configuration section but change a few values. - // Each patch uses the JSON patch notation. - // For example, this profile will replace the `dockerfile` value of the first artifact by `Dockerfile.DEV`. - // For example: `[{path: /build/artifacts/0/docker/dockerfile, value: Dockerfile.DEV}]`. - Patches yamlpatch.Patch `yaml:"patches,omitempty"` + // Patches is a list of patches applied to the configuration. + // This is used change a few values and not replace whole sections. + // Patches use the JSON patch notation. + // For example, this replaces the `dockerfile` of the 1st artifact with `Dockerfile.DEV`. + // For example: `[{"path:": "/build/artifacts/0/docker/dockerfile", "value": "Dockerfile.DEV"}]`. + Patches []yamlpatch.Operation `yaml:"patches,omitempty"` // Activation criteria by which a profile can be auto-activated. // This can be based on Environment Variables, the current Kubernetes @@ -491,54 +508,54 @@ type Activation struct { } type ArtifactType struct { - // DockerArtifact describes an artifact built from a Dockerfile, + // DockerArtifact (beta) describes an artifact built from a Dockerfile, // usually using `docker build`. DockerArtifact *DockerArtifact `yaml:"docker,omitempty" yamltags:"oneOf=artifact"` - // BazelArtifact requires bazel CLI to be installed and the artifacts sources to + // BazelArtifact (beta) requires bazel CLI to be installed and the artifacts sources to // contain [Bazel](https://bazel.build/) configuration files. BazelArtifact *BazelArtifact `yaml:"bazel,omitempty" yamltags:"oneOf=artifact"` - // JibMavenArtifact builds images using the + // JibMavenArtifact (alpha) builds images using the // [Jib plugin for Maven](https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin). JibMavenArtifact *JibMavenArtifact `yaml:"jibMaven,omitempty" yamltags:"oneOf=artifact"` - // JibGradleArtifact builds images using the + // JibGradleArtifact (alpha) builds images using the // [Jib plugin for Gradle](https://github.com/GoogleContainerTools/jib/tree/master/jib-gradle-plugin). JibGradleArtifact *JibGradleArtifact `yaml:"jibGradle,omitempty" yamltags:"oneOf=artifact"` } -// DockerArtifact describes an artifact built from a Dockerfile, +// DockerArtifact (beta) 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: "value2"}`. + // For example: `{"key1": "value1", "key2": "value2"}`. BuildArgs map[string]*string `yaml:"buildArgs,omitempty"` // CacheFrom lists the Docker images to consider as cache sources. // For example: `["golang:1.10.1-alpine3.7", "alpine:3.7"]`. CacheFrom []string `yaml:"cacheFrom,omitempty"` - - // Target is the Dockerfile target name to build. - Target string `yaml:"target,omitempty"` } -// BazelArtifact describes an artifact built with [Bazel](https://bazel.build/). +// BazelArtifact (beta) 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: `["arg1", "arg2"]`. + // For example: `["-flag", "--otherflag"]`. BuildArgs []string `yaml:"args,omitempty"` } -// JibMavenArtifact builds images using the +// JibMavenArtifact (alpha) builds images using the // [Jib plugin for Maven](https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin). type JibMavenArtifact struct { // Module selects which Maven module to build, for a multi module project. @@ -548,15 +565,17 @@ type JibMavenArtifact struct { Profile string `yaml:"profile"` // Flags are additional build flags passed to Maven. + // For example: `["-x", "-DskipTests"]`. Flags []string `yaml:"args,omitempty"` } -// JibGradleArtifact builds images using the +// JibGradleArtifact (alpha) builds images using the // [Jib plugin for Gradle](https://github.com/GoogleContainerTools/jib/tree/master/jib-gradle-plugin). type JibGradleArtifact struct { // Project selects which Gradle project to build. Project string `yaml:"project"` // Flags are additional build flags passed to Gradle. + // For example: `["--no-build-cache"]`. Flags []string `yaml:"args,omitempty"` } diff --git a/pkg/skaffold/schema/profiles.go b/pkg/skaffold/schema/profiles.go index 8a2ea86d4a0..d37cff3658b 100644 --- a/pkg/skaffold/schema/profiles.go +++ b/pkg/skaffold/schema/profiles.go @@ -25,6 +25,7 @@ import ( cfg "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest" + yamlpatch "github.com/krishicks/yaml-patch" "github.com/pkg/errors" "github.com/sirupsen/logrus" yaml "gopkg.in/yaml.v2" @@ -155,7 +156,7 @@ func applyProfile(config *latest.SkaffoldPipeline, profile latest.Profile) error return err } - buf, err = profile.Patches.Apply(buf) + buf, err = yamlpatch.Patch(profile.Patches).Apply(buf) if err != nil { return err } diff --git a/schemas/index.html b/schemas/index.html new file mode 100644 index 00000000000..759216ec8a0 --- /dev/null +++ b/schemas/index.html @@ -0,0 +1,14 @@ + + + + + Skaffold Pipeline Configuration + + + + + +
+ + + diff --git a/schemas/main.css b/schemas/main.css new file mode 100644 index 00000000000..9a4e34d6f4a --- /dev/null +++ b/schemas/main.css @@ -0,0 +1,59 @@ +.comment { + color: #008000; +} + +.key { + color: #811f3f; +} + +.key.required { + font-weight: bold; +} + +.value { + color: blue; +} + +.example { + color: gray; + font-weight: 100; +} + +.key, .value, .comment, .gray, .example { + font-family: 'Roboto Mono', monospace; + white-space: nowrap; +} + +table { + border-collapse: collapse; +} + +td { + border-bottom: 1px solid #EEE; + padding: 2px 0; +} + +td.top { + background-color: #EEE; +} + +td.top .comment { + color: gray; +} + +td:first-child { + white-space: nowrap; + padding-right: 10px; +} + +tr:hover td { + background: #EEE; +} + +code { + font-family: unset; + font-size: 85%; + border: 1px dotted gray; + border-radius: 3px; + padding: 0 .2em; +} diff --git a/schemas/main.go b/schemas/main.go index bff89e21bf6..f10a147b837 100644 --- a/schemas/main.go +++ b/schemas/main.go @@ -69,12 +69,15 @@ func (d *Definitions) MarshalJSON() ([]byte, error) { } buf.Write(key) buf.WriteString(":") + // marshal value - val, err := json.Marshal(d.values[k]) - if err != nil { + var val bytes.Buffer + encoder := json.NewEncoder(&val) + encoder.SetEscapeHTML(false) + if err := encoder.Encode(d.values[k]); err != nil { return nil, err } - buf.Write(val) + buf.Write(val.Bytes()) } buf.WriteString("}") @@ -199,10 +202,6 @@ func newDefinition(name string, t ast.Expr, comment string) *Definition { for _, field := range tt.Fields.List { yamlName := yamlFieldName(field) - if strings.Contains(field.Tag.Value, "required") { - def.Required = append(def.Required, yamlName) - } - if strings.Contains(field.Tag.Value, "inline") { def.OneOf = append(def.OneOf, &Definition{ Ref: defPrefix + field.Type.(*ast.Ident).Name, @@ -210,6 +209,14 @@ func newDefinition(name string, t ast.Expr, comment string) *Definition { continue } + if yamlName == "" { + continue + } + + if strings.Contains(field.Tag.Value, "required") { + def.Required = append(def.Required, yamlName) + } + if def.Properties == nil { def.Properties = &Definitions{} } @@ -233,8 +240,11 @@ func newDefinition(name string, t ast.Expr, comment string) *Definition { } // Remove type prefix + description = strings.TrimPrefix(description, name+" is the ") description = strings.TrimPrefix(description, name+" is ") + description = strings.TrimPrefix(description, name+" are the ") description = strings.TrimPrefix(description, name+" are ") + description = strings.TrimPrefix(description, name+" lists ") description = strings.TrimPrefix(description, name+" ") // Convert to HTML @@ -273,26 +283,24 @@ func generateSchema(inputPath string) ([]byte, error) { } // Inline oneOfs - if true { - for _, v := range definitions.values { - var options []*Definition - - for _, oneOf := range v.OneOf { - ref := strings.TrimPrefix(oneOf.Ref, defPrefix) - referenced := definitions.values[ref] - - for _, key := range referenced.Properties.keys { - choice := &Definitions{} - choice.Add(key, referenced.Properties.values[key]) - - options = append(options, &Definition{ - Properties: choice, - }) - } - } + for _, v := range definitions.values { + var options []*Definition + + for _, oneOf := range v.OneOf { + ref := strings.TrimPrefix(oneOf.Ref, defPrefix) + referenced := definitions.values[ref] - v.OneOf = options + for _, key := range referenced.Properties.keys { + choice := &Definitions{} + choice.Add(key, referenced.Properties.values[key]) + + options = append(options, &Definition{ + Properties: choice, + }) + } } + + v.OneOf = options } schema := Schema{ diff --git a/schemas/main.js b/schemas/main.js new file mode 100644 index 00000000000..9f06f82358e --- /dev/null +++ b/schemas/main.js @@ -0,0 +1,157 @@ +import { html, render } from "https://unpkg.com/lit-html@1.0.0/lit-html.js"; +import { unsafeHTML } from "https://unpkg.com/lit-html@1.0.0/directives/unsafe-html.js"; + +(async function() { + const response = await fetch("v1beta5.json"); + const json = await response.json(); + console.log(json); + + render(html`${template(json.definitions, undefined, '#/definitions/SkaffoldPipeline', 0)}`, document.getElementById("table")); +})(); + +function* template(definitions, parentDefinition, ref, ident) { + const name = ref.replace('#/definitions/', ''); + + let allProperties = []; + var properties = definitions[name].properties; + for (var key in properties) { + allProperties.push([key, properties[key]]); + } + if (definitions[name].oneOf) { + for (var properties of definitions[name].oneOf) { + for (var key in properties.properties) { + allProperties.push([key, properties.properties[key]]); + } + } + } + + let index = -1 + for (var [key, definition] of allProperties) { + var desc = definition.description; + let value = definition.default; + index++; + + if (key === 'apiVersion') { + value = 'skaffold/v1beta5' + } + if (definition.examples) { + value = definition.examples[0] + } + let valueClass = definition.examples ? 'example' : 'value'; + + let required = false; + if (definitions[name].required) { + for (var requiredName of definitions[name].required) { + if (requiredName === key) { + required = true; + break; + } + } + } + let keyClass = required ? 'key required' : 'key'; + + // Special case for profiles + if (name === 'Profile') { + if ((key === 'build') || (key === 'test') || (key === 'deploy')) { + yield html` + + ${key}: {} + # ${unsafeHTML(desc)} + + `; + continue + } + } + + if (definition.$ref) { + // Check if the referenced description is a final one + const refName = definition.$ref.replace('#/definitions/', ''); + if (!definitions[refName].properties && !definitions[refName].oneOf) { + value = '{}' + } + + yield html` + +   + + + ${key}: ${value} + # ${unsafeHTML(desc)} + + `; + } else if (definition.items && definition.items.$ref) { + yield html` + +   + + + ${key}: ${value} + # ${unsafeHTML(desc)} + + `; + } else if (parentDefinition && parentDefinition.type === 'array' && (index == 0)) { + yield html` + + - ${key}: ${value} + # ${unsafeHTML(desc)} + + `; + } else if ((definition.type === 'array') && value && (value != '[]')) { + yield html` + + ${key}: + # ${unsafeHTML(desc)} + + `; + + // Parse value to json array + let values = JSON.parse(value); + for (var v of values) { + yield html` + + - ${v} + + `; + } + } else if ((definition.type === 'object') && value && (value != '{}')) { + yield html` + + ${key}: + # ${unsafeHTML(desc)} + + `; + + let values = JSON.parse(value); + for (var k in values) { + let v = values[k]; + + yield html` + + ${k}: ${v} + + `; + } + } else { + yield html` + + ${key}: ${value} + # ${unsafeHTML(desc)} + + `; + } + + // This definition references another definition + if (definition.$ref) { + yield html` + ${template(definitions, definition, definition.$ref, ident + 1)} + `; + } + + // This definition is an array + if (definition.items && definition.items.$ref) { + yield html` + ${template(definitions, definition, definition.items.$ref, ident + 1)} + `; + } + } +} diff --git a/schemas/v1alpha1.json b/schemas/v1alpha1.json index 06896106574..9dc50719988 100644 --- a/schemas/v1alpha1.json +++ b/schemas/v1alpha1.json @@ -23,7 +23,7 @@ "$ref": "#/definitions/DeployConfig" } }, - "description": "the top level config object that is parsed from a skaffold.yaml" + "description": "top level config object that is parsed from a skaffold.yaml" }, "BuildConfig": { "properties": { @@ -128,7 +128,7 @@ "type": "array" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "Manifest": { "properties": { diff --git a/schemas/v1alpha2.json b/schemas/v1alpha2.json index c2f79a5894d..08208fe16f5 100644 --- a/schemas/v1alpha2.json +++ b/schemas/v1alpha2.json @@ -254,7 +254,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { diff --git a/schemas/v1alpha3.json b/schemas/v1alpha3.json index 5504ad5f8aa..4f63b43d53f 100644 --- a/schemas/v1alpha3.json +++ b/schemas/v1alpha3.json @@ -262,7 +262,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { diff --git a/schemas/v1alpha4.json b/schemas/v1alpha4.json index 2223c9cd3f0..844fe22fe76 100644 --- a/schemas/v1alpha4.json +++ b/schemas/v1alpha4.json @@ -298,7 +298,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { @@ -592,7 +592,7 @@ "default": "\"\"" } }, - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "describes an artifact built from a Dockerfile, usually using docker build." }, "BazelArtifact": { "properties": { diff --git a/schemas/v1alpha5.json b/schemas/v1alpha5.json index 93094b1e41c..b095360854e 100644 --- a/schemas/v1alpha5.json +++ b/schemas/v1alpha5.json @@ -329,7 +329,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { @@ -620,7 +620,7 @@ "default": "\"\"" } }, - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "describes an artifact built from a Dockerfile, usually using docker build." }, "BazelArtifact": { "properties": { diff --git a/schemas/v1beta1.json b/schemas/v1beta1.json index 5e4c950d3dd..41c4ef972bf 100644 --- a/schemas/v1beta1.json +++ b/schemas/v1beta1.json @@ -310,7 +310,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { @@ -601,7 +601,7 @@ "default": "\"\"" } }, - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "describes an artifact built from a Dockerfile, usually using docker build." }, "BazelArtifact": { "properties": { diff --git a/schemas/v1beta2.json b/schemas/v1beta2.json index 924d9e142fe..87cc935806a 100644 --- a/schemas/v1beta2.json +++ b/schemas/v1beta2.json @@ -318,7 +318,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { @@ -609,7 +609,7 @@ "default": "\"\"" } }, - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "describes an artifact built from a Dockerfile, usually using docker build." }, "BazelArtifact": { "properties": { diff --git a/schemas/v1beta3.json b/schemas/v1beta3.json index e5183b310f6..38fbca26568 100644 --- a/schemas/v1beta3.json +++ b/schemas/v1beta3.json @@ -342,7 +342,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { @@ -633,7 +633,7 @@ "default": "\"\"" } }, - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "describes an artifact built from a Dockerfile, usually using docker build." }, "BazelArtifact": { "properties": { diff --git a/schemas/v1beta4.json b/schemas/v1beta4.json index 516c3010be6..118670a8ae1 100644 --- a/schemas/v1beta4.json +++ b/schemas/v1beta4.json @@ -342,7 +342,7 @@ "$ref": "#/definitions/KubectlFlags" } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e" + "description": "contains the configuration needed for deploying with kubectl apply" }, "KubectlFlags": { "properties": { @@ -661,7 +661,7 @@ "default": "\"\"" } }, - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "describes an artifact built from a Dockerfile, usually using docker build." }, "BazelArtifact": { "properties": { diff --git a/schemas/v1beta5.json b/schemas/v1beta5.json index f1c486ad700..7847b7d80f7 100644 --- a/schemas/v1beta5.json +++ b/schemas/v1beta5.json @@ -10,11 +10,13 @@ "properties": { "apiVersion": { "type": "string", + "description": "version of the configuration.", "default": "\"\"" }, "kind": { "type": "string", - "default": "\"\"" + "description": "always Config.", + "default": "Config" }, "build": { "$ref": "#/definitions/BuildConfig", @@ -33,7 +35,7 @@ "$ref": "#/definitions/Profile" }, "type": "array", - "description": "(beta) can override be used to \u003ccode\u003ebuild\u003c/code\u003e, \u003ccode\u003etest\u003c/code\u003e or \u003ccode\u003edeploy\u003c/code\u003e configuration." + "description": "(beta) can override be used to build, test or deploy configuration." } } }, @@ -44,14 +46,15 @@ "$ref": "#/definitions/Artifact" }, "type": "array", - "description": "lists the images you're going to be building." + "description": "the images you're going to be building." }, "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! The policy can be \u003ccode\u003egitCommit\u003c/code\u003e (beta), \u003ccode\u003esha256\u003c/code\u003e (beta), \u003ccode\u003eenvTemplate\u003c/code\u003e (beta) or \u003ccode\u003edateTime\u003c/code\u003e (beta). If not specified, it defaults to \u003ccode\u003egitCommit: {}\u003c/code\u003e." + "description": "(beta) determines how images are tagged. A few strategies are provided here, although you most likely won't need to care! The policy can be gitCommit (beta), sha256 (beta), envTemplate (beta) or dateTime (beta). If not specified, it defaults to gitCommit: {}." }, "executionEnvironment": { - "$ref": "#/definitions/ExecutionEnvironment" + "$ref": "#/definitions/ExecutionEnvironment", + "description": "environment in which the build should run. Possible values: googleCloudBuild." } }, "oneOf": [ @@ -59,7 +62,7 @@ "properties": { "local": { "$ref": "#/definitions/LocalBuild", - "description": "describes how to do a build on the local docker daemon and optionally push to a repository." + "description": "(beta) describes how to do a build on the local docker daemon and optionally push to a repository." } } }, @@ -67,7 +70,7 @@ "properties": { "googleCloudBuild": { "$ref": "#/definitions/GoogleCloudBuild", - "description": "describes how to do a remote build on \u003ca href=\"https://cloud.google.com/cloud-build/\"\u003eGoogle Cloud Build\u003c/a\u003e." + "description": "(beta) describes how to do a remote build on Google Cloud Build." } } }, @@ -75,7 +78,7 @@ "properties": { "kaniko": { "$ref": "#/definitions/KanikoBuild", - "description": "describes how to do an on-cluster build using \u003ca href=\"https://github.com/GoogleContainerTools/kaniko\"\u003eKaniko\u003c/a\u003e." + "description": "(beta) describes how to do an on-cluster build using Kaniko." } } } @@ -89,64 +92,60 @@ "ExecutionEnvironment": { "properties": { "name": { - "$ref": "#/definitions/ExecEnvironment" + "$ref": "#/definitions/ExecEnvironment", + "description": "name of the environment." }, "properties": { "additionalProperties": {}, "type": "object", + "description": "key-value pairs passed to the environment.", "default": "{}" } }, - "description": "the environment in which the build should run (ex. local or in-cluster, etc.)" + "description": "environment in which the build should run (ex. local or in-cluster, etc.)." }, "BuilderPlugin": { "properties": { "name": { "type": "string", - "description": "of the build plugin", + "description": "name of the build plugin.", "default": "\"\"" }, "properties": { "additionalProperties": {}, "type": "object", - "description": "associated with the plugin", + "description": "key-value pairs passed to the plugin.", "default": "{}" - }, - "": { - "items": { - "$ref": "#/definitions/byte" - }, - "type": "array" } }, - "description": "contains all fields necessary for specifying a build plugin" + "description": "contains all fields necessary for specifying a build plugin." }, "TagPolicy": { "properties": { "gitCommit": { "$ref": "#/definitions/GitTagger", - "description": "tags images with the git tag or git commit of the artifact workspace directory." + "description": "(beta) tags images with the git tag or git commit of the artifact workspace directory." }, "sha256": { "$ref": "#/definitions/ShaTagger", - "description": "tags images with their sha256 digest." + "description": "(beta) tags images with their sha256 digest." }, "envTemplate": { "$ref": "#/definitions/EnvTemplateTagger", - "description": "tags images with a configurable template string." + "description": "(beta) tags images with a configurable template string." }, "dateTime": { "$ref": "#/definitions/DateTimeTagger", - "description": "tags images with the build timestamp." + "description": "(beta) tags images with the build timestamp." } }, "description": "contains all the configuration for the tagging step." }, "ShaTagger": { - "description": "contains the configuration for the SHA tagger." + "description": "(beta) tags images with their sha256 digest." }, "GitTagger": { - "description": "contains the configuration for the git tagger." + "description": "(beta) tags images with the git tag or git commit of the artifact workspace directory." }, "EnvTemplateTagger": { "required": [ @@ -155,43 +154,43 @@ "properties": { "template": { "type": "string", - "description": "used to produce the image name and tag. See golang \u003ca href=\"https://golang.org/pkg/text/template/\"\u003etext/template\u003c/a\u003e syntax. The template is compiled and executed against the current environment, with those variables injected: IMAGE_NAME | Name of the image being built, as supplied in the artifacts section.", + "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: IMAGE_NAME | Name of the image being built, as supplied in the artifacts section.", "default": "\"\"", "examples": [ "{{.RELEASE}}-{{.IMAGE_NAME}}" ] } }, - "description": "tags images with a configurable template string." + "description": "(beta) tags images with a configurable template string." }, "DateTimeTagger": { "properties": { "format": { "type": "string", - "description": "formats the date and time. See \u003ca href=\"https://golang.org/pkg/time/#Time.Format\"\u003e#Time.Format\u003c/a\u003e.", + "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 \u003ca href=\"https://golang.org/pkg/time/#Time.LoadLocation\"\u003eTime.LoadLocation\u003c/a\u003e. Defaults to the local timezone.", + "description": "sets the timezone for the date and time. See Time.LoadLocation. Defaults to the local timezone.", "default": "\"\"" } }, - "description": "tags images with the build timestamp." + "description": "(beta) tags images with the build timestamp." }, "BuildType": { "properties": { "local": { "$ref": "#/definitions/LocalBuild", - "description": "describes how to do a build on the local docker daemon and optionally push to a repository." + "description": "(beta) describes how to do a build on the local docker daemon and optionally push to a repository." }, "googleCloudBuild": { "$ref": "#/definitions/GoogleCloudBuild", - "description": "describes how to do a remote build on \u003ca href=\"https://cloud.google.com/cloud-build/\"\u003eGoogle Cloud Build\u003c/a\u003e." + "description": "(beta) describes how to do a remote build on Google Cloud Build." }, "kaniko": { "$ref": "#/definitions/KanikoBuild", - "description": "describes how to do an on-cluster build using \u003ca href=\"https://github.com/GoogleContainerTools/kaniko\"\u003eKaniko\u003c/a\u003e." + "description": "(beta) describes how to do an on-cluster build using Kaniko." } }, "description": "contains the specific implementation and parameters needed for the build step. Only one field should be populated." @@ -204,7 +203,7 @@ }, "useDockerCLI": { "type": "boolean", - "description": "use \u003ccode\u003edocker\u003c/code\u003e command-line interface instead of Docker Engine APIs.", + "description": "use docker command-line interface instead of Docker Engine APIs.", "default": "false" }, "useBuildkit": { @@ -213,61 +212,61 @@ "default": "false" } }, - "description": "describes how to do a build on the local docker daemon and optionally push to a repository." + "description": "(beta) describes how to do a build on the local docker daemon and optionally push to a repository." }, "GoogleCloudBuild": { "properties": { "projectId": { "type": "string", - "description": "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 \u003ccode\u003egcr.io/myproject/image\u003c/code\u003e, Skaffold will use the \u003ccode\u003emyproject\u003c/code\u003e GCP project.", + "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.", "default": "\"\"" }, "diskSizeGb": { "type": "number", - "description": "the disk size of the VM that runs the build. See \u003ca href=\"https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions\"\u003eCloud Build Reference\u003c/a\u003e.", + "description": "disk size of the VM that runs the build. See Cloud Build Reference.", "default": "0" }, "machineType": { "type": "string", - "description": "the type of the VM that runs the build. See \u003ca href=\"https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions\"\u003eCloud Build Reference\u003c/a\u003e.", + "description": "type of the VM that runs the build. See Cloud Build Reference.", "default": "\"\"" }, "timeout": { "type": "string", - "description": "the amount of time (in seconds) that this build should be allowed to run. See \u003ca href=\"https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#resource-build\"\u003eCloud Build Reference\u003c/a\u003e.", + "description": "amount of time (in seconds) that this build should be allowed to run. See Cloud Build Reference.", "default": "\"\"" }, "dockerImage": { "type": "string", - "description": "the image that runs a Docker build. See \u003ca href=\"https://cloud.google.com/cloud-build/docs/cloud-builders\"\u003eCloud Builders\u003c/a\u003e.", + "description": "image that runs a Docker build. See Cloud Builders.", "default": "gcr.io/cloud-builders/docker" }, "mavenImage": { "type": "string", - "description": "the image that runs a Maven build. See \u003ca href=\"https://cloud.google.com/cloud-build/docs/cloud-builders\"\u003eCloud Builders\u003c/a\u003e.", + "description": "image that runs a Maven build. See Cloud Builders.", "default": "gcr.io/cloud-builders/mvn" }, "gradleImage": { "type": "string", - "description": "the image that runs a Gradle build. See \u003ca href=\"https://cloud.google.com/cloud-build/docs/cloud-builders\"\u003eCloud Builders\u003c/a\u003e.", + "description": "image that runs a Gradle build. See Cloud Builders.", "default": "gcr.io/cloud-builders/gradle" } }, - "description": "describes how to do a remote build on \u003ca href=\"https://cloud.google.com/cloud-build/docs/\"\u003eGoogle Cloud Build\u003c/a\u003e. Docker and Jib artifacts can be built on Cloud Build. The \u003ccode\u003eprojectId\u003c/code\u003e needs to be provided and the currently logged in user should be given permissions to trigger new builds." + "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." }, "LocalDir": { - "description": "configures how Kaniko mounts sources directly via an \u003ccode\u003eemptyDir\u003c/code\u003e volume." + "description": "configures how Kaniko mounts sources directly via an emptyDir volume." }, "KanikoBuildContext": { "properties": { "gcsBucket": { "type": "string", - "description": "the CGS bucket to which sources are uploaded by Skaffold. Kaniko will need access to that bucket to download the sources.", + "description": "CGS bucket to which sources are uploaded by Skaffold. Kaniko will need access to that bucket to download the sources.", "default": "\"\"" }, "localDir": { "$ref": "#/definitions/LocalDir", - "description": "configures how Kaniko mounts sources directly via an \u003ccode\u003eemptyDir\u003c/code\u003e volume." + "description": "configures how Kaniko mounts sources directly via an emptyDir volume." } }, "description": "contains the different fields available to specify a Kaniko build context." @@ -276,7 +275,7 @@ "properties": { "repo": { "type": "string", - "description": "a remote repository to store cached layers. If none is specified, one will be inferred from the image name. See \u003ca href=\"https://github.com/GoogleContainerTools/kaniko#caching\"\u003eKaniko Caching\u003c/a\u003e.", + "description": "a remote repository to store cached layers. If none is specified, one will be inferred from the image name. See Kaniko Caching.", "default": "\"\"" } }, @@ -298,32 +297,32 @@ "default": "\"\"" }, "type": "array", - "description": "additional flags to be passed to Kaniko command line. See \u003ca href=\"https://github.com/GoogleContainerTools/kaniko#additional-flags\"\u003eKaniko Additional Flags\u003c/a\u003e.", + "description": "additional flags to be passed to Kaniko command line. See Kaniko Additional Flags.", "default": "[]" }, "pullSecret": { "type": "string", - "description": "the path to the secret key file. See \u003ca href=\"https://github.com/GoogleContainerTools/kaniko#running-kaniko-in-a-kubernetes-cluster\"\u003eKaniko Documentation\u003c/a\u003e.", + "description": "path to the secret key file. See Kaniko Documentation.", "default": "\"\"" }, "pullSecretName": { "type": "string", - "description": "the name of the Kubernetes secret for pulling the files from the build context and pushing the final image.", + "description": "name of the Kubernetes secret for pulling the files from the build context and pushing the final image.", "default": "kaniko-secret" }, "namespace": { "type": "string", - "description": "the Kubernetes namespace. Defaults to current namespace in Kubernetes configuration.", + "description": "Kubernetes namespace. Defaults to current namespace in Kubernetes configuration.", "default": "\"\"" }, "timeout": { "type": "string", - "description": "the amount of time (in seconds) that this build is allowed to run. Defaults to 20 minutes (\u003ccode\u003e20m\u003c/code\u003e).", + "description": "amount of time (in seconds) that this build is allowed to run. Defaults to 20 minutes (20m).", "default": "\"\"" }, "image": { "type": "string", - "description": "the Docker image used by the Kaniko pod. Defaults to the latest released version of \u003ccode\u003egcr.io/kaniko-project/executor\u003c/code\u003e.", + "description": "Docker image used by the Kaniko pod. Defaults to the latest released version of gcr.io/kaniko-project/executor.", "default": "\"\"" }, "dockerConfig": { @@ -331,22 +330,22 @@ "description": "describes how to mount the local Docker configuration into the Kaniko pod." } }, - "description": "describes how to do an on-cluster build using \u003ca href=\"https://github.com/GoogleContainerTools/kaniko\"\u003eKaniko\u003c/a\u003e." + "description": "(beta) describes how to do an on-cluster build using Kaniko." }, "DockerConfig": { "properties": { "path": { "type": "string", - "description": "the path to the docker \u003ccode\u003econfig.json\u003c/code\u003e.", + "description": "path to the docker config.json.", "default": "\"\"" }, "secretName": { "type": "string", - "description": "the Kubernetes secret that will hold the Docker configuration.", + "description": "Kubernetes secret that will hold the Docker configuration.", "default": "\"\"" } }, - "description": "contains information about the docker \u003ccode\u003econfig.json\u003c/code\u003e to mount." + "description": "contains information about the docker config.json to mount." }, "TestConfig": { "items": { @@ -361,7 +360,7 @@ "properties": { "image": { "type": "string", - "description": "the artifact on which to run those tests.", + "description": "artifact on which to run those tests.", "default": "\"\"" }, "structureTests": { @@ -370,7 +369,7 @@ "default": "\"\"" }, "type": "array", - "description": "lists the \u003ca href=\"https://github.com/GoogleContainerTools/container-structure-test\"\u003eContainer Structure Tests\u003c/a\u003e to run on that artifact.", + "description": "the Container Structure Tests to run on that artifact.", "default": "[]", "examples": [ "[\"./test/*\"]" @@ -384,7 +383,8 @@ { "properties": { "helm": { - "$ref": "#/definitions/HelmDeploy" + "$ref": "#/definitions/HelmDeploy", + "description": "(beta) uses the helm CLI to apply the charts to the cluster." } } }, @@ -392,7 +392,7 @@ "properties": { "kubectl": { "$ref": "#/definitions/KubectlDeploy", - "description": "uses a client side \u003ccode\u003ekubectl apply\u003c/code\u003e to apply the manifests to the cluster. You'll need a kubectl CLI version installed that's compatible with your cluster." + "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." } } }, @@ -400,7 +400,7 @@ "properties": { "kustomize": { "$ref": "#/definitions/KustomizeDeploy", - "description": "uses the \u003ccode\u003ekustomize\u003c/code\u003e CLI to \u0026quot;patch\u0026quot; a deployment for a target environment." + "description": "(beta) uses the kustomize CLI to "patch" a deployment for a target environment." } } } @@ -410,15 +410,16 @@ "DeployType": { "properties": { "helm": { - "$ref": "#/definitions/HelmDeploy" + "$ref": "#/definitions/HelmDeploy", + "description": "(beta) uses the helm CLI to apply the charts to the cluster." }, "kubectl": { "$ref": "#/definitions/KubectlDeploy", - "description": "uses a client side \u003ccode\u003ekubectl apply\u003c/code\u003e to apply the manifests to the cluster. You'll need a kubectl CLI version installed that's compatible with your cluster." + "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": "uses the \u003ccode\u003ekustomize\u003c/code\u003e CLI to \u0026quot;patch\u0026quot; a deployment for a target environment." + "description": "(beta) uses the kustomize CLI to "patch" a deployment for a target environment." } }, "description": "contains the specific implementation and parameters needed for the deploy step. Only one field should be populated." @@ -431,7 +432,7 @@ "default": "\"\"" }, "type": "array", - "description": "lists the Kubernetes yaml or json manifests.", + "description": "the Kubernetes yaml or json manifests.", "default": "[\"k8s/*.yaml\"]" }, "remoteManifests": { @@ -440,15 +441,15 @@ "default": "\"\"" }, "type": "array", - "description": "lists Kubernetes manifests in remote clusters.", + "description": "Kubernetes manifests in remote clusters.", "default": "[]" }, "flags": { "$ref": "#/definitions/KubectlFlags", - "description": "additional flags to pass to \u003ccode\u003ekubectl\u003c/code\u003e." + "description": "additional flags to pass to kubectl." } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekubectl apply\u003c/code\u003e." + "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": { @@ -467,7 +468,7 @@ "default": "\"\"" }, "type": "array", - "description": "additional flags passed on creations (\u003ccode\u003ekubectl apply\u003c/code\u003e).", + "description": "additional flags passed on creations (kubectl apply).", "default": "[]" }, "delete": { @@ -476,7 +477,7 @@ "default": "\"\"" }, "type": "array", - "description": "additional flags passed on deletions (\u003ccode\u003ekubectl delete\u003c/code\u003e).", + "description": "additional flags passed on deletions (kubectl delete).", "default": "[]" } }, @@ -495,21 +496,21 @@ "description": "a list of Helm releases." } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ehelm\u003c/code\u003e." + "description": "(beta) uses the helm CLI to apply the charts to the cluster." }, "KustomizeDeploy": { "properties": { "path": { "type": "string", - "description": "the path to Kustomization files.", + "description": "path to Kustomization files.", "default": "." }, "flags": { "$ref": "#/definitions/KubectlFlags", - "description": "additional flags to pass to \u003ccode\u003ekubectl\u003c/code\u003e." + "description": "additional flags to pass to kubectl." } }, - "description": "contains the configuration needed for deploying with \u003ccode\u003ekustomize\u003c/code\u003e." + "description": "(beta) uses the kustomize CLI to "patch" a deployment for a target environment." }, "HelmRelease": { "required": [ @@ -519,12 +520,12 @@ "properties": { "name": { "type": "string", - "description": "the name of the Helm release.", + "description": "name of the Helm release.", "default": "\"\"" }, "chartPath": { "type": "string", - "description": "the path to the Helm chart.", + "description": "path to the Helm chart.", "default": "\"\"" }, "valuesFiles": { @@ -533,7 +534,7 @@ "default": "\"\"" }, "type": "array", - "description": "the paths to the Helm \u003ccode\u003evalues\u003c/code\u003e files\u0026quot;.", + "description": "paths to the Helm values files".", "default": "[]" }, "values": { @@ -542,17 +543,17 @@ "default": "\"\"" }, "type": "object", - "description": "key-value pairs supplementing the Helm \u003ccode\u003evalues\u003c/code\u003e file\u0026quot;.", + "description": "key-value pairs supplementing the Helm values file".", "default": "{}" }, "namespace": { "type": "string", - "description": "the Kubernetes namespace.", + "description": "Kubernetes namespace.", "default": "\"\"" }, "version": { "type": "string", - "description": "the version of the chart.", + "description": "version of the chart.", "default": "\"\"" }, "setValues": { @@ -561,7 +562,7 @@ "default": "\"\"" }, "type": "object", - "description": "key-value pairs. If present, Skaffold will send \u003ccode\u003e--set\u003c/code\u003e flag to Helm CLI and append all pairs after the flag.", + "description": "key-value pairs. If present, Skaffold will send --set flag to Helm CLI and append all pairs after the flag.", "default": "{}" }, "setValueTemplates": { @@ -570,36 +571,37 @@ "default": "\"\"" }, "type": "object", - "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 \u003ccode\u003e--set\u003c/code\u003e flag to Helm CLI and append all parsed pairs after the flag.", + "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.", "default": "{}" }, "wait": { "type": "boolean", - "description": "if \u003ccode\u003etrue\u003c/code\u003e, Skaffold will send \u003ccode\u003e--wait\u003c/code\u003e flag to Helm CLI.", + "description": "if true, Skaffold will send --wait flag to Helm CLI.", "default": "false" }, "recreatePods": { "type": "boolean", - "description": "if \u003ccode\u003etrue\u003c/code\u003e, Skaffold will send \u003ccode\u003e--recreate-pods\u003c/code\u003e flag to Helm CLI.", + "description": "if true, Skaffold will send --recreate-pods flag to Helm CLI.", "default": "false" }, "skipBuildDependencies": { "type": "boolean", + "description": "should build dependencies be skipped.", "default": "false" }, "overrides": { "additionalProperties": {}, "type": "object", - "description": "key-value pairs. If present, Skaffold will build a Helm \u003ccode\u003evalues\u003c/code\u003e file that overrides the original and use it to call Helm CLI (\u003ccode\u003e--f\u003c/code\u003e flag).", + "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).", "default": "{}" }, "packaged": { "$ref": "#/definitions/HelmPackaged", - "description": "parameters for packaging helm chart (\u003ccode\u003ehelm package\u003c/code\u003e)." + "description": "parameters for packaging helm chart (helm package)." }, "imageStrategy": { "$ref": "#/definitions/HelmImageStrategy", - "description": "adds image configurations to the Helm \u003ccode\u003evalues\u003c/code\u003e file." + "description": "adds image configurations to the Helm values file." } } }, @@ -607,16 +609,16 @@ "properties": { "version": { "type": "string", - "description": "sets the \u003ccode\u003eversion\u003c/code\u003e on the chart to this semver version.", + "description": "sets the version on the chart to this semver version.", "default": "\"\"" }, "appVersion": { "type": "string", - "description": "sets the \u003ccode\u003eappVersion\u003c/code\u003e on the chart to this version.", + "description": "sets the appVersion on the chart to this version.", "default": "\"\"" } }, - "description": "parameters for packaging helm chart (\u003ccode\u003ehelm package\u003c/code\u003e)." + "description": "parameters for packaging helm chart (helm package)." }, "HelmImageStrategy": { "oneOf": [ @@ -624,7 +626,7 @@ "properties": { "fqn": { "$ref": "#/definitions/HelmFQNConfig", - "description": "the image configuration uses the syntax \u003ccode\u003eIMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG\u003c/code\u003e." + "description": "image configuration uses the syntax IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG." } } }, @@ -632,22 +634,22 @@ "properties": { "helm": { "$ref": "#/definitions/HelmConventionConfig", - "description": "the image configuration uses the syntax \u003ccode\u003eIMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG\u003c/code\u003e." + "description": "image configuration uses the syntax IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG." } } } ], - "description": "adds image configurations to the Helm \u003ccode\u003evalues\u003c/code\u003e file." + "description": "adds image configurations to the Helm values file." }, "HelmImageConfig": { "properties": { "fqn": { "$ref": "#/definitions/HelmFQNConfig", - "description": "the image configuration uses the syntax \u003ccode\u003eIMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG\u003c/code\u003e." + "description": "image configuration uses the syntax IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG." }, "helm": { "$ref": "#/definitions/HelmConventionConfig", - "description": "the image configuration uses the syntax \u003ccode\u003eIMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG\u003c/code\u003e." + "description": "image configuration uses the syntax IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG." } } }, @@ -655,13 +657,14 @@ "properties": { "property": { "type": "string", + "description": "defines the image config.", "default": "\"\"" } }, - "description": "the image config to use the FullyQualifiedImageName as param to set." + "description": "image config to use the FullyQualifiedImageName as param to set." }, "HelmConventionConfig": { - "description": "the image config in the syntax of image.repository and image.tag." + "description": "image config in the syntax of image.repository and image.tag." }, "Artifact": { "required": [ @@ -670,12 +673,15 @@ "properties": { "image": { "type": "string", - "description": "the name of the image to be built.", - "default": "\"\"" + "description": "name of the image to be built.", + "default": "\"\"", + "examples": [ + "gcr.io/k8s-skaffold/example" + ] }, "context": { "type": "string", - "description": "the directory where the artifact's sources are to be found.", + "description": "directory where the artifact's sources are to be found.", "default": "." }, "sync": { @@ -684,15 +690,15 @@ "default": "\"\"" }, "type": "object", - "description": "lists local files that can be synced to remote pods (alpha) instead of triggering an image build when modified. This is a mapping of local files to sync to remote folders.", + "description": "(alpha) lists local files that can be synced to remote pods instead of triggering an image build when modified. This is a mapping of local files to sync to remote folders.", "default": "{}", "examples": [ - "{'*.py': .}" + "{\"*.py\": \".\", \"css/**/*.css\": \"app/css\"}" ] }, "plugin": { "$ref": "#/definitions/BuilderPlugin", - "description": "The plugin used to build this artifact" + "description": "plugin used to build this artifact." } }, "oneOf": [ @@ -700,7 +706,7 @@ "properties": { "docker": { "$ref": "#/definitions/DockerArtifact", - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "(beta) describes an artifact built from a Dockerfile, usually using docker build." } } }, @@ -708,7 +714,7 @@ "properties": { "bazel": { "$ref": "#/definitions/BazelArtifact", - "description": "requires bazel CLI to be installed and the artifacts sources to contain \u003ca href=\"https://bazel.build/\"\u003eBazel\u003c/a\u003e configuration files." + "description": "(beta) requires bazel CLI to be installed and the artifacts sources to contain Bazel configuration files." } } }, @@ -716,7 +722,7 @@ "properties": { "jibMaven": { "$ref": "#/definitions/JibMavenArtifact", - "description": "builds images using the \u003ca href=\"https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin\"\u003eJib plugin for Maven\u003c/a\u003e." + "description": "(alpha) builds images using the Jib plugin for Maven." } } }, @@ -724,12 +730,12 @@ "properties": { "jibGradle": { "$ref": "#/definitions/JibGradleArtifact", - "description": "builds images using the \u003ca href=\"https://github.com/GoogleContainerTools/jib/tree/master/jib-gradle-plugin\"\u003eJib plugin for Gradle\u003c/a\u003e." + "description": "(alpha) builds images using the Jib plugin for Gradle." } } } ], - "description": "the items that need to be built, along with the context in which they should be built." + "description": "items that need to be built, along with the context in which they should be built." }, "Profile": { "required": [ @@ -739,24 +745,30 @@ "name": { "type": "string", "description": "a unique profile name.", - "default": "\"\"" + "default": "\"\"", + "examples": [ + "profile-prod" + ] }, "build": { "$ref": "#/definitions/BuildConfig", - "description": "replaces the main \u003ccode\u003ebuild\u003c/code\u003e configuration." + "description": "replaces the main build configuration." }, "test": { "$ref": "#/definitions/TestConfig", - "description": "replaces the main \u003ccode\u003etest\u003c/code\u003e configuration." + "description": "replaces the main test configuration." }, "deploy": { "$ref": "#/definitions/DeployConfig", - "description": "replaces the main \u003ccode\u003edeploy\u003c/code\u003e configuration." + "description": "replaces the main deploy configuration." }, "patches": { - "description": "a list of patches that will modify the default configuration. This is used to not replace a whole configuration section but change a few values. Each patch uses the JSON patch notation. For example, this profile will replace the \u003ccode\u003edockerfile\u003c/code\u003e value of the first artifact by \u003ccode\u003eDockerfile.DEV\u003c/code\u003e.", + "items": {}, + "type": "array", + "description": "a list of patches applied to the configuration. This is used change a few values and not replace whole sections. Patches use the JSON patch notation. For example, this replaces the dockerfile of the 1st artifact with Dockerfile.DEV.", + "default": "[]", "examples": [ - "[{path: /build/artifacts/0/docker/dockerfile, value: Dockerfile.DEV}]" + "[{\"path:\": \"/build/artifacts/0/docker/dockerfile\", \"value\": \"Dockerfile.DEV\"}]" ] }, "activation": { @@ -767,13 +779,13 @@ "description": "criteria by which a profile can be auto-activated. This can be based on Environment Variables, the current Kubernetes context name, or depending on which Skaffold command is running." } }, - "description": "(beta) profiles are used to override any \u003ccode\u003ebuild\u003c/code\u003e, \u003ccode\u003etest\u003c/code\u003e or \u003ccode\u003edeploy\u003c/code\u003e configuration." + "description": "(beta) profiles are used to override any build, test or deploy configuration." }, "Activation": { "properties": { "env": { "type": "string", - "description": "holds a key=value pair. The profile is auto-activated if an Environment Variable \u003ccode\u003ekey\u003c/code\u003e has value \u003ccode\u003evalue\u003c/code\u003e.", + "description": "holds a key=value pair. The profile is auto-activated if an Environment Variable key has value value.", "default": "\"\"", "examples": [ "ENV=production" @@ -802,19 +814,19 @@ "properties": { "docker": { "$ref": "#/definitions/DockerArtifact", - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "(beta) describes an artifact built from a Dockerfile, usually using docker build." }, "bazel": { "$ref": "#/definitions/BazelArtifact", - "description": "requires bazel CLI to be installed and the artifacts sources to contain \u003ca href=\"https://bazel.build/\"\u003eBazel\u003c/a\u003e configuration files." + "description": "(beta) requires bazel CLI to be installed and the artifacts sources to contain Bazel configuration files." }, "jibMaven": { "$ref": "#/definitions/JibMavenArtifact", - "description": "builds images using the \u003ca href=\"https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin\"\u003eJib plugin for Maven\u003c/a\u003e." + "description": "(alpha) builds images using the Jib plugin for Maven." }, "jibGradle": { "$ref": "#/definitions/JibGradleArtifact", - "description": "builds images using the \u003ca href=\"https://github.com/GoogleContainerTools/jib/tree/master/jib-gradle-plugin\"\u003eJib plugin for Gradle\u003c/a\u003e." + "description": "(alpha) builds images using the Jib plugin for Gradle." } } }, @@ -825,6 +837,11 @@ "description": "locates the Dockerfile relative to workspace.", "default": "Dockerfile" }, + "target": { + "type": "string", + "description": "Dockerfile target name to build.", + "default": "\"\"" + }, "buildArgs": { "additionalProperties": { "type": "string" @@ -833,7 +850,7 @@ "description": "arguments passed to the docker build.", "default": "{}", "examples": [ - "{key1: \"value1\", key2: \"value2\"}" + "{\"key1\": \"value1\", \"key2\": \"value2\"}" ] }, "cacheFrom": { @@ -842,19 +859,14 @@ "default": "\"\"" }, "type": "array", - "description": "lists the Docker images to consider as cache sources.", + "description": "the Docker images to consider as cache sources.", "default": "[]", "examples": [ "[\"golang:1.10.1-alpine3.7\", \"alpine:3.7\"]" ] - }, - "target": { - "type": "string", - "description": "the Dockerfile target name to build.", - "default": "\"\"" } }, - "description": "describes an artifact built from a Dockerfile, usually using \u003ccode\u003edocker build\u003c/code\u003e." + "description": "(beta) describes an artifact built from a Dockerfile, usually using docker build." }, "BazelArtifact": { "required": [ @@ -863,7 +875,7 @@ "properties": { "target": { "type": "string", - "description": "the \u003ccode\u003ebazel build\u003c/code\u003e target to run.", + "description": "bazel build target to run.", "default": "\"\"", "examples": [ "//:skaffold_example.tar" @@ -875,14 +887,14 @@ "default": "\"\"" }, "type": "array", - "description": "additional args to pass to \u003ccode\u003ebazel build\u003c/code\u003e.", + "description": "additional args to pass to bazel build.", "default": "[]", "examples": [ - "[\"arg1\", \"arg2\"]" + "[\"-flag\", \"--otherflag\"]" ] } }, - "description": "describes an artifact built with \u003ca href=\"https://bazel.build/\"\u003eBazel\u003c/a\u003e." + "description": "(beta) describes an artifact built with Bazel." }, "JibMavenArtifact": { "properties": { @@ -903,10 +915,13 @@ }, "type": "array", "description": "additional build flags passed to Maven.", - "default": "[]" + "default": "[]", + "examples": [ + "[\"-x\", \"-DskipTests\"]" + ] } }, - "description": "builds images using the \u003ca href=\"https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin\"\u003eJib plugin for Maven\u003c/a\u003e." + "description": "(alpha) builds images using the Jib plugin for Maven." }, "JibGradleArtifact": { "properties": { @@ -922,10 +937,13 @@ }, "type": "array", "description": "additional build flags passed to Gradle.", - "default": "[]" + "default": "[]", + "examples": [ + "[\"--no-build-cache\"]" + ] } }, - "description": "builds images using the \u003ca href=\"https://github.com/GoogleContainerTools/jib/tree/master/jib-gradle-plugin\"\u003eJib plugin for Gradle\u003c/a\u003e." + "description": "(alpha) builds images using the Jib plugin for Gradle." } } }