You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(helm): remove need for Helm deployer's artifactOverrides (#6949)
* refactor: remove vestiges of parsing release info text from helm deployment (#6913)
* refactor(testutil): allow tests to check for envvars that should not be set
* feat(helm): remove need for Helm deployer's artifactOverrides
* Back out changes to v1 schema
* pacify golangci-lint
* fix mac test and attempt to fix windows
* fix lint
Co-authored-by: tejal29 <[email protected]>
Copy file name to clipboardExpand all lines: docs/content/en/docs/pipeline-stages/deployers/helm.md
+3-173
Original file line number
Diff line number
Diff line change
@@ -18,179 +18,9 @@ To use `helm` with Skaffold, the `helm` binary must be installed on your machine
18
18
19
19
Skaffold supports projects set up to deploy with Helm, but certain aspects of the project need to be configured correctly in order for Skaffold to work properly. This guide should demystify some of the nuance around using Skaffold with Helm to help you get started quickly.
20
20
21
-
## Image Configuration
22
-
The normal Helm convention for defining image references is through the `values.yaml` file. Often, image information is configured through an `image` stanza in the values file, which might look something like this:
23
-
24
-
```project_root/values.yaml```
25
-
```yaml
26
-
image:
27
-
repository: gcr.io/my-project/my-image
28
-
tag: v1.2.0
29
-
pullPolicy: IfNotPresent
30
-
```
31
-
32
-
This image would then be referenced in a templated resource file, maybe like this:
**IMPORTANT: To get Skaffold to work with Helm, the `image` key must be configured in the skaffold.yaml.**
46
-
47
-
Associating the Helm image key allows Skaffold to track the image being built, and then configure Helm to substitute it in the proper resource definitions to be deployed to your cluster. In practice, this looks something like this:
48
-
49
-
```yaml
50
-
build:
51
-
artifacts:
52
-
- image: gcr.io/my-project/my-image # must match in artifactOverrides
53
-
deploy:
54
-
helm:
55
-
releases:
56
-
- name: my-release
57
-
artifactOverrides:
58
-
image: gcr.io/my-project/my-image # no tag present!
59
-
imageStrategy:
60
-
helm: {}
61
-
```
62
-
63
-
The `artifactOverrides` binds a Helm value key to a build artifact. The `imageStrategy` configures the image reference strategy for informing Helm of the image reference to a newly built artifact.
64
-
65
-
### Image reference strategies
66
-
67
-
Skaffold supports three _image reference strategies_ for Helm:
68
-
69
-
1. `fqn`: provides a fully-qualified image reference (default);
70
-
2. `helm`: provides separate repository and tag portions (shown above);
71
-
3. `helm+explicitRegistry`: provides separate registry, repository, and tag portions.
72
-
73
-
#### `fqn` strategy: single fully-qualified name (default)
74
-
75
-
With the fully-qualified name strategy, Skaffold configures Helm by setting a key to the fully-tagged image reference.
76
-
77
-
The `skaffold.yaml` setup:
78
-
```yaml
79
-
build:
80
-
artifacts:
81
-
- image: gcr.io/my-project/my-image
82
-
deploy:
83
-
helm:
84
-
releases:
85
-
- name: my-chart
86
-
chartPath: helm
87
-
artifactOverrides:
88
-
imageKey: gcr.io/my-project/my-image
89
-
imageStrategy:
90
-
fqn: {}
91
-
```
92
-
93
-
Note that the `fqn` strategy is the default and the `imageStrategy` can be omitted.
94
-
95
-
The `values.yaml` (note that Skaffold overrides this value):
Skaffold can be configured to provide Helm with a separate repository and tag. The key used in the `artifactOverrides` is used as base portion producing two keys `{key}.repository` and `{key}.tag`.
116
-
117
-
The `skaffold.yaml` setup:
118
-
```yaml
119
-
build:
120
-
artifacts:
121
-
- image: gcr.io/my-project/my-image
122
-
deploy:
123
-
helm:
124
-
releases:
125
-
- name: my-chart
126
-
chartPath: helm
127
-
artifactOverrides:
128
-
imageKey: gcr.io/my-project/my-image
129
-
imageStrategy:
130
-
helm: {}
131
-
```
132
-
133
-
The `values.yaml` (note that Skaffold overrides these values):
#### `helm`+`explicitRegistry` strategy: split registry, repository, and tag
154
-
155
-
Skaffold can also be configured to provide Helm with a separate repository and tag. The key used in the `artifactOverrides` is used as base portion producing three keys: `{key}.registry`, `{key}.repository`, and `{key}.tag`.
156
-
157
-
The `skaffold.yaml` setup:
158
-
```yaml
159
-
build:
160
-
artifacts:
161
-
- image: gcr.io/my-project/my-image
162
-
deploy:
163
-
helm:
164
-
releases:
165
-
- name: my-chart
166
-
chartPath: helm
167
-
artifactOverrides:
168
-
imageKey: gcr.io/my-project/my-image
169
-
imageStrategy:
170
-
helm:
171
-
explicitRegistry: true
172
-
```
173
-
174
-
The `values.yaml` (note that Skaffold overrides these values):
| DEPLOY_HELM_USER_ERR | 1005 | Deploy error due to user deploy config for helm deployer |
1021
-
| DEPLOY_NO_MATCHING_BUILD | 1006 |Helm error when no build result is found of value specified in helm `artifactOverrides`|
1021
+
| DEPLOY_NO_MATCHING_BUILD | 1006 |An image was referenced with no matching build result|
1022
1022
| DEPLOY_HELM_VERSION_ERR | 1007 | Unable to get helm client version |
1023
1023
| DEPLOY_HELM_MIN_VERSION_ERR | 1008 | Helm version not supported. |
1024
1024
| DEPLOY_KUBECTL_VERSION_ERR | 1109 | Unable to retrieve kubectl version |
@@ -1109,7 +1109,7 @@ Enum for Suggestion codes
1109
1109
| CHECK_MINIKUBE_STATUS | 202 | Check minikube status |
1110
1110
| INSTALL_HELM | 203 | Install helm tool |
1111
1111
| UPGRADE_HELM | 204 | Upgrade helm tool |
1112
-
| FIX_SKAFFOLD_CONFIG_HELM_ARTIFACT_OVERRIDES | 205 | Fix helm `releases.artifactOverrides` config to match with `build.artiofacts`|
1112
+
| FIX_SKAFFOLD_CONFIG_HELM_ARTIFACT_OVERRIDES | 205 | Fix helm `releases.artifactOverrides` config to match with `build.artifacts` (no longer used in Skaffold v2)|
1113
1113
| UPGRADE_HELM32 | 206 | Upgrade helm version to v3.2.0 and higher. |
1114
1114
| FIX_SKAFFOLD_CONFIG_HELM_CREATE_NAMESPACE | 207 | Set `releases.createNamespace` to false. |
1115
1115
| INVALID_KPT_MANIFESTS | 208 | check the Kptfile validation. |
0 commit comments