-
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: Feruzjon Muyassarov <[email protected]>
- Loading branch information
1 parent
ced32fb
commit 7b01334
Showing
22 changed files
with
935 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
deployment/helm/resource-management-policies/balloons/Chart.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,11 @@ | ||
apiVersion: v2 | ||
appVersion: main | ||
description: | | ||
The balloons NRI resource policy plugin implements workload placement into | ||
“balloons” that are disjoint CPU pools. | ||
name: nri-resource-policy-balloons | ||
sources: | ||
- https://github.com/containers/nri-plugins | ||
home: https://github.com/containers/nri-plugins | ||
type: application | ||
version: 0.0.0 |
270 changes: 270 additions & 0 deletions
270
deployment/helm/resource-management-policies/balloons/crds/noderesourcetopology.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,270 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
api-approved.kubernetes.io: https://github.com/kubernetes/enhancements/pull/1870 | ||
controller-gen.kubebuilder.io/version: v0.11.2 | ||
creationTimestamp: null | ||
name: noderesourcetopologies.topology.node.k8s.io | ||
spec: | ||
group: topology.node.k8s.io | ||
names: | ||
kind: NodeResourceTopology | ||
listKind: NodeResourceTopologyList | ||
plural: noderesourcetopologies | ||
shortNames: | ||
- node-res-topo | ||
singular: noderesourcetopology | ||
scope: Cluster | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: NodeResourceTopology describes node resources and their topology. | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
topologyPolicies: | ||
items: | ||
type: string | ||
type: array | ||
zones: | ||
description: ZoneList contains an array of Zone objects. | ||
items: | ||
description: Zone represents a resource topology zone, e.g. socket, | ||
node, die or core. | ||
properties: | ||
attributes: | ||
description: AttributeList contains an array of AttributeInfo objects. | ||
items: | ||
description: AttributeInfo contains one attribute of a Zone. | ||
properties: | ||
name: | ||
type: string | ||
value: | ||
type: string | ||
required: | ||
- name | ||
- value | ||
type: object | ||
type: array | ||
costs: | ||
description: CostList contains an array of CostInfo objects. | ||
items: | ||
description: CostInfo describes the cost (or distance) between | ||
two Zones. | ||
properties: | ||
name: | ||
type: string | ||
value: | ||
format: int64 | ||
type: integer | ||
required: | ||
- name | ||
- value | ||
type: object | ||
type: array | ||
name: | ||
type: string | ||
parent: | ||
type: string | ||
resources: | ||
description: ResourceInfoList contains an array of ResourceInfo | ||
objects. | ||
items: | ||
description: ResourceInfo contains information about one resource | ||
type. | ||
properties: | ||
allocatable: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
description: Allocatable quantity of the resource, corresponding | ||
to allocatable in node status, i.e. total amount of this | ||
resource available to be used by pods. | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
available: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
description: Available is the amount of this resource currently | ||
available for new (to be scheduled) pods, i.e. Allocatable | ||
minus the resources reserved by currently running pods. | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
capacity: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
description: Capacity of the resource, corresponding to capacity | ||
in node status, i.e. total amount of this resource that | ||
the node has. | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
name: | ||
description: Name of the resource. | ||
type: string | ||
required: | ||
- allocatable | ||
- available | ||
- capacity | ||
- name | ||
type: object | ||
type: array | ||
type: | ||
type: string | ||
required: | ||
- name | ||
- type | ||
type: object | ||
type: array | ||
required: | ||
- topologyPolicies | ||
- zones | ||
type: object | ||
served: true | ||
storage: false | ||
- name: v1alpha2 | ||
schema: | ||
openAPIV3Schema: | ||
description: NodeResourceTopology describes node resources and their topology. | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
attributes: | ||
description: AttributeList contains an array of AttributeInfo objects. | ||
items: | ||
description: AttributeInfo contains one attribute of a Zone. | ||
properties: | ||
name: | ||
type: string | ||
value: | ||
type: string | ||
required: | ||
- name | ||
- value | ||
type: object | ||
type: array | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
topologyPolicies: | ||
description: 'DEPRECATED (to be removed in v1beta1): use top level attributes | ||
if needed' | ||
items: | ||
type: string | ||
type: array | ||
zones: | ||
description: ZoneList contains an array of Zone objects. | ||
items: | ||
description: Zone represents a resource topology zone, e.g. socket, | ||
node, die or core. | ||
properties: | ||
attributes: | ||
description: AttributeList contains an array of AttributeInfo objects. | ||
items: | ||
description: AttributeInfo contains one attribute of a Zone. | ||
properties: | ||
name: | ||
type: string | ||
value: | ||
type: string | ||
required: | ||
- name | ||
- value | ||
type: object | ||
type: array | ||
costs: | ||
description: CostList contains an array of CostInfo objects. | ||
items: | ||
description: CostInfo describes the cost (or distance) between | ||
two Zones. | ||
properties: | ||
name: | ||
type: string | ||
value: | ||
format: int64 | ||
type: integer | ||
required: | ||
- name | ||
- value | ||
type: object | ||
type: array | ||
name: | ||
type: string | ||
parent: | ||
type: string | ||
resources: | ||
description: ResourceInfoList contains an array of ResourceInfo | ||
objects. | ||
items: | ||
description: ResourceInfo contains information about one resource | ||
type. | ||
properties: | ||
allocatable: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
description: Allocatable quantity of the resource, corresponding | ||
to allocatable in node status, i.e. total amount of this | ||
resource available to be used by pods. | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
available: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
description: Available is the amount of this resource currently | ||
available for new (to be scheduled) pods, i.e. Allocatable | ||
minus the resources reserved by currently running pods. | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
capacity: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
description: Capacity of the resource, corresponding to capacity | ||
in node status, i.e. total amount of this resource that | ||
the node has. | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
name: | ||
description: Name of the resource. | ||
type: string | ||
required: | ||
- allocatable | ||
- available | ||
- capacity | ||
- name | ||
type: object | ||
type: array | ||
type: | ||
type: string | ||
required: | ||
- name | ||
- type | ||
type: object | ||
type: array | ||
required: | ||
- zones | ||
type: object | ||
served: true | ||
storage: true |
8 changes: 8 additions & 0 deletions
8
deployment/helm/resource-management-policies/balloons/templates/_helpers.tpl
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 @@ | ||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "nri-plugins.labels" -}} | ||
app: nri-resource-policy-balloons | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} |
22 changes: 22 additions & 0 deletions
22
deployment/helm/resource-management-policies/balloons/templates/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,22 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: nri-resource-policy-balloons | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- get | ||
- watch | ||
- apiGroups: | ||
- topology.node.k8s.io | ||
resources: | ||
- noderesourcetopologies | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- update | ||
- delete |
12 changes: 12 additions & 0 deletions
12
deployment/helm/resource-management-policies/balloons/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-balloons | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: nri-resource-policy-balloons | ||
subjects: | ||
- kind: ServiceAccount | ||
name: nri-resource-policy-balloons | ||
namespace: {{ .Values.namespace }} |
8 changes: 8 additions & 0 deletions
8
deployment/helm/resource-management-policies/balloons/templates/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,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nri-resource-policy-config.default | ||
namespace: {{ .Values.namespace }} | ||
data: | ||
policy: |+ | ||
{{- toYaml .Values.config | nindent 4 }} |
Oops, something went wrong.