Skip to content

Commit

Permalink
Adjust Elastic agent Kubernetes recipe
Browse files Browse the repository at this point in the history
Use ${env.VAR} syntax for environment variables in the configuration
because loading configuration excludes `inputs` from the go-ucfg
variable expansion since elastic/beats#24005.
  • Loading branch information
thbkrkr committed Mar 30, 2021
1 parent 2c3d85b commit 6218e83
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions config/recipes/elastic-agent/kubernetes-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
- apiserver
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
hosts:
- 'https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}'
- 'https://${env.KUBERNETES_SERVICE_HOST}:${env.KUBERNETES_SERVICE_PORT}'
period: 30s
ssl.certificate_authorities:
- /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
Expand All @@ -66,7 +66,7 @@ spec:
add_metadata: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
hosts:
- 'https://${NODE_NAME}:10250'
- 'https://${env.NODE_NAME}:10250'
period: 10s
ssl.verification_mode: none
- id: kubernetes/metrics-kubernetes.event
Expand All @@ -86,7 +86,7 @@ spec:
add_metadata: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
hosts:
- 'https://${NODE_NAME}:10250'
- 'https://${env.NODE_NAME}:10250'
period: 10s
ssl.verification_mode: none
- id: kubernetes/metrics-kubernetes.pod
Expand All @@ -98,7 +98,7 @@ spec:
add_metadata: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
hosts:
- 'https://${NODE_NAME}:10250'
- 'https://${env.NODE_NAME}:10250'
period: 10s
ssl.verification_mode: none
- id: kubernetes/metrics-kubernetes.system
Expand All @@ -110,7 +110,7 @@ spec:
add_metadata: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
hosts:
- 'https://${NODE_NAME}:10250'
- 'https://${env.NODE_NAME}:10250'
period: 10s
ssl.verification_mode: none
- id: kubernetes/metrics-kubernetes.volume
Expand All @@ -122,7 +122,7 @@ spec:
add_metadata: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
hosts:
- 'https://${NODE_NAME}:10250'
- 'https://${env.NODE_NAME}:10250'
period: 10s
ssl.verification_mode: none
---
Expand Down

0 comments on commit 6218e83

Please sign in to comment.