diff --git a/.github/workflows/package-helm.yaml b/.github/workflows/package-helm.yaml index ad2660a97..41882a2e8 100644 --- a/.github/workflows/package-helm.yaml +++ b/.github/workflows/package-helm.yaml @@ -24,7 +24,7 @@ jobs: run: | find "$CHARTS_DIR" -name values.yaml | xargs -I '{}' \ sed -e s"/pullPolicy:.*/pullPolicy: IfNotPresent/" -i '{}' - helm package --version "$GITHUB_REF_NAME" --app-version "$GITHUB_REF_NAME" "$CHARTS_DIR"/* + make helm-package find . -name '*.tgz' -print | while read SRC_FILE; do DEST_FILE=$(echo $SRC_FILE | sed 's/v/helm-chart-v/g') mv $SRC_FILE $DEST_FILE diff --git a/Makefile b/Makefile index f8324e482..896bd4bc1 100644 --- a/Makefile +++ b/Makefile @@ -500,19 +500,28 @@ generate-clients: $(GENERATE_GROUPS) generate-go: $(Q)$(GO_CMD) generate ./... -# rule to update generated CRDs in our helm charts -.PHONY: update-helm-crds -update-helm-crds: - $(Q)for plugin in $(PLUGINS); do \ - plugin="$${plugin#nri-}"; plugin="$${plugin#resource-policy-}"; \ - helm_dir=$(HELM_TOP_DIR)/$$plugin/crds; \ - if [ ! -d "$$helm_dir" ]; then \ - echo "No generated CRD found for $$plugin plugin..."; \ - else \ - echo "Updating Helm chart CRDs for $$plugin plugin..."; \ - cp $(CRD_BASE_DIR)/*_$${plugin//-/}*.yaml $$helm_dir; \ - fi; \ - done - # top level rule to (re)generate everything we need -generate: generate-go generate-types generate-manifests generate-clients update-helm-crds +generate: generate-go generate-types generate-manifests generate-clients + +CRD_BASE_DIR := config/crd/bases +HELM_TOP_DIR := deployment/helm + +.PHONY: helm-package +helm-package: copy-helm-crds + helm package --version $(IMAGE_VERSION) --app-version $(IMAGE_VERSION) $(HELM_TOP_DIR)/* + $(MAKE) cleanup-crds + +.PHONY: copy-helm-crds +copy-helm-crds: ## Copy CRDs root directory to helm directory for packaging. + cp $(CRD_BASE_DIR)/topology.node.k8s.io_noderesourcetopologies.yaml $(HELM_TOP_DIR)/balloons/crds + cp $(CRD_BASE_DIR)/config.nri_balloonspolicies.yaml $(HELM_TOP_DIR)/balloons/crds + cp $(CRD_BASE_DIR)/topology.node.k8s.io_noderesourcetopologies.yaml $(HELM_TOP_DIR)/template/crds + cp $(CRD_BASE_DIR)/config.nri_templatepolicies.yaml $(HELM_TOP_DIR)/template/crds + cp $(CRD_BASE_DIR)/topology.node.k8s.io_noderesourcetopologies.yaml $(HELM_TOP_DIR)/topology-aware/crds + cp $(CRD_BASE_DIR)/config.nri_topologyawarepolicies.yaml $(HELM_TOP_DIR)/topology-aware/crds + +.PHONY: cleanup-crds +cleanup-crds: ## Clean up temporarily copied CRDs. + rm -f $(HELM_TOP_DIR)/balloons/crds/* + rm -f $(HELM_TOP_DIR)/template/crds/* + rm -f $(HELM_TOP_DIR)/topology-aware/crds/* diff --git a/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml b/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml deleted file mode 100644 index e39fd0adc..000000000 --- a/deployment/helm/balloons/crds/config.nri_balloonspolicies.yaml +++ /dev/null @@ -1,349 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - name: balloonspolicies.config.nri -spec: - group: config.nri - names: - kind: BalloonsPolicy - listKind: BalloonsPolicyList - plural: balloonspolicies - singular: balloonspolicy - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: BalloonsPolicy represents the configuration for the balloons - policy. - 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 - spec: - description: BalloonsPolicySpec describes a balloons policy. - properties: - allocatorTopologyBalancing: - description: 'If AllocatorTopologyBalancing is true, balloons are - allocated and resized so that all topology elements (packages, dies, - numa nodes, cores) have roughly same amount of allocations. The - default is false: balloons are packed tightly to optimize power - efficiency. The value set here can be overridden with the balloon - type specific setting with the same name.' - type: boolean - availableResources: - additionalProperties: - type: string - description: Available/allowed (CPU) resources to use. - type: object - balloonTypes: - description: BallonDefs contains balloon type definitions. - items: - description: BalloonDef contains a balloon definition. - properties: - allocatorPriority: - default: high - description: AllocatorPriority (High, Normal, Low, None) This - parameter is passed to CPU allocator when creating or resizing - a balloon. At init, balloons with highest priority CPUs are - allocated first. - enum: - - high - - normal - - low - - none - type: string - allocatorTopologyBalancing: - description: AllocatorTopologyBalancing is the balloon type - specific parameter of the policy level parameter with the - same name. - type: boolean - cpuClass: - description: CpuClass controls how CPUs of a balloon are (re)configured - whenever a balloon is created, inflated or deflated. - type: string - maxBalloons: - description: MaxBalloons is the maximum number of balloon instances - that is allowed to co-exist. If reached, new balloons cannot - be created anymore. - type: integer - maxCPUs: - description: MaxCpus specifies the maximum number of CPUs exclusively - usable by containers in a balloon. Balloon size will not be - inflated larger than MaxCpus. - type: integer - minBalloons: - description: MinBalloons is the number of balloon instances - that always exist even if they would become empty. At init - this number of instances will be created before assigning - any containers. - type: integer - minCPUs: - description: MinCpus specifies the minimum number of CPUs exclusively - usable by containers in a balloon. When new balloon is created, - this will be the number of CPUs reserved for it even if a - container would request less. - type: integer - name: - description: Name of the balloon definition. - type: string - namespaces: - description: Namespaces control which namespaces are assigned - into balloon instances from this definition. This is used - by namespace assign methods. - items: - type: string - type: array - preferCloseToDevices: - description: 'PreferCloseToDevices: prefer creating new balloons - of this type close to listed devices.' - items: - type: string - type: array - preferNewBalloons: - description: 'PreferNewBalloons: prefer creating new balloons - over adding containers to existing balloons. The default is - false: prefer using filling free capacity and possibly inflating - existing balloons before creating new ones.' - type: boolean - preferPerNamespaceBalloon: - description: 'PreferPerNamespaceBalloon: if true, containers - in different namespaces are preferrably placed in separate - balloons, even if the balloon type is the same for all of - them. On the other hand, containers in the same namespace - will be placed in the same balloon instances. The default - is false: namespaces have no effect on placement.' - type: boolean - preferSpreadOnPhysicalCores: - description: PreferSpreadOnPhysicalCores is the balloon type - specific parameter of the policy level parameter with the - same name. - type: boolean - preferSpreadingPods: - description: 'PreferSpreadingPods: containers of the same pod - may be placed on separate balloons. The default is false: - prefer placing containers of a pod to the same balloon(s).' - type: boolean - shareIdleCPUsInSame: - description: 'ShareIdleCpusInSame : if there - are idle CPUs, that is CPUs not in any balloon, in the same - as any CPU in the balloon, then allow workloads - to run on those (shared) CPUs in addition to the (dedicated) - CPUs of the balloon.' - enum: - - "" - - system - - package - - die - - numa - - core - - thread - type: string - required: - - name - type: object - type: array - control: - properties: - cpu: - properties: - classes: - additionalProperties: - properties: - energyPerformancePreference: - description: EnergyPerformancePreference for CPUs in - this class. - type: integer - maxFreq: - description: MaxFreq is the maximum frequency for this - class. - type: integer - minFreq: - description: MinFreq is the minimum frequency for this - class. - type: integer - uncoreMaxFreq: - description: UncoreMaxFreq is the maximum uncore frequency - for this class. - type: integer - uncoreMinFreq: - description: UncoreMinFreq is the minimum uncore frequency - for this class. - type: integer - required: - - maxFreq - - minFreq - type: object - type: object - required: - - classes - type: object - type: object - idleCPUClass: - description: IdleCpuClass controls how unusded CPUs outside any a - balloons are (re)configured. - type: string - instrumentation: - description: Config provides runtime configuration for instrumentation. - properties: - httpEndpoint: - description: HTTPEndpoint is the address our HTTP server listens - on. This endpoint is used to expose Prometheus metrics among - other things. - example: :8891 - type: string - prometheusExport: - description: PrometheusExport enables exporting /metrics for Prometheus. - type: boolean - reportPeriod: - description: ReportPeriod is the interval between reporting aggregated - metrics. - format: duration - type: string - samplingRatePerMillion: - description: SamplingRatePerMillion is the number of samples to - collect per million spans. - example: 100000 - type: integer - tracingCollector: - description: 'TracingCollector defines the external endpoint for - tracing data collection. Endpoints are specified as full URLs, - or as plain URL schemes which then imply scheme-specific defaults. - The supported schemes and their default URLs are: - otlp-http, - http: localhost:4318 - otlp-grpc, grpc: localhost:4317' - example: otlp-http://localhost:4318 - type: string - type: object - log: - properties: - debug: - description: Debub turns on debug messages matching listed logger - sources. - items: - type: string - type: array - klog: - description: Klog configures the klog backend. - properties: - add_dir_header: - type: boolean - alsologtostderr: - type: boolean - log_backtrace_at: - type: string - log_dir: - type: string - log_file: - type: string - log_file_max_size: - format: int64 - type: integer - logtostderr: - type: boolean - one_output: - type: boolean - skip_headers: - type: boolean - skip_log_headers: - type: boolean - stderrthreshold: - type: string - v: - type: integer - vmodule: - type: string - type: object - source: - description: Source controls whether messages are prefixed with - their logger source. - type: boolean - type: object - pinCPU: - default: true - description: PinCPU controls pinning containers to CPUs. - type: boolean - pinMemory: - default: true - description: PinMemory controls pinning containers to memory nodes. - type: boolean - preferSpreadOnPhysicalCores: - description: 'PreferSpreadOnPhysicalCores prefers allocating logical - CPUs (possibly hyperthreads) for a balloon from separate physical - CPU cores. This prevents workloads in the balloon from interfering - with themselves as they do not compete on the resources of the same - CPU cores. On the other hand, it allows more interference between - workloads in different balloons. The default is false: balloons - are packed tightly to a minimum number of physical CPU cores. The - value set here is the default for all balloon types, but it can - be overridden with the balloon type specific setting with the same - name.' - type: boolean - reservedPoolNamespaces: - description: ReservedPoolNamespaces is a list of namespace globs that - will be allocated to reserved CPUs. - items: - type: string - type: array - reservedResources: - additionalProperties: - type: string - description: Reserved (CPU) resources for kube-system namespace. - type: object - required: - - reservedResources - type: object - status: - description: ConfigStatus is the per-node status for a configuration resource. - properties: - nodes: - additionalProperties: - description: NodeStatus is the configuration status for a single - node. - properties: - errors: - description: Error can provide further details of a configuration - error. - type: string - generation: - description: Generation is the generation the configuration - this status was set for. - format: int64 - type: integer - status: - description: Status of activating the configuration on this - node. - enum: - - Success - - Failure - type: string - timestamp: - description: Timestamp of setting this status. - format: date-time - type: string - required: - - generation - - status - type: object - type: object - required: - - nodes - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/deployment/helm/balloons/crds/noderesourcetopology.yaml b/deployment/helm/balloons/crds/noderesourcetopology.yaml deleted file mode 100644 index 3719f2c2d..000000000 --- a/deployment/helm/balloons/crds/noderesourcetopology.yaml +++ /dev/null @@ -1,270 +0,0 @@ -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 diff --git a/deployment/helm/template/crds/config.nri_templatepolicies.yaml b/deployment/helm/template/crds/config.nri_templatepolicies.yaml deleted file mode 100644 index 0e5e92d9d..000000000 --- a/deployment/helm/template/crds/config.nri_templatepolicies.yaml +++ /dev/null @@ -1,202 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - name: templatepolicies.config.nri -spec: - group: config.nri - names: - kind: TemplatePolicy - listKind: TemplatePolicyList - plural: templatepolicies - singular: templatepolicy - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: TemplatePolicy represents the configuration for the template - policy. - 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 - spec: - description: TemplatePolicySpec describes a template policy. - properties: - availableResources: - additionalProperties: - type: string - type: object - control: - properties: - cpu: - properties: - classes: - additionalProperties: - properties: - energyPerformancePreference: - description: EnergyPerformancePreference for CPUs in - this class. - type: integer - maxFreq: - description: MaxFreq is the maximum frequency for this - class. - type: integer - minFreq: - description: MinFreq is the minimum frequency for this - class. - type: integer - uncoreMaxFreq: - description: UncoreMaxFreq is the maximum uncore frequency - for this class. - type: integer - uncoreMinFreq: - description: UncoreMinFreq is the minimum uncore frequency - for this class. - type: integer - required: - - maxFreq - - minFreq - type: object - type: object - required: - - classes - type: object - type: object - instrumentation: - description: Config provides runtime configuration for instrumentation. - properties: - httpEndpoint: - description: HTTPEndpoint is the address our HTTP server listens - on. This endpoint is used to expose Prometheus metrics among - other things. - example: :8891 - type: string - prometheusExport: - description: PrometheusExport enables exporting /metrics for Prometheus. - type: boolean - reportPeriod: - description: ReportPeriod is the interval between reporting aggregated - metrics. - format: duration - type: string - samplingRatePerMillion: - description: SamplingRatePerMillion is the number of samples to - collect per million spans. - example: 100000 - type: integer - tracingCollector: - description: 'TracingCollector defines the external endpoint for - tracing data collection. Endpoints are specified as full URLs, - or as plain URL schemes which then imply scheme-specific defaults. - The supported schemes and their default URLs are: - otlp-http, - http: localhost:4318 - otlp-grpc, grpc: localhost:4317' - example: otlp-http://localhost:4318 - type: string - type: object - log: - properties: - debug: - description: Debub turns on debug messages matching listed logger - sources. - items: - type: string - type: array - klog: - description: Klog configures the klog backend. - properties: - add_dir_header: - type: boolean - alsologtostderr: - type: boolean - log_backtrace_at: - type: string - log_dir: - type: string - log_file: - type: string - log_file_max_size: - format: int64 - type: integer - logtostderr: - type: boolean - one_output: - type: boolean - skip_headers: - type: boolean - skip_log_headers: - type: boolean - stderrthreshold: - type: string - v: - type: integer - vmodule: - type: string - type: object - source: - description: Source controls whether messages are prefixed with - their logger source. - type: boolean - type: object - reservedResources: - additionalProperties: - type: string - type: object - required: - - reservedResources - type: object - status: - description: ConfigStatus is the per-node status for a configuration resource. - properties: - nodes: - additionalProperties: - description: NodeStatus is the configuration status for a single - node. - properties: - errors: - description: Error can provide further details of a configuration - error. - type: string - generation: - description: Generation is the generation the configuration - this status was set for. - format: int64 - type: integer - status: - description: Status of activating the configuration on this - node. - enum: - - Success - - Failure - type: string - timestamp: - description: Timestamp of setting this status. - format: date-time - type: string - required: - - generation - - status - type: object - type: object - required: - - nodes - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/deployment/helm/template/crds/noderesourcetopology.yaml b/deployment/helm/template/crds/noderesourcetopology.yaml deleted file mode 100644 index 3719f2c2d..000000000 --- a/deployment/helm/template/crds/noderesourcetopology.yaml +++ /dev/null @@ -1,270 +0,0 @@ -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 diff --git a/deployment/helm/topology-aware/crds/config.nri_topologyawarepolicies.yaml b/deployment/helm/topology-aware/crds/config.nri_topologyawarepolicies.yaml deleted file mode 100644 index fd40a190c..000000000 --- a/deployment/helm/topology-aware/crds/config.nri_topologyawarepolicies.yaml +++ /dev/null @@ -1,246 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - name: topologyawarepolicies.config.nri -spec: - group: config.nri - names: - kind: TopologyAwarePolicy - listKind: TopologyAwarePolicyList - plural: topologyawarepolicies - singular: topologyawarepolicy - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: TopologyAwarePolicy represents the configuration for the topology-aware - policy. - 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 - spec: - description: TopologyAwarePolicySpec describes a topology-aware policy. - properties: - availableResources: - additionalProperties: - type: string - description: AvailableResources defines the bounding set for the policy - to allocate resources from. - type: object - colocateNamespaces: - description: ColocateNamespaces controls whether an attempt is made - to allocate all containers of pods in a namespace close to each - other (to the same topology zone). - type: boolean - colocatePods: - description: ColocatePods controls whether an attempt is made to allocate - containers within the same pod close to each other (to the same - topology zone). - type: boolean - control: - properties: - cpu: - properties: - classes: - additionalProperties: - properties: - energyPerformancePreference: - description: EnergyPerformancePreference for CPUs in - this class. - type: integer - maxFreq: - description: MaxFreq is the maximum frequency for this - class. - type: integer - minFreq: - description: MinFreq is the minimum frequency for this - class. - type: integer - uncoreMaxFreq: - description: UncoreMaxFreq is the maximum uncore frequency - for this class. - type: integer - uncoreMinFreq: - description: UncoreMinFreq is the minimum uncore frequency - for this class. - type: integer - required: - - maxFreq - - minFreq - type: object - type: object - required: - - classes - type: object - type: object - instrumentation: - description: Config provides runtime configuration for instrumentation. - properties: - httpEndpoint: - description: HTTPEndpoint is the address our HTTP server listens - on. This endpoint is used to expose Prometheus metrics among - other things. - example: :8891 - type: string - prometheusExport: - description: PrometheusExport enables exporting /metrics for Prometheus. - type: boolean - reportPeriod: - description: ReportPeriod is the interval between reporting aggregated - metrics. - format: duration - type: string - samplingRatePerMillion: - description: SamplingRatePerMillion is the number of samples to - collect per million spans. - example: 100000 - type: integer - tracingCollector: - description: 'TracingCollector defines the external endpoint for - tracing data collection. Endpoints are specified as full URLs, - or as plain URL schemes which then imply scheme-specific defaults. - The supported schemes and their default URLs are: - otlp-http, - http: localhost:4318 - otlp-grpc, grpc: localhost:4317' - example: otlp-http://localhost:4318 - type: string - type: object - log: - properties: - debug: - description: Debub turns on debug messages matching listed logger - sources. - items: - type: string - type: array - klog: - description: Klog configures the klog backend. - properties: - add_dir_header: - type: boolean - alsologtostderr: - type: boolean - log_backtrace_at: - type: string - log_dir: - type: string - log_file: - type: string - log_file_max_size: - format: int64 - type: integer - logtostderr: - type: boolean - one_output: - type: boolean - skip_headers: - type: boolean - skip_log_headers: - type: boolean - stderrthreshold: - type: string - v: - type: integer - vmodule: - type: string - type: object - source: - description: Source controls whether messages are prefixed with - their logger source. - type: boolean - type: object - pinCPU: - default: true - description: PinCPU controls whether the policy pins containers to - allocated CPUs. - type: boolean - pinMemory: - default: true - description: PinMemory controls whether the policy pins containers - allocated memory nodes. - type: boolean - preferIsolatedCPUs: - default: true - description: PreferIsolated controls whether kernel-isolated CPUs - are preferred for Guaranteed QoS-class containers that request 1 - full CPU. - type: boolean - preferSharedCPUs: - description: PreferShared controls whether exclusive CPU allocation - is considered for all eligible containers. If set to trues, exclusive - CPU allocation is only considered for eligible containers which - are explicitly annotated to opt out from shared allocation. - type: boolean - reservedPoolNamespaces: - description: ReservedPoolNamespaces lists extra namespaces which are - treated like 'kube-system' (resources allocate from the reserved - pool). - items: - type: string - type: array - reservedResources: - additionalProperties: - type: string - description: ReservedResources defines the resources reserved namespaces - get assigned to. If AvailableResources is defined, ReservedResources - must be a subset of it. - type: object - required: - - reservedResources - type: object - status: - description: ConfigStatus is the per-node status for a configuration resource. - properties: - nodes: - additionalProperties: - description: NodeStatus is the configuration status for a single - node. - properties: - errors: - description: Error can provide further details of a configuration - error. - type: string - generation: - description: Generation is the generation the configuration - this status was set for. - format: int64 - type: integer - status: - description: Status of activating the configuration on this - node. - enum: - - Success - - Failure - type: string - timestamp: - description: Timestamp of setting this status. - format: date-time - type: string - required: - - generation - - status - type: object - type: object - required: - - nodes - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} diff --git a/deployment/helm/topology-aware/crds/noderesourcetopology.yaml b/deployment/helm/topology-aware/crds/noderesourcetopology.yaml deleted file mode 100644 index 3719f2c2d..000000000 --- a/deployment/helm/topology-aware/crds/noderesourcetopology.yaml +++ /dev/null @@ -1,270 +0,0 @@ -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