Skip to content

Commit

Permalink
Merge pull request #120 from peng19940915/main
Browse files Browse the repository at this point in the history
add resource group id
  • Loading branch information
jwcesign authored Nov 12, 2024
2 parents e93177f + 23e64ae commit f2ed819
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apis/v1alpha1/ecsnodeclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ type ECSNodeClassSpec struct {
// +kubebuilder:validation:XValidation:message="tag contains a restricted tag matching karpenter.k8s.alibabacloud/ecsnodeclass",rule="self.all(k, k !='karpenter.k8s.alibabacloud/ecsnodeclass')"
// +optional
Tags map[string]string `json:"tags,omitempty"`
// ResourceGroupID is the resource group id in ECS
// +kubebuilder:validation:Pattern:="rg-[0-9a-z]+"
// +optional
ResourceGroupID string `json:"resourceGroupId,omitempty"`
}

// VSwitchSelectorTerm defines selection logic for a vSwitch used by Karpenter to launch nodes.
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ func (p *DefaultProvider) getProvisioningGroup(ctx context.Context, nodeClass *v

// TODO: AutoProvisioningGroup is not compatible with SecurityGroupIds, waiting for Aliyun developers to fix it,
// so here we only take the first one.
ResourceGroupId: tea.String(nodeClass.Spec.ResourceGroupID),
SecurityGroupId: securityGroupIDs[0],
SystemDiskSize: systemDisk.Size,
SystemDiskPerformanceLevel: systemDisk.PerformanceLevel,
Expand Down

0 comments on commit f2ed819

Please sign in to comment.