stop using selfsigned certificate on tlsroute tests#4918
Conversation
c52b0a7 to
1fc4ab0
Compare
| } | ||
|
|
||
| // GetTLSSecret fetches the named Secret and converts both cert and key to []byte | ||
| func GetTLSSecret(client client.Client, secretName types.NamespacedName) ([]byte, []byte, error) { |
There was a problem hiding this comment.
now when it is in tls package TLS in name is redundant
There was a problem hiding this comment.
maybe it would fit better anyway into utils/kubernetes/certificate.go as the tls package is mainly used for creating and asserting TLS connections
There was a problem hiding this comment.
hum, moved to certificate.go, keeping the same function name for now
| if err != nil { | ||
| return cert, key, fmt.Errorf("error fetching TLS Secret: %w", err) | ||
| } | ||
| cert = secret.Data["tls.crt"] |
There was a problem hiding this comment.
I think it will be safer to check if those keys exists in test cases we are checking error but not if cert is not empty
There was a problem hiding this comment.
Maybe too early for me, I don't follow this comment. Do you want me to add a check for the cert not being empty on each test?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rikatz, snorwin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold (sorry @kl52752 I missed your comments) |
|
@snorwin like, this is our plan for 1.7 right? You and me will clean up this whole conformance test :P |
1fc4ab0 to
c33db62
Compare
|
New changes are detected. LGTM label has been removed. |
|
@rikatz: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
/kind bug
/kind cleanup
/area conformance-test
What this PR does / why we need it:
TLSRoute tests were using selfsigned certificate on the TCP backend, which makes other kinds of testing (like TCPRoute and TLSRoute with BackendTLSPolicy) need to import the secret from the backend instead of the CA that signed it.
This PR fixes it and the tests that were once relying on the secret
Which issue(s) this PR fixes:
Does this PR introduce a user-facing change?: