Skip to content

Commit

Permalink
Add placeholders for ProviderSpec and ProviderStatus
Browse files Browse the repository at this point in the history
Fix some module imports. Will be cleaned up in future PRs.
  • Loading branch information
wfernandes committed Mar 3, 2021
1 parent 409fb46 commit 87d262f
Show file tree
Hide file tree
Showing 11 changed files with 294 additions and 50 deletions.
12 changes: 2 additions & 10 deletions operator/api/v1alpha4/bootstrapprovider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// BootstrapProviderSpec defines the desired state of BootstrapProvider
type BootstrapProviderSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of BootstrapProvider. Edit BootstrapProvider_types.go to remove/update
Foo string `json:"foo,omitempty"`
ProviderSpec `json:",inline"`
}

// BootstrapProviderStatus defines the observed state of BootstrapProvider
type BootstrapProviderStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
ProviderStatus `json:",inline"`
}

// +kubebuilder:object:root=true
Expand Down
12 changes: 2 additions & 10 deletions operator/api/v1alpha4/controlplaneprovider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// ControlPlaneProviderSpec defines the desired state of ControlPlaneProvider
type ControlPlaneProviderSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of ControlPlaneProvider. Edit ControlPlaneProvider_types.go to remove/update
Foo string `json:"foo,omitempty"`
ProviderSpec `json:",inline"`
}

// ControlPlaneProviderStatus defines the observed state of ControlPlaneProvider
type ControlPlaneProviderStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
ProviderStatus `json:",inline"`
}

// +kubebuilder:object:root=true
Expand Down
12 changes: 2 additions & 10 deletions operator/api/v1alpha4/coreprovider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// CoreProviderSpec defines the desired state of CoreProvider
type CoreProviderSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of CoreProvider. Edit CoreProvider_types.go to remove/update
Foo string `json:"foo,omitempty"`
ProviderSpec `json:",inline"`
}

// CoreProviderStatus defines the observed state of CoreProvider
type CoreProviderStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
ProviderStatus `json:",inline"`
}

// +kubebuilder:object:root=true
Expand Down
12 changes: 2 additions & 10 deletions operator/api/v1alpha4/infrastructureprovider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,14 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// InfrastructureProviderSpec defines the desired state of InfrastructureProvider
type InfrastructureProviderSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of InfrastructureProvider. Edit InfrastructureProvider_types.go to remove/update
Foo string `json:"foo,omitempty"`
ProviderSpec `json:",inline"`
}

// InfrastructureProviderStatus defines the observed state of InfrastructureProvider
type InfrastructureProviderStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
ProviderStatus `json:",inline"`
}

// +kubebuilder:object:root=true
Expand Down
26 changes: 26 additions & 0 deletions operator/api/v1alpha4/provider_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha4

// TODO: NOTE: The API details will be incrementally added and will eventually
// conform to the CAPI Provider CAEP.

// ProProviderSpec is the desired state of the Provider.
type ProviderSpec struct{}

// ProProviderStatus defines the observed state of the Provider.
type ProviderStatus struct{}
38 changes: 38 additions & 0 deletions operator/api/v1alpha4/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 operator/controllers/coreprovider_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

operatorv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4"
operatorv1alpha4 "sigs.k8s.io/cluster-api/operator/api/v1alpha4"
)

// CoreProviderReconciler reconciles a CoreProvider object
Expand Down
2 changes: 1 addition & 1 deletion operator/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

operatorv1alpha4 "sigs.k8s.io/cluster-api/api/v1alpha4"
operatorv1alpha4 "sigs.k8s.io/cluster-api/operator/api/v1alpha4"
// +kubebuilder:scaffold:imports
)

Expand Down
14 changes: 8 additions & 6 deletions operator/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module sigs.k8s.io/cluster-api
module sigs.k8s.io/cluster-api/operator

go 1.13

require (
github.com/go-logr/logr v0.1.0
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.8.1
k8s.io/apimachinery v0.17.2
k8s.io/client-go v0.17.2
sigs.k8s.io/controller-runtime v0.5.0
github.com/onsi/ginkgo v1.12.1
github.com/onsi/gomega v1.10.1
k8s.io/apimachinery v0.17.9
k8s.io/client-go v0.17.9
sigs.k8s.io/cluster-api v0.3.13
sigs.k8s.io/controller-runtime v0.5.14
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 // indirect
)
Loading

0 comments on commit 87d262f

Please sign in to comment.