Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0ce4777

Browse files
committed
Update multi-helm repo support
Edited content to include multi-helm repos in pipelines
1 parentd28e059 commit0ce4777

File tree

2 files changed

+42
-20
lines changed

2 files changed

+42
-20
lines changed

‎_docs/new-helm/helm-charts-and-repositories.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ If your repository doesn't require authentication, click 'Save' and you are done
3131

3232
For more details on adding extra Helm repositories see the[Helm integration page]({{site.baseurl}}/docs/integrations/helm/).
3333

34-
##Using a Helm Repository in a Codefresh pipeline
34+
##Using Helm Repositories in a Codefresh pipeline
35+
36+
Once you have set up Helm integrations in Codefresh, you can inject single or multiple Helm repository contexts into your pipelines.
37+
Select the**Import from shared configuration** option in the "Environment Variables" section, and then select the Helm repository or Helm repositories to inject into the pipeline.
38+
The repository settings are injected as environment variables into the pipeline so you can use them as you wish.
3539

36-
Once connected, any Helm repository context can be injected into pipelines by selecting "Import from shared configuration" (under "Environment Variables" section) and selecting the name of the repository.
37-
The repository settings will be injected as environment variables into the pipeline so you can use them as you wish.
3840

3941
{% include image.html
4042
lightbox="true"
@@ -45,7 +47,10 @@ caption="Connecting a Helm repository in the pipeline"
4547
max-width="70%"
4648
%}
4749

48-
If you are using the Helm step, it will use these settings to connect to your authenticated repository automatically. More info on the Codefresh Helm step can be found in the[Helm Usage Guide]({{site.baseurl}}/docs/new-helm/using-helm-in-codefresh-pipeline/).
50+
If you are using the Helm step, the step uses the Helm repository context's settings to automatically connect to your authenticated repository.
51+
If the pipeline has multiple Helm repository contexts, then you must specify the primary repsoitory context.
52+
53+
For more info on the Codefresh Helm step, see[Using Helm in Codefresh pipelines]({{site.baseurl}}/docs/new-helm/using-helm-in-codefresh-pipeline/).
4954

5055
##Install chart from your Helm repository
5156

‎_docs/new-helm/using-helm-in-codefresh-pipeline.md‎

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ redirect_from:
88
toc:true
99
---
1010

11-
We have created a[special Helm step](https://codefresh.io/steps/step/helm) for easy integration of Helm in Codefresh pipelines. The Helm step facilitates authentication, configuration and execution of Helm commands.
11+
We have created a[special Helm step](https://codefresh.io/steps/step/helm)for easy integration of Helm in Codefresh pipelines. The Helm step facilitates authentication, configuration and execution of Helm commands.
1212

1313
>You can always use the regular`helm` cli in a freestyle step, if you have a special use case that is not covered by the Codefresh Helm step. In this case, you can use the simpler container`codefresh/kube-helm` which includes only the Kubectl and helm tools. kube-helm is available on DockerHub:[https://hub.docker.com/r/codefresh/kube-helm/](https://hub.docker.com/r/codefresh/kube-helm/).
1414
@@ -34,7 +34,7 @@ chart for your application by following [the official documentation on charts](h
3434

3535
The example Codefresh application also comes with a[sample chart](https://github.com/codefresh-contrib/python-flask-sample-app/tree/with-helm/charts/python) that is used in the[Helm quick start guide]({{site.baseurl}}/docs/getting-started/helm-quick-start-guide/).
3636

37-
You can create the chart manually or by using the[helm create](https://helm.sh/docs/helm/#helm-create) command on your workstation. There are also several thirdpart tools that can create Helm packages for you such as[Draft](https://draft.sh/).
37+
You can create the chart manually or by using the[helm create](https://helm.sh/docs/helm/#helm-create) command on your workstation. There are also several thirdparty tools that can create Helm packages for you such as[Draft](https://draft.sh/).
3838

3939
Once you have your Helm chart ready, commit it to the same git repository that contains the source code of your application. It should be in a folder called`charts`. Codefresh can also work with Helm charts that are in different Git repositories. We suggest however that you keep both the source code and the Helm chart of an application in the same git repository as this makes chart management much easier.
4040

@@ -54,9 +54,9 @@ caption="Name of Kubernetes cluster"
5454
max-width="70%"
5555
%}
5656

57-
If you are still using Helm 2 make sure also that your Kubernetes cluster has the server part of Helm installed (called Tiller).
57+
<!---If you are still using Helm 2 make sure also that your Kubernetes cluster has the server part of Helm installed (called Tiller).
5858
The easiest way to do that is to run `helm init` from the command shell of your cloud provider or
59-
any other terminal that has access to your cluster via`kubectl`. This process is not needed if you use Helm 3.
59+
any other terminal that has access to your cluster via `kubectl`. This process is not needed if you use Helm 3.-->
6060

6161
To verify that your cluster is setup for Helm select the*Helm Releases* item from the left sidebar in the Codefresh UI. You should see the[Helm releases]({{site.baseurl}}/docs/new-helm/helm-releases-management/) in your cluster or an empty screen if you just started using Helm.
6262

@@ -68,9 +68,13 @@ you should configure a Helm repository for the step to work with. Besides public
6868
You will need to connect your repository with Codefresh as described[here]({{site.baseurl}}/docs/new-helm/add-helm-repository/), or obtain your managed Helm repository URL as described[here]({{site.baseurl}}/docs/new-helm/managed-helm-repository/#chart-repository-url).
6969

7070

71-
###Step 4 (optional) - ImporttheHelmConfiguration in your pipeline definition
71+
###Step 4 (optional) - Import Helmconfiguration(s) into your pipeline definition
7272

73-
Once you have a Helm repository connected, attach it to the pipeline. Do this by opening the advanced options (the gear icon) in the variables section in the right sidebard. Then click on*Import from shared configuration* and choose the`CF_HELM_DEFAULT`[shared configuration]({{site.baseurl}}/docs/configure-ci-cd-pipeline/shared-configuration/).
73+
Once you have single or multiple Helm repositories connected to Codefresh, you can attach one or more them to the pipeline.
74+
Do this by opening the advanced options (the gear icon) in the variables section in the right sidebar.
75+
Then click on*Import from shared configuration* and select the Helm context or contexts to import into the pipeline:
76+
* To import a single context, which is the general requirement, select the`CF_HELM_DEFAULT`[shared configuration]({{site.baseurl}}/docs/configure-ci-cd-pipeline/shared-configuration/).
77+
* To import multiple contexts, select each context to add.
7478

7579
{% include image.html
7680
lightbox="true"
@@ -86,13 +90,11 @@ This concludes the Helm setup for Codefresh. Now you can use the Helm freestyle
8690

8791
Note that this step is only needed in pipelines that actually upload/fetch Helm charts from/to Helm repositories. If you have a pipeline that directly installs a Helm chart from the git filesystem, there is no need to import a Helm configuration.
8892

89-
>Currently only one Helm configuration can be used in the same pipeline. We are aware
90-
of this limitation and will soon improve the way Codefresh works with multiple Helm configurations.
9193

9294

9395
##Helm usage in a pipeline step
9496

95-
You can use the helm typed step from the[Step Marketplace](https://codefresh.io/steps/step/helm)
97+
You can use the`helm` typed step from the[Step Marketplace](https://codefresh.io/steps/step/helm).
9698

9799
The Helm step can be configured using environment variables, which can be provided in any of the various ways supported by Codefresh as described[here]({{site.baseurl}}/docs/codefresh-yaml/variables/#user-provided-variables).
98100

@@ -112,17 +114,22 @@ deploy:
112114
-'STR_WITH_COMAS="one\,two\,three"'
113115
```
114116
115-
For Helm 2, the Docker image tag refers to the version of Helm/Tiller you need. For Helm 3, just use the [newest Helm 3 image tag](https://hub.docker.com/r/codefresh/cfstep-helm/tags).
117+
<!---For Helm 2, the Docker image tag refers to the version of Helm/Tiller you need. For Helm 3, just use the [newest Helm 3 image tag](https://hub.docker.com/r/codefresh/cfstep-helm/tags). -->
116118
117119
### Action modes
118120
119-
The Helm step can operate in one of3 modes:
121+
The Helm step can operate in one ofthree modes:
120122
121-
1. install - will install the chart into a Kubernetes cluster. This is the default mode if not explicitly set.
122-
2. push - will package chart and push it to the repository.
123-
3. authentication only - will only setup authentication and add the repo to the helm. This is useful if you want to write your own helm commands using the freestyle step's`commands` property, but you still want the step to handle authentication.
123+
1. install: Install the Helm chart into a Kubernetes cluster. This is the default mode if not explicitly set.
124+
1. push: Packages the Helm chart and pushes it to the repository.
125+
1. authentication only: Only sets up authentication and adds the repo to the helm. This is useful if you want to write your own helm commands using the freestyle step's`commands` property, but you still want the step to handle authentication.
126+
127+
The operation mode is set by the `action` field, where the value can be `install`/`push`/`auth`.
128+
129+
For the `install` and `push` actions, if you have imported multiple Helm contexts into the same pipeline, you need to define the primary Helm context to use through the `primary_helm_context` argument.
130+
For the `auth` action, if the chart has dependencies on other repos, then to authenticate the referenced repos, you need to add `use_repos_for_auth_action:'true'`.
131+
For a description of these and other arguments, see [Configuration](#configuration).
124132
125-
The operation mode is set by the `action` field, where the value is `install`/`push`/`auth`.
126133
127134
### Helm Values
128135
@@ -238,17 +245,27 @@ Name|Required|Description
238245
action|defaults to 'install'|Operation mode:`install`/`push`/`auth`
239246
chart_name|required for install/push|Chart reference to use, adhering to Helm's lookup rules (path to chart folder, or name of packaged chart). There's no need to prefix with `/reponame` if referencing a chart in a repository, this is handled automatically. a.k.a `CHART_NAME` but `CHART_NAME` shouldn't be used anymore.
240247
chart_repo_url|optional|Helm chart repository URL. If a [Helm repository configuration](#step-4-optional---import-the-helm-configuration-in-your-pipeline-definition) is attached to the pipeline, this setting is ignored
248+
chart_subdir |optional | The subfolder where the chart is located in the JFrog Artifactory Helm repository.
241249
chart_version|optional|Override or set the chart version
242250
cmd_ps|optional|Command Postscript - this will be appended as is to the generated helm command string. Can be used to set additional parameters supported by the command but not exposed as configuration options.
243251
commands|optional|commands to execute in plugin after auth action
252+
credentials_in_arguments | optional | The username and password credentials to add to the Helm command as arguments. If not added to the Helm command, the credentials are passed in the URL `http(s)://username:password@url`. Should be enabled for JFrog Artifactory Helm repositories.
244253
custom_value_files|optional|values file to provide to Helm as --values or -f
245254
custom_values|optional|values to provide to Helm as --set
255+
helm_repository_context | The name of the Helm repository integration configured in Codefresh.
246256
helm_version|optional|version of [cfstep-helm image](https://hub.docker.com/r/codefresh/cfstep-helm/tags)
247257
kube_context|required for install|Kubernetes context to use. The name of the cluster as [configured in Codefresh]({{site.baseurl}}/docs/deploy-to-kubernetes/add-kubernetes-cluster/)
248258
namespace|optional|Target Kubernetes namespace to deploy to
249-
release_name|required for install|Helm release name. If the release exists, it will be upgraded
259+
primary_helm_context |required for `install` and `push` actions |The Helm context to use for the Helm command when the pipeline has multiple Helm contexts. When omitted, the repo most recently added to the pipeline is used.
260+
release_name|required for `install`|Helm release name. If the release exists, it will be upgraded
250261
repos|optional|array of custom repositories
262+
set_file | optional | Set values from the respective files specified by the command line in `key=value` format. To specify multiple key-value pairs, separate them with commas.
263+
skip_cf_stable_helm_repo | optional | Don't add stable repository.
251264
tiller_namespace|optional|Kubernetes namespace where Tiller is installed (unnecessary for Helm 3)
265+
timeout | optional | The maximum time, in seconds, to wait for Kubernetes commands to complete.
266+
use_debian_image | optional | Use Debian-based `cfstep-helm` image.
267+
use_repos_for_auth_action |optional | Required if the chart has dependencies on other repos that need to be authenticated. Set `true`.
268+
wait |optional | When specified, waits until all pods are in state `ready` to mark the release as successful. Otherwise, release is marked as successful when the minimum number of pods are `ready` and the Services have IP addresses.
252269

253270
## Full Helm pipeline example
254271

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp