Skip to content

Commit e9c4a8d

Browse files
committed
feat(helm): Support Helm v4 for rendering and deployment, drop Helm v2 support for rendering since helm version --client parameter is not supported anymore in v4
1 parent 48bae15 commit e9c4a8d

File tree

28 files changed

+661
-419
lines changed

28 files changed

+661
-419
lines changed

docs-v1/content/en/api-v2/skaffold.swagger.json

Lines changed: 2 additions & 1 deletion
Large diffs are not rendered by default.

docs-v1/content/en/api/skaffold.swagger.json

Lines changed: 28 additions & 14 deletions
Large diffs are not rendered by default.

docs-v1/content/en/docs/references/api-v2/grpc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ For Cancelled Error code, use range 800 to 850.<br>
12631263
| RENDER_SET_LABEL_ERR | 1407 | Error setting user specified additional labels. |
12641264
| RENDER_MANIFEST_WRITE_ERR | 1408 | Error writing hydrated kubernetes manifests. |
12651265
| RENDER_PARSE_MANIFEST_IMAGES_ERR | 1409 | Error getting images from a kubernetes manifest. |
1266+
| RENDER_HELM_PLUGIN_ERR | 1410 | Error due to Helm plugin registration |
12661267
| CONFIG_FILE_PARSING_ERR | 1201 | Catch-all configuration file parsing error |
12671268
| CONFIG_FILE_NOT_FOUND_ERR | 1202 | Main configuration file not found |
12681269
| CONFIG_DEPENDENCY_NOT_FOUND_ERR | 1203 | Dependency configuration file not found |

docs-v1/content/en/docs/references/api/grpc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,7 @@ For Cancelled Error code, use range 800 to 850.<br>
10811081
| RENDER_SET_LABEL_ERR | 1407 | Error setting user specified additional labels. |
10821082
| RENDER_MANIFEST_WRITE_ERR | 1408 | Error writing hydrated kubernetes manifests. |
10831083
| RENDER_PARSE_MANIFEST_IMAGES_ERR | 1409 | Error getting images from a kubernetes manifest. |
1084+
| RENDER_HELM_PLUGIN_ERR | 1410 | Error due to Helm plugin registration |
10841085
| CONFIG_FILE_PARSING_ERR | 1201 | Catch-all configuration file parsing error |
10851086
| CONFIG_FILE_NOT_FOUND_ERR | 1202 | Main configuration file not found |
10861087
| CONFIG_DEPENDENCY_NOT_FOUND_ERR | 1203 | Dependency configuration file not found |

docs-v2/content/en/api-v2/skaffold.swagger.json

Lines changed: 2 additions & 1 deletion
Large diffs are not rendered by default.

docs-v2/content/en/api/skaffold.swagger.json

Lines changed: 28 additions & 14 deletions
Large diffs are not rendered by default.

docs-v2/content/en/docs/deployers/helm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In Skaffold `v2` the primary difference between the helm renderer (`manifest.hel
3232
In the latest version of Skaffold, the primary methods of using `helm` templating with Skaffold involve the `deploy.helm.setValueTemplates` and the `deploy.helm.setValues` fields. `deploy.helm.setValues` supplies the key:value pair to substitute from a users `values.yaml` file (a standard `helm` file for rendering). `deploy.helm.setValueTemplates` does a similar thing only the key:value value comes from an environment variable instead of a given value. Depending on how a user's `values.yaml` and how `charts/templates` specify `image: $IMAGE_TEMPLATE`, the docs [here]({{< relref "#image-reference-strategies" >}}) explain the proper `setValueTemplates` to use. When migrating from schema version `v2beta29` or less, Skaffold will automatically configure these values to continue to work.
3333

3434

35-
`helm` deploy support in Skaffold is accomplished by calling `helm install ...` with the appropriate `--set` flags for the variables Skaffold will inject as well as uses the `skaffold` binary as a `helm` `--post-renderer`. Using `skaffold` as a post-renderer is done to inject Skaffold specific labels primarily the `run-id` label which Skaffold uses to tag K8s objects it will manage via it's status checking.
35+
`helm` deploy support in Skaffold is accomplished by calling `helm install ...` with the appropriate `--set` flags for the variables Skaffold will inject as well as uses the `skaffold` binary as a `helm` `--post-renderer`. Using `skaffold` as a post-renderer is done to inject Skaffold specific labels primarily the `run-id` label which Skaffold uses to tag K8s objects it will manage via its status checking.
3636

3737

3838
This works by having Skaffold run `helm install ...` taking into consideration all of the supplied flags, skaffold.yaml configuration, etc. and creating an intermediate yaml manifest with all helm replacements except that the fully qualified image from the current run is NOT added but instead a placeholder with the artifact name - eg: `skaffold-helm-image`. Then the skaffold post-renderer is called to convert `image: skaffold-helm-image` -> `image: gcr.io/example-repo/skaffold-helm-image:latest@sha256:<sha256-hash>` in specified locations (specific allowlisted k8s objects and/or k8s object fields). This above replacement is nearly identical to how it works for values.yaml files using only the `image` key in `values.yaml` - eg:

docs-v2/content/en/docs/references/api-v2/grpc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,7 @@ For Cancelled Error code, use range 800 to 850.<br>
12631263
| RENDER_SET_LABEL_ERR | 1407 | Error setting user specified additional labels. |
12641264
| RENDER_MANIFEST_WRITE_ERR | 1408 | Error writing hydrated kubernetes manifests. |
12651265
| RENDER_PARSE_MANIFEST_IMAGES_ERR | 1409 | Error getting images from a kubernetes manifest. |
1266+
| RENDER_HELM_PLUGIN_ERR | 1410 | Error due to Helm plugin registration |
12661267
| CONFIG_FILE_PARSING_ERR | 1201 | Catch-all configuration file parsing error |
12671268
| CONFIG_FILE_NOT_FOUND_ERR | 1202 | Main configuration file not found |
12681269
| CONFIG_DEPENDENCY_NOT_FOUND_ERR | 1203 | Dependency configuration file not found |

docs-v2/content/en/docs/references/api/grpc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,7 @@ For Cancelled Error code, use range 800 to 850.<br>
10811081
| RENDER_SET_LABEL_ERR | 1407 | Error setting user specified additional labels. |
10821082
| RENDER_MANIFEST_WRITE_ERR | 1408 | Error writing hydrated kubernetes manifests. |
10831083
| RENDER_PARSE_MANIFEST_IMAGES_ERR | 1409 | Error getting images from a kubernetes manifest. |
1084+
| RENDER_HELM_PLUGIN_ERR | 1410 | Error due to Helm plugin registration |
10841085
| CONFIG_FILE_PARSING_ERR | 1201 | Catch-all configuration file parsing error |
10851086
| CONFIG_FILE_NOT_FOUND_ERR | 1202 | Main configuration file not found |
10861087
| CONFIG_DEPENDENCY_NOT_FOUND_ERR | 1203 | Dependency configuration file not found |

docs-v2/content/en/docs/renderers/helm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In Skaffold `v2` the primary difference between the helm renderer (`manifest.hel
3232
In the latest version of Skaffold, the primary methods of using `helm` templating with Skaffold involve the `deploy.helm.setValueTemplates` and the `deploy.helm.setValues` fields. `deploy.helm.setValues` supplies the key:value pair to substitute from a users `values.yaml` file (a standard `helm` file for rendering). `deploy.helm.setValueTemplates` does a similar thing only the key:value value comes from an environment variable instead of a given value. Depending on how a user's `values.yaml` and how `charts/templates` specify `image: $IMAGE_TEMPLATE`, the docs [here]({{< relref "#image-reference-strategies" >}}) explain the proper `setValueTemplates` to use. When migrating from schema version `v2beta29` or less, Skaffold will automatically configure these values to continue to work.
3333

3434

35-
`helm` deploy support in Skaffold is accomplished by calling `helm template ...` with the appropriate `--set` flags for the variables Skaffold will inject as well as uses the `skaffold` binary as a `helm` `--post-renderer`. Using `skaffold` as a post-renderer is done to inject Skaffold specific labels primarily the `run-id` label which Skaffold uses to tag K8s objects it will manage via it's status checking.
35+
`helm` deploy support in Skaffold is accomplished by calling `helm template ...` with the appropriate `--set` flags for the variables Skaffold will inject as well as uses the `skaffold` binary as a `helm` `--post-renderer`. Using `skaffold` as a post-renderer is done to inject Skaffold specific labels primarily the `run-id` label which Skaffold uses to tag K8s objects it will manage via its status checking.
3636

3737

3838
This works by having Skaffold run `helm template ...` taking into consideration all of the supplied flags, skaffold.yaml configuration, etc. and creating an intermediate yaml manifest with all helm replacements except that the fully qualified image from the current run is NOT added but instead a placeholder with the artifact name - eg: `skaffold-helm-image`. Then the skaffold post-renderer is called to convert `image: skaffold-helm-image` -> `image: gcr.io/example-repo/skaffold-helm-image:latest@sha256:<sha256-hash>` in specified locations (specific allowlisted k8s objects and/or k8s object fields). This above replacement is nearly identical to how it works for values.yaml files using only the `image` key in `values.yaml` - eg:

0 commit comments

Comments
 (0)