Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add LoadBalancerProviderRef #169

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/v1alpha1/ionoscloudcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ type IonosCloudClusterSpec struct {
// CredentialsRef is a reference to the secret containing the credentials to access the IONOS Cloud API.
//+kubebuilder:validation:XValidation:rule="has(self.name) && self.name != ''",message="credentialsRef.name must be provided"
CredentialsRef corev1.LocalObjectReference `json:"credentialsRef"`

// LoadBalancerProviderRef is a reference to the load balancer provider configuration.
// An empty loadBalancerProviderRef field is allowed and means to disable any load balancer logic.
LoadBalancerProviderRef *corev1.LocalObjectReference `json:"loadBalancerProviderRef,omitempty"`
}

// IonosCloudClusterStatus defines the observed state of IonosCloudCluster.
Expand Down
3 changes: 3 additions & 0 deletions api/v1alpha1/ionoscloudcluster_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func defaultCluster() *IonosCloudCluster {
},
Location: "de/txl",
CredentialsRef: corev1.LocalObjectReference{Name: "secret-name"},
LoadBalancerProviderRef: &corev1.LocalObjectReference{
Name: "fake-lb-provider",
},
},
}
}
Expand Down
14 changes: 10 additions & 4 deletions api/v1alpha1/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 @@ -96,6 +96,19 @@ spec:
x-kubernetes-validations:
- message: credentialsRef.name must be provided
rule: has(self.name) && self.name != ''
loadBalancerProviderRef:
description: |-
LoadBalancerProviderRef is a reference to the load balancer provider configuration.
An empty loadBalancerProviderRef field is allowed and means to disable any load balancer logic.
properties:
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
type: object
x-kubernetes-map-type: atomic
location:
description: Location is the location where the data centers should
be located.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ spec:
x-kubernetes-validations:
- message: credentialsRef.name must be provided
rule: has(self.name) && self.name != ''
loadBalancerProviderRef:
description: |-
LoadBalancerProviderRef is a reference to the load balancer provider configuration.
An empty loadBalancerProviderRef field is allowed and means to disable any load balancer logic.
properties:
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
type: object
x-kubernetes-map-type: atomic
location:
description: Location is the location where the data centers
should be located.
Expand Down
Loading