Skip to content

Commit

Permalink
Merge pull request #94 from helen-frank/cleanup/replace
Browse files Browse the repository at this point in the history
cleanup: alibabacloud replace alicloud
  • Loading branch information
jwcesign authored Nov 6, 2024
2 parents 7b86f2f + 10a8c9b commit 932bc7a
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -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

---
Expand All @@ -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**:
Expand All @@ -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:
- Others:
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/CLEANUP.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
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

---
<!-- Please only use this template for submitting clean up requests -->

**What would you like to be cleaned**:

**Why is this needed**:
**Why is this needed**:
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/ENHANCEMENT.md
Original file line number Diff line number Diff line change
@@ -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

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -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

---
12 changes: 6 additions & 6 deletions config/components/crds/karpenter.sh_nodeclaims.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions config/components/crds/karpenter.sh_nodepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down Expand Up @@ -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: |-
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions examples/nodepool/nodepool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ spec:
operator: In
values: ["spot"]
nodeClassRef:
group: "karpenter.k8s.alicloud"
group: "karpenter.k8s.alibabacloud"
kind: ECSNodeClass
name: defaultnodeclass
---
---

2 changes: 1 addition & 1 deletion pkg/apis/v1alpha1/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 932bc7a

Please sign in to comment.