|
| 1 | +--- |
| 2 | +title:"Helm Integration" |
| 3 | +description:"Manage Helm releases and repositories with Codefresh" |
| 4 | +group:integrations |
| 5 | +toc:true |
| 6 | +--- |
| 7 | + |
| 8 | +Codefresh is one of the few devops platforms that has native support for Helm releases and deployments. This includes |
| 9 | + |
| 10 | +* A[built-in Helm repository]({{site.baseurl}}/docs/new-helm/managed-helm-repository/) for all Codefresh accounts |
| 11 | +* The ability to add any external Helm repository in addition to the built-in one (this page) |
| 12 | +* A pipeline[step for deploying Helm applications]({{site.baseurl}}/docs/new-helm/using-helm-in-codefresh-pipeline/) |
| 13 | +* A dashboard for looking at your[Helm charts]({{site.baseurl}}/docs/new-helm/add-helm-repository/) |
| 14 | +* A dashboard for looking at your[Helm releases]({{site.baseurl}}/docs/new-helm/helm-releases-management/) |
| 15 | +* A dashboard for[promoting Helm releases]({{site.baseurl}}/docs/new-helm/helm-environment-promotion/) between different environments |
| 16 | +* A dashboard for[Helm environments]({{site.baseurl}}/docs/deploy-to-kubernetes/environment-dashboard/) |
| 17 | + |
| 18 | +Note that the built-in Helm repository is production ready. You can start using Helm right away with your Codefresh account |
| 19 | +even if you don't have an external Helm repository. See our[quick start guide for Helm]({{site.baseurl}}/docs/getting-started/helm-quick-start-guide/) or the[full Helm example]({{site.baseurl}}/docs/yaml-examples/examples/helm/). |
| 20 | + |
| 21 | +##General Helm configuration |
| 22 | + |
| 23 | +To configure your external Helm repositories go to your Account Configuration, by clicking on*Account Settings* on the left sidebar. On the first section called*Integrations* click the*Configure* button next to*Helm*. |
| 24 | + |
| 25 | +{% include image.html |
| 26 | + lightbox="true" |
| 27 | + file="/images/integrations/codefresh-integrations.png" |
| 28 | + url="/images/integrations/codefresh-integrations.png" |
| 29 | + alt="Codefresh Account Integration" |
| 30 | + max-width="80%" %} |
| 31 | + |
| 32 | +Add a new Helm repository configuration from the drop down. |
| 33 | + |
| 34 | +{% include image.html |
| 35 | + lightbox="true" |
| 36 | + file="/images/integrations/helm/add-helm-repository.png" |
| 37 | + url="/images/integrations/helm/add-helm-repository.png" |
| 38 | + alt="Add Helm Repository" |
| 39 | + max-width="40%" |
| 40 | +%} |
| 41 | + |
| 42 | +Each configuration must be given a unique name, which you can later reference in a codefresh.yml file. |
| 43 | + |
| 44 | +###Private Helm repository - HTTP |
| 45 | + |
| 46 | +You can connect to your repository using HTTP Basic authentication: |
| 47 | + |
| 48 | +- Add your repo URL as usually with HTTP protocol. |
| 49 | +- Supply the User and Password for HTTP Basic authentication. |
| 50 | + |
| 51 | +Variables: |
| 52 | + |
| 53 | +Name|Description |
| 54 | +---|--- |
| 55 | +REPOSITORY NAME|Give a unique name to this integration |
| 56 | +REPOSITORY URL|Location of the Helm repository |
| 57 | +HELMREPO_USERNAME|The username to authenticate with |
| 58 | +HELMREPO_PASSWORD|The password for the username provided |
| 59 | + |
| 60 | +###Private Helm repository - S3 |
| 61 | + |
| 62 | +- Add your S3 bucket URL in the following scheme:`s3://bucketname`. |
| 63 | +- Supply the AWS authentication variables as you would for the AWS CLI, or the S3 plugin for Helm. See details here:[Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html). |
| 64 | + |
| 65 | +Variables: |
| 66 | + |
| 67 | +Name|Description |
| 68 | +---|--- |
| 69 | +REPOSITORY NAME|Give a unique name to this integration |
| 70 | +REPOSITORY URL|Location of the Helm repository with format`s3://bucketname` |
| 71 | +AWS_ACCESS_KEY_ID|ID of the key with permissions for the bucket |
| 72 | +AWS_SECRET_ACCESS_KEY|Secret of the key with permissions for the bucket |
| 73 | +AWS_DEFAULT_REGION|region where the bucket was created |
| 74 | + |
| 75 | +###Private Helm repository - GCS |
| 76 | + |
| 77 | +- Add your GCS bucket URL in the following scheme:`gs://bucketname`. |
| 78 | +- Supply the Google authentication variable as you would for the GCloud CLI, or the GCS plugin for Helm. See details here:[Creating Service Account](https://cloud.google.com/docs/authentication/getting-started). |
| 79 | + |
| 80 | +Variables: |
| 81 | + |
| 82 | +Name|Description |
| 83 | +---|--- |
| 84 | +REPOSITORY NAME|Give a unique name to this integration |
| 85 | +REPOSITORY URL|Location of the Helm repository with format`gs://bucketname`. |
| 86 | +GOOGLE_APPLICATION_CREDENTIALS_JSON|The JSON content of the service account credentials |
| 87 | + |
| 88 | +###Private Helm repository - Azure |
| 89 | + |
| 90 | +First make sure that you[create the Helm repository](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-helm-repos) in Azure. |
| 91 | + |
| 92 | +Then click*Authenticate*. You will get a permissions dialog for allowing Codefresh to access |
| 93 | +the Azure services. Click*Accept*. |
| 94 | + |
| 95 | +>Make sure that you are using an organizational/company Azure account and not a personal one. We are currently working with Microsoft to improve this integration. |
| 96 | +
|
| 97 | +{% include image.html |
| 98 | +lightbox="true" |
| 99 | +file="/images/integrations/helm/select-azure-helm-repository.png" |
| 100 | +url="/images/integrations/helm/select-azure-helm-repository.png" |
| 101 | +alt="Selecting an Azure Helm repository" |
| 102 | +caption="Selecting an Azure Helm repository" |
| 103 | +max-width="70%" |
| 104 | +%} |
| 105 | + |
| 106 | +Select your Azure subscription on the left drop-down menu and your Helm repository on the right drop-down menu. |
| 107 | + |
| 108 | +>If you are already authenticated to Azure, and cannot find your Helm repository in the list, try revoking access and authenticating again. |
| 109 | +
|
| 110 | +The Azure Helm integration is now ready. |
| 111 | + |
| 112 | +###Private Helm repository - Azure with service principal |
| 113 | + |
| 114 | +An alternative method of adding an Azure Helm repository is by using a service principal. First follow the[instructions for creating a service principal in the Azure portal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal). |
| 115 | + |
| 116 | +Then from the drop-down menu select*Azure Registry SP*. Click the*Authenticate button* and enter the following details: |
| 117 | + |
| 118 | +*`Client ID` |
| 119 | +*`Tenant` |
| 120 | +*`Client secret` |
| 121 | + |
| 122 | +{% include image.html |
| 123 | +lightbox="true" |
| 124 | +file="/images/integrations/helm/add-azure-helm-spn.png" |
| 125 | +url="/images/integrations/helm/add-azure-helm-spn.png" |
| 126 | +alt="Azure Service principal details" |
| 127 | +caption="Azure Service principal details" |
| 128 | +max-width="60%" |
| 129 | + %} |
| 130 | + |
| 131 | +Click the*Save* button once finished. Assuming that the authentication is successful you will see your available Azure registries that can be used as a Helm repository. |
| 132 | + |
| 133 | +###Private Helm repository from another Codefresh account |
| 134 | + |
| 135 | +You also add the private Helm repository of another Codefresh user as your integration: |
| 136 | + |
| 137 | + |
| 138 | +Name|Description |
| 139 | +---|--- |
| 140 | +REPOSITORY NAME|Give a unique name to this integration |
| 141 | +REPOSITORY URL|Location of the Helm repository with format`cm://repository-name`. |
| 142 | +CF API KEY|A token in[order to access the other Codefresh account]({{site.baseurl}}/docs/integrations/codefresh-api/#authentication-instructions). |
| 143 | + |
| 144 | +Note that we**don't** recommend using this practice (sharing the Codefresh Helm repository between accounts). The built-in Helm repository of each account is best used as a private Helm repository of that account. See |
| 145 | +more details on[how to make your private Helm public]({{site.baseurl}}/docs/new-helm/managed-helm-repository/#repo-access-level). |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +##What to Read Next |
| 150 | + |
| 151 | +*[Your private Helm repository]({{site.baseurl}}/docs/new-helm/managed-helm-repository/) |
| 152 | +*[How to use Helm in a Codefresh pipeline]({{site.baseurl}}/docs/new-helm/using-helm-in-codefresh-pipeline/) |
| 153 | +*[Managing Helm releases]({{site.baseurl}}/docs/new-helm/helm-releases-management/) |
| 154 | +*[Helm best practices]({{site.baseurl}}/docs/new-helm/helm-best-practices/) |