-
Notifications
You must be signed in to change notification settings - Fork 339
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
fix(kuma-cp) fix env #1171
fix(kuma-cp) fix env #1171
Conversation
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
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.
Do we want to expand testing and ensure that loader_test.go
has all the env variables checked?
Yes, I will expand testing |
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
} | ||
|
||
Expect(testEnvs).To(Equal(configEnvs)) | ||
} |
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.
That's amazing 👏
Please add a message like we have in generate tests
Expect(string(actualContents)).To(Equal(string(given.ExpectedContents)), "generated Go code is no longer in sync with the original template files. To re-generate it, run `make generate/kumactl/install/k8s/control-plane`")
Something like
%s config values are not overridden in the test. Add overrides for them with a value that is different than default.
if _, exist, _ := metadata.Annotations(pod.Annotations).GetEnabled(metadata.KumaVirtualProbesAnnotation); !exist { | ||
annotations[metadata.KumaVirtualProbesAnnotation] = metadata.AnnotationEnabled | ||
if err := virtualProbesEnabled(annotations, pod, i.cfg); err != nil { | ||
return nil, err |
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.
please change the method names. I was confused why it's not returning bool and what is going on. It should be something like setVirtualProbesEnabledAnnotation
, setVirtualProbesPortAnnotation
if enabled, exist, _ := metadata.Annotations(pod.Annotations).GetEnabled(metadata.KumaGatewayAnnotation); exist && enabled { | ||
annotations[metadata.KumaVirtualProbesAnnotation] = metadata.AnnotationDisabled | ||
if err := virtualProbesPort(annotations, pod, i.cfg); err != nil { | ||
return nil, err |
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.
give more context to these errors
@@ -0,0 +1,187 @@ | |||
// Copyright (c) 2013 Kelsey Hightower |
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 copy paste? Can you also paste the reference here (link to github)?
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
(cherry picked from commit 3d02c39)
Signed-off-by: Ilya Lobkov ilya.lobkov@konghq.com
Summary
Fix env