-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
operator: introduce nri-plugins operator
Introduce an operator for life-cycle-management of NRI plugins. Users are expected to interact with the operator through NriPluginDeployment namespaced Custom Resource. Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com> Co-authored-by: Krisztian Litkey <krisztian.litkey@intel.com>
- Loading branch information
1 parent
c9ae08a
commit 4ab0206
Showing
58 changed files
with
2,608 additions
and
19 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
|
||
*_gendata.go | ||
/build | ||
/deployment/operator/bundle/ | ||
/build-aux | ||
/generate | ||
coverage.html | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
270 changes: 270 additions & 0 deletions
270
config/crd/bases/topology.node.k8s.io_noderesourcetopologies.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 |
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 @@ | ||
FROM fedora:latest as build | ||
ENV VERIFY_CHECKSUM=false | ||
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \ | ||
&& chmod 700 get_helm.sh && ./get_helm.sh | ||
|
||
FROM quay.io/operator-framework/ansible-operator:v1.32.0 | ||
COPY --from=build /usr/local/bin/helm /usr/local/bin/helm | ||
COPY requirements.yml ${HOME}/requirements.yml | ||
RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \ | ||
&& chmod -R ug+rwx ${HOME}/.ansible | ||
|
||
COPY watches.yaml ${HOME}/watches.yaml | ||
COPY ansible.cfg /etc/ansible/ansible.cfg | ||
COPY roles/ ${HOME}/roles/ | ||
COPY playbooks/ ${HOME}/playbooks/ |
Oops, something went wrong.