-
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
fix: ensure input CAbundle always end with a newline #1339
fix: ensure input CAbundle always end with a newline #1339
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## incubation #1339 +/- ##
=============================================
Coverage ? 19.08%
=============================================
Files ? 30
Lines ? 3369
Branches ? 0
=============================================
Hits ? 643
Misses ? 2657
Partials ? 69 ☔ View full report in Codecov by Sentry. |
726a4bf
to
65977fb
Compare
- missing newline will cause problem when inject data into configmap - this happens when user use kustomize with their own CA for DSCI, it set to use |- not | - fix lint Signed-off-by: Wen Zhou <[email protected]>
// Adding newline breaker if user input does not have it | ||
if !strings.HasSuffix(customCAData, "\n") { | ||
customCAData += "\n" | ||
} |
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: maybe something we can do unconditionally, like
customCAData = strings.TrimSpace(customCAData) + "\n"
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.
thats nicer
It would be nice to have the tests done manually also as part of the test suite |
haha, we have an ongoing https://github.com/opendatahub-io/opendatahub-operator/pull/1346/files for this topic |
Signed-off-by: Wen Zhou <[email protected]>
Wonder if that PR should be merged after this and include also the tests you included in the PR description. |
yep, i think so. |
lgtm, I'd love to see this merged along with the related tests so we are sure it won't break anything. I let @VaishnaviHire doing a final review as I probably don't know all the implication |
Agree, we can add all the test cases above. Thanks for the changes @zdtsw /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: VaishnaviHire 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 |
656d53e
into
opendatahub-io:incubation
…1339) * fix: ensure input CAbundle always end with a newline - missing newline will cause problem when inject data into configmap - this happens when user use kustomize with their own CA for DSCI, it set to use |- not | - fix lint Signed-off-by: Wen Zhou <[email protected]> * update: better way to add newline Signed-off-by: Wen Zhou <[email protected]> --------- Signed-off-by: Wen Zhou <[email protected]> (cherry picked from commit 656d53e)
* fix: ensure input CAbundle always end with a newline (#1339) * fix: ensure input CAbundle always end with a newline - missing newline will cause problem when inject data into configmap - this happens when user use kustomize with their own CA for DSCI, it set to use |- not | - fix lint Signed-off-by: Wen Zhou <[email protected]> * update: better way to add newline Signed-off-by: Wen Zhou <[email protected]> --------- Signed-off-by: Wen Zhou <[email protected]> (cherry picked from commit 656d53e) * fix: add check to remove old kube-rbac-proxy container in modelregistry operator, fixes RHOAIENG-15328 (#1341) * fix: add check to remove old kube-rbac-proxy container in modelregistry operator, fixes RHOAIENG-15328 Signed-off-by: Dhiraj Bokde <[email protected]> * update: remove check in ModelReg code, add it to upgrade logic Signed-off-by: Wen Zhou <[email protected]> --------- Signed-off-by: Dhiraj Bokde <[email protected]> Signed-off-by: Wen Zhou <[email protected]> Co-authored-by: Wen Zhou <[email protected]> (cherry picked from commit 92251e4) * fix: cherry-pick error - remove new logger - dummy: request from devops to verify auto-sync Signed-off-by: Wen Zhou <[email protected]> --------- Signed-off-by: Wen Zhou <[email protected]> Co-authored-by: Dhiraj Bokde <[email protected]>
related to Remove Default Addition of Block Chomp (|-) on ConfigMaps that don't end with New Line kubernetes-sigs/kustomize#4602
i am not fond of the solution provided in https://issues.redhat.com/browse/RHOAIENG-11895 on a component base.
this could protentially cause other components to fail.
Description
How Has This Been Tested?
quay.io/wenzhou/opendatahub-operator:2.20.114
output in CM:
output in CM:
output in CM:
Screenshot or short clip
Merge criteria