Skip to content

feat: add validating webhook for KeptnTaskDefinition#1514

Merged
odubajDT merged 47 commits intokeptn:mainfrom
geoffrey1330:feat/1486/validating_webhook
Jun 7, 2023
Merged

feat: add validating webhook for KeptnTaskDefinition#1514
odubajDT merged 47 commits intokeptn:mainfrom
geoffrey1330:feat/1486/validating_webhook

Conversation

@geoffrey1330
Copy link
Copy Markdown
Member

@geoffrey1330 geoffrey1330 commented Jun 2, 2023

Fixes #1486 Added webhook validation for TaskDefinitions in the lifecycle operator

@geoffrey1330 geoffrey1330 requested a review from a team as a code owner June 2, 2023 09:05
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 2, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit d6a4800
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/6479b0c6f1636a000893ebb4
😎 Deploy Preview https://deploy-preview-1514--keptn-lifecycle-toolkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

odubajDT and others added 2 commits June 2, 2023 14:20
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
@geoffrey1330 geoffrey1330 force-pushed the feat/1486/validating_webhook branch from d6a4800 to 2af1475 Compare June 2, 2023 13:20
@github-actions github-actions Bot added documentation Improvements or additions to documentation helm ops labels Jun 2, 2023
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
…r container spec but not both

Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
@github-actions github-actions Bot removed documentation Improvements or additions to documentation ops helm labels Jun 2, 2023
…ffrey1330/lifecycle-toolkit into feat/1486/validating_webhook

Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
…r container spec but not both

Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Copy link
Copy Markdown
Member

@rakshitgondwal rakshitgondwal 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 this webhook to work when a KeptnTaskDefinition gets created or updated, thus we'll need to return the validateKeptnTaskDefinition function on ValidateCreate and ValidateUpdate.

Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
geoffrey1330 and others added 10 commits June 2, 2023 18:16
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
…r container spec but not both

Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Copy link
Copy Markdown
Member

@rakshitgondwal rakshitgondwal left a comment

Choose a reason for hiding this comment

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

Made a small typo, sorry. Can you fix this? @geoffrey1330

Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook.go Outdated
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Comment thread operator/apis/lifecycle/v1alpha3/keptntaskdefinition_webhook_test.go Outdated
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
geoffrey1330 and others added 2 commits June 6, 2023 08:58
…est.go

Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
…) methods

Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@odubajDT odubajDT merged commit d55a7ef into keptn:main Jun 7, 2023
@odubajDT
Copy link
Copy Markdown
Contributor

odubajDT commented Jun 7, 2023

@rakshitgondwal @geoffrey1330 awesome job! Thank you very much for contribution :)

@rakshitgondwal
Copy link
Copy Markdown
Member

Kudos to @geoffrey1330!

@geoffrey1330
Copy link
Copy Markdown
Member Author

Kudos to @geoffrey1330!

Thanks for the support @rakshitgondwal

StackScribe pushed a commit to StackScribe/lifecycle-toolkit that referenced this pull request Jun 22, 2023
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: geoffrey1330 <israelgeoffrey13@gmail.com>
Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com>
Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Co-authored-by: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com>
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
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.

Introduce a validating webhook for TaskDefinitions

5 participants