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

[8.x](backport #5981) [helm] agent preset replicas #5984

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions deploy/helm/elastic-agent/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ Here is a collection of example configurations for the eck-integrations chart.
- [System - custom authlogs path](kubernetes-default/README.md)
- [Kubernetes - only container logs](kubernetes-only-logs/README.md)
- [Kubernetes - only hints autodiscover](kubernetes-hints-autodiscover/README.md)
- [Custom Integration - nginx](nginx-custom-integration/README.md)
- [Nginx - custom integration](nginx-custom-integration/README.md)
- [Multiple Integrations](multiple-integrations/README.md)
- [ECK - Kubernetes - defaults](eck/README.md)
- [Fleet - Managed Agent](fleet-managed/README.md)
- [User created cluster role](user-cluster-role/README.md)
- [User created service account](user-service-account/README.md)

Useful links:

- [Kibana - Install and uninstall Elastic Agent integration assets](https://www.elastic.co/guide/en/fleet/current/install-uninstall-integration-assets.html)
- [Kibana - Creating API Keys](https://www.elastic.co/guide/en/kibana/current/api-keys.html)
- [Kibana - Create roles and users](https://www.elastic.co/guide/en/kibana/current/using-kibana-with-security.html#security-create-roles)
- [ECK operator](https://github.com/elastic/cloud-on-k8s).
- [ECK operator](https://github.com/elastic/cloud-on-k8s)
- [Fleet - Manage Agents](https://www.elastic.co/guide/en/fleet/current/manage-agents-in-fleet.html)
- [Fleet - Installing Elastic Agent](https://www.elastic.co/guide/en/fleet/current/install-fleet-managed-elastic-agent.html#elastic-agent-installation-steps)
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ helm install elastic-agent ../../ \
--set 'agent.imagePullSecrets[0].name=regcred' \
--set outputs.default.type=ESSecretAuthAPI \
--set outputs.default.secretName=es-api-secret
```

## Validate:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ spec:
{{- end -}}
{{- end }}
deployment:
{{- with ($presetVal).replicaCount }}
replicas: {{ . }}
{{- if hasKey $presetVal "replicaCount" }}
replicas: {{ ($presetVal).replicaCount }}
{{- end }}
podTemplate:
{{- toYaml ($podTemplateResource).template | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ spec:
{{- end -}}
{{- end }}
statefulSet:
{{- with ($presetVal).replicaCount }}
replicas: {{ . }}
{{- if hasKey $presetVal "replicaCount" }}
replicas: {{ ($presetVal).replicaCount }}
{{- end }}
podTemplate:
{{- toYaml ($podTemplateResource).template | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ spec:
selector:
matchLabels:
name: {{ $agentName }}
{{- if hasKey $presetVal "replicaCount" }}
replicas: {{ ($presetVal).replicaCount }}
{{- end }}
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ spec:
selector:
matchLabels:
name: {{ $agentName }}
{{- if hasKey $presetVal "replicaCount" }}
replicas: {{ ($presetVal).replicaCount }}
{{- end }}
template:
metadata:
labels:
Expand Down