Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freno-helm3 #369

Merged
merged 3 commits into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ K8s with AKS | 1.12.8
Helm | 2.14.13 (Linux)
kubectl | 1.15.0

NOTE: Helm 3 is currently not supported.
NOTE: Helm 3 support is in the early stages and is not fully tested. Please refer to this [guide](docs/Helm3.md) for more information on Helm 3. We recommend you thoroughly test the use of Helm 3 in your pre-production environments before use.

The following matrix displays the tested package versions for our Helm chart.

Expand Down
83 changes: 83 additions & 0 deletions deploy/docs/Helm3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Using this chart with Helm 3

Helm 3 can be used to install the Sumo Logic Helm chart.

## Migrating from Helm2 to Helm 3

If you have installed our Helm chart with Helm 2 and are looking to migrate to Helm 3, we recommend following this [migration guide](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/) to transition your Helm 2 release of the Sumo Logic chart.

## Installing Chart Using Helm 3

If you are currently using Helm 3 use the following steps to install the chart.

1. Helm 3 no longer creates namespaces. You will need to create a Sumo Logic namespace first.

```
kubectl create namespace sumologic
```

2. Change your kubectl context to the sumologic namespace. You can use a tool like [kubens](https://github.com/ahmetb/kubectx) or kubectl to do this.

```bash
kubectl config set-context --current --namespace=sumologic
```

3. Install the chart using Helm 3. The helm install command has changed slightly in Helm 3.

```
helm install collection sumologic/sumologic --set sumologic.endpoint=<SUMO_API_ENDPOINT> --set sumologic.accessId=<SUMO_ACCESS_ID> --set sumologic.accessKey=<SUMO_ACCESS_KEY> --set prometheus-operator.prometheus.prometheusSpec.externalLabels.cluster="<MY_CLUSTER_NAME>" --set sumologic.clusterName="<MY_CLUSTER_NAME>"
```

NOTE: You may see the following messages however they can usually be ignored.

```bash
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
manifest_sorter.go:175: info: skipping unknown hook: "crd-install"
```

NOTE: If you need to install the chart with a different release name or namespace you will need to override some configuration fields for both Prometheus and fluent-bit. We recommend using an override file due to the number of fields that need to be overridden. In the following command, replace the `<RELEASE-NAME>` and `<NAMESPACE>` variables with your values and then run it to download the override file with your replaced values:

```bash
curl https://raw.githubusercontent.com/SumoLogic/sumologic-kubernetes-collection/master/deploy/helm/sumologic/values.yaml | \
sed 's/\-sumologic.sumologic'"/-sumologic.<NAMESPACE>/g" | \
sed 's/\- sumologic'"/- <NAMESPACE>/g" | \
sed 's/\collection'"/<RELEASE-NAME>/g" > values.yaml
```

For example, if your release name is `my-release` and namespace is `my-namespace`:
```bash
curl https://raw.githubusercontent.com/SumoLogic/sumologic-kubernetes-collection/master/deploy/helm/sumologic/values.yaml | \
sed 's/\-sumologic.sumologic'"/-sumologic.my-namespace/g" | \
sed 's/\collection'"/my-release/g" > values.yaml
```

Make any changes to the `values.yaml` file as needed and then change your kubectl context to the desired namespace.

```bash
kubectl config set-context --current --namespace=my-namespace
```

Then you can run the following to install the chart with the override file.

```bash
helm install my-release sumologic/sumologic -f values.yaml --set sumologic.endpoint=<SUMO_API_ENDPOINT> --set sumologic.accessId=<SUMO_ACCESS_ID> --set sumologic.accessKey=<SUMO_ACCESS_KEY>
```

## Uninstalling Chart Using Helm 3

In Helm 3 the delete command has changed slightly. By default, history is not preserved yet can be retained by using `--keep-history`

* Delete without preserving history

```bash
helm del collection
```

* Delete and preserve history

```bash
helm del --keep-history collection
```
2 changes: 2 additions & 0 deletions deploy/docs/Installation_with_Helm.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Installation with Helm

Note: the following steps assume you are installing using Helm 2. You are using Helm 3, please refer to [this guide](Helm3.md).

Our Helm chart deploys Kubernetes resources for collecting Kubernetes logs, metrics, and events; enriching them with deployment, pod, and service level metadata; and sends them to Sumo Logic.

<!-- TOC -->
Expand Down