Skip to content

Commit

Permalink
Merge pull request #120 from rabbitmq/bump-version
Browse files Browse the repository at this point in the history
Bump to API version v1beta1
  • Loading branch information
ChunyiLyu committed Apr 28, 2021
2 parents fb41e5a + 1df8e1c commit 383c578
Show file tree
Hide file tree
Showing 152 changed files with 1,840 additions and 791 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -72,7 +72,7 @@ manifests: install-tools
# Generate API reference documentation
api-reference:
crd-ref-docs \
--source-path ./api/v1alpha2 \
--source-path ./api/v1beta1 \
--config ./docs/api/autogen/config.yaml \
--templates-dir ./docs/api/autogen/templates \
--output-path ./docs/api/rabbitmq.com.ref.asciidoc \
Expand Down
16 changes: 8 additions & 8 deletions PROJECT
Expand Up @@ -3,26 +3,26 @@ repo: github.com/rabbitmq/messaging-topology-operator
resources:
- group: rabbitmq.com
kind: Queue
version: v1alpha2
version: v1beta1
- group: rabbitmq.com
kind: Exchange
version: v1alpha2
version: v1beta1
- group: rabbitmq.com
kind: Binding
version: v1alpha2
version: v1beta1
- group: rabbitmq.com
kind: User
version: v1alpha2
version: v1beta1
- group: rabbitmq.com
kind: Vhost
version: v1alpha2
version: v1beta1
- group: rabbitmq.com
kind: Policy
version: v1alpha2
version: v1beta1
- group: rabbitmq.com
kind: Permission
version: v1alpha2
version: v1beta1
- group: rabbitmq.com
kind: SchemaReplication
version: v1alpha2
version: v1beta1
version: "2"
Expand Up @@ -7,7 +7,7 @@ This product is licensed to you under the Mozilla Public License 2.0 license (th
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
*/

package v1alpha2
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -47,10 +47,10 @@ type BindingStatus struct {
}

// +genclient

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=all
// +kubebuilder:subresource:status

// Binding is the Schema for the bindings API
type Binding struct {
metav1.TypeMeta `json:",inline"`
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"fmt"
Expand All @@ -16,7 +16,7 @@ func (b *Binding) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1alpha2-binding,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=bindings,versions=v1alpha2,name=vbinding.kb.io,sideEffects=none,admissionReviewVersions=v1
// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1beta1-binding,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=bindings,versions=v1beta1,name=vbinding.kb.io,sideEffects=none,admissionReviewVersions=v1

var _ webhook.Validator = &Binding{}

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha2/conditions.go → api/v1beta1/conditions.go
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
corev1 "k8s.io/api/core/v1"
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
Expand Up @@ -7,7 +7,7 @@ This product is licensed to you under the Mozilla Public License 2.0 license (th
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
*/

package v1alpha2
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -45,7 +45,6 @@ type ExchangeStatus struct {
}

// +genclient

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=all
// +kubebuilder:subresource:status
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"fmt"
Expand All @@ -15,7 +15,7 @@ func (r *Exchange) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1alpha2-exchange,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=exchanges,versions=v1alpha2,name=vexchange.kb.io,sideEffects=none,admissionReviewVersions=v1
// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1beta1-exchange,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=exchanges,versions=v1beta1,name=vexchange.kb.io,sideEffects=none,admissionReviewVersions=v1

var _ webhook.Validator = &Exchange{}

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
Expand Up @@ -7,10 +7,10 @@ This product is licensed to you under the Mozilla Public License 2.0 license (th
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
*/

// Package v1alpha2 contains API Schema definitions for the rabbitmq.com v1alpha2 API group
// Package v1beta1 contains API Schema definitions for the rabbitmq.com v1beta1 API group
// +kubebuilder:object:generate=true
// +groupName=rabbitmq.com
package v1alpha2
package v1beta1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -19,7 +19,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "rabbitmq.com", Version: "v1alpha2"}
GroupVersion = schema.GroupVersion{Group: "rabbitmq.com", Version: "v1beta1"}

// SchemeGroupVersion is group version used to register these objects
// added for generated clientset
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -42,6 +42,7 @@ type PermissionStatus struct {
Conditions []Condition `json:"conditions,omitempty"`
}

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=all
// +kubebuilder:subresource:status
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"fmt"
Expand All @@ -15,7 +15,7 @@ func (p *Permission) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1alpha2-permission,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=permissions,versions=v1alpha2,name=vpermission.kb.io,sideEffects=none,admissionReviewVersions=v1
// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1beta1-permission,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=permissions,versions=v1beta1,name=vpermission.kb.io,sideEffects=none,admissionReviewVersions=v1

var _ webhook.Validator = &Permission{}

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
3 changes: 1 addition & 2 deletions api/v1alpha2/policy_types.go → api/v1beta1/policy_types.go
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -47,7 +47,6 @@ type PolicyStatus struct {
}

// +genclient

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=all
// +kubebuilder:subresource:status
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"fmt"
Expand All @@ -15,7 +15,7 @@ func (p *Policy) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1alpha2-policy,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=policies,versions=v1alpha2,name=vpolicy.kb.io,sideEffects=none,admissionReviewVersions=v1
// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1beta1-policy,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=policies,versions=v1beta1,name=vpolicy.kb.io,sideEffects=none,admissionReviewVersions=v1

var _ webhook.Validator = &Policy{}

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
3 changes: 1 addition & 2 deletions api/v1alpha2/queue_types.go → api/v1beta1/queue_types.go
Expand Up @@ -7,7 +7,7 @@ This product is licensed to you under the Mozilla Public License 2.0 license (th
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
*/

package v1alpha2
package v1beta1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -56,7 +56,6 @@ type QueueStatus struct {
}

// +genclient

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=all
// +kubebuilder:subresource:status
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"fmt"
Expand All @@ -15,7 +15,7 @@ func (r *Queue) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1alpha2-queue,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=queues,versions=v1alpha2,name=vqueue.kb.io,sideEffects=none,admissionReviewVersions=v1sideEffects=none,admissionReviewVersions=v1
// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1beta1-queue,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=queues,versions=v1beta1,name=vqueue.kb.io,sideEffects=none,admissionReviewVersions=v1sideEffects=none,admissionReviewVersions=v1

var _ webhook.Validator = &Queue{}

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
Expand Up @@ -7,7 +7,7 @@ This product is licensed to you under the Mozilla Public License 2.0 license (th
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
*/

package v1alpha2
package v1beta1

import (
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -35,6 +35,7 @@ type SchemaReplicationStatus struct {
Conditions []Condition `json:"conditions,omitempty"`
}

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"fmt"
Expand All @@ -15,7 +15,7 @@ func (s *SchemaReplication) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1alpha2-schemareplication,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=schemareplications,versions=v1alpha2,name=vschemareplication.kb.io,sideEffects=none,admissionReviewVersions=v1
// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1beta1-schemareplication,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=schemareplications,versions=v1beta1,name=vschemareplication.kb.io,sideEffects=none,admissionReviewVersions=v1

var _ webhook.Validator = &SchemaReplication{}

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha2/suite_test.go → api/v1beta1/suite_test.go
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"path/filepath"
Expand All @@ -24,7 +24,7 @@ func TestAPIs(t *testing.T) {
RegisterFailHandler(Fail)

RunSpecsWithDefaultAndCustomReporters(t,
"v1alpha2 Suite",
"v1beta1 Suite",
[]Reporter{printer.NewlineReporter{}})
}

Expand Down
3 changes: 1 addition & 2 deletions api/v1alpha2/user_types.go → api/v1beta1/user_types.go
Expand Up @@ -7,7 +7,7 @@ This product is licensed to you under the Mozilla Public License 2.0 license (th
This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
*/

package v1alpha2
package v1beta1

import (
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -52,7 +52,6 @@ type UserStatus struct {
type UserTag string

// +genclient

// +kubebuilder:object:root=true
// +kubebuilder:resource:categories=all
// +kubebuilder:subresource:status
Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha2/user_webhook.go → api/v1beta1/user_webhook.go
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"fmt"
Expand All @@ -15,7 +15,7 @@ func (u *User) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1alpha2-user,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=users,versions=v1alpha2,name=vuser.kb.io,sideEffects=none,admissionReviewVersions=v1
// +kubebuilder:webhook:verbs=create;update,path=/validate-rabbitmq-com-v1beta1-user,mutating=false,failurePolicy=fail,groups=rabbitmq.com,resources=users,versions=v1beta1,name=vuser.kb.io,sideEffects=none,admissionReviewVersions=v1

var _ webhook.Validator = &User{}

Expand Down
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down

0 comments on commit 383c578

Please sign in to comment.