Skip to content
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
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ require (
github.com/google/licenseclassifier v0.0.0-20210325184830-bb04aff29e72
github.com/influxdata/tdigest v0.0.1 // indirect
github.com/kelseyhightower/envconfig v1.4.0
github.com/michaelklishin/rabbit-hole/v2 v2.11.0
github.com/michaelklishin/rabbit-hole/v2 v2.12.0
github.com/pkg/errors v0.9.1
github.com/rabbitmq/amqp091-go v1.3.0
github.com/rabbitmq/cluster-operator v1.10.0
github.com/rabbitmq/messaging-topology-operator v1.2.2-0.20211112104201-5a7530880441
github.com/rabbitmq/cluster-operator v1.12.1
github.com/rabbitmq/messaging-topology-operator v1.4.1
github.com/testcontainers/testcontainers-go v0.11.1
github.com/tiago4orion/conjure v0.0.0-20150908101743-93cb30b9d218 // indirect
go.opencensus.io v0.23.0
Expand All @@ -34,11 +34,11 @@ require (
knative.dev/hack v0.0.0-20220318020218-14f832e506f8
knative.dev/pkg v0.0.0-20220318185521-e6e3cf03d765
knative.dev/reconciler-test v0.0.0-20220317152933-ce683fafefb6
sigs.k8s.io/controller-runtime v0.9.6
sigs.k8s.io/controller-runtime v0.11.1
)

require (
cloud.google.com/go v0.98.0 // indirect
cloud.google.com/go v0.99.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect
contrib.go.opencensus.io/exporter/zipkin v0.1.2 // indirect
Expand All @@ -53,7 +53,7 @@ require (
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cloudevents/conformance v0.2.0 // indirect
github.com/cloudevents/sdk-go/sql/v2 v2.8.0 // indirect
github.com/containerd/cgroups v1.0.2 // indirect
Expand Down Expand Up @@ -83,7 +83,7 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.6.7 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/imdario/mergo v0.3.12 // indirect
Expand Down Expand Up @@ -136,7 +136,7 @@ require (
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 // indirect
google.golang.org/api v0.61.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.42.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
18 changes: 18 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
cloud.google.com/go v0.98.0 h1:w6LozQJyDDEyhf64Uusu1LCcnLt0I1VMLiJC2kV+eXk=
cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM=
cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY=
cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
Expand Down Expand Up @@ -248,6 +250,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw=
github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
Expand Down Expand Up @@ -803,6 +807,8 @@ github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FK
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
Expand Down Expand Up @@ -980,6 +986,8 @@ github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyex
github.com/michaelklishin/rabbit-hole/v2 v2.10.0/go.mod h1:NvU8401DjBzt659c6gVIuFJspIcqtRe/pOq0m8gYErc=
github.com/michaelklishin/rabbit-hole/v2 v2.11.0 h1:v/Jtrr0FY82pITY3VFhIDaXCllPCTGpGCIM2U505Row=
github.com/michaelklishin/rabbit-hole/v2 v2.11.0/go.mod h1:tVpCFikY4BB40a436H81PRVybvtNwFwWI3oCflUTec8=
github.com/michaelklishin/rabbit-hole/v2 v2.12.0 h1:946p6jOYFcVJdtBBX8MwXvuBkpPjwm1Nm2Qg8oX+uFk=
github.com/michaelklishin/rabbit-hole/v2 v2.12.0/go.mod h1:AN/3zyz7d++OHf+4WUo/LR0+Q5nlPHMaXasIsG/mPY0=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.17/go.mod h1:WgzbA6oji13JREwiNsRDNfl7jYdPnmz+VEuLrA+/48M=
github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
Expand Down Expand Up @@ -1224,8 +1232,12 @@ github.com/rabbitmq/amqp091-go v1.3.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0V
github.com/rabbitmq/cluster-operator v1.8.3/go.mod h1:WSi19XiNTc4rC8FEyfhg8nHKlMZ45VMpA3eAzUaWheY=
github.com/rabbitmq/cluster-operator v1.10.0 h1:n2TxmRvimouxq8JO/XKgIMPAlrokVVtNcnx9/Iz81RY=
github.com/rabbitmq/cluster-operator v1.10.0/go.mod h1:uU/gmMu6rmDc21vGRZNMjMttbCl5UQVEvDO7C6sD1k8=
github.com/rabbitmq/cluster-operator v1.12.1 h1:BiG+r3XjXuIQ/AvQIpCkczF7o0xlCrv1J9mfFOhlVdw=
github.com/rabbitmq/cluster-operator v1.12.1/go.mod h1:3SB11WZNn6RtMxQlUa26493GCXVHSgqp9ye8irssZU0=
github.com/rabbitmq/messaging-topology-operator v1.2.2-0.20211112104201-5a7530880441 h1:LCthSrkcIfz8IuLIxtiix5BiEwVKOXcogjQIk06tYps=
github.com/rabbitmq/messaging-topology-operator v1.2.2-0.20211112104201-5a7530880441/go.mod h1:uHQiUQS0lOzzF3qAAnzfvrq5Vjmac4cOHUrDK06P30U=
github.com/rabbitmq/messaging-topology-operator v1.4.1 h1:sFKhVaG/25BUD8jD1c6F+NThHKPkIjEyc0UuESql3eY=
github.com/rabbitmq/messaging-topology-operator v1.4.1/go.mod h1:JDh/sAzgm5XNZPUFtRp0mlM0iH7ZO4ld7rqIkZqfBnw=
github.com/rabbitmq/rabbitmq-stream-go-client v0.0.0-20210811090309-627299932bac/go.mod h1:dZtRwYizmzN1EwkcW7/CoN9rFbGSEA7i/889iakOJZE=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
Expand Down Expand Up @@ -1800,6 +1812,7 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211031064116-611d5d643895/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 h1:nhht2DYV/Sn3qOayu8lM+cU1ii9sTLUeBQwQQfUHtrs=
Expand Down Expand Up @@ -2058,6 +2071,9 @@ google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ6
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 h1:DN5b3HU13J4sMd/QjDx34U6afpaexKTDdop+26pdjdk=
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0=
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
Expand Down Expand Up @@ -2313,6 +2329,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyz
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4=
sigs.k8s.io/controller-runtime v0.9.6 h1:EevVMlgUj4fC1NVM4+DB3iPkWkmGRNarA66neqv9Qew=
sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA=
sigs.k8s.io/controller-runtime v0.11.1 h1:7YIHT2QnHJArj/dk9aUkYhfqfK5cIxPOX5gPECfdZLU=
sigs.k8s.io/controller-runtime v0.11.1/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20210623192810-985e819db7af/go.mod h1:jqzBWjsNdxfl/cDmihB034I5aCqlfw2p24HYs3Eo4K4=
sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70=
sigs.k8s.io/controller-tools v0.6.2/go.mod h1:oaeGpjXn6+ZSEIQkUe/+3I40PNiDYp9aeawbt3xTgJ8=
Expand Down
10 changes: 0 additions & 10 deletions third_party/pkg/apis/rabbitmq.com/v1beta1/queue_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ type QueueSpec struct {
RabbitmqClusterReference RabbitmqClusterReference `json:"rabbitmqClusterReference"`
}

type RabbitmqClusterReference struct {
// The name of the RabbitMQ cluster to reference.
// +kubebuilder:validation:Required
Name string `json:"name"`
// The namespace of the RabbitMQ cluster to reference.
// Defaults to the namespace of the requested resource if omitted.
// +kubebuilder:validation:Optional
Namespace string `json:"namespace"`
}

// QueueStatus defines the observed state of Queue
type QueueStatus struct {
// observedGeneration is the most recent successful generation observed for this Queue. It corresponds to the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package v1beta1

import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/validation/field"
)

type RabbitmqClusterReference struct {
// The name of the RabbitMQ cluster to reference.
// Have to set either name or connectionSecret, but not both.
// +kubebuilder:validation:Optional
Name string `json:"name,omitempty"`
// The namespace of the RabbitMQ cluster to reference.
// Defaults to the namespace of the requested resource if omitted.
// +kubebuilder:validation:Optional
Namespace string `json:"namespace,omitempty"`
// Secret contains the http management uri for the RabbitMQ cluster.
// The Secret must contain the key `uri`, `username` and `password` or operator will error.
// Have to set either name or connectionSecret, but not both.
// +kubebuilder:validation:Optional
ConnectionSecret *corev1.LocalObjectReference `json:"connectionSecret,omitempty"`
}

func (r *RabbitmqClusterReference) Matches(new *RabbitmqClusterReference) bool {
if new.Name != r.Name || new.Namespace != r.Namespace {
return false
}

// when connectionSecret has been updated
if new.ConnectionSecret != nil && r.ConnectionSecret != nil && *new.ConnectionSecret != *r.ConnectionSecret {
return false
}

// when connectionSecret is removed
if new.ConnectionSecret == nil && r.ConnectionSecret != nil {
return false
}

// when connectionSecret is added
if new.ConnectionSecret != nil && r.ConnectionSecret == nil {
return false
}

return true
}

// ValidateOnCreate validates RabbitmqClusterReference on resources create
// either rabbitmqClusterReference.name or rabbitmqClusterReference.connectionSecret must be provided but not both; else it errors
func (ref *RabbitmqClusterReference) ValidateOnCreate(groupResource schema.GroupResource, name string) error {
if ref.Name != "" && ref.ConnectionSecret != nil {
return apierrors.NewForbidden(groupResource, name,
field.Forbidden(field.NewPath("spec", "rabbitmqClusterReference"),
"do not provide both spec.rabbitmqClusterReference.name and spec.rabbitmqClusterReference.connectionSecret"))
}

if ref.Name == "" && ref.ConnectionSecret == nil {
return apierrors.NewForbidden(groupResource, name,
field.Forbidden(field.NewPath("spec", "rabbitmqClusterReference"),
"must provide either spec.rabbitmqClusterReference.name or spec.rabbitmqClusterReference.connectionSecret"))
}
return nil
}
25 changes: 15 additions & 10 deletions third_party/pkg/apis/rabbitmq.com/v1beta1/zz_generated.deepcopy.go

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

8 changes: 0 additions & 8 deletions vendor/github.com/cespare/xxhash/v2/.travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions vendor/github.com/cespare/xxhash/v2/README.md

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

1 change: 0 additions & 1 deletion vendor/github.com/cespare/xxhash/v2/xxhash.go

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

Loading