Skip to content

Commit

Permalink
Merge pull request #355 from CARV-ICS-FORTH/fedbed
Browse files Browse the repository at this point in the history
Fix bugs in the mutating webhooks
  • Loading branch information
fnikolai authored Oct 17, 2022
2 parents cd9d9a9 + 993dd8f commit 44b89c2
Show file tree
Hide file tree
Showing 10 changed files with 308 additions and 303 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/admission_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

var _ webhook.Defaulter = &Call{}

// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-call,mutating=true,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=calls,verbs=create;update,versions=v1alpha1,name=vcall.kb.io,admissionReviewVersions={v1,v1alpha1}
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-call,mutating=false,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=calls,verbs=create,versions=v1alpha1,name=vcall.kb.io,admissionReviewVersions={v1,v1alpha1}

var _ webhook.Validator = &Call{}

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/admission_cascade.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

var _ webhook.Defaulter = &Cascade{}

// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-cascade,mutating=true,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=cascades,verbs=create;update,versions=v1alpha1,name=vcascade.kb.io,admissionReviewVersions={v1,v1alpha1}
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-cascade,mutating=false,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=cascades,verbs=create,versions=v1alpha1,name=vcascade.kb.io,admissionReviewVersions={v1,v1alpha1}

var _ webhook.Validator = &Cascade{}

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/admission_chaos.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
var _ webhook.Defaulter = &Chaos{}

// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-chaos,mutating=true,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=chaos,verbs=create;update,versions=v1alpha1,name=vchaos.kb.io,admissionReviewVersions={v1,v1alpha1}
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-chaos,mutating=false,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=chaos,verbs=create,versions=v1alpha1,name=vchaos.kb.io,admissionReviewVersions={v1,v1alpha1}

var _ webhook.Validator = &Chaos{}

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/admission_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

var _ webhook.Defaulter = &Cluster{}

// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-cluster,mutating=true,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=clusters,verbs=create;update,versions=v1alpha1,name=vcluster.kb.io,admissionReviewVersions={v1,v1alpha1}
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-cluster,mutating=false,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=clusters,verbs=create,versions=v1alpha1,name=vcluster.kb.io,admissionReviewVersions={v1,v1alpha1}

var _ webhook.Validator = &Cluster{}

Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/admission_scenario.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

var _ webhook.Defaulter = &Scenario{}

// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-scenario,mutating=true,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=scenarios,verbs=create;update,versions=v1alpha1,name=vscenario.kb.io,admissionReviewVersions={v1,v1alpha1}
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-scenario,mutating=false,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=scenarios,verbs=create,versions=v1alpha1,name=vscenario.kb.io,admissionReviewVersions={v1,v1alpha1}

var _ webhook.Validator = &Scenario{}

Expand Down Expand Up @@ -77,7 +77,7 @@ func (in *Scenario) Default() {

case ActionCall, ActionDelete:
// calls and deletes do not involve templates.
return
continue
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/admission_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

var _ webhook.Defaulter = &Service{}

// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-service,mutating=true,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=services,verbs=create;update,versions=v1alpha1,name=vservice.kb.io,admissionReviewVersions={v1,v1alpha1}
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-service,mutating=false,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=services,verbs=create,versions=v1alpha1,name=vservice.kb.io,admissionReviewVersions={v1,v1alpha1}

var _ webhook.Validator = &Service{}

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/admission_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

var _ webhook.Defaulter = &Template{}

// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-template,mutating=true,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=templates,verbs=create;update,versions=v1alpha1,name=vtemplate.kb.io,admissionReviewVersions={v1,v1alpha1}
// +kubebuilder:webhook:path=/validate-frisbee-dev-v1alpha1-template,mutating=false,failurePolicy=fail,sideEffects=None,groups=frisbee.dev,resources=templates,verbs=create,versions=v1alpha1,name=vtemplate.kb.io,admissionReviewVersions={v1,v1alpha1}

var _ webhook.Validator = &Template{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: webhook-tls
namespace: {{.Release.Namespace}}
spec:
secretName: webhook-tls
duration: 87600h
Expand Down
Loading

0 comments on commit 44b89c2

Please sign in to comment.