Skip to content

Commit

Permalink
Merge pull request #66 from aandryashin/master
Browse files Browse the repository at this point in the history
Add resourcequota control.
  • Loading branch information
vania-pooh authored Sep 23, 2021
2 parents 34111f3 + 1d3fdfe commit 56a1880
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions moon/templates/moon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}
rules:
{{- if .Values.moon.resourcequotacontrol }}
- apiGroups:
- ""
resources:
Expand All @@ -33,6 +34,31 @@ rules:
- update
- patch
- delete
{{- else }}
- apiGroups:
- ""
resources:
- pods
- pods/log
- configmaps
- secrets
verbs:
- get
- watch
- list
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- resourcequotas
verbs:
- get
- watch
- list
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand Down
5 changes: 5 additions & 0 deletions moon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ moon:
enabled:
resources: true

##
## Global flag to enable/disable resource quota control pod limits (by default Moon has permissions to update resourcequota)
##
resourcequotacontrol: true

##
## Optionally add annotations to the service account generated byt the chart
## This is necessary if you intend to use the moon service account for
Expand Down

0 comments on commit 56a1880

Please sign in to comment.