Skip to content

Commit

Permalink
Merge pull request #29 from joosangkim/add-helm3-url [semver:minor]
Browse files Browse the repository at this point in the history
Add helm3 client download url
  • Loading branch information
lokst authored Nov 27, 2020
2 parents 1f9d041 + 18d9b0b commit 02c7dea
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 81 deletions.
30 changes: 24 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
parameters:
release-name:
type: string
default: "grafana-release"
default: "prometheus-release"
cluster-name:
type: string
description: Cluster name
Expand All @@ -65,9 +65,15 @@ jobs:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
install-kubectl: true
- helm/install-helm-client:
version: << parameters.helm-version >>
- run:
name: Install cncf stable repo
command: |
helm repo add stable http://cncf.gitlab.io/stable
- helm/install-helm-chart:
chart: stable/grafana
release-name: grafana-release
chart: stable/prometheus
release-name: prometheus-release
helm-version: << parameters.helm-version >>
update-repositories: << parameters.update-repositories >>
upgrade-helm-chart-on-eks-cluster:
Expand All @@ -89,9 +95,15 @@ jobs:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
install-kubectl: true
- helm/install-helm-client:
version: << parameters.helm-version >>
- run:
name: Install cncf stable repo
command: |
helm repo add stable http://cncf.gitlab.io/stable
- helm/upgrade-helm-chart:
chart: stable/grafana
release-name: grafana-release
chart: stable/prometheus
release-name: prometheus-release
helm-version: << parameters.helm-version >>
update-repositories: << parameters.update-repositories >>
# test specifying no-output-timeout
Expand All @@ -113,8 +125,14 @@ jobs:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
install-kubectl: true
- helm/install-helm-client:
version: << parameters.helm-version >>
- run:
name: Install cncf stable repo
command: |
helm repo add stable http://cncf.gitlab.io/stable
- helm/delete-helm-release:
release-name: grafana-release
release-name: prometheus-release
purge: true
timeout: << parameters.timeout >>
helm-version: << parameters.helm-version >>
Expand Down
75 changes: 3 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# helm Orb [![CircleCI status](https://circleci.com/gh/CircleCI-Public/helm-orb.svg "CircleCI status")](https://circleci.com/gh/CircleCI-Public/helm-orb) [![CircleCI Orb Version](https://img.shields.io/badge/endpoint.svg?url=https://badges.circleci.io/orb/circleci/helm)](https://circleci.com/orbs/registry/orb/circleci/helm) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/CircleCI-Public/helm-orb/blob/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs)
# helm Orb [![CircleCI status](https://circleci.com/gh/CircleCI-Public/helm-orb.svg "CircleCI status")](https://circleci.com/gh/CircleCI-Public/helm-orb) [![CircleCI Orb Version](https://img.shields.io/badge/endpoint.svg?url=https://badges.circleci.io/orb/circleci/helm)](https://circleci.com/developer/orbs/orb/circleci/helm) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/CircleCI-Public/helm-orb/blob/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs)

A CircleCI Orb to simplify deployments to Kubernetes using Helm.

Here are the features that the Helm orb provides:

- Installing the helm client (`install-helm-client`)
- Installing helm on a cluster (`install-helm-on-cluster`)
- Installing helm charts (`install-helm-chart`) and deleting releases (`delete-helm-release`)

Table of Contents
Expand All @@ -17,83 +16,15 @@ Table of Contents

## Usage

See the [orb registry listing](http://circleci.com/orbs/registry/orb/circleci/helm) for usage guidelines.
See the [orb registry listing](https://circleci.com/developer/orbs/orb/circleci/helm) for usage guidelines.

## Requirements

- `curl` should be present in `PATH`.

## Examples

```
version: 2.1
orbs:
aws-eks: circleci/[email protected]
helm: circleci/[email protected]
jobs:
install-helm-on-cluster:
executor: aws-eks/python
parameters:
cluster-name:
type: string
description: Cluster name
steps:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
install-kubectl: true
- helm/install-helm-on-cluster:
enable-cluster-wide-admin-access: true
install-helm-chart:
executor: aws-eks/python
parameters:
cluster-name:
type: string
description: Cluster name
steps:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
- helm/install-helm-chart:
chart: stable/grafana
release-name: grafana-release
delete-helm-release:
executor: aws-eks/python
parameters:
cluster-name:
type: string
description: Cluster name
steps:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
- helm/delete-helm-release:
release-name: grafana-release
purge: true
timeout: 600
workflows:
deployment:
jobs:
- aws-eks/create-cluster:
cluster-name: test-cluster
- install-helm-on-cluster:
cluster-name: test-cluster
requires:
- aws-eks/create-cluster
- install-helm-chart:
cluster-name: test-cluster
requires:
- install-helm-on-cluster
- delete-helm-release:
cluster-name: test-cluster
requires:
- install-helm-chart
- aws-eks/delete-cluster:
cluster-name: test-cluster
wait: true
requires:
- delete-helm-release
```
Refer to the usage examples [here](https://circleci.com/developer/orbs/orb/circleci/helm#usage-install-helm-chart-with-helm3).

## Contributing

Expand Down
4 changes: 4 additions & 0 deletions src/commands/install-helm-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ steps:
fi
fi
INSTALL_SCRIPT="https://raw.githubusercontent.com/helm/helm/master/scripts/get"
if [ "${IS_VERSION_2}" == "false" ]; then
INSTALL_SCRIPT="https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3"
fi
curl "${INSTALL_SCRIPT}" > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh "$@"
Expand Down
18 changes: 15 additions & 3 deletions src/examples/install-helm-chart-with-helm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ usage:
steps:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
- helm/install-helm-client:
version: v2.16.9
- run:
name: Add cncf stable repo
command: |
helm repo add stable http://cncf.gitlab.io/stable
- helm/install-helm-chart:
chart: stable/grafana
release-name: grafana-release
chart: stable/prometheus
release-name: prometheus-release
delete-helm-release:
executor: aws-eks/python
parameters:
Expand All @@ -43,8 +49,14 @@ usage:
steps:
- aws-eks/update-kubeconfig-with-authenticator:
cluster-name: << parameters.cluster-name >>
- helm/install-helm-client:
version: v2.16.9
- run:
name: Add cncf stable repo
command: |
helm repo add stable http://cncf.gitlab.io/stable
- helm/delete-helm-release:
release-name: grafana-release
release-name: prometheus-release
purge: true
timeout: 600

Expand Down

0 comments on commit 02c7dea

Please sign in to comment.