Drop initial code
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.19.0
|
||||
name: clusterblueprints.rig.appstack.io
|
||||
spec:
|
||||
group: rig.appstack.io
|
||||
names:
|
||||
kind: ClusterBlueprint
|
||||
listKind: ClusterBlueprintList
|
||||
plural: clusterblueprints
|
||||
shortNames:
|
||||
- cbp
|
||||
singular: clusterblueprint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.phase
|
||||
name: Phase
|
||||
type: string
|
||||
- jsonPath: .spec.kubernetesVersion
|
||||
name: K8s Version
|
||||
type: string
|
||||
- jsonPath: .spec.infraBlueprintRef
|
||||
name: Infra
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
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
|
||||
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
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ClusterBlueprintSpec defines the desired state of ClusterBlueprint
|
||||
properties:
|
||||
controlPlaneHA:
|
||||
description: ControlPlaneHA determines if we provision 3 CP nodes
|
||||
(true) or 1 (false).
|
||||
type: boolean
|
||||
infraBlueprintRef:
|
||||
description: |-
|
||||
InfraBlueprintRef points to the InfraBlueprint (IBP) that manages
|
||||
the quotas and provider details for this cluster.
|
||||
type: string
|
||||
kubernetesVersion:
|
||||
description: KubernetesVersion is the target RKE2/K3s version (e.g.,
|
||||
v1.28.0+rke2r1).
|
||||
type: string
|
||||
workerPools:
|
||||
description: WorkerPools is the list of worker node groups to provision.
|
||||
items:
|
||||
description: |-
|
||||
GenericPoolReq defines a request for a set of nodes with specific sizing.
|
||||
This is provider-agnostic.
|
||||
properties:
|
||||
cpuCores:
|
||||
description: CpuCores is the number of vCPUs per node.
|
||||
minimum: 1
|
||||
type: integer
|
||||
diskGb:
|
||||
description: DiskGB is the root disk size per node in Gigabytes.
|
||||
minimum: 10
|
||||
type: integer
|
||||
memoryGb:
|
||||
description: MemoryGB is the amount of RAM per node in Gigabytes.
|
||||
minimum: 1
|
||||
type: integer
|
||||
name:
|
||||
description: Name is the identifier for this node pool (e.g.
|
||||
"workers-gpu").
|
||||
type: string
|
||||
quantity:
|
||||
description: Quantity is the number of nodes desired.
|
||||
minimum: 0
|
||||
type: integer
|
||||
required:
|
||||
- cpuCores
|
||||
- diskGb
|
||||
- memoryGb
|
||||
- name
|
||||
- quantity
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- infraBlueprintRef
|
||||
- kubernetesVersion
|
||||
type: object
|
||||
status:
|
||||
description: ClusterBlueprintStatus defines the observed state of ClusterBlueprint
|
||||
properties:
|
||||
identity:
|
||||
description: Identity tracks the cloud credentials generated for this
|
||||
cluster.
|
||||
properties:
|
||||
secretRef:
|
||||
description: SecretRef is the name of the generated secret used
|
||||
by this cluster.
|
||||
type: string
|
||||
serviceAccount:
|
||||
description: ServiceAccount is the name of the SA created on the
|
||||
provider (if applicable).
|
||||
type: string
|
||||
type: object
|
||||
phase:
|
||||
description: Phase can be "Pending", "Provisioning", "Deployed", or
|
||||
"Failed"
|
||||
type: string
|
||||
ready:
|
||||
description: Ready indicates if the Helm Chart has been successfully
|
||||
applied.
|
||||
type: boolean
|
||||
required:
|
||||
- ready
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -0,0 +1,82 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.19.0
|
||||
name: harvesterblueprints.rig.appstack.io
|
||||
spec:
|
||||
group: rig.appstack.io
|
||||
names:
|
||||
kind: HarvesterBlueprint
|
||||
listKind: HarvesterBlueprintList
|
||||
plural: harvesterblueprints
|
||||
shortNames:
|
||||
- hbp
|
||||
singular: harvesterblueprint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
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
|
||||
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
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: HarvesterBlueprintSpec defines the desired state of HarvesterBlueprint
|
||||
properties:
|
||||
harvesterUrl:
|
||||
description: |-
|
||||
HarvesterURL is the endpoint of the Harvester cluster (e.g. https://10.x.x.x:6443).
|
||||
This replaces the need for auto-discovery.
|
||||
type: string
|
||||
imageName:
|
||||
description: ImageName is the specific image name in Harvester to
|
||||
clone (e.g. image-abcde).
|
||||
type: string
|
||||
networkName:
|
||||
description: NetworkName is the VM Network to attach to the nodes.
|
||||
type: string
|
||||
sshUser:
|
||||
description: SshUser is the username to configure on the VM (e.g.
|
||||
ubuntu, rancher).
|
||||
type: string
|
||||
vmNamespace:
|
||||
description: VmNamespace is the namespace in Harvester where VMs will
|
||||
be created.
|
||||
type: string
|
||||
required:
|
||||
- harvesterUrl
|
||||
- imageName
|
||||
- networkName
|
||||
- sshUser
|
||||
- vmNamespace
|
||||
type: object
|
||||
status:
|
||||
description: HarvesterBlueprintStatus defines the observed state of HarvesterBlueprint
|
||||
properties:
|
||||
ready:
|
||||
description: Ready indicates the configuration is valid (optional
|
||||
future use)
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -0,0 +1,146 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.19.0
|
||||
name: infrablueprints.rig.appstack.io
|
||||
spec:
|
||||
group: rig.appstack.io
|
||||
names:
|
||||
kind: InfraBlueprint
|
||||
listKind: InfraBlueprintList
|
||||
plural: infrablueprints
|
||||
shortNames:
|
||||
- ibp
|
||||
singular: infrablueprint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .spec.quota.maxCpu
|
||||
name: MaxCPU
|
||||
type: integer
|
||||
- jsonPath: .status.usage.usedCpu
|
||||
name: UsedCPU
|
||||
type: integer
|
||||
- jsonPath: .spec.quota.maxMemoryGb
|
||||
name: MaxMem(GB)
|
||||
type: integer
|
||||
- jsonPath: .status.usage.usedMemoryGb
|
||||
name: UsedMem(GB)
|
||||
type: integer
|
||||
- jsonPath: .spec.quota.maxDiskGb
|
||||
name: MaxDisk(GB)
|
||||
type: integer
|
||||
- jsonPath: .status.usage.usedDiskGb
|
||||
name: UsedDisk(GB)
|
||||
type: integer
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
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
|
||||
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
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: InfraBlueprintSpec defines the desired state of InfraBlueprint
|
||||
properties:
|
||||
cloudCredentialSecret:
|
||||
description: |-
|
||||
CloudCredentialSecret is the name of the Secret containing the
|
||||
master cloud credentials (e.g., kubeconfig or username/password).
|
||||
type: string
|
||||
providerRef:
|
||||
description: ProviderRef points to the technical configuration (HarvesterBlueprint/VsphereBlueprint).
|
||||
properties:
|
||||
apiGroup:
|
||||
description: APIGroup defaults to rig.appstack.io if not specified
|
||||
type: string
|
||||
kind:
|
||||
description: Kind is the type of resource being referenced (e.g.,
|
||||
HarvesterBlueprint)
|
||||
type: string
|
||||
name:
|
||||
description: Name is the name of resource being referenced
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
quota:
|
||||
description: Quota defines the maximum resources allocatable by this
|
||||
Infra.
|
||||
properties:
|
||||
maxCpu:
|
||||
description: MaxCPU is the total number of cores allowed across
|
||||
all clusters
|
||||
type: integer
|
||||
maxDiskGb:
|
||||
description: MaxDiskGB is the total Storage (in GB) allowed across
|
||||
all clusters
|
||||
type: integer
|
||||
maxMemoryGb:
|
||||
description: MaxMemoryGB is the total RAM (in GB) allowed across
|
||||
all clusters
|
||||
type: integer
|
||||
type: object
|
||||
rancherUrl:
|
||||
description: |-
|
||||
RancherURL is the public URL of the Rancher Manager (e.g. https://rancher.example.com)
|
||||
This is injected into the Helm Chart to register the cluster.
|
||||
type: string
|
||||
userData:
|
||||
description: UserData is the default cloud-init user data for all
|
||||
clusters in this Infra.
|
||||
type: string
|
||||
required:
|
||||
- cloudCredentialSecret
|
||||
- providerRef
|
||||
- rancherUrl
|
||||
type: object
|
||||
status:
|
||||
description: InfraBlueprintStatus defines the observed state of InfraBlueprint
|
||||
properties:
|
||||
ready:
|
||||
description: Ready indicates the provider connection is verified
|
||||
type: boolean
|
||||
usage:
|
||||
description: Usage tracks the current resource consumption
|
||||
properties:
|
||||
usedCpu:
|
||||
description: UsedCPU is the sum of cores currently provisioned
|
||||
type: integer
|
||||
usedDiskGb:
|
||||
description: UsedDiskGB tracks storage consumption
|
||||
type: integer
|
||||
usedMemoryGb:
|
||||
description: UsedMemoryGB is the sum of RAM currently provisioned
|
||||
type: integer
|
||||
required:
|
||||
- usedCpu
|
||||
- usedDiskGb
|
||||
- usedMemoryGb
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.19.0
|
||||
name: vsphereblueprints.rig.appstack.io
|
||||
spec:
|
||||
group: rig.appstack.io
|
||||
names:
|
||||
kind: VsphereBlueprint
|
||||
listKind: VsphereBlueprintList
|
||||
plural: vsphereblueprints
|
||||
shortNames:
|
||||
- vbp
|
||||
singular: vsphereblueprint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VsphereBlueprint is the Schema for the vsphereblueprints 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
|
||||
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
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: VsphereBlueprintSpec defines the desired state of VsphereBlueprint
|
||||
properties:
|
||||
datacenter:
|
||||
description: Datacenter name (e.g. NL001)
|
||||
type: string
|
||||
datastore:
|
||||
description: DatastoreCluster or Datastore name (e.g. "NL001 Development
|
||||
- Rancher SDRS")
|
||||
type: string
|
||||
folder:
|
||||
description: Folder path where VMs will be organized (e.g. "ICT Digitalisation
|
||||
- Rancher")
|
||||
type: string
|
||||
network:
|
||||
description: Network name to attach to (e.g. "nl001.vDS.Distri.Vlan.1542")
|
||||
type: string
|
||||
resourcePool:
|
||||
description: ResourcePool path (e.g. "NL001 Development - Rancher/Resources")
|
||||
type: string
|
||||
template:
|
||||
description: Template is the VM template name to clone from
|
||||
type: string
|
||||
vCenter:
|
||||
description: vCenter address (e.g. vcenter.example.com)
|
||||
type: string
|
||||
required:
|
||||
- datacenter
|
||||
- datastore
|
||||
- folder
|
||||
- network
|
||||
- resourcePool
|
||||
- template
|
||||
- vCenter
|
||||
type: object
|
||||
status:
|
||||
description: VsphereBlueprintStatus defines the observed state
|
||||
properties:
|
||||
ready:
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
Reference in New Issue
Block a user