Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4e64c92
init
pkoutsovasilis Aug 13, 2025
9cfaf7c
added all env vriabels
idanl21 Aug 13, 2025
1ba1854
added es_pass and username as an option and added autoops to values.s…
idanl21 Aug 14, 2025
f121792
Update deploy/helm/elastic-agent/values.schema.json
idanl21 Aug 14, 2025
169bc02
fix scheme
idanl21 Aug 14, 2025
60c6b6d
run mage helm:updateAgentVersion helm:renderExamples
idanl21 Aug 14, 2025
09e6625
adde to CODEOWNERS
idanl21 Aug 17, 2025
f47a85e
add contidions to shecma
idanl21 Sep 1, 2025
8da4c78
change schema
idanl21 Sep 10, 2025
65a6fc7
fix schema
idanl21 Sep 11, 2025
23296ff
add exmaples to values file
idanl21 Sep 11, 2025
cac6497
add exmaples to values file
idanl21 Sep 11, 2025
8e9b328
added example
idanl21 Sep 11, 2025
cfe46a9
run mage runderExamples
idanl21 Sep 11, 2025
b4f2afd
run mage runderExamples
idanl21 Sep 11, 2025
bce7187
run mage runderExamples
idanl21 Sep 11, 2025
d4986c8
run mage runderExamples
idanl21 Sep 11, 2025
bf07100
fix values naming
idanl21 Sep 11, 2025
d1d471e
Merge branch 'main' into add-autoops-chart
idanl21 Sep 14, 2025
1893412
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/_au…
idanl21 Sep 16, 2025
3a9adfd
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/_au…
idanl21 Sep 16, 2025
40fc0a7
Update deploy/helm/elastic-agent/templates/integrations/_auto_ops/sec…
idanl21 Sep 16, 2025
be2da12
Merge branch 'main' into add-autoops-chart
idanl21 Oct 29, 2025
1ea7f03
fix: update manifest.yaml of autoops-agent
pkoutsovasilis Oct 29, 2025
e2ebe1f
Clear default values for autoops
swiatekm Nov 6, 2025
4ada197
added changelog
idanl21 Nov 11, 2025
5f26fc6
Update changelog/fragments/1762856188-added-opex-to-elastic-agent-hel…
idanl21 Nov 12, 2025
2471075
Update changelog/fragments/1762856188-added-opex-to-elastic-agent-hel…
idanl21 Nov 12, 2025
81a67ca
Delete docs/release-notes/_snippets/0.1.0.asciidoc
idanl21 Nov 12, 2025
71b381c
Delete changelog/0.1.0.yaml
idanl21 Nov 16, 2025
4ac81eb
remove unnecessary docs
idanl21 Nov 16, 2025
c595ecd
Merge branch 'main' into add-autoops-chart
ebeahan Nov 19, 2025
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
8 changes: 5 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ changelog/fragments/
/internal/pkg/otel/samples @elastic/ingest-otel-data @elastic/ingest-docs
/internal/pkg/otel/components.yml @elastic/ingest-otel-leads
/internal/pkg/composable/providers/kubernetes @elastic/elastic-agent-control-plane
/internal/pkg/otel/samples/darwin/autoops_es*.yml @elastic/opex
/internal/pkg/otel/samples/linux/autoops_es*.yml @elastic/opex
/internal/pkg/otel/samples/windows/autoops_es*.yml @elastic/opex
/internal/pkg/otel/samples/darwin/autoops_es.yml @elastic/opex
/internal/pkg/otel/samples/linux/autoops_es.yml @elastic/opex
/internal/pkg/otel/samples/windows/autoops_es.yml @elastic/opex
/deploy/helm/elastic-agent/templates/integrations/_auto_ops @elastic.opex

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# REQUIRED
# Kind can be one of:
# - breaking-change: a change to previously-documented behavior
# - deprecation: functionality that is being removed in a later release
# - bug-fix: fixes a problem in a previous version
# - enhancement: extends functionality but does not break or fix existing behavior
# - feature: new functionality
# - known-issue: problems that we are aware of in a given version
# - security: impacts on the security of a product or a user’s deployment.
# - upgrade: important information for someone upgrading from a prior version
# - other: does not fit into any of the other categories
kind: feature

# REQUIRED for all kinds
# Change summary; a 80ish characters long description of the change.
summary: added opex to elastic-agent helm chart, This change will add the Opex-CCM support to the offical elastic-agent helm chart deployment.

# REQUIRED for breaking-change, deprecation, known-issue
# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
# description:

# REQUIRED for breaking-change, deprecation, known-issue
# impact:

# REQUIRED for breaking-change, deprecation, known-issue
# action:

# REQUIRED for all kinds
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component: elastic-agent

# AUTOMATED
# OPTIONAL to manually add other PR URLs
# PR URL: A link the PR that added the changeset.
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
# Please provide it if you are adding a fragment for a different PR.
pr: https://github.com/elastic/elastic-agent/pull/9363

# AUTOMATED
# OPTIONAL to manually add other issue URLs
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
# If not present is automatically filled by the tooling with the issue linked to the PR number.
# issue: https://github.com/owner/repo/1234
35 changes: 35 additions & 0 deletions deploy/helm/elastic-agent/examples/autoops-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Example: Managed by Opex Agent

In this example we deploy an Elastic AutoOps Agent that is managed by Opex team .


## Run:

There are 2 kinds of installations, related to auth method

### for API_KEY installation

```console
helm install ./deploy/helm/elastic-agent -n kube-system \
--set kube-state-metrics.enabled=false \
--set kubernetes.enabled=false \
--set autoOps.enabled=true \
--set-string autoOps.autoops_token="tok-123" \
--set-string autoOps.autoops_otel_url="https://otel.example.com:4318" \
--set-string autoOps.autoops_temp_resource_id="res-abc" \
--set-string autoOps.es_api_key="API_KEY_123"
```

### for Username:password (Basic auth) installation

```console
helm install ./deploy/helm/elastic-agent -n kube-system \
--set kube-state-metrics.enabled=false \
--set kubernetes.enabled=false \
--set autoOps.enabled=true \
--set-string autoOps.autoops_token="tok-123" \
--set-string autoOps.autoops_otel_url="https://otel.example.com:4318" \
--set-string autoOps.autoops_temp_resource_id="res-abc" \
--set-string autoOps.es_username="elastic" \
--set-string autoOps.es_username="es_pass"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Turn off everything except the AutoOps preset
kubernetes:
enabled: false
kube-state-metrics:
enabled: false

autoOps:
enabled: true
autoops_token: "REPLACE_ME_TOKEN"
autoops_otel_url: "https://otel.example.com:4318"
autoops_temp_resource_id: "REPLACE_ME_RESOURCE_ID"
es_api_key: "REPLACE_ME_API_KEY"
elastic_cloud_connected_mode_api_key: "CCM-API-KEY"
elastic_cloud_connected_mode_api_url: "CCM-API-URL"
autoops_es_url: "https://ccm-test-eu-west-1.es.us-east-2.aws.elastic-cloud.com"
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
---
# Source: elastic-agent/templates/agent/service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: agent-autoops-example
namespace: "default"
labels:
helm.sh/chart: elastic-agent-9.3.0-beta
app.kubernetes.io/name: elastic-agent
app.kubernetes.io/instance: example
app.kubernetes.io/version: 9.3.0
---
# Source: elastic-agent/templates/agent/k8s/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: agent-autoops-example
namespace: "default"
labels:
helm.sh/chart: elastic-agent-9.3.0-beta
app.kubernetes.io/name: elastic-agent
app.kubernetes.io/instance: example
app.kubernetes.io/version: 9.3.0
stringData:

agent.yml: |-
exporters:
otlphttp:
endpoint: ${env:AUTOOPS_OTEL_URL}
headers:
Authorization: AutoOpsToken ${env:AUTOOPS_TOKEN}
receivers:
metricbeatreceiver:
metricbeat:
modules:
- hosts: ${env:AUTOOPS_ES_URL}
metricsets:
- cat_shards
- cluster_health
- cluster_settings
- license
- node_stats
- tasks_management
module: autoops_es
period: 10s
- hosts: ${env:AUTOOPS_ES_URL}
metricsets:
- cat_template
- component_template
- index_template
module: autoops_es
period: 24h
output:
otelconsumer: null
processors:
- add_fields:
fields:
temp_resource_id: ${env:AUTOOPS_TEMP_RESOURCE_ID}
token: ${env:AUTOOPS_TOKEN}
target: autoops_es
telemetry_types:
- logs
service:
pipelines:
logs:
exporters:
- otlphttp
receivers:
- metricbeatreceiver
telemetry:
logs:
encoding: json
---
# Source: elastic-agent/templates/integrations/_auto_ops/secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: agent-autoops-example-autoops
namespace: "default"
labels:
helm.sh/chart: elastic-agent-9.3.0-beta
app.kubernetes.io/name: elastic-agent
app.kubernetes.io/instance: example
app.kubernetes.io/version: 9.3.0
stringData:
autoops-token: "REPLACE_ME_TOKEN"
autoops-es-url: "https://ccm-test-eu-west-1.es.us-east-2.aws.elastic-cloud.com"
temp-resource-id: "REPLACE_ME_RESOURCE_ID"
otel-url: "https://otel.example.com:4318"
es-api-key: "REPLACE_ME_API_KEY"
cloud-connected-mode-api-key: "CCM-API-KEY"
cloud-connected-mode-api-url: "CCM-API-URL"
---
# Source: elastic-agent/templates/agent/k8s/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: agent-autoops-example
namespace: "default"
labels:
helm.sh/chart: elastic-agent-9.3.0-beta
app.kubernetes.io/name: elastic-agent
app.kubernetes.io/instance: example
app.kubernetes.io/version: 9.3.0
spec:
selector:
matchLabels:
name: agent-autoops-example
template:
metadata:
labels:
name: agent-autoops-example
annotations:
checksum/config: e89ad87aab4abdf0b266914a815ddd71744340acbec3678f63b018cfe85334df
spec:
automountServiceAccountToken: true
containers:
- args:
- otel
- --config
- /etc/elastic-agent/agent.yml
command:
- elastic-agent
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: STATE_PATH
value: /usr/share/elastic-agent/state
- name: AUTOOPS_TOKEN
valueFrom:
secretKeyRef:
key: autoops-token
name: agent-autoops-example-autoops
- name: AUTOOPS_TEMP_RESOURCE_ID
valueFrom:
secretKeyRef:
key: temp-resource-id
name: agent-autoops-example-autoops
- name: AUTOOPS_OTEL_URL
valueFrom:
secretKeyRef:
key: otel-url
name: agent-autoops-example-autoops
- name: AUTOOPS_ES_URL
valueFrom:
secretKeyRef:
key: autoops-es-url
name: agent-autoops-example-autoops
- name: ELASTICSEARCH_READ_API_KEY
valueFrom:
secretKeyRef:
key: es-api-key
name: agent-autoops-example-autoops
- name: ELASTIC_CLOUD_CONNECTED_MODE_API_KEY
valueFrom:
secretKeyRef:
key: cloud-connected-mode-api-key
name: agent-autoops-example-autoops
- name: ELASTIC_CLOUD_CONNECTED_MODE_API_URL
valueFrom:
secretKeyRef:
key: cloud-connected-mode-api-url
name: agent-autoops-example-autoops
optional: true
image: docker.elastic.co/elastic-agent/elastic-agent:9.3.0-SNAPSHOT
imagePullPolicy: IfNotPresent
name: agent
securityContext:
runAsUser: 0
volumeMounts:
- mountPath: /usr/share/elastic-agent/state
name: agent-data
- mountPath: /etc/elastic-agent/agent.yml
name: config
readOnly: true
subPath: agent.yml
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
kubernetes.io/os: linux
serviceAccountName: agent-autoops-example
volumes:
- emptyDir: {}
name: agent-data
- name: config
secret:
defaultMode: 292
secretName: agent-autoops-example
3 changes: 2 additions & 1 deletion deploy/helm/elastic-agent/templates/agent/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Initialise input templates if we are not deploying as managed
as they change the k8s configuration of presets e.g. necessary volume mounts, etc. */}}
{{- include "elasticagent.kubernetes.init" $ -}}
{{- include "elasticagent.system.init" $ -}}
{{- include "elasticagent.autoops.init" $ -}}
{{/* initialise inputs the custom integrations only if fleet is disabled */}}
{{- if eq $.Values.agent.fleet.enabled false -}}
{{- range $customInputName, $customInputVal := $.Values.extraIntegrations -}}
Expand Down Expand Up @@ -351,7 +352,7 @@ app.kubernetes.io/version: {{ .Values.agent.version}}
{{- $presetVal := index . 1 -}}
{{- $otelConfigVal := index . 2 -}}
{{- $presetOtelConfig := dig "otelConfig" (dict) $presetVal -}}
{{- $presetOtelConfig = uniq (deepCopy $presetOtelConfig | merge $otelConfigVal) -}}
{{- $presetOtelConfig = (deepCopy $presetOtelConfig | merge $otelConfigVal) -}}
{{- $_ := set $presetVal "otelConfig" $presetOtelConfig -}}
{{- end -}}

Expand Down
Loading