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

Github Gateway #95

Closed
iterion opened this issue Oct 5, 2018 · 2 comments
Closed

Github Gateway #95

iterion opened this issue Oct 5, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@iterion
Copy link

iterion commented Oct 5, 2018

The hooks gateway already provides a decent way to pipe events from GitHub into argo-events. However, it would either require manual setup for each repo or an organization-wide rule to receive GitHub hooks. For some, the organization-wide rule might not be tenable, even though it's the easiest option. Additionally, the hooks gateway would just send along the hook payload, but we could do some deeper introspection on the hook to better fill out the metadata on the events that are generated.

Instead, it might be nice to have a custom gateway specifically focused on GitHub. It would do two primary things. Support an easy way to configure hooks for a repo through the GitHub API. And, provide a GitHub specific transformation from GitHub events to the CloudEvents specification.

This could be implemented via a separate controller that configures hooks and the appropriate argo-events webhook gateways. But, I think a tighter integration as a gateway would offer a better experience for users.

Proposed config:

type githubConfig struct {
	// GitHub owner name i.e. argoproj
	Owner string

	// GitHub repo name i.e. argo-events
	Repo string

	// Github events to subscribe to which the gateway will subscribe
	Events []string

	// Hostname for hooks
	Hostname string
}
@VaibhavPage
Copy link
Contributor

VaibhavPage commented Oct 7, 2018

Can we add a field for github api token for authentication,


type githubConfig struct {
	// GitHub owner name i.e. argoproj
	Owner string

	// GitHub repo name i.e. argo-events
	Repo string

	// Github events to subscribe to which the gateway will subscribe
	Events []string

	// Hostname for hooks
	Hostname string

       // K8 secret containing github api token
       APIToken  GithubToken
}

type GithubToken struct {
  // Name of k8 secret containing api token
   Name  string
   // Key for api token
   Key string
}

@iterion
Copy link
Author

iterion commented Oct 8, 2018

Yep, agree, we also need the APIToken.

@VaibhavPage VaibhavPage added the enhancement New feature or request label Oct 9, 2018
@VaibhavPage VaibhavPage added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 13, 2018
pjediny added a commit to pjediny/argo-events that referenced this issue Jan 9, 2019
pjediny added a commit to pjediny/argo-events that referenced this issue Jan 10, 2019
VaibhavPage pushed a commit that referenced this issue Jan 10, 2019
* Refactoring gateway

* Updated state handling of event sources

* updating gateways

* refactor resource gateway

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* refactoring sensor

* refactoring controllers

* refactoring controllers

* Updating hack

* Updating documentation

* updated examples

* Adding recover in gateways

* Gateway is now deployed as a pod instead of deployment

* refactoring state machine of sensor and gateway

* Updating sensor and gateway state machine

* Updating sensor and gateway state machine

* Updating examples

* Add custom GitHub gateway

Issue #95
VaibhavPage added a commit that referenced this issue Jan 16, 2019
* Refactoring gateway

* Updated state handling of event sources

* updating gateways

* refactor resource gateway

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* refactoring sensor

* refactoring controllers

* refactoring controllers

* Updating hack

* Updating documentation

* updated examples

* Adding recover in gateways

* Gateway is now deployed as a pod instead of deployment

* refactoring state machine of sensor and gateway

* Updating sensor and gateway state machine

* Updating sensor and gateway state machine

* Updating examples

* Updating resource gateway

* Updating gateway validation

* reverting examples

* Add custom GitHub gateway (#150)

* Refactoring gateway

* Updated state handling of event sources

* updating gateways

* refactor resource gateway

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* refactoring sensor

* refactoring controllers

* refactoring controllers

* Updating hack

* Updating documentation

* updated examples

* Adding recover in gateways

* Gateway is now deployed as a pod instead of deployment

* refactoring state machine of sensor and gateway

* Updating sensor and gateway state machine

* Updating sensor and gateway state machine

* Updating examples

* Add custom GitHub gateway

Issue #95

* minor docs fix

* minor docs fix

* minor docs fix

* Adding tests back

* Adding tests back

* Adding tests back

* Adding tests back

* Adding tests back
juliev0 pushed a commit to juliev0/argo-events that referenced this issue Mar 29, 2022
* Refactoring gateway

* Updated state handling of event sources

* updating gateways

* refactor resource gateway

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* refactoring sensor

* refactoring controllers

* refactoring controllers

* Updating hack

* Updating documentation

* updated examples

* Adding recover in gateways

* Gateway is now deployed as a pod instead of deployment

* refactoring state machine of sensor and gateway

* Updating sensor and gateway state machine

* Updating sensor and gateway state machine

* Updating examples

* Updating resource gateway

* Updating gateway validation

* reverting examples

* Add custom GitHub gateway (argoproj#150)

* Refactoring gateway

* Updated state handling of event sources

* updating gateways

* refactor resource gateway

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* updating gateways

* refactoring sensor

* refactoring controllers

* refactoring controllers

* Updating hack

* Updating documentation

* updated examples

* Adding recover in gateways

* Gateway is now deployed as a pod instead of deployment

* refactoring state machine of sensor and gateway

* Updating sensor and gateway state machine

* Updating sensor and gateway state machine

* Updating examples

* Add custom GitHub gateway

Issue argoproj#95

* minor docs fix

* minor docs fix

* minor docs fix

* Adding tests back

* Adding tests back

* Adding tests back

* Adding tests back

* Adding tests back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants