Skip to content

Commit

Permalink
Merge pull request #229 from klihub/backports/release-0.3/helm-settab…
Browse files Browse the repository at this point in the history
…le-plugin-index

[release-0.3/#227] helm: allow setting NRI plugin index via values, fix validation errors.
  • Loading branch information
fmuyassarov authored Jan 12, 2024
2 parents 8e8d5ca + 6475cf4 commit e39907b
Show file tree
Hide file tree
Showing 27 changed files with 384 additions and 138 deletions.
1 change: 1 addition & 0 deletions deployment/helm/balloons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ customize with their own values, along with the default values.
| `hostPort` | 8891 | metrics port to expose on the host |
| `config` | see [helm chart values](tree:/deployment/helm/balloons/values.yaml) for the default configuration | plugin configuration data |
| `nri.patchRuntimeConfig` | false | enable NRI in containerd or CRI-O |
| `nri.pluginIndex` | 90 | NRI plugin index to register with |
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](https://ghcr.io/containers/nri-plugins/config-manager) | init container image name |
| `initImage.tag` | unstable | init container image tag |
| `initImage.pullPolicy` | Always | init container image pull policy |
Expand Down
2 changes: 2 additions & 0 deletions deployment/helm/balloons/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ spec:
- /tmp/nri-resource-policy.pid
- -metrics-interval
- 5s
- --nri-plugin-index
- "{{ printf "%02d" .Values.nri.pluginIndex }}"
ports:
- containerPort: 8891
protocol: TCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,25 @@
"type": "object",
"required": [
"name",
"tag",
"pullPolicy"
],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
},
"pullPolicy": {
"type": "string",
"enum": ["Never", "Always", "IfNotPresent"]
}
}
},
"initContainerImage": {
"type": "object",
"required": [
"name",
"pullPolicy"
],
"properties": {
Expand Down Expand Up @@ -41,8 +59,28 @@
}
}
},
"nri": {
"type": "object",
"required": [
"patchRuntimeConfig",
"pluginIndex"
],
"properties": {
"patchRuntimeConfig": {
"type": "boolean"
},
"pluginIndex": {
"type": "integer",
"minimum": 0,
"maximum": 99
}
}
},
"hostPort": {
"type": "integer"
},
"podPriorityClassNodeCritical": {
"type": "boolean"
}
}
}
1 change: 1 addition & 0 deletions deployment/helm/balloons/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ resources:

nri:
patchRuntimeConfig: false
pluginIndex: 90

initContainerImage:
name: ghcr.io/containers/nri-plugins/nri-config-manager
Expand Down
1 change: 1 addition & 0 deletions deployment/helm/memory-qos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ customize with their own values, along with the default values.
| `resources.cpu` | 10m | cpu resources for the Pod |
| `resources.memory` | 100Mi | memory qouta for the |
| `nri.patchRuntimeConfig` | false | enable NRI in containerd or CRI-O |
| `nri.pluginIndex` | 40 | NRI plugin index to register with |
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](https://ghcr.io/containers/nri-plugins/config-manager) | init container image name |
| `initImage.tag` | unstable | init container image tag |
| `initImage.pullPolicy` | Always | init container image pull policy |
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/memory-qos/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
command:
- nri-memory-qos
- --idx
- "40"
- "{{ printf "%02d" .Values.nri.pluginIndex }}"
- --config
- /etc/nri/memory-qos/config.yaml
- -v
Expand Down
82 changes: 82 additions & 0 deletions deployment/helm/memory-qos/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"$schema": "http://json-schema.org/schema#",
"required": [
"image",
"resources"
],
"properties": {
"image": {
"type": "object",
"required": [
"name",
"pullPolicy"
],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
},
"pullPolicy": {
"type": "string",
"enum": ["Never", "Always", "IfNotPresent"]
}
}
},
"initContainerImage": {
"type": "object",
"required": [
"name",
"pullPolicy"
],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
},
"pullPolicy": {
"type": "string",
"enum": ["Never", "Always", "IfNotPresent"]
}
}
},
"resources": {
"type": "object",
"required": [
"cpu",
"memory"
],
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
}
},
"nri": {
"type": "object",
"required": [
"patchRuntimeConfig",
"pluginIndex"
],
"properties": {
"patchRuntimeConfig": {
"type": "boolean"
},
"pluginIndex": {
"type": "integer",
"minimum": 0,
"maximum": 99
}
}
},
"podPriorityClassNodeCritical": {
"type": "boolean"
}
}
}
44 changes: 0 additions & 44 deletions deployment/helm/memory-qos/values.scheme.json

This file was deleted.

1 change: 1 addition & 0 deletions deployment/helm/memory-qos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resources:

nri:
patchRuntimeConfig: false
pluginIndex: 40

initContainerImage:
name: ghcr.io/containers/nri-plugins/nri-config-manager
Expand Down
1 change: 1 addition & 0 deletions deployment/helm/memtierd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ customize with their own values, along with the default values.
| `resources.memory` | 100Mi | memory qouta for the |
| `outputDir` | empty string | host directory for memtierd.output files |
| `nri.patchRuntimeConfig` | false | enable NRI in containerd or CRI-O |
| `nri.pluginIndex` | 45 | NRI plugin index to register with |
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](https://ghcr.io/containers/nri-plugins/config-manager) | init container image name |
| `initImage.tag` | unstable | init container image tag |
| `initImage.pullPolicy` | Always | init container image pull policy |
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/memtierd/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
command:
- nri-memtierd
- --idx
- "45"
- "{{ printf "%02d" .Values.nri.pluginIndex }}"
- --config
- /etc/nri/memtierd/config.yaml
{{- if .Values.outputDir }}
Expand Down
82 changes: 82 additions & 0 deletions deployment/helm/memtierd/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"$schema": "http://json-schema.org/schema#",
"required": [
"image",
"resources"
],
"properties": {
"image": {
"type": "object",
"required": [
"name",
"pullPolicy"
],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
},
"pullPolicy": {
"type": "string",
"enum": ["Never", "Always", "IfNotPresent"]
}
}
},
"initContainerImage": {
"type": "object",
"required": [
"name",
"pullPolicy"
],
"properties": {
"name": {
"type": "string"
},
"tag": {
"type": "string"
},
"pullPolicy": {
"type": "string",
"enum": ["Never", "Always", "IfNotPresent"]
}
}
},
"resources": {
"type": "object",
"required": [
"cpu",
"memory"
],
"properties": {
"cpu": {
"type": "string"
},
"memory": {
"type": "string"
}
}
},
"nri": {
"type": "object",
"required": [
"patchRuntimeConfig",
"pluginIndex"
],
"properties": {
"patchRuntimeConfig": {
"type": "boolean"
},
"pluginIndex": {
"type": "integer",
"minimum": 0,
"maximum": 99
}
}
},
"podPriorityClassNodeCritical": {
"type": "boolean"
}
}
}
44 changes: 0 additions & 44 deletions deployment/helm/memtierd/values.scheme.json

This file was deleted.

1 change: 1 addition & 0 deletions deployment/helm/memtierd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ outputDir: ""

nri:
patchRuntimeConfig: false
pluginIndex: 45

initContainerImage:
name: ghcr.io/containers/nri-plugins/nri-config-manager
Expand Down
1 change: 1 addition & 0 deletions deployment/helm/sgx-epc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ customize with their own values, along with the default values.
| `resources.cpu` | 25m | cpu resources for the Pod |
| `resources.memory` | 100Mi | memory qouta for the |
| `nri.patchRuntimeConfig` | false | enable NRI in containerd or CRI-O |
| `nri.pluginIndex` | 40 | NRI plugin index to register with |
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](https://ghcr.io/containers/nri-plugins/config-manager) | init container image name |
| `initImage.tag` | unstable | init container image tag |
| `initImage.pullPolicy` | Always | init container image pull policy |
Expand Down
Loading

0 comments on commit e39907b

Please sign in to comment.