Skip to content

Commit

Permalink
Merge pull request #59 from crossplane-contrib/sdk-bump
Browse files Browse the repository at this point in the history
Bump civogo version
  • Loading branch information
uzaxirr committed Apr 4, 2024
2 parents 35c5c7c + 7775b20 commit d5a11ef
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 69 deletions.
19 changes: 16 additions & 3 deletions apis/civo/cluster/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ limitations under the License.
package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/civo/civogo"
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)

Expand All @@ -42,8 +42,8 @@ type CivoKubernetesConnectionDetails struct {
// A CivoKubernetesSpec defines the desired state of a CivoKubernetes.
type CivoKubernetesSpec struct {
xpv1.ResourceSpec `json:",inline"`
Name string `json:"name"`
Pools []civogo.KubernetesClusterPoolConfig `json:"pools"`
Name string `json:"name"`
Pools []KubernetesClusterPoolConfig `json:"pools"`
// +optional
// A list of applications to install from civo marketplace.
Applications []string `json:"applications,omitempty"`
Expand Down Expand Up @@ -120,3 +120,16 @@ type CivoKubernetesList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []CivoKubernetes `json:"items"`
}

// KubernetesClusterPoolConfig defines the configuration for a pool of nodes in a Civo Kubernetes cluster.
// Should be converted to the equivalent type in the civogo package before being used.
// Should always be identical to the KubernetesClusterPoolConfig in the civogo package.
type KubernetesClusterPoolConfig struct {
Region string `json:"region,omitempty"`
ID string `json:"id,omitempty"`
Count int `json:"count,omitempty"`
Size string `json:"size,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Taints []corev1.Taint `json:"taints"`
PublicIPNodePool bool `json:"public_ip_node_pool,omitempty"`
}
37 changes: 34 additions & 3 deletions apis/civo/cluster/v1alpha1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion build
Submodule build updated 1 files
+1 −1 makelib/local.mk
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/crossplane-contrib/provider-civo
go 1.22

require (
github.com/civo/civogo v0.2.68
github.com/civo/civogo v0.3.66
github.com/crossplane/crossplane-runtime v1.15.0
github.com/crossplane/crossplane-tools v0.0.0-20201201125637-9ddc70edfd0d
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -40,6 +40,7 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
Expand All @@ -63,7 +64,7 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
Expand Down
Loading

0 comments on commit d5a11ef

Please sign in to comment.