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

Add a way to change the METRICS_WATCH_NAMESPACE which further restric… #64

Merged
merged 2 commits into from
Nov 29, 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
2 changes: 2 additions & 0 deletions kedify-agent/templates/agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ spec:
- name: PRP_REQUIRES_ANNOTATED_PODS
value: {{ .Values.agent.features.prpRequiresAnnotatedPods | quote }}
{{- end }}
- name: METRICS_WATCH_NAMESPACE
value: {{ .Values.agent.metricsWatchNamespace | quote }}
- name: RBAC_READ_NODES
value: {{ .Values.agent.rbac.readNodes | quote }}
- name: RBAC_READ_PODS
Expand Down
3 changes: 3 additions & 0 deletions kedify-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ agent:
pullPolicy: IfNotPresent
imagePullSecrets: []

# comma-separated list of namespaces where pod utilization metrics should be collected
# or if unset denotes all namespaces, the collecting itself needs to be also enabled by KubernetesMetricsScraping flag
metricsWatchNamespace: ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we consider adding {{ .Release.Namespace }} by default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, that's the plan, basically same logic as in keda upstream helm chart

  {{- $namespaces := append (splitList "," .Values.agent.metricsWatchNamespace ) .Release.Namespace -}}
  {{- range $namespaces }}
  ...

# if anything else than 'false', the log will not print the ascii logo
noBanner: false
# if anything else than 'false', the log will not contain colors
Expand Down