Skip to content

Commit

Permalink
Implement KThreesControlPlaneTemplateResourceSpec and KThreesControlP…
Browse files Browse the repository at this point in the history
…laneMachineTemplate

Signed-off-by: Andrea Mazzotti <[email protected]>
  • Loading branch information
anmazzotti committed Jan 4, 2024
1 parent cf92eff commit 139aa67
Show file tree
Hide file tree
Showing 12 changed files with 595 additions and 190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,46 +67,6 @@ spec:
spec:
description: KThreesControlPlaneSpec defines the desired state of KThreesControlPlane.
properties:
infrastructureTemplate:
description: InfrastructureTemplate is a required reference to a custom
resource offered by an infrastructure provider. In the next API
version we will move this into the `KThreesControlPlaneMachineTemplate`
struct. See https://github.com/cluster-api-provider-k3s/cluster-api-k3s/issues/62
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
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: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
x-kubernetes-map-type: atomic
kthreesConfigSpec:
description: KThreesConfigSpec is a KThreesConfigSpec to use for initializing
and joining machines to the control plane.
Expand Down Expand Up @@ -294,6 +254,44 @@ spec:
description: MachineTemplate contains information about how machines
should be shaped when creating or updating a control plane.
properties:
infrastructureRef:
description: InfrastructureRef is a required reference to a custom
resource offered by an infrastructure provider.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a valid
JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part
of an object. TODO: this design is not final and this field
is subject to change in the future.'
type: string
kind:
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: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
x-kubernetes-map-type: atomic
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
properties:
Expand All @@ -315,14 +313,16 @@ spec:
More info: http://kubernetes.io/docs/user-guide/labels'
type: object
type: object
nodeDrainTimeout:
description: 'NodeDrainTimeout is the total amount of time that
the controller will spend on draining a controlplane node The
default value is 0, meaning that the node can be drained without
any time limitations. NOTE: NodeDrainTimeout is different from
`kubectl drain --timeout`'
type: string
required:
- infrastructureRef
type: object
nodeDrainTimeout:
description: 'NodeDrainTimeout is the total amount of time that the
controller will spend on draining a controlplane node The default
value is 0, meaning that the node can be drained without any time
limitations. NOTE: NodeDrainTimeout is different from `kubectl drain
--timeout`'
type: string
remediationStrategy:
description: The RemediationStrategy that controls how control plane
machine remediation happens.
Expand Down Expand Up @@ -384,7 +384,6 @@ spec:
description: Version defines the desired Kubernetes version.
type: string
required:
- infrastructureTemplate
- version
type: object
status:
Expand Down
Loading

0 comments on commit 139aa67

Please sign in to comment.