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

Adding create-webhook tekton task #82

Merged
merged 1 commit into from
Aug 30, 2019

Conversation

akihikokuroda
Copy link
Member

@akihikokuroda akihikokuroda commented Aug 26, 2019

This PR is for the issue #80.

This task configures components necessary for the github event processing.
The compoments are:

  1. Selfsigned certificate for the Ingress
  2. Ingress with TLS for the event listener
  3. Github (or Github enterprize) webhook
  4. Event listener

All componet configurations are optional. They can be truned off
by the parameter in the taskrun.

Changes

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

Describe any user facing changes here, or delete this block.

Examples of user facing changes:
- API changes
- Bug fixes
- Any changes in behavior

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 26, 2019
@akihikokuroda
Copy link
Member Author

I'll add readme file for this.

@akihikokuroda
Copy link
Member Author

I added createwebhook.md.

@akihikokuroda
Copy link
Member Author

/retest

Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

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

Wow! I love that you make a Task to do this, this is super cool :D ❤️

  • Can we add a link to the new docs somewhere, e.g. from the main README or maybe we can start an install guide (which we would also want to link to from the main README)
  • One great thing about this being a Task vs. just docs is that we can test it. I'd love to see automated tests to run this - if you don't want to add that @akihikokuroda could you add an issue to the backlog to add the tests?

volumes:
- name: github-secret
secret:
secretName: ${inputs.params.GithubSecretName}
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we want this to work with > 0.6 we should make the ${} into $() instead

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll change them.

exit 0
fi
apk update
apk add openssl
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious why we want to update and install this here - is there another image we can use which would include these prerequisites already?

Copy link
Member Author

Choose a reason for hiding this comment

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

I looked for the image with the kubectl and the openssl but I couldn't find one so far.

Copy link
Member Author

Choose a reason for hiding this comment

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

When I tried this task on OpenShift, the apk didn't work with the default security context. So I looked for the images again and updated. Thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks @akihikokuroda !

(I've found the same thing - it's hard to choose the right image to use when you need to use 2 tools together - cuz usually an image will have one but not the other :S)

- value: triggertemplate CR instnace name
- name: TriggerServiceAccount
This param is the service account name set in the event listener
- value: service account name
Copy link
Collaborator

Choose a reason for hiding this comment

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

just a formatting thing, looking at the rendered markdown, using `` around some of the text will make it visually a bit clearer, e.g.:

- name: `TriggerTemplate`
  This param has the trigger template set in the event listener 
  - value: triggertemplate CR instance name

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it makes the doc more readable. Thanks.

- value: triggerbinding CR instance name
- name: TriggerTemplate
This param has the trigger template set in the event listener
- value: triggertemplate CR instnace name
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: instnace

Copy link
Member Author

Choose a reason for hiding this comment

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

I fix it. Thanks.


The ingress exposes the event listener to the outside of the cluster.

The followig task params must be set for the creation of the ingress.
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: followig

Copy link
Member Author

Choose a reason for hiding this comment

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

I fix them. Thanks.

@akihikokuroda
Copy link
Member Author

@bobcatfish Thanks for reviewing. I added a comment in the "getting started guide" #13 issue about putting the reference from it. I'll open a separate issue about the testing of the task in the backlog.

@akihikokuroda
Copy link
Member Author

I created the issue for the automated test. #86

@akihikokuroda
Copy link
Member Author

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 29, 2019
@akihikokuroda
Copy link
Member Author

I have some issues running this on the OpenShift.

apk add curl
echo "Create Webhook"
if [ $(inputs.params.GithubUrl) = "github.com" ]
then
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need secret also for securing endpoint?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, eventually. The handling of the github secret is not in the event listener yet. When it is implemented, the secret should be added.

This task configures components necessary for the github event processing.
The compoments are:

1. Selfsigned certificate for the Ingress
2. Ingress with TLS for the event listener
3. Github (or Github enterprize) webhook
4. Event listener

All componet configurations are optional.  They can be truned off
by the parameter in the taskrun.
@akihikokuroda
Copy link
Member Author

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 30, 2019
@bobcatfish
Copy link
Collaborator

Okay let's do it @akihikokuroda !

I think we should link to this from the main README too but not a big deal and we can always add it later :D

/lgtm
/meow space

@tekton-robot
Copy link

@bobcatfish: cat image

In response to this:

Okay let's do it @akihikokuroda !

I think we should link to this from the main README too but not a big deal and we can always add it later :D

/lgtm
/meow space

Instructions 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/test-infra repository.

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2019
@bobcatfish
Copy link
Collaborator

hm still not a space cat

@bobcatfish
Copy link
Collaborator

image

@bobcatfish
Copy link
Collaborator

/approve

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akihikokuroda, bobcatfish

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 30, 2019
@tekton-robot tekton-robot merged commit e80e8f3 into tektoncd:master Aug 30, 2019
@akihikokuroda akihikokuroda deleted the webhooktask branch August 30, 2019 18:17
piyush-garg pushed a commit to piyush-garg/triggers that referenced this pull request Mar 24, 2020
Removing myself from approvers/reviewers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants