-
Notifications
You must be signed in to change notification settings - Fork 420
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
Allow secure connection to eventlistener pod #819
Allow secure connection to eventlistener pod #819
Conversation
c81be10
to
6264fb2
Compare
3d73905
to
5668819
Compare
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.
Overall looks good. Just some minor comments. Also, how feasible would it be to add an e2e test for this?
(Also noticed some questions on tektoncd/community#244 that we should resolve before merging this)
5668819
to
604c8d1
Compare
604c8d1
to
309185c
Compare
9af1b9a
to
94c22a9
Compare
0740e24
to
bbd8248
Compare
/lgtm Code looks fine. Pending design discussion on using |
bbd8248
to
f057378
Compare
The following is the coverage report on the affected files.
|
func envVarSourceMask(in *corev1.EnvVarSource) *corev1.EnvVarSource { | ||
if in == nil { | ||
return nil | ||
} | ||
out := new(corev1.EnvVarSource) | ||
// Allowed fields | ||
out.SecretKeyRef = in.SecretKeyRef | ||
|
||
// Disallowed fields | ||
out.ConfigMapKeyRef = nil | ||
out.FieldRef = nil | ||
out.ResourceFieldRef = nil | ||
|
||
return out | ||
} |
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 own to refactor changes related to masking fields in a follow up PR by creating separate file so that _validation.go
will have changes related to validation
f057378
to
7e97b68
Compare
The following is the coverage report on the affected files.
|
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.
One small nit about docs otherwise LGTM!
/approve
docs/eventlisteners.md
Outdated
|
||
## EventListener Secure Connection | ||
|
||
Triggers now support both `HTTP` and `HTTPS` connection by adding few configurations to eventlistener. |
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.
Could we add a little bit more detail here? e.g. :
even a like like -- To setup TLS, add set two environment variables TLS_CERT
, and TLS_KEY
with values set to a Secret. See the full example(LINK) for details`
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.
Updated
7e97b68
to
978df6f
Compare
The following is the coverage report on the affected files.
|
``` | ||
|
||
#### Configuring EventListener for TLS connection | ||
```yaml |
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: Why not put this in yaml file like other examples? It make it faster to test out examples. Otherwise, lgtm.
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.
The dependency is on secret which is given by user and which contains cert and key files so just added sample example in README so that user can refer
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.
We can probably assume tls-key-secret
as secretKeyRef.
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.
if we assume then we should create that before hand and for that we also need to create cert n keys
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.
It's OK to not create key beforehand because those command will do it anyway.
978df6f
to
7ae961f
Compare
The following is the coverage report on the affected files.
|
7ae961f
to
6633356
Compare
The following is the coverage report on the affected files.
|
6633356
to
dfdd879
Compare
The following is the coverage report on the affected files.
|
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom, khrm 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 |
…ented TEP-0027 was implemented in tektoncd/triggers#819. This change updates the TEP state from `implementable` to `implemented`.
…ented TEP-0027 was implemented in tektoncd/triggers#819. This change updates the TEP state from `implementable` to `implemented`.
Changes
Issue: #650
As part of this PR Triggers eventlistener now support end to end secure connection to eventlistener pod.
For more info about the feature refer TEP-0027 .
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes
HTTPS
connection to eventlistener can be configured by tweaking eventlistener configurationNote:
TLS_CERT
,TLS_KEY
are RESERVED env