-
Notifications
You must be signed in to change notification settings - Fork 257
Add autoops chart #9363
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
Merged
Merged
Add autoops chart #9363
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
4e64c92
init
pkoutsovasilis 9cfaf7c
added all env vriabels
idanl21 1ba1854
added es_pass and username as an option and added autoops to values.s…
idanl21 f121792
Update deploy/helm/elastic-agent/values.schema.json
idanl21 169bc02
fix scheme
idanl21 60c6b6d
run mage helm:updateAgentVersion helm:renderExamples
idanl21 09e6625
adde to CODEOWNERS
idanl21 f47a85e
add contidions to shecma
idanl21 8da4c78
change schema
idanl21 65a6fc7
fix schema
idanl21 23296ff
add exmaples to values file
idanl21 cac6497
add exmaples to values file
idanl21 8e9b328
added example
idanl21 cfe46a9
run mage runderExamples
idanl21 b4f2afd
run mage runderExamples
idanl21 bce7187
run mage runderExamples
idanl21 d4986c8
run mage runderExamples
idanl21 bf07100
fix values naming
idanl21 d1d471e
Merge branch 'main' into add-autoops-chart
idanl21 1893412
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/_au…
idanl21 3a9adfd
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/_au…
idanl21 40fc0a7
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/sec…
idanl21 be2da12
Merge branch 'main' into add-autoops-chart
idanl21 1ea7f03
fix: update manifest.yaml of autoops-agent
pkoutsovasilis e2ebe1f
Clear default values for autoops
swiatekm 4ada197
added changelog
idanl21 5f26fc6
Update changelog/fragments/1762856188-added-opex-to-elastic-agent-hel…
idanl21 2471075
Update changelog/fragments/1762856188-added-opex-to-elastic-agent-hel…
idanl21 81a67ca
Delete docs/release-notes/_snippets/0.1.0.asciidoc
idanl21 71b381c
Delete changelog/0.1.0.yaml
idanl21 4ac81eb
remove unnecessary docs
idanl21 c595ecd
Merge branch 'main' into add-autoops-chart
ebeahan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 125 additions & 0 deletions
125
deploy/helm/elastic-agent/templates/integrations/_auto_ops/_auto_ops.tpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| {{- define "elasticagent.autoops.init" -}} | ||
| {{- if eq $.Values.autoOps.enabled true -}} | ||
| {{- $presetVal := $.Values.agent.presets.autoOps -}} | ||
| {{- $autoOpsConfig := ((include "elasticagent.autoops.config" $) | fromYaml) -}} | ||
| {{- include "elasticagent.preset.mutate.otelConfig" (list $ $presetVal $autoOpsConfig) -}} | ||
| {{- $autoOpsEnvVars := ((include "elasticagent.autoops.envVars" $) | fromYaml) -}} | ||
| {{- include "elasticagent.preset.mutate.envs" (list $presetVal $autoOpsEnvVars)}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
|
|
||
| {{- define "elasticagent.autoops.config" -}} | ||
| receivers: | ||
| metricbeatreceiver: | ||
| metricbeat: | ||
| modules: | ||
| # Metrics | ||
| - module: autoops_es | ||
| hosts: ${env:AUTOOPS_ES_URL} | ||
| period: 10s | ||
| metricsets: | ||
| - cat_shards | ||
| - cluster_health | ||
| - cluster_settings | ||
| - license | ||
| - node_stats | ||
| - tasks_management | ||
| # Templates | ||
| - module: autoops_es | ||
| hosts: ${env:AUTOOPS_ES_URL} | ||
| period: 24h | ||
| metricsets: | ||
| - cat_template | ||
| - component_template | ||
| - index_template | ||
| processors: | ||
| - add_fields: | ||
| target: autoops_es | ||
| fields: | ||
| temp_resource_id: ${env:AUTOOPS_TEMP_RESOURCE_ID} | ||
| token: ${env:AUTOOPS_TOKEN} | ||
| output: | ||
| otelconsumer: | ||
| telemetry_types: ["logs"] | ||
|
|
||
| exporters: | ||
| otlphttp: | ||
| headers: | ||
| Authorization: "AutoOpsToken ${env:AUTOOPS_TOKEN}" | ||
| endpoint: ${env:AUTOOPS_OTEL_URL} | ||
|
|
||
| service: | ||
| pipelines: | ||
| logs: | ||
| receivers: [metricbeatreceiver] | ||
| exporters: [otlphttp] | ||
| telemetry: | ||
| logs: | ||
| encoding: json | ||
|
idanl21 marked this conversation as resolved.
|
||
| {{- end -}} | ||
|
|
||
| {{- define "elasticagent.autoops.envVars" -}} | ||
| {{- $presetName := "autoOps" -}} | ||
| {{- $agentName := include "elasticagent.preset.fullname" (list $ $presetName) -}} | ||
| extraEnvs: | ||
| # Always present | ||
| - name: AUTOOPS_TOKEN | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: autoops-token | ||
|
|
||
| - name: AUTOOPS_TEMP_RESOURCE_ID | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: temp-resource-id | ||
|
|
||
| - name: AUTOOPS_OTEL_URL | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: otel-url | ||
|
|
||
| - name: AUTOOPS_ES_URL | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: autoops-es-url | ||
|
idanl21 marked this conversation as resolved.
|
||
|
|
||
| # Only if API key provided | ||
| {{- if $.Values.autoOps.es_api_key }} | ||
| - name: ELASTICSEARCH_READ_API_KEY | ||
|
idanl21 marked this conversation as resolved.
|
||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: es-api-key | ||
| {{- end }} | ||
|
|
||
| # Only if BOTH username & password provided | ||
| {{- if and $.Values.autoOps.es_username $.Values.autoOps.es_password }} | ||
| - name: ELASTICSEARCH_READ_USERNAME | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: es-username | ||
| - name: ELASTICSEARCH_READ_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: es-password | ||
| {{- end }} | ||
|
|
||
| - name: ELASTIC_CLOUD_CONNECTED_MODE_API_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: cloud-connected-mode-api-key | ||
|
|
||
| - name: ELASTIC_CLOUD_CONNECTED_MODE_API_URL | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: {{ $agentName }}-autoops | ||
| key: cloud-connected-mode-api-url | ||
| optional: true | ||
|
idanl21 marked this conversation as resolved.
|
||
| {{- end -}} | ||
33 changes: 33 additions & 0 deletions
33
deploy/helm/elastic-agent/templates/integrations/_auto_ops/secret.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| {{- if eq $.Values.autoOps.enabled true }} | ||
| {{- $presetName := "autoOps" }} | ||
| {{- $presetVal := $.Values.agent.presets.autoOps }} | ||
| {{- $agentName := include "elasticagent.preset.fullname" (list $ $presetName) }} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ $agentName }}-autoops | ||
| namespace: {{ .namespace | default $.Release.Namespace | quote }} | ||
| labels: | ||
| {{- include "elasticagent.labels" $ | nindent 4 }} | ||
| {{- with ($presetVal).labels -}} | ||
| {{ toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- with ($presetVal).annotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| stringData: | ||
| autoops-token: {{ $.Values.autoOps.autoops_token | quote }} | ||
| {{- if and $.Values.autoOps.es_username $.Values.autoOps.es_password }} | ||
| es-username: {{ $.Values.autoOps.es_username | quote }} | ||
| es-password: {{ $.Values.autoOps.es_password | quote }} | ||
| {{- end }} | ||
| autoops-es-url: {{ $.Values.autoOps.autoops_es_url | quote }} | ||
| temp-resource-id: {{ $.Values.autoOps.temp_resource_id | quote }} | ||
| otel-url: {{ $.Values.autoOps.otel_url | quote }} | ||
| {{- if $.Values.autoOps.es_api_key }} | ||
| es-api-key: {{ $.Values.autoOps.es_api_key | quote }} | ||
| {{- end }} | ||
| cloud-connected-mode-api-key: {{ $.Values.autoOps.cloud_connected_mode_api_key | quote }} | ||
| cloud-connected-mode-api-url: {{ $.Values.autoOps.cloud_connected_mode_api_url | quote }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.