diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellclusters.yaml index e96a05f2..d228a444 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellclusters.yaml @@ -1,8 +1,10 @@ + +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.9 + controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null name: tinkerbellclusters.infrastructure.cluster.x-k8s.io spec: @@ -17,44 +19,35 @@ spec: - name: v1alpha3 schema: openAPIV3Schema: - description: TinkerbellCluster is the Schema for the tinkerbellclusters API + description: TinkerbellCluster is the Schema for the tinkerbellclusters API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: - description: TinkerbellClusterSpec defines the desired state of TinkerbellCluster + description: 'TinkerbellClusterSpec defines the desired state of TinkerbellCluster INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run "make" to regenerate code after modifying this file.' properties: - hardwareDiscoveryStrategy: - description: Currently there is only one strategy implemented - and it is the default one. Discovery uses the two list of - hardware IDs specified. Other way will come in the future - like 'all' will get random hardware IDs from all Tinkerbell - type: string controlPlaneHardwareIDs: - description: A list of hardware ID from tinkerbell that will be - used to deploy Kubernetes control planes to - type: array + description: ControlPlaneHardwareIDs contains a list of hardware IDs used as pool for control plane kubernetes instances. items: type: string - machineHardwareIDs: - description: A list of hardware ID from tinkerbell that will be - used to deploy Kubernetes data plane type: array + hardwareDiscoveryStrategy: + description: HardwareDiscoveryStrategy is a switch we have to implement more advacned discovery strategy. The unique one we have today is the default one obviously and it uses the two lists of hardware IDs specified down here. + type: string + machineHardwareIDs: + description: MachineHardwareIDs contains a list of hardware IDs used as pool for data plane kubernetes instances. items: type: string + type: array type: object status: - description: TinkerbellClusterStatus defines the observed state of TinkerbellCluster + description: TinkerbellClusterStatus defines the observed state of TinkerbellCluster. properties: ready: description: Ready denotes that the cluster (infrastructure) is ready. diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachines.yaml index 5fa3f11c..e9d4bbfe 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachines.yaml @@ -1,8 +1,10 @@ + +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.9 + controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null name: tinkerbellmachines.infrastructure.cluster.x-k8s.io spec: @@ -40,26 +42,24 @@ spec: name: v1alpha3 schema: openAPIV3Schema: - description: TinkerbellMachine is the Schema for the tinkerbellmachines API + description: TinkerbellMachine is the Schema for the tinkerbellmachines API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: - description: TinkerbellMachineSpec defines the desired state of TinkerbellMachine + description: TinkerbellMachineSpec defines the desired state of TinkerbellMachine. properties: + hardwareReservationID: + type: string type: object status: - description: TinkerbellMachineStatus defines the observed state of TinkerbellMachine + description: TinkerbellMachineStatus defines the observed state of TinkerbellMachine. properties: addresses: description: Addresses contains the Tinkerbell device associated addresses. @@ -70,8 +70,7 @@ spec: description: The node address. type: string type: - description: Node address type, one of Hostname, ExternalIP - or InternalIP. + description: Node address type, one of Hostname, ExternalIP or InternalIP. type: string required: - address @@ -79,25 +78,14 @@ spec: type: object type: array errorMessage: - description: "ErrorMessage will be set in the event that there is - a terminal problem reconciling the Machine and will contain a more - verbose string suitable for logging and human consumption. \n This - field should not be set for transitive errors that a controller - faces that are expected to be fixed automatically over time (like - service outages), but instead indicate that something is fundamentally - wrong with the Machine's spec or the configuration of the controller, - and that manual intervention is required. Examples of terminal errors - would be invalid combinations of settings in the spec, values that - are unsupported by the controller, or the responsible controller - itself being critically misconfigured. \n Any transient errors that - occur during the reconciliation of Machines can be added as events - to the Machine object and/or logged in the controller's output." + description: "ErrorMessage will be set in the event that there is a terminal problem reconciling the Machine and will contain a more verbose string suitable for logging and human consumption. \n This field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured. \n Any transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output." type: string errorReason: - description: Any transient errors that occur during the reconciliation - of Machines can be added as events to the Machine object and/or - logged in the controller's output. + description: Any transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output. type: string + instanceStatus: + description: InstanceStatus is the status of the Tinkerbell device instance for this machine. + type: integer ready: description: Ready is true when the provider resource is ready. type: boolean diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachinetemplates.yaml index 314cd559..89e73c8e 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachinetemplates.yaml @@ -1,8 +1,10 @@ + +--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.2.9 + controller-gen.kubebuilder.io/version: v0.4.1 creationTimestamp: null name: tinkerbellmachinetemplates.infrastructure.cluster.x-k8s.io spec: @@ -19,33 +21,27 @@ spec: - name: v1alpha3 schema: openAPIV3Schema: - description: TinkerbellMachineTemplate is the Schema for the tinkerbellmachinetemplates - API + description: TinkerbellMachineTemplate is the Schema for the tinkerbellmachinetemplates API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: - description: TinkerbellMachineTemplateSpec defines the desired state of - TinkerbellMachineTemplate + description: TinkerbellMachineTemplateSpec defines the desired state of TinkerbellMachineTemplate. properties: template: - description: TinkerbellMachineTemplateResource describes the data - needed to create am TinkerbellMachine from a template + description: TinkerbellMachineTemplateResource describes the data needed to create am TinkerbellMachine from a template. properties: spec: - description: Spec is the specification of the desired behavior - of the machine. + description: Spec is the specification of the desired behavior of the machine. properties: + hardwareReservationID: + type: string type: object required: - spec diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index fb825ca9..0678e910 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,4 +1,4 @@ -namespace: cluster-api-provider-tinkerbell-system +namespace: capt-system resources: - namespace.yaml - credentials.yaml diff --git a/config/kustomization.yaml b/config/kustomization.yaml index 006e9aaf..937c840e 100644 --- a/config/kustomization.yaml +++ b/config/kustomization.yaml @@ -3,7 +3,7 @@ # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: cluster-api-provider-tinkerbell- +namePrefix: capt- # Labels to add to all resources and selectors. commonLabels: cluster.x-k8s.io/provider: infrastructure-tinkerbell diff --git a/config/managerless/kustomization.yaml b/config/managerless/kustomization.yaml index 6585e670..060d9c58 100644 --- a/config/managerless/kustomization.yaml +++ b/config/managerless/kustomization.yaml @@ -1,11 +1,11 @@ # Adds namespace to all resources. -namespace: cluster-api-provider-tinkerbell-system +namespace: capt-system # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: cluster-api-provider-tinkerbell- +namePrefix: capt- # Labels to add to all resources and selectors. commonLabels: cluster.x-k8s.io/provider: infrastructure-tinkerbell diff --git a/config/rbac/packetcluster_editor_role.yaml b/config/rbac/packetcluster_editor_role.yaml deleted file mode 100644 index 51bc7148..00000000 --- a/config/rbac/packetcluster_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit packetclusters. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: packetcluster-editor-role -rules: -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetclusters/status - verbs: - - get diff --git a/config/rbac/packetcluster_viewer_role.yaml b/config/rbac/packetcluster_viewer_role.yaml deleted file mode 100644 index 88235713..00000000 --- a/config/rbac/packetcluster_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view packetclusters. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: packetcluster-viewer-role -rules: -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetclusters - verbs: - - get - - list - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetclusters/status - verbs: - - get diff --git a/config/rbac/packetmachine_editor_role.yaml b/config/rbac/packetmachine_editor_role.yaml deleted file mode 100644 index c3cf0043..00000000 --- a/config/rbac/packetmachine_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit packetmachines. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: packetmachine-editor-role -rules: -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetmachines - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetmachines/status - verbs: - - get diff --git a/config/rbac/packetmachine_viewer_role.yaml b/config/rbac/packetmachine_viewer_role.yaml deleted file mode 100644 index c353a8ac..00000000 --- a/config/rbac/packetmachine_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view packetmachines. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: packetmachine-viewer-role -rules: -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetmachines - verbs: - - get - - list - - watch -- apiGroups: - - infrastructure.cluster.x-k8s.io - resources: - - packetmachines/status - verbs: - - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index cbf64a35..94432f28 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,3 +1,5 @@ + +--- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -33,7 +35,7 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: - - packetclusters + - tinkerbellclusters verbs: - create - delete @@ -45,7 +47,7 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: - - packetclusters/status + - tinkerbellclusters/status verbs: - get - patch @@ -53,7 +55,7 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: - - packetmachines + - tinkerbellmachines verbs: - create - delete @@ -65,7 +67,7 @@ rules: - apiGroups: - infrastructure.cluster.x-k8s.io resources: - - packetmachines/status + - tinkerbellmachines/status verbs: - get - patch