diff --git a/deployment/base/crds/kustomization.yaml b/deployment/base/crds/kustomization.yaml deleted file mode 100644 index d143029ae..000000000 --- a/deployment/base/crds/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- noderesourcetopology_crd.yaml diff --git a/deployment/base/crds/noderesourcetopology_crd.yaml b/deployment/base/crds/noderesourcetopology_crd.yaml deleted file mode 100644 index 3719f2c2d..000000000 --- a/deployment/base/crds/noderesourcetopology_crd.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/base/nri-resource-policy/clusterrole.yaml b/deployment/base/nri-resource-policy/clusterrole.yaml deleted file mode 100644 index 163e9313e..000000000 --- a/deployment/base/nri-resource-policy/clusterrole.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: nri-resource-policy -rules: -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - - watch -- apiGroups: - - topology.node.k8s.io - resources: - - noderesourcetopologies - verbs: - - create - - get - - list - - update - - delete diff --git a/deployment/base/nri-resource-policy/clusterrolebinding.yaml b/deployment/base/nri-resource-policy/clusterrolebinding.yaml deleted file mode 100644 index d08950fac..000000000 --- a/deployment/base/nri-resource-policy/clusterrolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: nri-resource-policy -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: nri-resource-policy -subjects: -- kind: ServiceAccount - name: nri-resource-policy - namespace: default diff --git a/deployment/base/nri-resource-policy/daemonset.yaml b/deployment/base/nri-resource-policy/daemonset.yaml deleted file mode 100644 index 076f328ac..000000000 --- a/deployment/base/nri-resource-policy/daemonset.yaml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - labels: - app: nri-resource-policy - name: nri-resource-policy - namespace: kube-system -spec: - selector: - matchLabels: - app: nri-resource-policy - template: - metadata: - labels: - app: nri-resource-policy - spec: - serviceAccount: nri-resource-policy - nodeSelector: - kubernetes.io/os: "linux" - containers: - - name: nri-resource-policy-topology-aware - args: - - --host-root - - /host - - --fallback-config - - /etc/nri-resource-policy/nri-resource-policy.cfg - - --pid-file - - /tmp/nri-resource-policy.pid - - -metrics-interval - - 5s - ports: - - containerPort: 8891 - name: metrics - protocol: TCP - hostPort: 8891 - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - image: IMAGE_PLACEHOLDER - imagePullPolicy: Always - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - resources: - requests: - cpu: 500m - memory: 512Mi - volumeMounts: - - name: resource-policydata - mountPath: /var/lib/nri-resource-policy - - name: hostsysfs - mountPath: /host/sys - - name: resource-policysockets - mountPath: /var/run/nri-resource-policy - - name: resource-policyconfig - mountPath: /etc/nri-resource-policy - - name: nrisockets - mountPath: /var/run/nri - volumes: - - name: resource-policydata - hostPath: - path: /var/lib/nri-resource-policy - type: DirectoryOrCreate - - name: hostsysfs - hostPath: - path: /sys - type: Directory - - name: resource-policysockets - hostPath: - path: /var/run/nri-resource-policy - - name: resource-policyconfig - configMap: - name: nri-resource-policy-config.default - - name: nrisockets - hostPath: - path: /var/run/nri - type: Directory diff --git a/deployment/base/nri-resource-policy/kustomization.yaml b/deployment/base/nri-resource-policy/kustomization.yaml deleted file mode 100644 index 7bf898bb6..000000000 --- a/deployment/base/nri-resource-policy/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: kube-system - -resources: -- serviceaccount.yaml -- clusterrole.yaml -- clusterrolebinding.yaml -- role.yaml -- rolebinding.yaml -- daemonset.yaml diff --git a/deployment/base/nri-resource-policy/role.yaml b/deployment/base/nri-resource-policy/role.yaml deleted file mode 100644 index 728ae6119..000000000 --- a/deployment/base/nri-resource-policy/role.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: nri-resource-policy -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - watch diff --git a/deployment/base/nri-resource-policy/rolebinding.yaml b/deployment/base/nri-resource-policy/rolebinding.yaml deleted file mode 100644 index 872e60347..000000000 --- a/deployment/base/nri-resource-policy/rolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: nri-resource-policy -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: nri-resource-policy -subjects: -- kind: ServiceAccount - name: nri-resource-policy - namespace: default diff --git a/deployment/base/nri-resource-policy/serviceaccount.yaml b/deployment/base/nri-resource-policy/serviceaccount.yaml deleted file mode 100644 index ca5a3652e..000000000 --- a/deployment/base/nri-resource-policy/serviceaccount.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: nri-resource-policy diff --git a/deployment/overlays/balloons/kustomization.yaml b/deployment/overlays/balloons/kustomization.yaml deleted file mode 100644 index ac3667ebe..000000000 --- a/deployment/overlays/balloons/kustomization.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: kube-system - -images: -- name: '*' - newName: ghcr.io/containers/nri-plugins/nri-resource-policy-balloons - newTag: unstable - -resources: -- ../../base/crds -- ../../base/nri-resource-policy -- sample-configmap.yaml - -patches: - - patch: |- - - op: replace - path: /spec/template/spec/containers/0/name - value: nri-resource-policy-balloons - target: - group: apps - version: v1 - kind: DaemonSet - labelSelector: "app=nri-resource-policy" - options: - allowNameChange: true diff --git a/deployment/overlays/balloons/sample-configmap.yaml b/deployment/overlays/balloons/sample-configmap.yaml deleted file mode 100644 index b28ce95af..000000000 --- a/deployment/overlays/balloons/sample-configmap.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: nri-resource-policy-config.default -data: - nri-resource-policy.cfg: | - policy: - ReservedResources: - cpu: 750m - # balloons: - # PinCPU: true - # PinMemory: true - # IdleCPUClass: lowpower - # BalloonTypes: - # - Name: "quad" - # MinCpus: 1 - # MaxCPUs: 4 - # CPUClass: dynamic - # Namespaces: - # - "*" - #cpu: |+ - # classes: - # lowpower: - # minFreq: 800 - # maxFreq: 800 - # dynamic: - # minFreq: 800 - # maxFreq: 3600 - # turbo: - # minFreq: 3000 - # maxFreq: 3600 - # uncoreMinFreq: 2000 - # uncoreMaxFreq: 2400 - #instrumentation: |+ - # # The balloons policy exports containers running in each balloon, - # # and cpusets of balloons. Accessible in command line: - # # curl --silent http://localhost:8891/metrics - # HTTPEndpoint: :8891 - # PrometheusExport: true - #logger: |+ - # Debug: resource-manager,cache,policy,resource-control diff --git a/deployment/overlays/memory-qos/daemonset.yaml b/deployment/overlays/memory-qos/daemonset.yaml deleted file mode 100644 index be60b4a7a..000000000 --- a/deployment/overlays/memory-qos/daemonset.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - labels: - app: nri-memory-qos - name: nri-memory-qos - namespace: kube-system -spec: - selector: - matchLabels: - app: nri-memory-qos - template: - metadata: - labels: - app: nri-memory-qos - spec: - nodeSelector: - kubernetes.io/os: "linux" - containers: - - name: nri-memory-qos - command: - - nri-memory-qos - - --idx - - "40" - - --config - - /etc/nri/memory-qos/config.yaml - - -v - image: IMAGE_PLACEHOLDER - imagePullPolicy: IfNotPresent - resources: - requests: - cpu: 10m - memory: 100Mi - volumeMounts: - - name: memory-qos-config-vol - mountPath: /etc/nri/memory-qos - - name: nri-sockets-vol - mountPath: /var/run/nri - volumes: - - name: memory-qos-config-vol - configMap: - name: nri-memory-qos-config.default - - name: nri-sockets-vol - hostPath: - path: /var/run/nri - type: Directory diff --git a/deployment/overlays/memory-qos/kustomization.yaml b/deployment/overlays/memory-qos/kustomization.yaml deleted file mode 100644 index 017af116f..000000000 --- a/deployment/overlays/memory-qos/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: kube-system - -images: -- name: '*' - newName: ghcr.io/containers/nri-plugins/nri-memory-qos - newTag: unstable - -resources: -- daemonset.yaml -- sample-configmap.yaml diff --git a/deployment/overlays/memory-qos/sample-configmap.yaml b/deployment/overlays/memory-qos/sample-configmap.yaml deleted file mode 100644 index 11bc635ea..000000000 --- a/deployment/overlays/memory-qos/sample-configmap.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: nri-memory-qos-config.default - namespace: kube-system -data: - config.yaml: | - classes: - - name: bronze - swaplimitratio: 0.5 - - name: silver - swaplimitratio: 0.2 - unifiedannotations: - - memory.swap.max - - memory.high diff --git a/deployment/overlays/memtierd/daemonset.yaml b/deployment/overlays/memtierd/daemonset.yaml deleted file mode 100644 index 7ce7f3f6a..000000000 --- a/deployment/overlays/memtierd/daemonset.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - labels: - app: nri-memtierd - name: nri-memtierd - namespace: kube-system -spec: - selector: - matchLabels: - app: nri-memtierd - template: - metadata: - labels: - app: nri-memtierd - spec: - nodeSelector: - kubernetes.io/os: "linux" - hostPID: true - containers: - - name: nri-memtierd - command: - - nri-memtierd - - --idx - - "45" - - --config - - /etc/nri/memtierd/config.yaml - - --run-dir - - /run-dir - - --cgroups-dir - - /sys/fs/cgroup - - -v - image: IMAGE_PLACEHOLDER - imagePullPolicy: IfNotPresent - resources: - requests: - cpu: 250m - memory: 100Mi - securityContext: - privileged: true - volumeMounts: - - name: memtierd-config-vol - mountPath: /etc/nri/memtierd - - name: nri-sockets-vol - mountPath: /var/run/nri - # # Uncomment to access memtierd.output files from host - # - name: run-dir-vol - # mountPath: /run-dir - - name: cgroups-vol - mountPath: /sys/fs/cgroup - - name: idlepage-vol - mountPath: /sys/kernel/mm/page_idle/bitmap - volumes: - - name: memtierd-config-vol - configMap: - name: nri-memtierd-config.default - - name: nri-sockets-vol - hostPath: - path: /var/run/nri - type: Directory - # # Uncomment to access memtierd.output files from host - # - name: run-dir-vol - # hostPath: - # path: /var/run/nri-memtierd - # type: DirectoryOrCreate - - name: cgroups-vol - hostPath: - path: /sys/fs/cgroup - type: Directory - - name: idlepage-vol - hostPath: - path: /sys/kernel/mm/page_idle/bitmap diff --git a/deployment/overlays/memtierd/kustomization.yaml b/deployment/overlays/memtierd/kustomization.yaml deleted file mode 100644 index 09af057da..000000000 --- a/deployment/overlays/memtierd/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: kube-system - -images: -- name: '*' - newName: ghcr.io/containers/nri-plugins/nri-memtierd - newTag: unstable - -resources: -- daemonset.yaml -- sample-configmap.yaml diff --git a/deployment/overlays/memtierd/sample-configmap.yaml b/deployment/overlays/memtierd/sample-configmap.yaml deleted file mode 100644 index 934997f3c..000000000 --- a/deployment/overlays/memtierd/sample-configmap.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: nri-memtierd-config.default - namespace: kube-system -data: - config.yaml: | - classes: - - name: swap-idle-data - allowswap: true - memtierdconfig: | - policy: - name: age - config: | - intervalms: 10000 - pidwatcher: - name: cgroups - config: | - cgroups: - - $CGROUP2_ABS_PATH - swapoutms: 10000 - tracker: - name: idlepage - config: | - pagesinregion: 512 - maxcountperregion: 1 - scanintervalms: 10000 - mover: - intervalms: 20 - bandwidth: 50 - - name: track-working-set-size - allowswap: false - memtierdconfig: | - policy: - name: age - config: | - intervalms: 20000 - pidwatcher: - name: cgroups - config: | - cgroups: - - $CGROUP2_ABS_PATH - tracker: - name: idlepage - config: | - pagesinregion: 512 - maxcountperregion: 1 - scanintervalms: 20000 - routines: - - name: statactions - config: | - intervalms: 60000 - intervalcommand: ["policy", "-dump", "accessed", "0,1m,30m,2h,24h,0"] - intervalcommandrunner: memtier diff --git a/deployment/overlays/topology-aware/kustomization.yaml b/deployment/overlays/topology-aware/kustomization.yaml deleted file mode 100644 index 336edbe9f..000000000 --- a/deployment/overlays/topology-aware/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: kube-system - -images: -- name: '*' - newName: ghcr.io/containers/nri-plugins/nri-resource-policy-topology-aware - newTag: unstable - -resources: -- ../../base/crds -- ../../base/nri-resource-policy -- sample-configmap.yaml diff --git a/deployment/overlays/topology-aware/sample-configmap.yaml b/deployment/overlays/topology-aware/sample-configmap.yaml deleted file mode 100644 index 3f06dd8eb..000000000 --- a/deployment/overlays/topology-aware/sample-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: nri-resource-policy-config.default -data: - nri-resource-policy.cfg: | - policy: - ReservedResources: - cpu: 750m - #topology-aware: - # PinCPU: true - # PinMemory: true - # PreferIsolatedCPUs: true - # PreferSharedCPUs: false - #logger: |+ - #Debug: resource-manager,cache,policy,resource-control diff --git a/hack/release-helper.sh b/hack/release-helper.sh index 44c420e4c..7e6f4636a 100755 --- a/hack/release-helper.sh +++ b/hack/release-helper.sh @@ -27,13 +27,6 @@ if ! [[ $version =~ ^v[0-9]+\.[0-9]+\..+$ ]]; then exit 1 fi -# Patch Kustomize -echo "Patching kustomize files" -find deployment/base deployment/overlays -name '*.yaml' | xargs -I '{}' \ - sed -E -e s",newTag:.+$,newTag: $version," \ - -e s",imagePullPolicy:.+$,imagePullPolicy: IfNotPresent," \ - -i '{}' - # Patch Helm charts echo "Patching Helm charts" find deployment/helm -name Chart.yaml | xargs -I '{}' \