-
Notifications
You must be signed in to change notification settings - Fork 140
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
LOG-3569: Add functionality to enable TLS Security feature gate #1887
Conversation
@jcantrill: This pull request references LOG-3569 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcantrill The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
/hold |
Entry("enables TLS Security profile for eEabled", constants.PreviewTLSSecurityProfile, "", constants.PreviewTLSSecurityProfile, "eNabled"), | ||
Entry("disables TLS Security profile for true", "", "", constants.PreviewTLSSecurityProfile, "true"), | ||
Entry("enables old remote syslog for enabled", UseOldRemoteSyslogPlugin, "", UseOldRemoteSyslogPlugin, "enabled"), | ||
Entry("enables old remote syslog for eEabled", UseOldRemoteSyslogPlugin, "", UseOldRemoteSyslogPlugin, "eNabled"), |
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.
@jcantrill eEabled sp. here and a few lines above
7ff612e
to
9d299f4
Compare
e0134b1
to
aa2dcb5
Compare
/hold cancel |
} | ||
for key, value := range forwarder.Annotations { | ||
switch key { | ||
case constants.PreviewTLSSecurityProfile: |
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.
nit: Do nothing here, maybe just remove this case
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 is doing for constants.PreviewTLSSecurityProfile the same thing as for constants.UseOldRemoteSyslogPlugin. Which is the same as
switch key {
case constants.PreviewTLSSecurityProfile, constants.UseOldRemoteSyslogPlugin:
...
internal/generator/options.go
Outdated
|
||
// Has takes a key and returns true if it exists | ||
func (o Options) Has(key string) bool { | ||
if _, found := o[key]; found { |
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.
_, found := o[key]
return found
internal/generator/options_test.go
Outdated
var ( | ||
options = Options{} | ||
) | ||
It("should should be false when the key does not exist", func() { |
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.
should
internal/generator/options_test.go
Outdated
Expect(options.Has("foo")).To(BeFalse()) | ||
}) | ||
|
||
It("should should be true when the key exists", func() { |
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.
should
if clusterRequest.ForwarderRequest == nil { | ||
return false | ||
// EvaluateAnnotationsForEnabledCapabilities populates generator options with capabilities enabled by the ClusterLogForwarder | ||
func EvaluateAnnotationsForEnabledCapabilities(forwarder *logging.ClusterLogForwarder, options generator.Options) { |
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.
nit: it doesn't look like EvaluateAnnotationsForEnabledCapabilities needs to be exported
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.
Updated test to require it to be exported 😉
}) | ||
DescribeTable("when forwarder is not nil", func(enabledOption, value string, annotations ...string) { | ||
pairs := annotations | ||
if len(pairs)%2 != 0 { |
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.
Just name annotations
pairs
and drop
pairs := annotations
?
/lgtm |
@jcantrill: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Description
This PR:
Links
cc @syedriko