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

add newlines between certs #685

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

HumairAK
Copy link
Contributor

The issue resolved by this Pull Request:

Resolves https://issues.redhat.com/browse/RHOAIENG-11297

Description of your changes:

If odh-trusted-ca-bundle has now newline, it concatenates the ca bundle with service-ca without any newline separate, an easy fix is to ensure there is always at least one new line between each ca bundle merge.

Testing instructions

Deploy podtopodtls in a self-signed environment with odh-trusted bundle with no newline at the end of file, run a pipeline, if it succeeds, it works.

Note that I have also adjusted the func tests to ignore trailing spaces, because it's incredibly buggy and non-intuitive to make work correctly, testing these portions should be saved for unit testing.

Checklist

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-685

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-685

@gregsheremeta
Copy link
Contributor

/lgtm

Copy link
Contributor

openshift-ci bot commented Aug 13, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from gregsheremeta. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-685

@gregsheremeta
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Aug 13, 2024
@diegolovison
Copy link
Contributor

Due to the we are combining certificates from multiple sources I would like to ask for a new test (ref 1).

  • openshift-service-ca.crt
  • odh-trsuted-ca-bundle
  • dspa -> spec.apiServer
  • dsci

are combined into dsp-trusted-ca-dspa

Each source is a multi-line string YAML attribute, the multi-line string can be represented by |, |-, |+, >, >-, >+

Here is an example:

apiVersion: v1
kind: ConfigMap
metadata:
  name: multi-line-test
data:
  ex1: |-
    Line one.
    Line two.
  ex2: |
    Line one.
    Line two.
  ex3: |+
    Line one.
    Line two.
  ex4: >-
    Line one.
    Line two.
  ex5: >
    Line one.
    Line two.
  ex6: >+
    Line one.
    Line two.    

ex4, ex5, and ex6 can be disregarded because it will result in an invalid certificate. They will remove the new line resulting in the content in a single line.

ref 1
We should focus on ex1, ex2, and ex3. Having a test providing the certificate attribute with |, |-, |+ and asserting the result.

@HumairAK
Copy link
Contributor Author

@diegolovison these tests cases are covered with the PR, except for DSCI, which requires ODH to test, which the current infra does not support, adding odh testing warrants a ticket of its own.

@HumairAK HumairAK merged commit a7c12ce into opendatahub-io:main Aug 13, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants