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 webhookUrl optional property to the GitServer spec #37

Closed
zmotso opened this issue Jan 4, 2024 · 1 comment
Closed

Add webhookUrl optional property to the GitServer spec #37

zmotso opened this issue Jan 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@zmotso
Copy link
Contributor

zmotso commented Jan 4, 2024

Is your feature request related to a problem? Please describe.
We need to have the possibility to redefine the webhook URL. For example, GCP uses HTTPRoute instead of Ingress, and our current approach(webhook URL is taken from hardcoded reference to Ingress) doesn't work.

Describe the solution you'd like

  • We need to extend the GitServer specification by adding a new field called webhookUrl. This field will be used to define the webhook URL.
  • The codebase-operator should first check this new field; if it is not defined, then it should try to use the current approach to get the URL from the ingress.
  • If both methods fail to retrieve the URL, then the codebase-operator should fail with an error message stating that it cannot set the webhook URL.

Additional context
Add any other context or screenshots about the feature request here.

@zmotso zmotso self-assigned this Jan 4, 2024
@zmotso zmotso added the enhancement New feature or request label Jan 4, 2024
epmd-edp pushed a commit that referenced this issue Jan 4, 2024
We added the possibility of redefining the webhook URL.
We need this for cases where we can't use Ingress.
For example, GCP uses HTTPRoute instead of Ingress,
and our current approach(take webhook URL from hardcoded Ingress) doesn't work.

Updated controller-gen to v0.13.0 to support `+kubebuilder:example` tag.

Change-Id: Ie4f03ddc0abaa09099cf07b0b4830acf688448b4
@zmotso
Copy link
Contributor Author

zmotso commented Jan 8, 2024

Done. GitServer example:

kind: GitServer
apiVersion: v2.edp.epam.com/v1
metadata:
  name: gitlab
spec:
  gitHost: gitlab.com
  httpsPort: 443
  nameSshKeySecret: ssh-key
  sshPort: 22
  gitProvider: gitlab
  webhookUrl: https://test.com:8080/webhook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant