-
Notifications
You must be signed in to change notification settings - Fork 290
Add support for advanced.config #221
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
Changes from 1 commit
1aaed67
d141b40
5269278
9dd84f4
d0ceb1c
960252a
e4184cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,18 @@ my-config-property-1 = better-value` | |
Expect(rabbitmqConf).To(Equal(expectedRabbitmqConf)) | ||
}) | ||
|
||
It("sets data.advancedConfig when provided", func() { | ||
instance.Spec.Rabbitmq.AdvancedConfig = ` | ||
[ | ||
{rabbit, [{auth_backends, [rabbit_auth_backend_ldap]}]} | ||
].` | ||
Expect(configMapBuilder.Update(configMap)).To(Succeed()) | ||
advancedConfig, ok := configMap.Data["advanced.config"] | ||
Expect(ok).To(BeTrue()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cosmetic change request 🙃 Let's annotate the assertion so that if this ever fails, we get a message more descriptive than "expected false to be true" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated in the new commit ;) good call Aitor |
||
Expect(advancedConfig).To(Equal("\n[\n {rabbit, [{auth_backends, [rabbit_auth_backend_ldap]}]}\n].")) | ||
|
||
}) | ||
|
||
Context("TLS", func() { | ||
It("adds TLS config when TLS is enabled", func() { | ||
instance = rabbitmqv1beta1.RabbitmqCluster{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this limit required? 2000 characters can be exceeded in environments with extensive LDAP queries and OAuth 2 settings, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not required. There is a hard limit in kubernetes that all objects are stored in etcd, and etcd has a limit of 1MB per object which translate to
1048576
characters. I will update the limit to100000
. Thanks for pointing it out Michael!