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

CP 24028 add insights controller scape config #120

Merged
30 changes: 26 additions & 4 deletions charts/cloudzero-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,36 @@ For the latest release, see [Releases](https://github.com/Cloudzero/cloudzero-ch

## Installation

### Get Helm Repository Info
### Adding Helm Repository Information

To use the chart or a beta version, you must add the repository to Helm. Refer to the [`helm repo`](https://helm.sh/docs/helm/helm_repo/) documentation for command details.

#### 1. Add the Helm Chart Repository

```console
helm repo add cloudzero https://cloudzero.github.io/cloudzero-charts
helm repo update
```
> Note: If you intend to use a beta version, refer to the [beta installation document](./BETA-INSTALLATION.md) for the appropriate channel.

#### 2. Add Repository Dependencies

**Cert Manager**
```console
helm repo add cert-manager https://charts.jetstack.io
```

**Metrics Exporter**
```console
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
josephbarnett marked this conversation as resolved.
Show resolved Hide resolved
```

#### 3. Update the Helm Repositories

Ensure that the most recent chart versions are available:

_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
```console
helm repo update
```

### Install Helm Chart

Expand Down Expand Up @@ -53,7 +75,7 @@ Alternatively, [install the cert-manager CRDs directly](https://cert-manager.io/
```console
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.2/cert-manager.yaml
```
Alternatively, [install the cert-manager CRDs directly](https://cert-manager.io/docs/installation/helm/).

josephbarnett marked this conversation as resolved.
Show resolved Hide resolved

3. Fill out all required fields in the `configuration.example.yaml` file in this directory. Rename the file as necessary. Below is an example of a completed configuration file:
```yaml
Expand Down
29 changes: 24 additions & 5 deletions charts/cloudzero-agent/templates/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,30 @@ data:
kubeconfig_file: ""
follow_redirects: true
enable_http2: true
{{- end }}
{{- if .Values.prometheusConfig.scrapeJobs.additionalScrapeJobs -}}
{{ toYaml .Values.prometheusConfig.scrapeJobs.additionalScrapeJobs | toString | nindent 6 }}
{{- end}}
{{- end}}
{{- end }}
{{- if .Values.insightsController.enabled }}
- job_name: '{{ include "cloudzero-agent.insightsController.server.webhookFullname" . }}'
josephbarnett marked this conversation as resolved.
Show resolved Hide resolved
metrics_path: /metrics
scheme: https
enable_compression: true
tls_config:
insecure_skip_verify: true
follow_redirects: true
enable_http2: true
kubernetes_sd_configs:
- role: endpoints
kubeconfig_file: ""
follow_redirects: true
enable_http2: true
relabel_configs:
- source_labels: [__meta_kubernetes_endpoints_name]
action: keep
regex: {{ include "cloudzero-agent.insightsController.server.webhookFullname" . }}-svc
{{- end }}
{{- if .Values.prometheusConfig.scrapeJobs.additionalScrapeJobs -}}
{{ toYaml .Values.prometheusConfig.scrapeJobs.additionalScrapeJobs | toString | nindent 6 }}
{{- end}}
{{- end}}
remote_write:
- url: 'https://{{ include "cloudzero-agent.cleanString" .Values.host }}/v1/container-metrics?cluster_name={{ include "cloudzero-agent.cleanString" .Values.clusterName | urlquery }}&cloud_account_id={{ include "cloudzero-agent.cleanString" .Values.cloudAccountId | urlquery }}&region={{ include "cloudzero-agent.cleanString" .Values.region | urlquery }}'
authorization:
Expand Down
2 changes: 1 addition & 1 deletion charts/cloudzero-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ insightsController:
replicaCount: 3
image:
repository: ghcr.io/cloudzero/cloudzero-insights-controller/cloudzero-insights-controller
tag: 0.0.2
tag: 0.0.3
pullPolicy: Always
tls:
enabled: true
Expand Down
Loading