Skip to content

DO NOT MERGE: Peer discovery 4.1 #1865

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ rules:
- configmaps
- persistentvolumeclaims
- secrets
- serviceaccounts
- services
verbs:
- create
Expand Down
1 change: 0 additions & 1 deletion controllers/rabbitmqcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ type RabbitmqClusterReconciler struct {
// +kubebuilder:rbac:groups=rabbitmq.com,resources=rabbitmqclusters/status,verbs=get;update
// +kubebuilder:rbac:groups=rabbitmq.com,resources=rabbitmqclusters/finalizers,verbs=update
// +kubebuilder:rbac:groups="",resources=events,verbs=get;create;patch
// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update
Expand Down
2 changes: 0 additions & 2 deletions docs/examples/ipv6/rabbitmq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ spec:
envConfig: |
SERVER_ADDITIONAL_ERL_ARGS="-kernel inetrc '/etc/rabbitmq/erl_inetrc' -proto_dist inet6_tcp"
RABBITMQ_CTL_ERL_ARGS="-proto_dist inet6_tcp"
additionalConfig: |
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
replicas: 1
service:
ipFamilyPolicy: "PreferDualStack"
4 changes: 1 addition & 3 deletions internal/resource/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ const (
queue_master_locator = min-masters
disk_free_limit.absolute = 2GB
cluster_partition_handling = pause_minority
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default
cluster_formation.k8s.address_type = hostname`
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s`

defaultTLSConf = `
ssl_options.certfile = /etc/rabbitmq-tls/tls.crt
Expand Down
2 changes: 0 additions & 2 deletions internal/resource/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ queue_master_locator = min-masters
disk_free_limit.absolute = 2GB
cluster_partition_handling = pause_minority
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default
cluster_formation.k8s.address_type = hostname
cluster_formation.target_cluster_size_hint = 1
cluster_name = ` + instanceName + `
auth_mechanisms.1 = PLAIN
Expand Down
1 change: 0 additions & 1 deletion internal/resource/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ func (builder *StatefulSetBuilder) podTemplateSpec(previousPodAnnotations map[st
},
ImagePullSecrets: builder.Instance.Spec.ImagePullSecrets,
TerminationGracePeriodSeconds: builder.Instance.Spec.TerminationGracePeriodSeconds,
ServiceAccountName: builder.Instance.ChildResourceName(serviceAccountName),
AutomountServiceAccountToken: ptr.To(true),
Affinity: builder.Instance.Spec.Affinity,
Tolerations: builder.Instance.Spec.Tolerations,
Expand Down
2 changes: 1 addition & 1 deletion internal/resource/statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ default_pass = {{ .Data.data.password }}
stsBuilder := builder.StatefulSet()
Expect(stsBuilder.Update(statefulSet)).To(Succeed())

Expect(statefulSet.Spec.Template.Spec.ServiceAccountName).To(Equal(instance.ChildResourceName("server")))
Expect(statefulSet.Spec.Template.Spec.ServiceAccountName).To(BeEmpty())
})

It("mounts the service account in its pods", func() {
Expand Down
Loading