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

Move charts to helm-charts repo #41

Merged
merged 3 commits into from
Aug 1, 2023
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
60 changes: 59 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,69 @@ make run-loki-server

### Helm Chart Support
A custom collector with Audit Logs receiver may be hosted on Kubernetes,
so to facilitate that the repository contains a [Helm Chart](./charts).
so to facilitate that a Helm Chart is published in [castai/helm-charts](https://github.com/castai/helm-charts).

One important aspect of hosting this collector on Kubernetes is that it is deployed as StatefulSet and uses PersistentVolumeClaim for storing data about fetching Audit Logs.
This data is required to ensure that all Audit Logs are collected even in case when Collector's pod got restarted.

### Usage
[Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

Once Helm is set up properly, add [castai/helm-charts](https://github.com/castai/helm-charts) repository as follows:

```console
helm repo add castai-helm https://castai.github.io/helm-charts
```
To install Audit Logs receiver's release:
* set `castai.apiKey` property to your CAST AI [API Access key](https://docs.cast.ai/docs/authentication#obtaining-api-access-key)
* deploy the chart:
```shell
helm install logs-receiver castai-helm/castai-audit-logs-receiver \
--namespace=castai-logs \
--create-namespace \
--set castai.apiKey=<api_access_key>
--set castai.apiURL="https://api.cast.ai"
```
Default installation uses [logging](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/loggingexporter) as main log exporter but this can be changed by overriding chart's `config` property with desired collector's pipeline setup. `collector-config.yaml` files for different exporter setups can be found in [examples](./examples/) directory for both reference and to create `values.yaml` file to pass to Helm chart.

Example Helm install with Loki configuration:
* create your custom `values.yaml` with pipeline setup from [./examples/loki/collector-config.yaml](./examples/loki/collector-config.yaml):
```shell
# values.yaml
config:
exporters:
loki:
endpoint: http://localhost:3100/loki/api/v1/push

processors:
attributes:
actions:
- action: insert
key: loki.attribute.labels
value: id, initiatedBy, eventType, labels.ClusterId

service:
pipelines:
logs:
receivers: [castai-audit-logs]
processors: [attributes]
exporters: [loki]
```
* deploy chart with `--values` flag set to `values.yaml`:
```shell
helm install logs-receiver castai-helm/castai-audit-logs-receiver \
--namespace=castai-logs --create-namespace \
--set castai.apiKey=<api_access_key>
--set castai.apiURL="https://api.cast.ai" \
--values values.yaml
```

To see all chart values that can be customized, run:
```shell
helm show values castai-helm/castai-audit-logs-receiver
```

## License

Code is licensed under the [Apache License 2.0](LICENSE). See [NOTICE.md](NOTICE.md) for complete details, including software and third-party licenses and permissions.
23 changes: 0 additions & 23 deletions charts/castai-otel-collector/.helmignore

This file was deleted.

6 changes: 0 additions & 6 deletions charts/castai-otel-collector/Chart.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions charts/castai-otel-collector/README.md

This file was deleted.

77 changes: 0 additions & 77 deletions charts/castai-otel-collector/templates/_helpers.tpl

This file was deleted.

14 changes: 0 additions & 14 deletions charts/castai-otel-collector/templates/configmap.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions charts/castai-otel-collector/templates/pvc.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions charts/castai-otel-collector/templates/secret.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions charts/castai-otel-collector/templates/serviceaccount.yaml

This file was deleted.

95 changes: 0 additions & 95 deletions charts/castai-otel-collector/templates/statefulset.yaml

This file was deleted.

Loading
Loading