Skip to content

Commit

Permalink
Switch kubedb apiVersion to v1alpha2 (#612)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Oct 7, 2020
1 parent fd3131c commit 0cf6469
Show file tree
Hide file tree
Showing 137 changed files with 2,039 additions and 2,040 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ BIN := apimachinery
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false,maxDescLen=0,crdVersions={v1beta1,v1}"
# https://github.com/appscodelabs/gengo-builder
CODE_GENERATOR_IMAGE ?= appscode/gengo:release-1.18
API_GROUPS ?= kubedb:v1alpha1 catalog:v1alpha1 config:v1alpha1 ops:v1alpha1 autoscaling:v1alpha1
API_GROUPS ?= kubedb:v1alpha2 catalog:v1alpha1 config:v1alpha1 ops:v1alpha1 autoscaling:v1alpha1

# This version-strategy uses git tags to set the version string
git_branch := $(shell git rev-parse --abbrev-ref HEAD)
Expand Down
24 changes: 12 additions & 12 deletions apis/kubedb/fuzzer/fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package fuzzer

import (
"kubedb.dev/apimachinery/apis/kubedb/v1alpha1"
"kubedb.dev/apimachinery/apis/kubedb/v1alpha2"

fuzz "github.com/google/gofuzz"
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
Expand All @@ -26,37 +26,37 @@ import (
// Funcs returns the fuzzer functions for this api group.
var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
return []interface{}{
func(s *v1alpha1.Elasticsearch, c fuzz.Continue) {
func(s *v1alpha2.Elasticsearch, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.Etcd, c fuzz.Continue) {
func(s *v1alpha2.Etcd, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.MariaDB, c fuzz.Continue) {
func(s *v1alpha2.MariaDB, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.Memcached, c fuzz.Continue) {
func(s *v1alpha2.Memcached, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.MongoDB, c fuzz.Continue) {
func(s *v1alpha2.MongoDB, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.MySQL, c fuzz.Continue) {
func(s *v1alpha2.MySQL, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.PerconaXtraDB, c fuzz.Continue) {
func(s *v1alpha2.PerconaXtraDB, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.PgBouncer, c fuzz.Continue) {
func(s *v1alpha2.PgBouncer, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.Postgres, c fuzz.Continue) {
func(s *v1alpha2.Postgres, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.ProxySQL, c fuzz.Continue) {
func(s *v1alpha2.ProxySQL, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
func(s *v1alpha1.Redis, c fuzz.Continue) {
func(s *v1alpha2.Redis, c fuzz.Continue) {
c.FuzzNoCustom(s) // fuzz self without calling this function again
},
}
Expand Down
6 changes: 3 additions & 3 deletions apis/kubedb/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ limitations under the License.
package install

import (
"kubedb.dev/apimachinery/apis/kubedb/v1alpha1"
"kubedb.dev/apimachinery/apis/kubedb/v1alpha2"

"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
)

// Install registers the API group and adds types to a scheme
func Install(scheme *runtime.Scheme) {
utilruntime.Must(v1alpha1.AddToScheme(scheme))
utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion))
utilruntime.Must(v1alpha2.AddToScheme(scheme))
utilruntime.Must(scheme.SetVersionPriority(v1alpha2.SchemeGroupVersion))
}
1 change: 0 additions & 1 deletion apis/kubedb/install/pruning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

"kubedb.dev/apimachinery/apis/kubedb/fuzzer"
"kubedb.dev/apimachinery/apis/kubedb/v1alpha1"

clientsetscheme "k8s.io/client-go/kubernetes/scheme"
crdfuzz "kmodules.xyz/crd-schema-fuzz"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1alpha2

import "kubedb.dev/apimachinery/apis/kubedb"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ limitations under the License.
// +k8s:defaulter-gen=TypeMeta

// +groupName=kubedb.com
package v1alpha1
package v1alpha2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1alpha2

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1alpha2

import (
core "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1alpha2

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1alpha2

import (
core "k8s.io/api/core/v1"
Expand Down
Loading

0 comments on commit 0cf6469

Please sign in to comment.