Skip to content

Commit

Permalink
Add resource requests and limits to tokengen job template
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander P.A. Wesseling <[email protected]>
  • Loading branch information
wessp01 committed Dec 5, 2024
1 parent c6ee65a commit 110851a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/enterprise-logs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: "v2"
name: "enterprise-logs"
type: application
version: "2.5.0"
version: "2.5.1"
appVersion: "v1.5.2"
kubeVersion: "^1.10.0-0"
description: "Grafana Enterprise Logs"
Expand Down
11 changes: 11 additions & 0 deletions charts/enterprise-logs/small.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ compactor:
cpu: 2
memory: 1Gi

# -target=tokengen
# defined in enterprise-logs chart
tokengen:
resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 0.5
memory: 500Mi

# -target=gateway
# defined in enterprise-logs chart
gateway:
Expand Down
4 changes: 4 additions & 0 deletions charts/enterprise-logs/templates/tokengen/job-tokengen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ spec:
mountPath: /etc/loki/config
- name: license
mountPath: /etc/enterprise-logs/license
resources:
{{- toYaml .Values.enterprise.tokengen.resources | nindent 8 }}
env:
{{- if .Values.tokengen.env }}
{{ toYaml .Values.tokengen.env | nindent 12 }}
Expand All @@ -97,6 +99,8 @@ spec:
mountPath: /etc/loki/config
- name: license
mountPath: /etc/enterprise-logs/license
resources:
{{- toYaml .Values.enterprise.tokengen.resources | nindent 8 }}
securityContext:
{{- toYaml .Values.tokengen.containerSecurityContext | nindent 12 }}
restartPolicy: OnFailure
Expand Down
5 changes: 5 additions & 0 deletions charts/enterprise-logs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ tokengen:
extraVolumes: []
# -- Additional volume mounts for Pods
extraVolumeMounts: []

# -- Request and limit Kubernetes resources
# -- Values are defined in small.yaml and large.yaml
resources: {}

# -- Run containers as user `enterprise-logs(uid=10001)`
podSecurityContext:
runAsNonRoot: true
Expand Down

0 comments on commit 110851a

Please sign in to comment.