Skip to content
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

Merged
merged 2 commits into from
Apr 24, 2020
Merged

generalized replacing container arguments #21

merged 2 commits into from
Apr 24, 2020

Conversation

samuelmacko
Copy link
Contributor

Fixes #15

Signed-off-by: smacko samuel.macko.sm@gmail.com

Signed-off-by: smacko <samuel.macko.sm@gmail.com>
Copy link
Member

@zroubalik zroubalik left a 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 {
Copy link
Member

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}
Copy link
Member

@zroubalik zroubalik Apr 23, 2020

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>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@zroubalik zroubalik merged commit 326b4b2 into kedacore:master Apr 24, 2020
@samuelmacko samuelmacko deleted the generalize branch April 28, 2020 08:04
joelsmith pushed a commit to joelsmith/keda-olm-operator that referenced this pull request Mar 20, 2023
OCPNODE-1499: Add support for must-gather collection script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants