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 a ReleaseLink validating webhook #7

Merged
merged 2 commits into from
Apr 25, 2022

Conversation

johnbieren
Copy link
Collaborator

Add a webhook that ensures that no ReleaseLinks are created
or updated to a state with its target the empty string
or the target equal to its namespace

Signed-off-by: Johnny Bieren [email protected]

@johnbieren johnbieren force-pushed the release_link_webhook branch 5 times, most recently from acec660 to 8dc3816 Compare April 19, 2022 01:46
@johnbieren
Copy link
Collaborator Author

redhat-appstudio/application-service#25 is a similar PR to help review

@johnbieren johnbieren force-pushed the release_link_webhook branch 3 times, most recently from 1bbbb01 to 971f940 Compare April 20, 2022 19:38
@johnbieren johnbieren changed the title WIP: Add a ReleaseLink validating webhook Add a ReleaseLink validating webhook Apr 20, 2022
@johnbieren johnbieren force-pushed the release_link_webhook branch 3 times, most recently from 61450d1 to 6980d14 Compare April 21, 2022 00:19
@johnbieren johnbieren requested a review from davidmogar April 21, 2022 11:01
api/v1alpha1/releaselink_webhook.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook_unit_test.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook_unit_test.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook_unit_test.go Outdated Show resolved Hide resolved
api/v1alpha1/releaselink_webhook_unit_test.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@johnbieren johnbieren force-pushed the release_link_webhook branch 4 times, most recently from d878051 to 83fda06 Compare April 22, 2022 16:54
@johnbieren johnbieren force-pushed the release_link_webhook branch 2 times, most recently from 704de74 to f58350b Compare April 22, 2022 20:05
Makefile Outdated Show resolved Hide resolved
@johnbieren johnbieren force-pushed the release_link_webhook branch from f58350b to 90c1790 Compare April 22, 2022 20:10
Copy link
Collaborator

@davidmogar davidmogar left a comment

Choose a reason for hiding this comment

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

We need to remove the defaulting in this webhook, but it can be done in a future PR.

Add a webhook that ensures that no ReleaseLinks are created
or updated to a state with its target equal to its namespace

Signed-off-by: Johnny Bieren <[email protected]>
@johnbieren johnbieren force-pushed the release_link_webhook branch from 90c1790 to 537ecc8 Compare April 25, 2022 12:12
@johnbieren johnbieren merged commit acf609f into konflux-ci:main Apr 25, 2022
@johnbieren johnbieren deleted the release_link_webhook branch April 25, 2022 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants