Skip to content

Commit

Permalink
Remove kubebuilder annotations;Remove defaulting comments; Update mak…
Browse files Browse the repository at this point in the history
…efile
  • Loading branch information
Kavitha Krishnan committed Feb 23, 2022
1 parent 57ac9c3 commit 0850842
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ cross:

.PHONY: manifests
manifests:
controller-gen object crd:trivialVersions=true,preserveUnknownFields=false rbac:roleName=cosigned-rbac webhook paths="./pkg/cosign/kubernetes/apis/..." output:crd:artifacts:config=config output:webhook:artifacts:config=config
$(eval SVCNAME=$(shell yq e '.metadata.name' ./config/400-webhook-service.yaml))
$(eval SVCNAMESPACE=$(shell yq e '.metadata.namespace' ./config/400-webhook-service.yaml))
yq --inplace e 'with(.webhooks[0].clientConfig.service; .name = "$(SVCNAME)" | .namespace = "$(SVCNAMESPACE)")' ./config/manifests.yaml
controller-gen object crd:trivialVersions=true,preserveUnknownFields=false paths="./pkg/cosign/kubernetes/apis/..." output:crd:artifacts:config=config

#####################
# lint / test section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,5 @@ import (
"context"
)

// +kubebuilder:webhook:verbs=create;update,path=/default-sigstore-dev-v1alpha1-clusterimagepolicy,mutating=true,failurePolicy=fail,matchPolicy=Equivalent,groups=sigstore.dev,resources=clusterimagepolicies,versions=v1alpha1,name=defaulting.clusterimagepolicy.sigstore.dev,sideEffects=None,admissionReviewVersions=v1

func (ip *ClusterImagePolicy) SetDefaults(ctx context.Context) {
/*
ip.Spec = ClusterImagePolicySpec{
Images: []ImagePattern{
ImagePattern{"*"},
},
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"knative.dev/pkg/apis"
)

// +kubebuilder:webhook:verbs=create;update,path=/validate-sigstore-dev-v1alpha1-clusterimagepolicy,mutating=false,failurePolicy=fail,matchPolicy=Equivalent,groups=sigstore.dev,resources=clusterimagepolicies,versions=v1alpha1,name=validation.clusterimagepolicy.sigstore.dev,sideEffects=None,admissionReviewVersions=v1

func (ip *ClusterImagePolicy) Validate(ctx context.Context) *apis.FieldError {
return nil
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0850842

Please sign in to comment.