-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/insights-agent] FWI-5698 Right-sizer rebrand (#1425)
* modify right-sizer to include new right-sizer + oomkill-detection
- Loading branch information
Showing
18 changed files
with
629 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
stable/insights-agent/templates/right-sizer/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- if (index .Values "right-sizer" "enabled") }} | ||
{{- with (index .Values "right-sizer" "config") }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "insights-agent.fullname" $ }}-right-sizer | ||
labels: | ||
component: right-sizer | ||
app: insights-agent | ||
{{- if (index $.Values "right-sizer" "controller" "deployment" "annotations") }} | ||
annotations: | ||
{{- toYaml (index $.Values "right-sizer" "controller" "deployment" "annotations") | nindent 4 }} | ||
{{- end }} | ||
data: | ||
config.yaml: | | ||
{{- if kindIs "map" . }} | ||
{{- range $key, $value := . }} | ||
{{ $key }}: | ||
{{- toYaml $value | nindent 6 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if kindIs "string" . }} | ||
{{- . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
63 changes: 63 additions & 0 deletions
63
stable/insights-agent/templates/right-sizer/controller-clusterrole.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{{- if and (index .Values "right-sizer" "controller" "rbac" "create") (index .Values "right-sizer" "enabled") }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "insights-agent.fullname" . }}-right-sizer-controller | ||
{{- if (index .Values "right-sizer" "controller" "deployment" "annotations") }} | ||
annotations: | ||
{{- toYaml (index .Values "right-sizer" "controller" "deployment" "annotations") | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
component: right-sizer | ||
app: insights-agent | ||
rules: | ||
- apiGroups: | ||
- 'apps' | ||
resources: | ||
- '*' | ||
verbs: | ||
- 'get' | ||
- 'list' | ||
- 'watch' | ||
- apiGroups: | ||
- 'batch' | ||
resources: | ||
- 'cronjobs' | ||
- 'jobs' | ||
verbs: | ||
- 'get' | ||
- 'list' | ||
- 'watch' | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- 'namespaces' | ||
- 'pods' | ||
verbs: | ||
- 'get' | ||
- 'list' | ||
- 'watch' | ||
- apiGroups: | ||
- 'autoscaling.k8s.io' | ||
resources: | ||
- 'verticalpodautoscalers' | ||
verbs: | ||
- 'get' | ||
- 'list' | ||
- 'create' | ||
- 'delete' | ||
- 'update' | ||
{{- if (index .Values "right-sizer" "controller" "rbac" "enableArgoproj") }} | ||
- apiGroups: | ||
- 'argoproj.io' | ||
resources: | ||
- rollouts | ||
verbs: | ||
- 'get' | ||
- 'list' | ||
- 'watch' | ||
{{- end }} | ||
{{- if (index .Values "right-sizer" "controller" "rbac" "extraRules") -}} | ||
{{ toYaml (index .Values "right-sizer" "controller" "rbac" "extraRules") | nindent 2 }} | ||
{{- end }} | ||
{{- end }} |
44 changes: 44 additions & 0 deletions
44
stable/insights-agent/templates/right-sizer/controller-clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{- if and (index .Values "right-sizer" "controller" "rbac" "create") (index .Values "right-sizer" "enabled") }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "insights-agent.fullname" . }}-right-sizer-controller | ||
{{- if (index .Values "right-sizer" "controller" "deployment" "annotations") }} | ||
annotations: | ||
{{- toYaml (index .Values "right-sizer" "controller" "deployment" "annotations") | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
component: right-sizer | ||
app: insights-agent | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ include "insights-agent.fullname" . }}-right-sizer-controller | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "insights-agent.fullname" . }}-right-sizer-controller | ||
namespace: {{ .Release.Namespace }} | ||
|
||
{{- range (index .Values "right-sizer" "controller" "rbac" "extraClusterRoleBindings" )}} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "insights-agent.fullname" $ }}-right-sizer-controller-{{ . }} | ||
{{- if (index $.Values "right-sizer" "controller" "deployment" "annotations") }} | ||
annotations: | ||
{{- toYaml (index $.Values "right-sizer" "controller" "deployment" "annotations") | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
component: right-sizer | ||
app: insights-agent | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "insights-agent.fullname" $ }}-right-sizer-controller | ||
namespace: {{ $.Release.Namespace }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.