You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ImageSelectorTerms is a list of or image selector terms. The terms are ORed.
46
+
// +kubebuilder:validation:XValidation:message="expected at least one, got none, ['tags', 'id', 'name', 'alias']",rule="self.all(x, has(x.tags) || has(x.id) || has(x.name) || has(x.alias))"
47
+
// +kubebuilder:validation:XValidation:message="'id' is mutually exclusive, cannot be set with a combination of other fields in imageSelectorTerms",rule="!self.exists(x, has(x.id) && (has(x.alias) || has(x.tags) || has(x.name) || has(x.owner)))"
48
+
// +kubebuilder:validation:XValidation:message="'alias' is mutually exclusive, cannot be set with a combination of other fields in imageSelectorTerms",rule="!self.exists(x, has(x.alias) && (has(x.id) || has(x.tags) || has(x.name) || has(x.owner)))"
49
+
// +kubebuilder:validation:XValidation:message="'alias' is mutually exclusive, cannot be set with a combination of other imageSelectorTerms",rule="!(self.exists(x, has(x.alias)) && self.size() != 1)"
// KubeletConfiguration defines args to be used when configuring kubelet on provisioned nodes.
42
55
// They are a subset of the upstream types, recognizing not all options may be supported.
43
56
// Wherever possible, the types and names should reflect the upstream kubelet types.
@@ -80,6 +93,38 @@ type SecurityGroupSelectorTerm struct {
80
93
Namestring`json:"name,omitempty"`
81
94
}
82
95
96
+
// ImageSelectorTerm defines selection logic for an image used by Karpenter to launch nodes.
97
+
// If multiple fields are used for selection, the requirements are ANDed.
98
+
typeImageSelectorTermstruct {
99
+
// Alias specifies which ACK image to select.
100
+
// Each alias consists of a family and an image version, specified as "family@version".
101
+
// Valid families include: aliyun3.
102
+
// Currently only supports version pinning to the latest image release, with that images version format (ex: "aliyun3@latest").
103
+
// Setting the version to latest will result in drift when a new Image is released. This is **not** recommended for production environments.
104
+
// +kubebuilder:validation:XValidation:message="'alias' is improperly formatted, must match the format 'family@version'",rule="self.matches('^[a-zA-Z0-9]*@.*$')"
105
+
// +kubebuilder:validation:XValidation:message="family is not supported, must be one of the following: 'aliyun3'",rule="self.find('^[^@]+') in ['aliyun3']"
106
+
// +kubebuilder:validation:MaxLength=30
107
+
// +optional
108
+
Aliasstring`json:"alias,omitempty"`
109
+
// Tags is a map of key/value tags used to select subsets
110
+
// Specifying '*' for a value selects all values for a given tag key.
111
+
// +kubebuilder:validation:XValidation:message="empty tag keys aren't supported",rule="self.all(k, k != '')"
112
+
// +kubebuilder:validation:MaxProperties:=20
113
+
// +optional
114
+
Tagsmap[string]string`json:"tags,omitempty"`
115
+
// ID is the image id in ECS
116
+
// +optional
117
+
IDstring`json:"id,omitempty"`
118
+
// Name is the image name in ECS.
119
+
// This value is the name field, which is different from the name tag.
120
+
// +optional
121
+
Namestring`json:"name,omitempty"`
122
+
// Owner is the image source.
123
+
// Default is system | self | public. If specified, only one of the following: "self", "system", "share", "public", and "marketplace"
124
+
// +optional
125
+
Ownerstring`json:"owner,omitempty"`
126
+
}
127
+
83
128
// KubeletConfiguration defines args to be used when configuring kubelet on provisioned nodes.
84
129
// They are a subset of the upstream types, recognizing not all options may be supported.
85
130
// Wherever possible, the types and names should reflect the upstream kubelet types.
@@ -161,10 +206,45 @@ type ECSNodeClass struct {
161
206
StatusECSNodeClassStatus`json:"status,omitempty"`
162
207
}
163
208
209
+
// ImageFamily If an alias is specified, return alias, or be 'Custom' (enforced via validation).
0 commit comments