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

Bump to API version v1beta1 #120

Merged
merged 3 commits into from
Apr 28, 2021
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
. "github.com/onsi/ginkgo"
Expand Down
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v1alpha2
package v1beta1

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