-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
helm: add helm chart for plugins installations
This commit adds a helm chart to install balloons and topology-aware NRI plugins. Signed-off-by: Muyassarov, Feruzjon <[email protected]>
- Loading branch information
1 parent
ced32fb
commit 22deea8
Showing
13 changed files
with
493 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,11 @@ | ||
apiVersion: v2 | ||
appVersion: main | ||
description: | | ||
NRI resource policy is a NRI plugin that will apply hardware-aware resource allocation | ||
policies to the containers running in the system. | ||
name: nri-plugins | ||
sources: | ||
- https://github.com/containers/nri-plugins | ||
home: https://github.com/containers/nri-plugins | ||
type: application | ||
version: 0.0.0 |
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,15 @@ | ||
# Default values for nri-plugins. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
--- | ||
image: | ||
name: nri-resource-policy-balloons | ||
container: | ||
name: nri-resource-policy-balloons | ||
|
||
namespace: kube-system | ||
|
||
configMap: | ||
data: | ||
ReservedResources: | ||
cpu: 750m |
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,6 @@ | ||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "nri-plugins.labels" -}} | ||
app: nri-resource-policy | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: nri-resource-policy | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- get | ||
- watch |
12 changes: 12 additions & 0 deletions
12
deployment/helm/nri-plugins/templates/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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: nri-resource-policy | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: nri-resource-policy | ||
subjects: | ||
- kind: ServiceAccount | ||
name: nri-resource-policy | ||
namespace: {{ .Values.namespace }} |
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,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nri-resource-policy-config.default | ||
namespace: {{ .Values.namespace }} | ||
data: | ||
policy: |+ | ||
{{- toYaml .Values.configMap.data | nindent 4 }} |
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,80 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
labels: | ||
{{- include "nri-plugins.labels" . | nindent 4 }} | ||
name: nri-resource-policy | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "nri-plugins.labels" . | nindent 4 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "nri-plugins.labels" . | nindent 4 }} | ||
spec: | ||
serviceAccount: nri-resource-policy | ||
nodeSelector: | ||
kubernetes.io/os: "linux" | ||
containers: | ||
- name: "{{ .Values.container.name }}" | ||
args: | ||
- --host-root | ||
- /host | ||
- --fallback-config | ||
- /etc/nri-resource-policy/nri-resource-policy.cfg | ||
- --pid-file | ||
- /tmp/nri-resource-policy.pid | ||
- -metrics-interval | ||
- 5s | ||
ports: | ||
- containerPort: 8891 | ||
name: metrics | ||
protocol: TCP | ||
hostPort: 8891 | ||
env: | ||
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
image: "{{ .Values.image.name }}:devel" | ||
imagePullPolicy: Always | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: ["ALL"] | ||
resources: | ||
requests: | ||
cpu: 500m | ||
memory: 512Mi | ||
volumeMounts: | ||
- name: resource-policydata | ||
mountPath: /var/lib/nri-resource-policy | ||
- name: hostsysfs | ||
mountPath: /host/sys | ||
- name: resource-policysockets | ||
mountPath: /var/run/nri-resource-policy | ||
- name: resource-policyconfig | ||
mountPath: /etc/nri-resource-policy | ||
- name: nrisockets | ||
mountPath: /var/run/nri | ||
volumes: | ||
- name: resource-policydata | ||
hostPath: | ||
path: /var/lib/nri-resource-policy | ||
type: DirectoryOrCreate | ||
- name: hostsysfs | ||
hostPath: | ||
path: /sys | ||
type: Directory | ||
- name: resource-policysockets | ||
hostPath: | ||
path: /var/run/nri-resource-policy | ||
- name: resource-policyconfig | ||
configMap: | ||
name: nri-resource-policy-config | ||
- name: nrisockets | ||
hostPath: | ||
path: /var/run/nri | ||
type: Directory |
Oops, something went wrong.