diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md index a7b1d2a5..4640cf05 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -1,6 +1,6 @@ --- name: Bug Report -about: Report a bug encountered while using Karpenter-provider-alicloud +about: Report a bug encountered while using Karpenter-provider-alibabacloud labels: kind/bug --- @@ -10,7 +10,6 @@ labels: kind/bug If the matter is security related, please email to admin@cloudpilot.ai --> - **What happened**: **What you expected to happen**: @@ -20,6 +19,7 @@ If the matter is security related, please email to admin@cloudpilot.ai **Anything else we need to know?**: **Environment**: -- Karpenter-provider-alicloud version (use `git describe --tags --dirty --always`): + +- Karpenter-provider-alibabacloud version (use `git describe --tags --dirty --always`): - AliCloud ACK version: -- Others: \ No newline at end of file +- Others: diff --git a/.github/ISSUE_TEMPLATE/CLEANUP.md b/.github/ISSUE_TEMPLATE/CLEANUP.md index 37276eab..fb064768 100644 --- a/.github/ISSUE_TEMPLATE/CLEANUP.md +++ b/.github/ISSUE_TEMPLATE/CLEANUP.md @@ -1,6 +1,6 @@ --- name: Clean Up Request -about: Suggest to clean up code, process or tech debt to the Karpenter-provider-alicloud project +about: Suggest to clean up code, process or tech debt to the Karpenter-provider-alibabacloud project labels: kind/cleanup --- @@ -8,4 +8,4 @@ labels: kind/cleanup **What would you like to be cleaned**: -**Why is this needed**: \ No newline at end of file +**Why is this needed**: diff --git a/.github/ISSUE_TEMPLATE/ENHANCEMENT.md b/.github/ISSUE_TEMPLATE/ENHANCEMENT.md index 66ac7db1..22d193f0 100644 --- a/.github/ISSUE_TEMPLATE/ENHANCEMENT.md +++ b/.github/ISSUE_TEMPLATE/ENHANCEMENT.md @@ -1,6 +1,6 @@ --- name: Enhancement Request -about: Suggest an enhancement to the Karpenter-provider-alicloud project +about: Suggest an enhancement to the Karpenter-provider-alibabacloud project labels: kind/feature --- diff --git a/.github/ISSUE_TEMPLATE/SUPPORT.md b/.github/ISSUE_TEMPLATE/SUPPORT.md index 9cd5f148..6cf5e371 100644 --- a/.github/ISSUE_TEMPLATE/SUPPORT.md +++ b/.github/ISSUE_TEMPLATE/SUPPORT.md @@ -1,6 +1,6 @@ --- name: Support Request -about: Support request or question relating to Karpenter-provider-alicloud +about: Support request or question relating to Karpenter-provider-alibabacloud labels: kind/support --- diff --git a/config/components/crds/karpenter.sh_nodeclaims.yaml b/config/components/crds/karpenter.sh_nodeclaims.yaml index 4f027b84..98a6cc86 100644 --- a/config/components/crds/karpenter.sh_nodeclaims.yaml +++ b/config/components/crds/karpenter.sh_nodeclaims.yaml @@ -92,7 +92,7 @@ spec: description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' type: string name: - description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' + description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names" type: string required: - group @@ -120,8 +120,8 @@ spec: rule: self in ["karpenter.sh/capacity-type", "karpenter.sh/nodepool"] || !self.find("^([^/]+)").endsWith("karpenter.sh") - message: label "kubernetes.io/hostname" is restricted rule: self != "kubernetes.io/hostname" - - message: label domain "karpenter.k8s.alicloud" is restricted - rule: self in ["karpenter.k8s.alicloud/instance-encryption-in-transit-supported", "karpenter.k8s.alicloud/instance-category", "karpenter.k8s.alicloud/instance-hypervisor", "karpenter.k8s.alicloud/instance-family", "karpenter.k8s.alicloud/instance-generation", "karpenter.k8s.alicloud/instance-local-nvme", "karpenter.k8s.alicloud/instance-size", "karpenter.k8s.alicloud/instance-cpu","karpenter.k8s.alicloud/instance-cpu-manufacturer","karpenter.k8s.alicloud/instance-memory", "karpenter.k8s.alicloud/instance-ebs-bandwidth", "karpenter.k8s.alicloud/instance-network-bandwidth", "karpenter.k8s.alicloud/instance-gpu-name", "karpenter.k8s.alicloud/instance-gpu-manufacturer", "karpenter.k8s.alicloud/instance-gpu-count", "karpenter.k8s.alicloud/instance-gpu-memory", "karpenter.k8s.alicloud/instance-accelerator-name", "karpenter.k8s.alicloud/instance-accelerator-manufacturer", "karpenter.k8s.alicloud/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.alicloud") + - message: label domain "karpenter.k8s.alibabacloud" is restricted + rule: self in ["karpenter.k8s.alibabacloud/instance-encryption-in-transit-supported", "karpenter.k8s.alibabacloud/instance-category", "karpenter.k8s.alibabacloud/instance-hypervisor", "karpenter.k8s.alibabacloud/instance-family", "karpenter.k8s.alibabacloud/instance-generation", "karpenter.k8s.alibabacloud/instance-local-nvme", "karpenter.k8s.alibabacloud/instance-size", "karpenter.k8s.alibabacloud/instance-cpu","karpenter.k8s.alibabacloud/instance-cpu-manufacturer","karpenter.k8s.alibabacloud/instance-memory", "karpenter.k8s.alibabacloud/instance-ebs-bandwidth", "karpenter.k8s.alibabacloud/instance-network-bandwidth", "karpenter.k8s.alibabacloud/instance-gpu-name", "karpenter.k8s.alibabacloud/instance-gpu-manufacturer", "karpenter.k8s.alibabacloud/instance-gpu-count", "karpenter.k8s.alibabacloud/instance-gpu-memory", "karpenter.k8s.alibabacloud/instance-accelerator-name", "karpenter.k8s.alibabacloud/instance-accelerator-manufacturer", "karpenter.k8s.alibabacloud/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.alibabacloud") minValues: description: |- This field is ALPHA and can be dropped or replaced at any time @@ -162,11 +162,11 @@ spec: type: array x-kubernetes-validations: - message: requirements with operator 'In' must have a value defined - rule: 'self.all(x, x.operator == ''In'' ? x.values.size() != 0 : true)' + rule: "self.all(x, x.operator == 'In' ? x.values.size() != 0 : true)" - message: requirements operator 'Gt' or 'Lt' must have a single positive integer value - rule: 'self.all(x, (x.operator == ''Gt'' || x.operator == ''Lt'') ? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)' + rule: "self.all(x, (x.operator == 'Gt' || x.operator == 'Lt') ? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)" - message: requirements with 'minValues' must have at least that many values specified in the 'values' field - rule: 'self.all(x, (x.operator == ''In'' && has(x.minValues)) ? x.values.size() >= x.minValues : true)' + rule: "self.all(x, (x.operator == 'In' && has(x.minValues)) ? x.values.size() >= x.minValues : true)" resources: description: Resources models the resource requirements for the NodeClaim to launch properties: diff --git a/config/components/crds/karpenter.sh_nodepools.yaml b/config/components/crds/karpenter.sh_nodepools.yaml index 15126b1b..6ea2e81f 100644 --- a/config/components/crds/karpenter.sh_nodepools.yaml +++ b/config/components/crds/karpenter.sh_nodepools.yaml @@ -137,7 +137,7 @@ spec: maxItems: 50 type: array x-kubernetes-validations: - - message: '''schedule'' must be set with ''duration''' + - message: "'schedule' must be set with 'duration'" rule: self.all(x, has(x.schedule) == has(x.duration)) consolidateAfter: description: |- @@ -206,8 +206,8 @@ spec: rule: self.all(x, x != "karpenter.sh/nodepool") - message: label "kubernetes.io/hostname" is restricted rule: self.all(x, x != "kubernetes.io/hostname") - - message: label domain "karpenter.k8s.alicloud" is restricted - rule: self.all(x, x in ["karpenter.k8s.alicloud/instance-encryption-in-transit-supported", "karpenter.k8s.alicloud/instance-category", "karpenter.k8s.alicloud/instance-hypervisor", "karpenter.k8s.alicloud/instance-family", "karpenter.k8s.alicloud/instance-generation", "karpenter.k8s.alicloud/instance-local-nvme", "karpenter.k8s.alicloud/instance-size", "karpenter.k8s.alicloud/instance-cpu","karpenter.k8s.alicloud/instance-cpu-manufacturer","karpenter.k8s.alicloud/instance-memory", "karpenter.k8s.alicloud/instance-ebs-bandwidth", "karpenter.k8s.alicloud/instance-network-bandwidth", "karpenter.k8s.alicloud/instance-gpu-name", "karpenter.k8s.alicloud/instance-gpu-manufacturer", "karpenter.k8s.alicloud/instance-gpu-count", "karpenter.k8s.alicloud/instance-gpu-memory", "karpenter.k8s.alicloud/instance-accelerator-name", "karpenter.k8s.alicloud/instance-accelerator-manufacturer", "karpenter.k8s.alicloud/instance-accelerator-count"] || !x.find("^([^/]+)").endsWith("karpenter.k8s.alicloud")) + - message: label domain "karpenter.k8s.alibabacloud" is restricted + rule: self.all(x, x in ["karpenter.k8s.alibabacloud/instance-encryption-in-transit-supported", "karpenter.k8s.alibabacloud/instance-category", "karpenter.k8s.alibabacloud/instance-hypervisor", "karpenter.k8s.alibabacloud/instance-family", "karpenter.k8s.alibabacloud/instance-generation", "karpenter.k8s.alibabacloud/instance-local-nvme", "karpenter.k8s.alibabacloud/instance-size", "karpenter.k8s.alibabacloud/instance-cpu","karpenter.k8s.alibabacloud/instance-cpu-manufacturer","karpenter.k8s.alibabacloud/instance-memory", "karpenter.k8s.alibabacloud/instance-ebs-bandwidth", "karpenter.k8s.alibabacloud/instance-network-bandwidth", "karpenter.k8s.alibabacloud/instance-gpu-name", "karpenter.k8s.alibabacloud/instance-gpu-manufacturer", "karpenter.k8s.alibabacloud/instance-gpu-count", "karpenter.k8s.alibabacloud/instance-gpu-memory", "karpenter.k8s.alibabacloud/instance-accelerator-name", "karpenter.k8s.alibabacloud/instance-accelerator-manufacturer", "karpenter.k8s.alibabacloud/instance-accelerator-count"] || !x.find("^([^/]+)").endsWith("karpenter.k8s.alibabacloud")) type: object spec: description: |- @@ -235,7 +235,7 @@ spec: description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' type: string name: - description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' + description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names" type: string required: - group @@ -265,8 +265,8 @@ spec: rule: self != "karpenter.sh/nodepool" - message: label "kubernetes.io/hostname" is restricted rule: self != "kubernetes.io/hostname" - - message: label domain "karpenter.k8s.alicloud" is restricted - rule: self in ["karpenter.k8s.alicloud/instance-encryption-in-transit-supported", "karpenter.k8s.alicloud/instance-category", "karpenter.k8s.alicloud/instance-hypervisor", "karpenter.k8s.alicloud/instance-family", "karpenter.k8s.alicloud/instance-generation", "karpenter.k8s.alicloud/instance-local-nvme", "karpenter.k8s.alicloud/instance-size", "karpenter.k8s.alicloud/instance-cpu","karpenter.k8s.alicloud/instance-cpu-manufacturer","karpenter.k8s.alicloud/instance-memory", "karpenter.k8s.alicloud/instance-ebs-bandwidth", "karpenter.k8s.alicloud/instance-network-bandwidth", "karpenter.k8s.alicloud/instance-gpu-name", "karpenter.k8s.alicloud/instance-gpu-manufacturer", "karpenter.k8s.alicloud/instance-gpu-count", "karpenter.k8s.alicloud/instance-gpu-memory", "karpenter.k8s.alicloud/instance-accelerator-name", "karpenter.k8s.alicloud/instance-accelerator-manufacturer", "karpenter.k8s.alicloud/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.alicloud") + - message: label domain "karpenter.k8s.alibabacloud" is restricted + rule: self in ["karpenter.k8s.alibabacloud/instance-encryption-in-transit-supported", "karpenter.k8s.alibabacloud/instance-category", "karpenter.k8s.alibabacloud/instance-hypervisor", "karpenter.k8s.alibabacloud/instance-family", "karpenter.k8s.alibabacloud/instance-generation", "karpenter.k8s.alibabacloud/instance-local-nvme", "karpenter.k8s.alibabacloud/instance-size", "karpenter.k8s.alibabacloud/instance-cpu","karpenter.k8s.alibabacloud/instance-cpu-manufacturer","karpenter.k8s.alibabacloud/instance-memory", "karpenter.k8s.alibabacloud/instance-ebs-bandwidth", "karpenter.k8s.alibabacloud/instance-network-bandwidth", "karpenter.k8s.alibabacloud/instance-gpu-name", "karpenter.k8s.alibabacloud/instance-gpu-manufacturer", "karpenter.k8s.alibabacloud/instance-gpu-count", "karpenter.k8s.alibabacloud/instance-gpu-memory", "karpenter.k8s.alibabacloud/instance-accelerator-name", "karpenter.k8s.alibabacloud/instance-accelerator-manufacturer", "karpenter.k8s.alibabacloud/instance-accelerator-count"] || !self.find("^([^/]+)").endsWith("karpenter.k8s.alibabacloud") minValues: description: |- This field is ALPHA and can be dropped or replaced at any time @@ -307,11 +307,11 @@ spec: type: array x-kubernetes-validations: - message: requirements with operator 'In' must have a value defined - rule: 'self.all(x, x.operator == ''In'' ? x.values.size() != 0 : true)' + rule: "self.all(x, x.operator == 'In' ? x.values.size() != 0 : true)" - message: requirements operator 'Gt' or 'Lt' must have a single positive integer value - rule: 'self.all(x, (x.operator == ''Gt'' || x.operator == ''Lt'') ? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)' + rule: "self.all(x, (x.operator == 'Gt' || x.operator == 'Lt') ? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)" - message: requirements with 'minValues' must have at least that many values specified in the 'values' field - rule: 'self.all(x, (x.operator == ''In'' && has(x.minValues)) ? x.values.size() >= x.minValues : true)' + rule: "self.all(x, (x.operator == 'In' && has(x.minValues)) ? x.values.size() >= x.minValues : true)" startupTaints: description: |- StartupTaints are taints that are applied to nodes upon startup which are expected to be removed automatically diff --git a/examples/nodepool/nodepool.yaml b/examples/nodepool/nodepool.yaml index a4438d3e..b839c62a 100644 --- a/examples/nodepool/nodepool.yaml +++ b/examples/nodepool/nodepool.yaml @@ -22,7 +22,8 @@ spec: operator: In values: ["spot"] nodeClassRef: - group: "karpenter.k8s.alicloud" + group: "karpenter.k8s.alibabacloud" kind: ECSNodeClass name: defaultnodeclass ---- \ No newline at end of file +--- + diff --git a/pkg/apis/v1alpha1/labels.go b/pkg/apis/v1alpha1/labels.go index 5cc19eed..56ab3bd7 100644 --- a/pkg/apis/v1alpha1/labels.go +++ b/pkg/apis/v1alpha1/labels.go @@ -78,7 +78,7 @@ var ( ECSClusterIDTagKey = "ecs:ecs-cluster-id" LabelNodeClass = apis.Group + "/ecsnodeclass" - LabelTopologyZoneID = "topology.k8s.alicloud/zone-id" + LabelTopologyZoneID = "topology.k8s.alibabacloud/zone-id" LabelInstanceCategory = apis.Group + "/instance-category" LabelInstanceFamily = apis.Group + "/instance-family" LabelInstanceGeneration = apis.Group + "/instance-generation"