Skip to content

Commit

Permalink
agent: configurable autowire and metrics RBAC (kedacore#56)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
  • Loading branch information
wozniakjan committed Nov 7, 2024
1 parent ec77f8c commit 16f5b75
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kedify-agent/templates/agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ spec:
value: /helm/repository/repositories.yaml
- name: HELM_REPOSITORY_CACHE
value: /helm/charts
{{- if .Values.agent.noColor }}
{{- if .Values.agent.noColor }}
- name: NO_COLOR
value: {{ .Values.agent.noColor | quote }}
{{- end }}
{{- if .Values.agent.noBanner }}
{{- end }}
{{- if .Values.agent.noBanner }}
- name: NO_BANNER
value: {{ .Values.agent.noBanner | quote }}
{{- end }}
{{- end }}
- name: RBAC_READ_NODES
value: {{ .Values.agent.rbac.readNodes | quote }}
- name: RBAC_READ_PODS
Expand All @@ -73,7 +73,7 @@ spec:
value: {{ or .Values.agent.rbac.shouldBeAbleToInstallKeda .Values.agent.rbac.shouldBeAbleToInstallHttpAddon | quote }}
- name: RBAC_MANAGE_HELM
value: {{ or .Values.agent.rbac.shouldBeAbleToInstallKeda .Values.agent.rbac.shouldBeAbleToInstallHttpAddon | quote }}
- name: RBAC_MANAGE_INGRESS_AUTOWIRE
- name: RBAC_MANAGE_INGRESS_AUTO_WIRE
value: {{ .Values.agent.rbac.ingressAutoWire | quote }}
- name: RBAC_MANAGE_KEDIFY_CONFIG
value: {{ .Values.agent.rbac.kedifyConfig | quote }}
Expand Down
12 changes: 12 additions & 0 deletions kedify-agent/templates/agent-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,18 @@ rules:
- kedify-proxy
{{- end }}

{{- if .Values.agent.rbac.readMetrics }}
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- get
- list
- watch
{{- end }}

{{- if .Values.agent.rbac.uninstall }}
# Kedify needs to be able to uninstall itself
- apiGroups:
Expand Down

0 comments on commit 16f5b75

Please sign in to comment.