-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sebastian Hoß <[email protected]>
- Loading branch information
Showing
17 changed files
with
2,222 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crd-catalog/aws/karpenter-provider-aws/karpenter.k8s.aws/v1beta1/ec2nodeclasses.args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--derive=PartialEq |
377 changes: 377 additions & 0 deletions
377
crd-catalog/aws/karpenter-provider-aws/karpenter.k8s.aws/v1beta1/ec2nodeclasses.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
crd-catalog/aws/karpenter-provider-aws/karpenter.sh/v1beta1/nodeclaims.args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--derive=PartialEq |
365 changes: 365 additions & 0 deletions
365
crd-catalog/aws/karpenter-provider-aws/karpenter.sh/v1beta1/nodeclaims.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
crd-catalog/aws/karpenter-provider-aws/karpenter.sh/v1beta1/nodepools.args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--derive=PartialEq |
414 changes: 414 additions & 0 deletions
414
crd-catalog/aws/karpenter-provider-aws/karpenter.sh/v1beta1/nodepools.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod v1beta1; |
459 changes: 459 additions & 0 deletions
459
kube-custom-resources-rs/src/karpenter_k8s_aws/v1beta1/ec2nodeclasses.rs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod ec2nodeclasses; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod v1beta1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod nodeclaims; | ||
pub mod nodepools; |
250 changes: 250 additions & 0 deletions
250
kube-custom-resources-rs/src/karpenter_sh/v1beta1/nodeclaims.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,250 @@ | ||
// WARNING: generated by kopium - manual changes will be overwritten | ||
// kopium command: kopium --docs --filename=./crd-catalog/aws/karpenter-provider-aws/karpenter.sh/v1beta1/nodeclaims.yaml --derive=PartialEq | ||
// kopium version: 0.16.5 | ||
|
||
use kube::CustomResource; | ||
use serde::{Serialize, Deserialize}; | ||
use std::collections::BTreeMap; | ||
use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString; | ||
|
||
/// NodeClaimSpec describes the desired state of the NodeClaim | ||
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
#[kube(group = "karpenter.sh", version = "v1beta1", kind = "NodeClaim", plural = "nodeclaims")] | ||
#[kube(status = "NodeClaimStatus")] | ||
#[kube(schema = "disabled")] | ||
pub struct NodeClaimSpec { | ||
/// Kubelet defines args to be used when configuring kubelet on provisioned nodes. | ||
/// They are a subset of the upstream types, recognizing not all options may be supported. | ||
/// Wherever possible, the types and names should reflect the upstream kubelet types. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub kubelet: Option<NodeClaimKubelet>, | ||
/// NodeClassRef is a reference to an object that defines provider specific configuration | ||
#[serde(rename = "nodeClassRef")] | ||
pub node_class_ref: NodeClaimNodeClassRef, | ||
/// Requirements are layered with GetLabels and applied to every node. | ||
pub requirements: Vec<NodeClaimRequirements>, | ||
/// Resources models the resource requirements for the NodeClaim to launch | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub resources: Option<NodeClaimResources>, | ||
/// StartupTaints are taints that are applied to nodes upon startup which are expected to be removed automatically | ||
/// within a short period of time, typically by a DaemonSet that tolerates the taint. These are commonly used by | ||
/// daemonsets to allow initialization and enforce startup ordering. StartupTaints are ignored for provisioning | ||
/// purposes in that pods are not required to tolerate a StartupTaint in order to have nodes provisioned for them. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "startupTaints")] | ||
pub startup_taints: Option<Vec<NodeClaimStartupTaints>>, | ||
/// Taints will be applied to the NodeClaim's node. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub taints: Option<Vec<NodeClaimTaints>>, | ||
} | ||
|
||
/// Kubelet defines args to be used when configuring kubelet on provisioned nodes. | ||
/// They are a subset of the upstream types, recognizing not all options may be supported. | ||
/// Wherever possible, the types and names should reflect the upstream kubelet types. | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimKubelet { | ||
/// clusterDNS is a list of IP addresses for the cluster DNS server. | ||
/// Note that not all providers may use all addresses. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterDNS")] | ||
pub cluster_dns: Option<Vec<String>>, | ||
/// CPUCFSQuota enables CPU CFS quota enforcement for containers that specify CPU limits. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cpuCFSQuota")] | ||
pub cpu_cfs_quota: Option<bool>, | ||
/// EvictionHard is the map of signal names to quantities that define hard eviction thresholds | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "evictionHard")] | ||
pub eviction_hard: Option<BTreeMap<String, String>>, | ||
/// EvictionMaxPodGracePeriod is the maximum allowed grace period (in seconds) to use when terminating pods in | ||
/// response to soft eviction thresholds being met. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "evictionMaxPodGracePeriod")] | ||
pub eviction_max_pod_grace_period: Option<i32>, | ||
/// EvictionSoft is the map of signal names to quantities that define soft eviction thresholds | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "evictionSoft")] | ||
pub eviction_soft: Option<BTreeMap<String, String>>, | ||
/// EvictionSoftGracePeriod is the map of signal names to quantities that define grace periods for each eviction signal | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "evictionSoftGracePeriod")] | ||
pub eviction_soft_grace_period: Option<BTreeMap<String, String>>, | ||
/// ImageGCHighThresholdPercent is the percent of disk usage after which image | ||
/// garbage collection is always run. The percent is calculated by dividing this | ||
/// field value by 100, so this field must be between 0 and 100, inclusive. | ||
/// When specified, the value must be greater than ImageGCLowThresholdPercent. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imageGCHighThresholdPercent")] | ||
pub image_gc_high_threshold_percent: Option<i32>, | ||
/// ImageGCLowThresholdPercent is the percent of disk usage before which image | ||
/// garbage collection is never run. Lowest disk usage to garbage collect to. | ||
/// The percent is calculated by dividing this field value by 100, | ||
/// so the field value must be between 0 and 100, inclusive. | ||
/// When specified, the value must be less than imageGCHighThresholdPercent | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imageGCLowThresholdPercent")] | ||
pub image_gc_low_threshold_percent: Option<i32>, | ||
/// KubeReserved contains resources reserved for Kubernetes system components. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "kubeReserved")] | ||
pub kube_reserved: Option<BTreeMap<String, IntOrString>>, | ||
/// MaxPods is an override for the maximum number of pods that can run on | ||
/// a worker node instance. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "maxPods")] | ||
pub max_pods: Option<i32>, | ||
/// PodsPerCore is an override for the number of pods that can run on a worker node | ||
/// instance based on the number of cpu cores. This value cannot exceed MaxPods, so, if | ||
/// MaxPods is a lower value, that value will be used. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podsPerCore")] | ||
pub pods_per_core: Option<i32>, | ||
/// SystemReserved contains resources reserved for OS system daemons and kernel memory. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "systemReserved")] | ||
pub system_reserved: Option<BTreeMap<String, IntOrString>>, | ||
} | ||
|
||
/// NodeClassRef is a reference to an object that defines provider specific configuration | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimNodeClassRef { | ||
/// API version of the referent | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] | ||
pub api_version: Option<String>, | ||
/// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub kind: Option<String>, | ||
/// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names | ||
pub name: String, | ||
} | ||
|
||
/// A node selector requirement is a selector that contains values, a key, and an operator | ||
/// that relates the key and values. | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimRequirements { | ||
/// The label key that the selector applies to. | ||
pub key: String, | ||
/// Represents a key's relationship to a set of values. | ||
/// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. | ||
pub operator: NodeClaimRequirementsOperator, | ||
/// An array of string values. If the operator is In or NotIn, | ||
/// the values array must be non-empty. If the operator is Exists or DoesNotExist, | ||
/// the values array must be empty. If the operator is Gt or Lt, the values | ||
/// array must have a single element, which will be interpreted as an integer. | ||
/// This array is replaced during a strategic merge patch. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub values: Option<Vec<String>>, | ||
} | ||
|
||
/// A node selector requirement is a selector that contains values, a key, and an operator | ||
/// that relates the key and values. | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub enum NodeClaimRequirementsOperator { | ||
In, | ||
NotIn, | ||
Exists, | ||
DoesNotExist, | ||
Gt, | ||
Lt, | ||
} | ||
|
||
/// Resources models the resource requirements for the NodeClaim to launch | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimResources { | ||
/// Requests describes the minimum required resources for the NodeClaim to launch | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub requests: Option<BTreeMap<String, IntOrString>>, | ||
} | ||
|
||
/// The node this Taint is attached to has the "effect" on | ||
/// any pod that does not tolerate the Taint. | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimStartupTaints { | ||
/// Required. The effect of the taint on pods | ||
/// that do not tolerate the taint. | ||
/// Valid effects are NoSchedule, PreferNoSchedule and NoExecute. | ||
pub effect: NodeClaimStartupTaintsEffect, | ||
/// Required. The taint key to be applied to a node. | ||
pub key: String, | ||
/// TimeAdded represents the time at which the taint was added. | ||
/// It is only written for NoExecute taints. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "timeAdded")] | ||
pub time_added: Option<String>, | ||
/// The taint value corresponding to the taint key. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub value: Option<String>, | ||
} | ||
|
||
/// The node this Taint is attached to has the "effect" on | ||
/// any pod that does not tolerate the Taint. | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub enum NodeClaimStartupTaintsEffect { | ||
NoSchedule, | ||
PreferNoSchedule, | ||
NoExecute, | ||
} | ||
|
||
/// The node this Taint is attached to has the "effect" on | ||
/// any pod that does not tolerate the Taint. | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimTaints { | ||
/// Required. The effect of the taint on pods | ||
/// that do not tolerate the taint. | ||
/// Valid effects are NoSchedule, PreferNoSchedule and NoExecute. | ||
pub effect: NodeClaimTaintsEffect, | ||
/// Required. The taint key to be applied to a node. | ||
pub key: String, | ||
/// TimeAdded represents the time at which the taint was added. | ||
/// It is only written for NoExecute taints. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "timeAdded")] | ||
pub time_added: Option<String>, | ||
/// The taint value corresponding to the taint key. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub value: Option<String>, | ||
} | ||
|
||
/// The node this Taint is attached to has the "effect" on | ||
/// any pod that does not tolerate the Taint. | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub enum NodeClaimTaintsEffect { | ||
NoSchedule, | ||
PreferNoSchedule, | ||
NoExecute, | ||
} | ||
|
||
/// NodeClaimStatus defines the observed state of NodeClaim | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimStatus { | ||
/// Allocatable is the estimated allocatable capacity of the node | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub allocatable: Option<BTreeMap<String, IntOrString>>, | ||
/// Capacity is the estimated full capacity of the node | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub capacity: Option<BTreeMap<String, IntOrString>>, | ||
/// Conditions contains signals for health and readiness | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub conditions: Option<Vec<NodeClaimStatusConditions>>, | ||
/// ImageID is an identifier for the image that runs on the node | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imageID")] | ||
pub image_id: Option<String>, | ||
/// NodeName is the name of the corresponding node object | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeName")] | ||
pub node_name: Option<String>, | ||
/// ProviderID of the corresponding node object | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "providerID")] | ||
pub provider_id: Option<String>, | ||
} | ||
|
||
/// Condition defines a readiness condition for a Knative resource. | ||
/// See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties | ||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
pub struct NodeClaimStatusConditions { | ||
/// LastTransitionTime is the last time the condition transitioned from one status to another. | ||
/// We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic | ||
/// differences (all other things held constant). | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "lastTransitionTime")] | ||
pub last_transition_time: Option<String>, | ||
/// A human readable message indicating details about the transition. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub message: Option<String>, | ||
/// The reason for the condition's last transition. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub reason: Option<String>, | ||
/// Severity with which to treat failures of this type of condition. | ||
/// When this is not specified, it defaults to Error. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub severity: Option<String>, | ||
/// Status of the condition, one of True, False, Unknown. | ||
pub status: String, | ||
/// Type of condition. | ||
#[serde(rename = "type")] | ||
pub r#type: String, | ||
} | ||
|
Oops, something went wrong.