-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support using user-created serviceAccount and clusterRole
- Loading branch information
1 parent
116848c
commit 6567ef6
Showing
16 changed files
with
1,875 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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 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
30 changes: 30 additions & 0 deletions
30
deploy/helm/elastic-agent/examples/user-cluster-role/README.md
This file contains 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,30 @@ | ||
# Example: Kubernetes Integration with User-created service account | ||
|
||
In this example we install the built-in `kubernetes` integration with the default built-in values, including the use of a user-created service account. | ||
|
||
## Prerequisites: | ||
1. A k8s secret that contains the connection details to an Elasticsearch cluster such as the URL and the API key ([Kibana - Creating API Keys](https://www.elastic.co/guide/en/kibana/current/api-keys.html)): | ||
```console | ||
kubectl create secret generic es-api-secret \ | ||
--from-literal=api_key=... \ | ||
--from-literal=url=... | ||
``` | ||
|
||
2. `kubernetes` integration assets installed through Kibana ([Kibana - Install and uninstall Elastic Agent integration assets](https://www.elastic.co/guide/en/fleet/current/install-uninstall-integration-assets.html)) | ||
|
||
3. A k8s service account | ||
```console | ||
kubectl create serviceaccount user-sa | ||
``` | ||
|
||
## Run: | ||
```console | ||
helm install elastic-agent ../../ \ | ||
-f ./agent-kubernetes-values.yaml \ | ||
--set outputs.default.type=ESSecretAuthAPI \ | ||
--set outputs.default.secretName=es-api-secret | ||
``` | ||
|
||
## Validate: | ||
|
||
1. The Kibana `kubernetes`-related dashboards should start showing up the respective info. |
18 changes: 18 additions & 0 deletions
18
deploy/helm/elastic-agent/examples/user-cluster-role/agent-kubernetes-values.yaml
This file contains 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,18 @@ | ||
kubernetes: | ||
enabled: true | ||
|
||
agent: | ||
unprivileged: true | ||
presets: | ||
perNode: | ||
serviceAccount: | ||
create: false | ||
name: user-sa | ||
clusterWide: | ||
serviceAccount: | ||
create: false | ||
name: user-sa | ||
ksmSharded: | ||
serviceAccount: | ||
create: false | ||
name: user-sa |
Oops, something went wrong.