-
Notifications
You must be signed in to change notification settings - Fork 23
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
generalized replacing container arguments #21
Conversation
Signed-off-by: smacko <samuel.macko.sm@gmail.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.
Looking good! Have just minor nits.
@@ -205,6 +201,14 @@ func EnsureCertInjectionForDeployment(configMapName string, secretName string, s | |||
} | |||
} | |||
|
|||
func AddPathsToCerts(values []string, prefixes []Prefix, scheme *runtime.Scheme, logger logr.Logger) []mf.Transformer { |
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.
I'd name this something like EnsurePathsToCertsInDeployment
just because of consistency with other similar functions
@@ -302,6 +306,11 @@ func (r *ReconcileKedaController) installMetricsServer(instance *kedav1alpha1.Ke | |||
transform.EnsureCertInjectionForService(metricsServcerServiceName, injectservingCertAnnotation, injectservingCertAnnotationValue, r.scheme, log), | |||
transform.EnsureCertInjectionForDeployment(metricsServerConfigMapName, metricsServcerServiceName, r.scheme, log), | |||
} | |||
|
|||
argsPrefixes := []transform.Prefix{transform.ClientCAFile, transform.TLSCertFile, transform.TLSPrivateKeyFile} |
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.
I'd move argsPrefixes
and newArgs
definition somewhere around line 302, before transforms := []mf.Transformer{
.
Then move transforms = append(transforms, transform.AddPathsToCert...
directly inside the transforms
defintion.
To keep the code consistent
Signed-off-by: smacko <samuel.macko.sm@gmail.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.
LGTM, thanks!
OCPNODE-1499: Add support for must-gather collection script
Fixes #15
Signed-off-by: smacko samuel.macko.sm@gmail.com