Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm: add an option to set tolerations #157

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions deployment/helm/balloons/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ spec:
labels:
{{- include "balloons-plugin.labels" . | nindent 8 }}
spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccount: nri-resource-policy-balloons
nodeSelector:
kubernetes.io/os: "linux"
Expand Down
9 changes: 9 additions & 0 deletions deployment/helm/balloons/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,12 @@ initContainerImage:
# If not defined Chart.AppVersion will be used
#tag: unstable
pullPolicy: Always

tolerations: []
#
# Example:
#
# tolerations:
# - key: "node-role.kubernetes.io/control-plane"
# operator: "Exists"
# effect: "NoSchedule"
4 changes: 4 additions & 0 deletions deployment/helm/memory-qos/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ spec:
labels:
{{- include "memory-qos.labels" . | nindent 8 }}
spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
nodeSelector:
kubernetes.io/os: "linux"
{{- if .Values.nri.patchRuntimeConfig }}
Expand Down
9 changes: 9 additions & 0 deletions deployment/helm/memory-qos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ initContainerImage:
# If not defined Chart.AppVersion will be used
#tag: unstable
pullPolicy: Always

tolerations: []
#
# Example:
#
# tolerations:
# - key: "node-role.kubernetes.io/control-plane"
# operator: "Exists"
# effect: "NoSchedule"
4 changes: 4 additions & 0 deletions deployment/helm/memtierd/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ spec:
labels:
{{- include "memtierd.labels" . | nindent 8 }}
spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
nodeSelector:
kubernetes.io/os: "linux"
hostPID: true
Expand Down
9 changes: 9 additions & 0 deletions deployment/helm/memtierd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ initContainerImage:
# If not defined Chart.AppVersion will be used
#tag: unstable
pullPolicy: Always

tolerations: []
#
# Example:
#
# tolerations:
# - key: "node-role.kubernetes.io/control-plane"
# operator: "Exists"
# effect: "NoSchedule"
4 changes: 4 additions & 0 deletions deployment/helm/topology-aware/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ spec:
labels:
{{- include "topology-aware-plugin.labels" . | nindent 8 }}
spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccount: nri-resource-policy-topology-aware
nodeSelector:
kubernetes.io/os: "linux"
Expand Down
9 changes: 9 additions & 0 deletions deployment/helm/topology-aware/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ initContainerImage:
# If not defined Chart.AppVersion will be used
#tag: unstable
pullPolicy: Always

tolerations: []
#
# Example:
#
# tolerations:
# - key: "node-role.kubernetes.io/control-plane"
# operator: "Exists"
# effect: "NoSchedule"
28 changes: 25 additions & 3 deletions docs/resource-policy/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,30 @@ following components: DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-r
1. Install the plugin. Replace release version with the desired version. If you wish to
provide custom values to the Helm chart, refer to the [table](#helm-parameters) below,
which describes the available parameters that can be modified before installation.
It's important to note that specifying the namespace (using `--namespace` or `-n`) is
crucial when installing the Helm chart. If no namespace is specified, the manifests
will be installed in the default namespace.
Parameters can be specified either using the --set option or through the -f flag along
with the custom values.yaml file. It's important to note that specifying the namespace
(using `--namespace` or `-n`) is crucial when installing the Helm chart. If no namespace
is specified, the manifests will be installed in the default namespace.

```sh
# Install the topology-aware plugin with default values
helm install topology-aware nri-plugins/nri-resource-policy-topology-aware --namespace kube-system

# Install the topology-aware plugin with custom values provided using the --set option
helm install topology-aware nri-plugins/nri-resource-policy-topology-aware --namespace kube-system --set nri.patchRuntimeConfig=true

# Install the topology-aware plugin with custom values specified in a custom values.yaml file
cat <<EOF > myPath/values.yaml
nri:
patchRuntimeConfig: true

tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
EOF

helm install topology-aware nri-plugins/nri-resource-policy-topology-aware --namespace kube-system -f myPath/values.yaml
```

The helm repository is named `nri-plugins`, and in step 1, you have the
Expand Down Expand Up @@ -122,6 +140,7 @@ Path to the chart: `nri-resource-policy-topology-aware`
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](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 |
| `tolerations` | [] | specify taint toleration key, operator and effect |

#### Balloons

Expand All @@ -140,6 +159,7 @@ Path to the chart: `nri-resource-policy-balloons`
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](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 |
| `tolerations` | [] | specify taint toleration key, operator and effect |

#### Memtierd

Expand All @@ -157,6 +177,7 @@ Path to the chart: `nri-memtierd`
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](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 |
| `tolerations` | [] | specify taint toleration key, operator and effect |


#### Memory-qos
Expand All @@ -174,6 +195,7 @@ Path to the chart: `nri-memory-qos`
| `initImage.name` | [ghcr.io/containers/nri-plugins/config-manager](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 |
| `tolerations` | [] | specify taint toleration key, operator and effect |


## Manual installation
Expand Down