Skip to content

Commit

Permalink
Fix balloons helm installation and add doc
Browse files Browse the repository at this point in the history
1. Add more document about balloons helm installation guide.
2. Remove the ".default" suffix from the daemonset and configmap yaml files.

Signed-off-by: Zhi Chang <[email protected]>
  • Loading branch information
Zhi Chang committed Jul 27, 2023
1 parent 66846cb commit 539cd94
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nri-resource-policy-config.default
name: nri-resource-policy-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "balloons-plugin.labels" . | nindent 4 }}
data:
policy: |+
{{- toYaml .Values.config | nindent 4 }}
nri-resource-policy.cfg: |+
policy:
{{- toYaml .Values.config | nindent 6 }}
instrumentation:
{{- toYaml .Values.instrumentation | nindent 6 }}
cpu:
{{- toYaml .Values.cpu | nindent 6 }}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
path: /var/run/nri-resource-policy
- name: resource-policyconfig
configMap:
name: nri-resource-policy-config.default
name: nri-resource-policy-config
- name: nrisockets
hostPath:
path: /var/run/nri
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,54 @@ image:
name: ghcr.io/containers/nri-plugins/nri-resource-policy-balloons
# tag, if defined will use the given image tag, otherwise Chart.AppVersion will be used
tag: unstable
pullPolicy: Always
pullPolicy: IfNotPresent

config:
Active: balloons
ReservedResources:
cpu: 750m
balloons:
PinCPU: true
PinMemory: true
BalloonTypes:
- Name: btype0
MinCPUs: 2
MaxCPUs: 2
AllocationPriority: 0
CPUClass: classA
PreferNewBalloons: true
PreferSpreadingPods: false
MinBalloons: 1
- Name: btype2
Namespaces:
- "*"
- btype2ns1
MinCPUs: 4
MaxCPUs: 8
MinBalloons: 1
AllocatorPriority: 2
CPUClass: classB
PreferNewBalloons: false
PreferSpreadingPods: false
cpu:
classes:
default:
minFreq: 1800000
maxFreq: 2800000
classA:
minFreq: 1100000
maxFreq: 1100000
classB:
minFreq: 1000000
maxFreq: 3000000
classC:
minFreq: 1100000
maxFreq: 3100000
energyPerformancePreference: 1

instrumentation:
HTTPEndpoint: :8891
PrometheusExport: true

hostPort: 8891

Expand Down
10 changes: 10 additions & 0 deletions docs/resource-policy/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ For the manual installation we will be using templating tool to generate Kuberne

That's it! You have now installed the topology-aware NRI resource policy plugin using kutomize.
Also, you can use the following **helm** command to install the NRI resource policy plugin in the **nri-plugins/deployment/helm/resource-management-policies/balloons** directory.
```
helm install balloons . --namespace kube-system
```
*Note: please specify the kube-system namespace.*
## Manual uninstallation
To uninstall plugin manifests you can run the following command:
Expand All @@ -149,3 +157,5 @@ kustomize build deployment/overlays/topology-aware/ | kubectl delete -f -
Note: this removes DaemonSet, ConfigMap, CustomResourceDefinition, and RBAC-related objects associated
with the chart.
Also, you can use the **helm uninstall balloons --namespace kube-system** to uninstall the NRI resource policy plugin.

0 comments on commit 539cd94

Please sign in to comment.