Skip to content

Commit

Permalink
Merge pull request #21 from Leaseweb/develop
Browse files Browse the repository at this point in the history
Develop -> main
  • Loading branch information
hrak authored Jul 16, 2024
2 parents 655c562 + 47c1a95 commit 5488f5a
Show file tree
Hide file tree
Showing 31 changed files with 707 additions and 505 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SETUP_ENVTEST_BIN := setup-envtest
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest

CONTROLLER_GEN_VER := v0.12.0
CONTROLLER_GEN_VER := v0.14.0
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen
Expand Down Expand Up @@ -301,7 +301,7 @@ delete-kind-cluster:
kind delete cluster --name $(KIND_CLUSTER_NAME)

cluster-api: ## Clone cluster-api repository for tilt use.
git clone --branch v1.5.7 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git
git clone --branch v1.5.8 --depth 1 https://github.com/kubernetes-sigs/cluster-api.git

cluster-api/tilt-settings.json: hack/tilt-settings.json cluster-api
cp ./hack/tilt-settings.json cluster-api
Expand Down
1 change: 0 additions & 1 deletion api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion api/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion api/v1beta3/cloudstackaffinitygroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ type CloudStackAffinityGroupSpec struct {
ID string `json:"id,omitempty"`

// FailureDomainName -- the name of the FailureDomain the machine is placed in.
// +optional
//+optional
FailureDomainName string `json:"failureDomainName,omitempty"`
}

// CloudStackAffinityGroupStatus defines the observed state of CloudStackAffinityGroup
type CloudStackAffinityGroupStatus struct {
// Reflects the readiness of the CS Affinity Group.
//+optional
Ready bool `json:"ready"`
}

Expand Down
3 changes: 2 additions & 1 deletion api/v1beta3/cloudstackcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ type CloudStackClusterSpec struct {
type CloudStackClusterStatus struct {
// CAPI recognizes failure domains as a method to spread machines.
// CAPC sets failure domains to indicate functioning CloudStackFailureDomains.
// +optional
//+optional
FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`

// Reflects the readiness of the CS cluster.
//+optional
Ready bool `json:"ready"`
}

Expand Down
9 changes: 5 additions & 4 deletions api/v1beta3/cloudstackfailuredomain_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const (

type Network struct {
// Cloudstack Network ID the cluster is built in.
// +optional
//+optional
ID string `json:"id,omitempty"`

// Cloudstack Network Type the cluster is built in.
// +optional
//+optional
Type string `json:"type,omitempty"`

// Cloudstack Network Name the cluster is built in.
Expand Down Expand Up @@ -82,11 +82,11 @@ type CloudStackFailureDomainSpec struct {
Zone CloudStackZoneSpec `json:"zone"`

// CloudStack account.
// +optional
//+optional
Account string `json:"account,omitempty"`

// CloudStack domain.
// +optional
//+optional
Domain string `json:"domain,omitempty"`

// Apache CloudStack Endpoint secret reference.
Expand All @@ -96,6 +96,7 @@ type CloudStackFailureDomainSpec struct {
// CloudStackFailureDomainStatus defines the observed state of CloudStackFailureDomain
type CloudStackFailureDomainStatus struct {
// Reflects the readiness of the CloudStack Failure Domain.
//+optional
Ready bool `json:"ready"`
}

Expand Down
1 change: 1 addition & 0 deletions api/v1beta3/cloudstackisolatednetwork_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type CloudStackIsolatedNetworkStatus struct {
LBRuleID string `json:"loadBalancerRuleID,omitempty"`

// Ready indicates the readiness of this provider resource.
//+optional
Ready bool `json:"ready"`
}

Expand Down
31 changes: 16 additions & 15 deletions api/v1beta3/cloudstackmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,42 @@ type CloudStackMachineSpec struct {
Template CloudStackResourceIdentifier `json:"template"`

// CloudStack disk offering to use.
// +optional
//+optional
DiskOffering *CloudStackResourceDiskOffering `json:"diskOffering,omitempty"`

// CloudStack ssh key to use.
// +optional
//+optional
SSHKey string `json:"sshKey"`

// Optional details map for deployVirtualMachine
Details map[string]string `json:"details,omitempty"`

// Optional affinitygroupids for deployVirtualMachine
// +optional
//+optional
AffinityGroupIDs []string `json:"affinityGroupIDs,omitempty"`

// Mutually exclusive parameter with AffinityGroupIDs.
// Defaults to `no`. Can be `pro` or `anti`. Will create an affinity group per machine set.
// +optional
//+optional
Affinity string `json:"affinity,omitempty"`

// Mutually exclusive parameter with AffinityGroupIDs.
// Is a reference to a CloudStack affinity group CRD.
// +optional
//+optional
AffinityGroupRef *corev1.ObjectReference `json:"cloudstackAffinityRef,omitempty"`

// The CS specific unique identifier. Of the form: fmt.Sprintf("cloudstack:///%s", CS Machine ID)
// +optional
//+optional
ProviderID *string `json:"providerID,omitempty"`

// FailureDomainName -- the name of the FailureDomain the machine is placed in.
// +optional
//+optional
FailureDomainName string `json:"failureDomainName,omitempty"`

// UncompressedUserData specifies whether the user data is gzip-compressed.
// cloud-init has built-in support for gzip-compressed user data, ignition does not
//
// +optional
//+optional
UncompressedUserData *bool `json:"uncompressedUserData,omitempty"`
}

Expand All @@ -99,18 +99,18 @@ func (c *CloudStackMachine) CompressUserdata() bool {

type CloudStackResourceIdentifier struct {
// Cloudstack resource ID.
// +optional
//+optional
ID string `json:"id,omitempty"`

// Cloudstack resource Name
// +optional
//+optional
Name string `json:"name,omitempty"`
}

type CloudStackResourceDiskOffering struct {
CloudStackResourceIdentifier `json:",inline"`
// Desired disk size. Used if disk offering is customizable as indicated by the ACS field 'Custom Disk Size'.
// +optional
//+optional
CustomSize int64 `json:"customSizeInGB"`
// mount point the data disk uses to mount. The actual partition, mkfs and mount are done by cloud-init generated by kubeadmConfig.
MountPath string `json:"mountPath"`
Expand All @@ -128,22 +128,23 @@ type CloudStackMachineStatus struct {
Addresses []corev1.NodeAddress `json:"addresses,omitempty"`

// InstanceState is the state of the CloudStack instance for this machine.
// +optional
//+optional
InstanceState string `json:"instanceState,omitempty"`

// InstanceStateLastUpdated is the time the instance state was last updated.
// +optional
//+optional
InstanceStateLastUpdated metav1.Time `json:"instanceStateLastUpdated,omitempty"`

// Ready indicates the readiness of the provider resource.
//+optional
Ready bool `json:"ready"`

// Status indicates the status of the provider resource.
// +optional
//+optional
Status *string `json:"status,omitempty"`

// Reason indicates the reason of status failure
// +optional
//+optional
Reason *string `json:"reason,omitempty"`
}

Expand Down
1 change: 1 addition & 0 deletions api/v1beta3/cloudstackmachinestatechecker_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type CloudStackMachineStateCheckerSpec struct {
// CloudStackMachineStateCheckerStatus defines the observed state of CloudStackMachineStateChecker
type CloudStackMachineStateCheckerStatus struct {
// Reflects the readiness of the Machine State Checker.
//+optional
Ready bool `json:"ready"`
}

Expand Down
2 changes: 1 addition & 1 deletion api/v1beta3/cloudstackmachinetemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
type CloudStackMachineTemplateResource struct {
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
//+optional
ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`

// Spec is the specification of a desired behavior of the machine
Expand Down
1 change: 0 additions & 1 deletion api/v1beta3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.14.0
name: cloudstackaffinitygroups.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand All @@ -21,14 +21,19 @@ spec:
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
Expand All @@ -43,10 +48,9 @@ spec:
description: Name.
type: string
type:
description: Mutually exclusive parameter with AffinityGroupIDs. Can
be "host affinity", "host anti-affinity", "non-strict host affinity"or
"non-strict host anti-affinity". Will create an affinity group per
machine set.
description: |-
Mutually exclusive parameter with AffinityGroupIDs.
Can be "host affinity", "host anti-affinity", "non-strict host affinity"or "non-strict host anti-affinity". Will create an affinity group per machine set.
type: string
type: object
status:
Expand All @@ -71,14 +75,19 @@ spec:
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
Expand All @@ -97,9 +106,9 @@ spec:
description: Name.
type: string
type:
description: Mutually exclusive parameter with AffinityGroupIDs. Can
be "host affinity" or "host anti-affinity". Will create an affinity
group per machine set.
description: |-
Mutually exclusive parameter with AffinityGroupIDs.
Can be "host affinity" or "host anti-affinity". Will create an affinity group per machine set.
type: string
type: object
status:
Expand All @@ -124,14 +133,19 @@ spec:
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
Expand All @@ -150,10 +164,9 @@ spec:
description: Name.
type: string
type:
description: Mutually exclusive parameter with AffinityGroupIDs. Can
be "host affinity", "host anti-affinity", "non-strict host affinity"
or "non-strict host anti-affinity". Will create an affinity group
per machine set.
description: |-
Mutually exclusive parameter with AffinityGroupIDs.
Can be "host affinity", "host anti-affinity", "non-strict host affinity" or "non-strict host anti-affinity". Will create an affinity group per machine set.
type: string
type: object
status:
Expand All @@ -163,8 +176,6 @@ spec:
ready:
description: Reflects the readiness of the CS Affinity Group.
type: boolean
required:
- ready
type: object
type: object
served: true
Expand Down
Loading

0 comments on commit 5488f5a

Please sign in to comment.