diff --git a/.github/workflows/kind-e2e-cosigned.yaml b/.github/workflows/kind-e2e-cosigned.yaml index 110946c50ad8..b33c72dac58b 100644 --- a/.github/workflows/kind-e2e-cosigned.yaml +++ b/.github/workflows/kind-e2e-cosigned.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Cosigned KinD E2E +name: Policy Controller KinD E2E on: pull_request: @@ -121,7 +121,7 @@ jobs: run: | ./test/e2e_test_policy_crd.sh - - name: Run Cosigned Tests + - name: Run Policy Controller Tests run: | ./test/e2e_test_policy_controller.sh diff --git a/cmd/cosign/policy_webhook/main.go b/cmd/cosign/policy_webhook/main.go index a7e088dc6fc5..82f54c4fb104 100644 --- a/cmd/cosign/policy_webhook/main.go +++ b/cmd/cosign/policy_webhook/main.go @@ -33,9 +33,9 @@ import ( "knative.dev/pkg/webhook/resourcesemantics/validation" "sigs.k8s.io/release-utils/version" - "github.com/sigstore/cosign/pkg/apis/policycontroller" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + "github.com/sigstore/cosign/pkg/apis/policy" + "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" + "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" "github.com/sigstore/cosign/pkg/reconciler/clusterimagepolicy" // Register the provider-specific plugins @@ -135,7 +135,7 @@ func newConversionController(ctx context.Context, cmw configmap.Watcher) *contro // Specify the types of custom resource definitions that should be converted map[schema.GroupKind]conversion.GroupKindConversion{ v1beta1.Kind("ClusterImagePolicy"): { - DefinitionName: policycontroller.ClusterImagePolicyResource.String(), + DefinitionName: policy.ClusterImagePolicyResource.String(), HubVersion: v1alpha1GroupVersion, Zygotes: map[string]conversion.ConvertibleObject{ v1alpha1GroupVersion: &v1alpha1.ClusterImagePolicy{}, diff --git a/cmd/cosign/webhook/main.go b/cmd/cosign/webhook/main.go index a4d43dbefba8..6de012148a62 100644 --- a/cmd/cosign/webhook/main.go +++ b/cmd/cosign/webhook/main.go @@ -52,7 +52,7 @@ var secretName = flag.String("secret-name", "", "The name of the secret in the w // ./config/500-webhook-configuration.yaml // https://github.com/sigstore/helm-charts/blob/main/charts/policy-controller/templates/webhook/webhook_mutating.yaml // https://github.com/sigstore/helm-charts/blob/main/charts/policy-controller/templates/webhook/webhook_validating.yaml -var webhookName = flag.String("webhook-name", "policycontroller.sigstore.dev", "The name of the validating and mutating webhook configurations as well as the webhook name that is automatically configured, if exists, with different rules and client settings setting how the admission requests to be dispatched to policy-controller.") +var webhookName = flag.String("webhook-name", "policy.sigstore.dev", "The name of the validating and mutating webhook configurations as well as the webhook name that is automatically configured, if exists, with different rules and client settings setting how the admission requests to be dispatched to policy-controller.") func main() { opts := webhook.Options{ diff --git a/cmd/schema/main.go b/cmd/schema/main.go index 83badbb8f67a..62bcaf88d389 100644 --- a/cmd/schema/main.go +++ b/cmd/schema/main.go @@ -20,7 +20,7 @@ import ( "knative.dev/hack/schema/commands" "knative.dev/hack/schema/registry" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" ) // schema is a tool to dump the schema for Eventing resources. diff --git a/config/100-namespace.yaml b/config/100-namespace.yaml index 5fc7b3956d79..8fcf2831b6f6 100644 --- a/config/100-namespace.yaml +++ b/config/100-namespace.yaml @@ -17,4 +17,4 @@ kind: Namespace metadata: name: cosign-system labels: - policycontroller.sigstore.dev/include: "false" + policy.sigstore.dev/include: "false" diff --git a/config/200-clusterrole.yaml b/config/200-clusterrole.yaml index e02dc6faa98a..4a99e09f9af2 100644 --- a/config/200-clusterrole.yaml +++ b/config/200-clusterrole.yaml @@ -28,7 +28,7 @@ rules: - apiGroups: ["admissionregistration.k8s.io"] resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"] verbs: ["get", "update"] - resourceNames: ["policycontroller.sigstore.dev", "validating.clusterimagepolicy.sigstore.dev", "defaulting.clusterimagepolicy.sigstore.dev"] + resourceNames: ["policy.sigstore.dev", "validating.clusterimagepolicy.sigstore.dev", "defaulting.clusterimagepolicy.sigstore.dev"] - apiGroups: [""] resources: ["namespaces"] @@ -45,10 +45,10 @@ rules: - apiGroups: ["apiextensions.k8s.io"] resources: ["customresourcedefinitions"] verbs: ["get", "update"] - resourceNames: ["clusterimagepolicies.policycontroller.sigstore.dev"] + resourceNames: ["clusterimagepolicies.policy.sigstore.dev"] # Allow reconciliation of the ClusterImagePolic CRDs. - - apiGroups: ["policycontroller.sigstore.dev", "validating.clusterimagepolicy.sigstore.dev", "defaulting.clusterimagepolicy.sigstore.dev"] + - apiGroups: ["policy.sigstore.dev", "validating.clusterimagepolicy.sigstore.dev", "defaulting.clusterimagepolicy.sigstore.dev"] resources: ["clusterimagepolicies"] verbs: ["get", "list", "update", "watch", "patch"] diff --git a/config/300-clusterimagepolicy.yaml b/config/300-clusterimagepolicy.yaml index 0a69a147b4d1..e8d5d8ce4a32 100644 --- a/config/300-clusterimagepolicy.yaml +++ b/config/300-clusterimagepolicy.yaml @@ -14,9 +14,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: clusterimagepolicies.policycontroller.sigstore.dev + name: clusterimagepolicies.policy.sigstore.dev spec: - group: policycontroller.sigstore.dev + group: policy.sigstore.dev names: kind: ClusterImagePolicy plural: clusterimagepolicies diff --git a/config/500-webhook-configuration.yaml b/config/500-webhook-configuration.yaml index 34dc2eeb8caa..8a9660771063 100644 --- a/config/500-webhook-configuration.yaml +++ b/config/500-webhook-configuration.yaml @@ -15,13 +15,13 @@ apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - name: policycontroller.sigstore.dev + name: policy.sigstore.dev webhooks: -- name: policycontroller.sigstore.dev +- name: policy.sigstore.dev namespaceSelector: # The webhook should only apply to things that opt-in matchExpressions: - - key: policycontroller.sigstore.dev/include + - key: policy.sigstore.dev/include operator: In values: ["true"] admissionReviewVersions: [v1] @@ -37,13 +37,13 @@ webhooks: apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - name: policycontroller.sigstore.dev + name: policy.sigstore.dev webhooks: -- name: policycontroller.sigstore.dev +- name: policy.sigstore.dev namespaceSelector: # The webhook should only apply to things that opt-in matchExpressions: - - key: policycontroller.sigstore.dev/include + - key: policy.sigstore.dev/include operator: In values: ["true"] admissionReviewVersions: [v1] diff --git a/config/policy-webhook.yaml b/config/policy-webhook.yaml index 063c77a8dafc..d66607c50f90 100644 --- a/config/policy-webhook.yaml +++ b/config/policy-webhook.yaml @@ -60,7 +60,7 @@ spec: - name: CONFIG_LOGGING_NAME value: config-logging - name: METRICS_DOMAIN - value: sigstore.dev/policycontroller + value: sigstore.dev/policy - name: WEBHOOK_NAME value: policy-webhook diff --git a/config/webhook.yaml b/config/webhook.yaml index a64e53977e60..884ff58655c1 100644 --- a/config/webhook.yaml +++ b/config/webhook.yaml @@ -60,7 +60,7 @@ spec: - name: CONFIG_LOGGING_NAME value: config-logging - name: METRICS_DOMAIN - value: sigstore.dev/policycontroller + value: sigstore.dev/policy - name: WEBHOOK_NAME value: webhook # Since we need to validate against different Rekor clients based on diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index c1f7018bfd37..d84243ffb950 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -45,7 +45,7 @@ group "Kubernetes Codegen" # instead of the $GOPATH directly. For normal projects this can be dropped. ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ github.com/sigstore/cosign/pkg/client github.com/sigstore/cosign/pkg/apis \ - "policycontroller:v1alpha1 policycontroller:v1beta1" \ + "policy:v1alpha1 policy:v1beta1" \ --go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt group "Knative Codegen" @@ -53,7 +53,7 @@ group "Knative Codegen" # Knative Injection ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \ github.com/sigstore/cosign/pkg/client github.com/sigstore/cosign/pkg/apis \ - "policycontroller:v1alpha1 policycontroller:v1beta1" \ + "policy:v1alpha1 policy:v1beta1" \ --go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt group "Update CRD Schema" diff --git a/pkg/apis/config/testdata/config-image-policies.yaml b/pkg/apis/config/testdata/config-image-policies.yaml index bb4ad4e7fae1..71f729406287 100644 --- a/pkg/apis/config/testdata/config-image-policies.yaml +++ b/pkg/apis/config/testdata/config-image-policies.yaml @@ -18,7 +18,7 @@ metadata: name: config-image-policies namespace: cosign-system labels: - policycontroller.sigstore.dev/release: devel + policy.sigstore.dev/release: devel data: _example: | diff --git a/pkg/apis/policycontroller/register.go b/pkg/apis/policy/register.go similarity index 92% rename from pkg/apis/policycontroller/register.go rename to pkg/apis/policy/register.go index f89604426259..17b92b201a6a 100644 --- a/pkg/apis/policycontroller/register.go +++ b/pkg/apis/policy/register.go @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policycontroller +package policy import "k8s.io/apimachinery/pkg/runtime/schema" const ( // GroupName is the name of the API group. - GroupName = "policycontroller.sigstore.dev" + GroupName = "policy.sigstore.dev" ) var ( diff --git a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_conversion.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_conversion.go similarity index 98% rename from pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_conversion.go rename to pkg/apis/policy/v1alpha1/clusterimagepolicy_conversion.go index 9e067750f590..f390066772d6 100644 --- a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_conversion.go +++ b/pkg/apis/policy/v1alpha1/clusterimagepolicy_conversion.go @@ -18,7 +18,7 @@ import ( "context" "fmt" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" v1 "k8s.io/api/core/v1" "knative.dev/pkg/apis" ) diff --git a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_conversion_test.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_conversion_test.go similarity index 98% rename from pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_conversion_test.go rename to pkg/apis/policy/v1alpha1/clusterimagepolicy_conversion_test.go index fd2c0d870e29..80f950dfc10e 100644 --- a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_conversion_test.go +++ b/pkg/apis/policy/v1alpha1/clusterimagepolicy_conversion_test.go @@ -22,7 +22,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" ) // Test v1alpha1 -> v1beta1 -> v1alpha1 diff --git a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_defaults.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_defaults.go similarity index 100% rename from pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_defaults.go rename to pkg/apis/policy/v1alpha1/clusterimagepolicy_defaults.go diff --git a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_defaults_test.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_defaults_test.go similarity index 100% rename from pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_defaults_test.go rename to pkg/apis/policy/v1alpha1/clusterimagepolicy_defaults_test.go diff --git a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_types.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_types.go similarity index 100% rename from pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_types.go rename to pkg/apis/policy/v1alpha1/clusterimagepolicy_types.go diff --git a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_validation.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_validation.go similarity index 100% rename from pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_validation.go rename to pkg/apis/policy/v1alpha1/clusterimagepolicy_validation.go diff --git a/pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_validation_test.go b/pkg/apis/policy/v1alpha1/clusterimagepolicy_validation_test.go similarity index 100% rename from pkg/apis/policycontroller/v1alpha1/clusterimagepolicy_validation_test.go rename to pkg/apis/policy/v1alpha1/clusterimagepolicy_validation_test.go diff --git a/pkg/apis/policycontroller/v1alpha1/doc.go b/pkg/apis/policy/v1alpha1/doc.go similarity index 93% rename from pkg/apis/policycontroller/v1alpha1/doc.go rename to pkg/apis/policy/v1alpha1/doc.go index 5619e7dc1b41..253e048cc817 100644 --- a/pkg/apis/policycontroller/v1alpha1/doc.go +++ b/pkg/apis/policy/v1alpha1/doc.go @@ -13,5 +13,5 @@ // limitations under the License. // +k8s:deepcopy-gen=package -// +groupName=policycontroller.sigstore.dev +// +groupName=policy.sigstore.dev package v1alpha1 diff --git a/pkg/apis/policycontroller/v1alpha1/register.go b/pkg/apis/policy/v1alpha1/register.go similarity index 90% rename from pkg/apis/policycontroller/v1alpha1/register.go rename to pkg/apis/policy/v1alpha1/register.go index d30bdefe963e..fa2d638a0982 100644 --- a/pkg/apis/policycontroller/v1alpha1/register.go +++ b/pkg/apis/policy/v1alpha1/register.go @@ -15,7 +15,7 @@ package v1alpha1 import ( - policycontroller "github.com/sigstore/cosign/pkg/apis/policycontroller" + policy "github.com/sigstore/cosign/pkg/apis/policy" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -23,7 +23,7 @@ import ( ) // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: policycontroller.GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: policy.GroupName, Version: "v1alpha1"} // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { diff --git a/pkg/apis/policycontroller/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/policy/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from pkg/apis/policycontroller/v1alpha1/zz_generated.deepcopy.go rename to pkg/apis/policy/v1alpha1/zz_generated.deepcopy.go diff --git a/pkg/apis/policycontroller/v1beta1/clusterimagepolicy_conversion.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_conversion.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/clusterimagepolicy_conversion.go rename to pkg/apis/policy/v1beta1/clusterimagepolicy_conversion.go diff --git a/pkg/apis/policycontroller/v1beta1/clusterimagepolicy_conversion_test.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_conversion_test.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/clusterimagepolicy_conversion_test.go rename to pkg/apis/policy/v1beta1/clusterimagepolicy_conversion_test.go diff --git a/pkg/apis/policycontroller/v1beta1/clusterimagepolicy_defaults.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_defaults.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/clusterimagepolicy_defaults.go rename to pkg/apis/policy/v1beta1/clusterimagepolicy_defaults.go diff --git a/pkg/apis/policycontroller/v1beta1/clusterimagepolicy_defaults_test.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_defaults_test.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/clusterimagepolicy_defaults_test.go rename to pkg/apis/policy/v1beta1/clusterimagepolicy_defaults_test.go diff --git a/pkg/apis/policycontroller/v1beta1/clusterimagepolicy_types.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_types.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/clusterimagepolicy_types.go rename to pkg/apis/policy/v1beta1/clusterimagepolicy_types.go diff --git a/pkg/apis/policycontroller/v1beta1/clusterimagepolicy_validation.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_validation.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/clusterimagepolicy_validation.go rename to pkg/apis/policy/v1beta1/clusterimagepolicy_validation.go diff --git a/pkg/apis/policycontroller/v1beta1/clusterimagepolicy_validation_test.go b/pkg/apis/policy/v1beta1/clusterimagepolicy_validation_test.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/clusterimagepolicy_validation_test.go rename to pkg/apis/policy/v1beta1/clusterimagepolicy_validation_test.go diff --git a/pkg/apis/policycontroller/v1beta1/doc.go b/pkg/apis/policy/v1beta1/doc.go similarity index 93% rename from pkg/apis/policycontroller/v1beta1/doc.go rename to pkg/apis/policy/v1beta1/doc.go index d760ba90fa58..929ce54bba26 100644 --- a/pkg/apis/policycontroller/v1beta1/doc.go +++ b/pkg/apis/policy/v1beta1/doc.go @@ -13,5 +13,5 @@ // limitations under the License. // +k8s:deepcopy-gen=package -// +groupName=policycontroller.sigstore.dev +// +groupName=policy.sigstore.dev package v1beta1 diff --git a/pkg/apis/policycontroller/v1beta1/register.go b/pkg/apis/policy/v1beta1/register.go similarity index 90% rename from pkg/apis/policycontroller/v1beta1/register.go rename to pkg/apis/policy/v1beta1/register.go index b18174acc18c..e356f8826c7f 100644 --- a/pkg/apis/policycontroller/v1beta1/register.go +++ b/pkg/apis/policy/v1beta1/register.go @@ -15,7 +15,7 @@ package v1beta1 import ( - policycontroller "github.com/sigstore/cosign/pkg/apis/policycontroller" + policy "github.com/sigstore/cosign/pkg/apis/policy" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -23,7 +23,7 @@ import ( ) // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: policycontroller.GroupName, Version: "v1beta1"} +var SchemeGroupVersion = schema.GroupVersion{Group: policy.GroupName, Version: "v1beta1"} // Kind takes an unqualified kind and returns back a Group qualified GroupKind func Kind(kind string) schema.GroupKind { diff --git a/pkg/apis/policycontroller/v1beta1/zz_generated.deepcopy.go b/pkg/apis/policy/v1beta1/zz_generated.deepcopy.go similarity index 100% rename from pkg/apis/policycontroller/v1beta1/zz_generated.deepcopy.go rename to pkg/apis/policy/v1beta1/zz_generated.deepcopy.go diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index b49256a08799..7742a57c450c 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -20,8 +20,8 @@ import ( "fmt" "net/http" - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1beta1" + policyv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1alpha1" + policyv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -29,26 +29,26 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - PolicycontrollerV1alpha1() policycontrollerv1alpha1.PolicycontrollerV1alpha1Interface - PolicycontrollerV1beta1() policycontrollerv1beta1.PolicycontrollerV1beta1Interface + PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface + PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - policycontrollerV1alpha1 *policycontrollerv1alpha1.PolicycontrollerV1alpha1Client - policycontrollerV1beta1 *policycontrollerv1beta1.PolicycontrollerV1beta1Client + policyV1alpha1 *policyv1alpha1.PolicyV1alpha1Client + policyV1beta1 *policyv1beta1.PolicyV1beta1Client } -// PolicycontrollerV1alpha1 retrieves the PolicycontrollerV1alpha1Client -func (c *Clientset) PolicycontrollerV1alpha1() policycontrollerv1alpha1.PolicycontrollerV1alpha1Interface { - return c.policycontrollerV1alpha1 +// PolicyV1alpha1 retrieves the PolicyV1alpha1Client +func (c *Clientset) PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface { + return c.policyV1alpha1 } -// PolicycontrollerV1beta1 retrieves the PolicycontrollerV1beta1Client -func (c *Clientset) PolicycontrollerV1beta1() policycontrollerv1beta1.PolicycontrollerV1beta1Interface { - return c.policycontrollerV1beta1 +// PolicyV1beta1 retrieves the PolicyV1beta1Client +func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { + return c.policyV1beta1 } // Discovery retrieves the DiscoveryClient @@ -95,11 +95,11 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error - cs.policycontrollerV1alpha1, err = policycontrollerv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.policyV1alpha1, err = policyv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.policycontrollerV1beta1, err = policycontrollerv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.policyV1beta1, err = policyv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -124,8 +124,8 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.policycontrollerV1alpha1 = policycontrollerv1alpha1.New(c) - cs.policycontrollerV1beta1 = policycontrollerv1beta1.New(c) + cs.policyV1alpha1 = policyv1alpha1.New(c) + cs.policyV1beta1 = policyv1beta1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index bd6b5828a200..f7801b5fd5f4 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -18,10 +18,10 @@ package fake import ( clientset "github.com/sigstore/cosign/pkg/client/clientset/versioned" - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1" - fakepolicycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1beta1" - fakepolicycontrollerv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake" + policyv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1alpha1" + fakepolicyv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1alpha1/fake" + policyv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1beta1" + fakepolicyv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1beta1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -79,12 +79,12 @@ var ( _ testing.FakeClient = &Clientset{} ) -// PolicycontrollerV1alpha1 retrieves the PolicycontrollerV1alpha1Client -func (c *Clientset) PolicycontrollerV1alpha1() policycontrollerv1alpha1.PolicycontrollerV1alpha1Interface { - return &fakepolicycontrollerv1alpha1.FakePolicycontrollerV1alpha1{Fake: &c.Fake} +// PolicyV1alpha1 retrieves the PolicyV1alpha1Client +func (c *Clientset) PolicyV1alpha1() policyv1alpha1.PolicyV1alpha1Interface { + return &fakepolicyv1alpha1.FakePolicyV1alpha1{Fake: &c.Fake} } -// PolicycontrollerV1beta1 retrieves the PolicycontrollerV1beta1Client -func (c *Clientset) PolicycontrollerV1beta1() policycontrollerv1beta1.PolicycontrollerV1beta1Interface { - return &fakepolicycontrollerv1beta1.FakePolicycontrollerV1beta1{Fake: &c.Fake} +// PolicyV1beta1 retrieves the PolicyV1beta1Client +func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface { + return &fakepolicyv1beta1.FakePolicyV1beta1{Fake: &c.Fake} } diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 4d459f361c41..93148e266975 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -17,8 +17,8 @@ package fake import ( - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + policyv1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" + policyv1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,8 +30,8 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - policycontrollerv1alpha1.AddToScheme, - policycontrollerv1beta1.AddToScheme, + policyv1alpha1.AddToScheme, + policyv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 82a9c5709cd2..70cd652d8989 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -17,8 +17,8 @@ package scheme import ( - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + policyv1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" + policyv1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,8 +30,8 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - policycontrollerv1alpha1.AddToScheme, - policycontrollerv1beta1.AddToScheme, + policyv1alpha1.AddToScheme, + policyv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/clusterimagepolicy.go b/pkg/client/clientset/versioned/typed/policy/v1alpha1/clusterimagepolicy.go similarity index 97% rename from pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/clusterimagepolicy.go rename to pkg/client/clientset/versioned/typed/policy/v1alpha1/clusterimagepolicy.go index c364c6fa1b3f..bf5f6b52d44d 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/clusterimagepolicy.go +++ b/pkg/client/clientset/versioned/typed/policy/v1alpha1/clusterimagepolicy.go @@ -20,7 +20,7 @@ import ( "context" "time" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" scheme "github.com/sigstore/cosign/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -53,7 +53,7 @@ type clusterImagePolicies struct { } // newClusterImagePolicies returns a ClusterImagePolicies -func newClusterImagePolicies(c *PolicycontrollerV1alpha1Client) *clusterImagePolicies { +func newClusterImagePolicies(c *PolicyV1alpha1Client) *clusterImagePolicies { return &clusterImagePolicies{ client: c.RESTClient(), } diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/policy/v1alpha1/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/doc.go rename to pkg/client/clientset/versioned/typed/policy/v1alpha1/doc.go diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/doc.go rename to pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/doc.go diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/fake_clusterimagepolicy.go b/pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/fake_clusterimagepolicy.go similarity index 94% rename from pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/fake_clusterimagepolicy.go rename to pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/fake_clusterimagepolicy.go index 3d880567e76c..92be94398b3c 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/fake_clusterimagepolicy.go +++ b/pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/fake_clusterimagepolicy.go @@ -19,7 +19,7 @@ package fake import ( "context" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,12 +30,12 @@ import ( // FakeClusterImagePolicies implements ClusterImagePolicyInterface type FakeClusterImagePolicies struct { - Fake *FakePolicycontrollerV1alpha1 + Fake *FakePolicyV1alpha1 } -var clusterimagepoliciesResource = schema.GroupVersionResource{Group: "policycontroller.sigstore.dev", Version: "v1alpha1", Resource: "clusterimagepolicies"} +var clusterimagepoliciesResource = schema.GroupVersionResource{Group: "policy.sigstore.dev", Version: "v1alpha1", Resource: "clusterimagepolicies"} -var clusterimagepoliciesKind = schema.GroupVersionKind{Group: "policycontroller.sigstore.dev", Version: "v1alpha1", Kind: "ClusterImagePolicy"} +var clusterimagepoliciesKind = schema.GroupVersionKind{Group: "policy.sigstore.dev", Version: "v1alpha1", Kind: "ClusterImagePolicy"} // Get takes name of the clusterImagePolicy, and returns the corresponding clusterImagePolicy object, and an error if there is any. func (c *FakeClusterImagePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterImagePolicy, err error) { diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/fake_policycontroller_client.go b/pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/fake_policy_client.go similarity index 80% rename from pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/fake_policycontroller_client.go rename to pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/fake_policy_client.go index 92562e91bdf8..a9f0c553bbe2 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/fake/fake_policycontroller_client.go +++ b/pkg/client/clientset/versioned/typed/policy/v1alpha1/fake/fake_policy_client.go @@ -17,22 +17,22 @@ package fake import ( - v1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakePolicycontrollerV1alpha1 struct { +type FakePolicyV1alpha1 struct { *testing.Fake } -func (c *FakePolicycontrollerV1alpha1) ClusterImagePolicies() v1alpha1.ClusterImagePolicyInterface { +func (c *FakePolicyV1alpha1) ClusterImagePolicies() v1alpha1.ClusterImagePolicyInterface { return &FakeClusterImagePolicies{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicycontrollerV1alpha1) RESTClient() rest.Interface { +func (c *FakePolicyV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/policy/v1alpha1/generated_expansion.go similarity index 100% rename from pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/generated_expansion.go rename to pkg/client/clientset/versioned/typed/policy/v1alpha1/generated_expansion.go diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/policycontroller_client.go b/pkg/client/clientset/versioned/typed/policy/v1alpha1/policy_client.go similarity index 65% rename from pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/policycontroller_client.go rename to pkg/client/clientset/versioned/typed/policy/v1alpha1/policy_client.go index 94fe33033a87..198ccf26273a 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1/policycontroller_client.go +++ b/pkg/client/clientset/versioned/typed/policy/v1alpha1/policy_client.go @@ -19,29 +19,29 @@ package v1alpha1 import ( "net/http" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" "github.com/sigstore/cosign/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type PolicycontrollerV1alpha1Interface interface { +type PolicyV1alpha1Interface interface { RESTClient() rest.Interface ClusterImagePoliciesGetter } -// PolicycontrollerV1alpha1Client is used to interact with features provided by the policycontroller.sigstore.dev group. -type PolicycontrollerV1alpha1Client struct { +// PolicyV1alpha1Client is used to interact with features provided by the policy.sigstore.dev group. +type PolicyV1alpha1Client struct { restClient rest.Interface } -func (c *PolicycontrollerV1alpha1Client) ClusterImagePolicies() ClusterImagePolicyInterface { +func (c *PolicyV1alpha1Client) ClusterImagePolicies() ClusterImagePolicyInterface { return newClusterImagePolicies(c) } -// NewForConfig creates a new PolicycontrollerV1alpha1Client for the given config. +// NewForConfig creates a new PolicyV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*PolicycontrollerV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*PolicyV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -53,9 +53,9 @@ func NewForConfig(c *rest.Config) (*PolicycontrollerV1alpha1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new PolicycontrollerV1alpha1Client for the given config and http client. +// NewForConfigAndClient creates a new PolicyV1alpha1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicycontrollerV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicyV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -64,12 +64,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicycontrollerV1a if err != nil { return nil, err } - return &PolicycontrollerV1alpha1Client{client}, nil + return &PolicyV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new PolicycontrollerV1alpha1Client for the given config and +// NewForConfigOrDie creates a new PolicyV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PolicycontrollerV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *PolicyV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -77,9 +77,9 @@ func NewForConfigOrDie(c *rest.Config) *PolicycontrollerV1alpha1Client { return client } -// New creates a new PolicycontrollerV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *PolicycontrollerV1alpha1Client { - return &PolicycontrollerV1alpha1Client{c} +// New creates a new PolicyV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *PolicyV1alpha1Client { + return &PolicyV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -97,7 +97,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PolicycontrollerV1alpha1Client) RESTClient() rest.Interface { +func (c *PolicyV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/clusterimagepolicy.go b/pkg/client/clientset/versioned/typed/policy/v1beta1/clusterimagepolicy.go similarity index 97% rename from pkg/client/clientset/versioned/typed/policycontroller/v1beta1/clusterimagepolicy.go rename to pkg/client/clientset/versioned/typed/policy/v1beta1/clusterimagepolicy.go index 4b1e670bf24d..195c55b8989e 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/clusterimagepolicy.go +++ b/pkg/client/clientset/versioned/typed/policy/v1beta1/clusterimagepolicy.go @@ -20,7 +20,7 @@ import ( "context" "time" - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" scheme "github.com/sigstore/cosign/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -53,7 +53,7 @@ type clusterImagePolicies struct { } // newClusterImagePolicies returns a ClusterImagePolicies -func newClusterImagePolicies(c *PolicycontrollerV1beta1Client) *clusterImagePolicies { +func newClusterImagePolicies(c *PolicyV1beta1Client) *clusterImagePolicies { return &clusterImagePolicies{ client: c.RESTClient(), } diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/doc.go b/pkg/client/clientset/versioned/typed/policy/v1beta1/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/policycontroller/v1beta1/doc.go rename to pkg/client/clientset/versioned/typed/policy/v1beta1/doc.go diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/doc.go b/pkg/client/clientset/versioned/typed/policy/v1beta1/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/doc.go rename to pkg/client/clientset/versioned/typed/policy/v1beta1/fake/doc.go diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/fake_clusterimagepolicy.go b/pkg/client/clientset/versioned/typed/policy/v1beta1/fake/fake_clusterimagepolicy.go similarity index 94% rename from pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/fake_clusterimagepolicy.go rename to pkg/client/clientset/versioned/typed/policy/v1beta1/fake/fake_clusterimagepolicy.go index b6592a8e3b44..74a35bde2297 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/fake_clusterimagepolicy.go +++ b/pkg/client/clientset/versioned/typed/policy/v1beta1/fake/fake_clusterimagepolicy.go @@ -19,7 +19,7 @@ package fake import ( "context" - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -30,12 +30,12 @@ import ( // FakeClusterImagePolicies implements ClusterImagePolicyInterface type FakeClusterImagePolicies struct { - Fake *FakePolicycontrollerV1beta1 + Fake *FakePolicyV1beta1 } -var clusterimagepoliciesResource = schema.GroupVersionResource{Group: "policycontroller.sigstore.dev", Version: "v1beta1", Resource: "clusterimagepolicies"} +var clusterimagepoliciesResource = schema.GroupVersionResource{Group: "policy.sigstore.dev", Version: "v1beta1", Resource: "clusterimagepolicies"} -var clusterimagepoliciesKind = schema.GroupVersionKind{Group: "policycontroller.sigstore.dev", Version: "v1beta1", Kind: "ClusterImagePolicy"} +var clusterimagepoliciesKind = schema.GroupVersionKind{Group: "policy.sigstore.dev", Version: "v1beta1", Kind: "ClusterImagePolicy"} // Get takes name of the clusterImagePolicy, and returns the corresponding clusterImagePolicy object, and an error if there is any. func (c *FakeClusterImagePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ClusterImagePolicy, err error) { diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/fake_policycontroller_client.go b/pkg/client/clientset/versioned/typed/policy/v1beta1/fake/fake_policy_client.go similarity index 80% rename from pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/fake_policycontroller_client.go rename to pkg/client/clientset/versioned/typed/policy/v1beta1/fake/fake_policy_client.go index f86282c33c42..b5f52e2d7c3c 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/fake/fake_policycontroller_client.go +++ b/pkg/client/clientset/versioned/typed/policy/v1beta1/fake/fake_policy_client.go @@ -17,22 +17,22 @@ package fake import ( - v1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakePolicycontrollerV1beta1 struct { +type FakePolicyV1beta1 struct { *testing.Fake } -func (c *FakePolicycontrollerV1beta1) ClusterImagePolicies() v1beta1.ClusterImagePolicyInterface { +func (c *FakePolicyV1beta1) ClusterImagePolicies() v1beta1.ClusterImagePolicyInterface { return &FakeClusterImagePolicies{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePolicycontrollerV1beta1) RESTClient() rest.Interface { +func (c *FakePolicyV1beta1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/generated_expansion.go b/pkg/client/clientset/versioned/typed/policy/v1beta1/generated_expansion.go similarity index 100% rename from pkg/client/clientset/versioned/typed/policycontroller/v1beta1/generated_expansion.go rename to pkg/client/clientset/versioned/typed/policy/v1beta1/generated_expansion.go diff --git a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/policycontroller_client.go b/pkg/client/clientset/versioned/typed/policy/v1beta1/policy_client.go similarity index 66% rename from pkg/client/clientset/versioned/typed/policycontroller/v1beta1/policycontroller_client.go rename to pkg/client/clientset/versioned/typed/policy/v1beta1/policy_client.go index fad29722bf06..5146b989aff2 100644 --- a/pkg/client/clientset/versioned/typed/policycontroller/v1beta1/policycontroller_client.go +++ b/pkg/client/clientset/versioned/typed/policy/v1beta1/policy_client.go @@ -19,29 +19,29 @@ package v1beta1 import ( "net/http" - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" "github.com/sigstore/cosign/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type PolicycontrollerV1beta1Interface interface { +type PolicyV1beta1Interface interface { RESTClient() rest.Interface ClusterImagePoliciesGetter } -// PolicycontrollerV1beta1Client is used to interact with features provided by the policycontroller.sigstore.dev group. -type PolicycontrollerV1beta1Client struct { +// PolicyV1beta1Client is used to interact with features provided by the policy.sigstore.dev group. +type PolicyV1beta1Client struct { restClient rest.Interface } -func (c *PolicycontrollerV1beta1Client) ClusterImagePolicies() ClusterImagePolicyInterface { +func (c *PolicyV1beta1Client) ClusterImagePolicies() ClusterImagePolicyInterface { return newClusterImagePolicies(c) } -// NewForConfig creates a new PolicycontrollerV1beta1Client for the given config. +// NewForConfig creates a new PolicyV1beta1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*PolicycontrollerV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -53,9 +53,9 @@ func NewForConfig(c *rest.Config) (*PolicycontrollerV1beta1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new PolicycontrollerV1beta1Client for the given config and http client. +// NewForConfigAndClient creates a new PolicyV1beta1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicycontrollerV1beta1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicyV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -64,12 +64,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PolicycontrollerV1b if err != nil { return nil, err } - return &PolicycontrollerV1beta1Client{client}, nil + return &PolicyV1beta1Client{client}, nil } -// NewForConfigOrDie creates a new PolicycontrollerV1beta1Client for the given config and +// NewForConfigOrDie creates a new PolicyV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PolicycontrollerV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *PolicyV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -77,9 +77,9 @@ func NewForConfigOrDie(c *rest.Config) *PolicycontrollerV1beta1Client { return client } -// New creates a new PolicycontrollerV1beta1Client for the given RESTClient. -func New(c rest.Interface) *PolicycontrollerV1beta1Client { - return &PolicycontrollerV1beta1Client{c} +// New creates a new PolicyV1beta1Client for the given RESTClient. +func New(c rest.Interface) *PolicyV1beta1Client { + return &PolicyV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -97,7 +97,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PolicycontrollerV1beta1Client) RESTClient() rest.Interface { +func (c *PolicyV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index b5d2716e3f40..097c2aecbcb9 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -23,7 +23,7 @@ import ( versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" internalinterfaces "github.com/sigstore/cosign/pkg/client/informers/externalversions/internalinterfaces" - policycontroller "github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller" + policy "github.com/sigstore/cosign/pkg/client/informers/externalversions/policy" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -170,9 +170,9 @@ type SharedInformerFactory interface { ForResource(resource schema.GroupVersionResource) (GenericInformer, error) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - Policycontroller() policycontroller.Interface + Policy() policy.Interface } -func (f *sharedInformerFactory) Policycontroller() policycontroller.Interface { - return policycontroller.New(f, f.namespace, f.tweakListOptions) +func (f *sharedInformerFactory) Policy() policy.Interface { + return policy.New(f, f.namespace, f.tweakListOptions) } diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index e6ebf78bdbd0..3c6ef7753c4d 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -19,8 +19,8 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -51,13 +51,13 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=policycontroller.sigstore.dev, Version=v1alpha1 + // Group=policy.sigstore.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("clusterimagepolicies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Policycontroller().V1alpha1().ClusterImagePolicies().Informer()}, nil + return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1alpha1().ClusterImagePolicies().Informer()}, nil - // Group=policycontroller.sigstore.dev, Version=v1beta1 + // Group=policy.sigstore.dev, Version=v1beta1 case v1beta1.SchemeGroupVersion.WithResource("clusterimagepolicies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Policycontroller().V1beta1().ClusterImagePolicies().Informer()}, nil + return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().ClusterImagePolicies().Informer()}, nil } diff --git a/pkg/client/informers/externalversions/policycontroller/interface.go b/pkg/client/informers/externalversions/policy/interface.go similarity index 95% rename from pkg/client/informers/externalversions/policycontroller/interface.go rename to pkg/client/informers/externalversions/policy/interface.go index 20eb005c11f0..c997ffc4f6aa 100644 --- a/pkg/client/informers/externalversions/policycontroller/interface.go +++ b/pkg/client/informers/externalversions/policy/interface.go @@ -14,12 +14,12 @@ // Code generated by informer-gen. DO NOT EDIT. -package policycontroller +package policy import ( internalinterfaces "github.com/sigstore/cosign/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1alpha1" - v1beta1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1beta1" + v1alpha1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1alpha1" + v1beta1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1beta1" ) // Interface provides access to each of this group's versions. diff --git a/pkg/client/informers/externalversions/policycontroller/v1alpha1/clusterimagepolicy.go b/pkg/client/informers/externalversions/policy/v1alpha1/clusterimagepolicy.go similarity index 86% rename from pkg/client/informers/externalversions/policycontroller/v1alpha1/clusterimagepolicy.go rename to pkg/client/informers/externalversions/policy/v1alpha1/clusterimagepolicy.go index 50b3b076ce2c..26bd1d1b3737 100644 --- a/pkg/client/informers/externalversions/policycontroller/v1alpha1/clusterimagepolicy.go +++ b/pkg/client/informers/externalversions/policy/v1alpha1/clusterimagepolicy.go @@ -20,10 +20,10 @@ import ( "context" time "time" - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + policyv1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" internalinterfaces "github.com/sigstore/cosign/pkg/client/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -59,16 +59,16 @@ func NewFilteredClusterImagePolicyInformer(client versioned.Interface, resyncPer if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicycontrollerV1alpha1().ClusterImagePolicies().List(context.TODO(), options) + return client.PolicyV1alpha1().ClusterImagePolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicycontrollerV1alpha1().ClusterImagePolicies().Watch(context.TODO(), options) + return client.PolicyV1alpha1().ClusterImagePolicies().Watch(context.TODO(), options) }, }, - &policycontrollerv1alpha1.ClusterImagePolicy{}, + &policyv1alpha1.ClusterImagePolicy{}, resyncPeriod, indexers, ) @@ -79,7 +79,7 @@ func (f *clusterImagePolicyInformer) defaultInformer(client versioned.Interface, } func (f *clusterImagePolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&policycontrollerv1alpha1.ClusterImagePolicy{}, f.defaultInformer) + return f.factory.InformerFor(&policyv1alpha1.ClusterImagePolicy{}, f.defaultInformer) } func (f *clusterImagePolicyInformer) Lister() v1alpha1.ClusterImagePolicyLister { diff --git a/pkg/client/informers/externalversions/policycontroller/v1alpha1/interface.go b/pkg/client/informers/externalversions/policy/v1alpha1/interface.go similarity index 100% rename from pkg/client/informers/externalversions/policycontroller/v1alpha1/interface.go rename to pkg/client/informers/externalversions/policy/v1alpha1/interface.go diff --git a/pkg/client/informers/externalversions/policycontroller/v1beta1/clusterimagepolicy.go b/pkg/client/informers/externalversions/policy/v1beta1/clusterimagepolicy.go similarity index 86% rename from pkg/client/informers/externalversions/policycontroller/v1beta1/clusterimagepolicy.go rename to pkg/client/informers/externalversions/policy/v1beta1/clusterimagepolicy.go index a2e22a381ea3..5e365c0accaa 100644 --- a/pkg/client/informers/externalversions/policycontroller/v1beta1/clusterimagepolicy.go +++ b/pkg/client/informers/externalversions/policy/v1beta1/clusterimagepolicy.go @@ -20,10 +20,10 @@ import ( "context" time "time" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + policyv1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" internalinterfaces "github.com/sigstore/cosign/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -59,16 +59,16 @@ func NewFilteredClusterImagePolicyInformer(client versioned.Interface, resyncPer if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicycontrollerV1beta1().ClusterImagePolicies().List(context.TODO(), options) + return client.PolicyV1beta1().ClusterImagePolicies().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PolicycontrollerV1beta1().ClusterImagePolicies().Watch(context.TODO(), options) + return client.PolicyV1beta1().ClusterImagePolicies().Watch(context.TODO(), options) }, }, - &policycontrollerv1beta1.ClusterImagePolicy{}, + &policyv1beta1.ClusterImagePolicy{}, resyncPeriod, indexers, ) @@ -79,7 +79,7 @@ func (f *clusterImagePolicyInformer) defaultInformer(client versioned.Interface, } func (f *clusterImagePolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&policycontrollerv1beta1.ClusterImagePolicy{}, f.defaultInformer) + return f.factory.InformerFor(&policyv1beta1.ClusterImagePolicy{}, f.defaultInformer) } func (f *clusterImagePolicyInformer) Lister() v1beta1.ClusterImagePolicyLister { diff --git a/pkg/client/informers/externalversions/policycontroller/v1beta1/interface.go b/pkg/client/informers/externalversions/policy/v1beta1/interface.go similarity index 100% rename from pkg/client/informers/externalversions/policycontroller/v1beta1/interface.go rename to pkg/client/informers/externalversions/policy/v1beta1/interface.go diff --git a/pkg/client/injection/client/client.go b/pkg/client/injection/client/client.go index bb465b97b50d..a45933165d23 100644 --- a/pkg/client/injection/client/client.go +++ b/pkg/client/injection/client/client.go @@ -22,11 +22,11 @@ import ( errors "errors" fmt "fmt" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" - typedpolicycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1alpha1" - typedpolicycontrollerv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policycontroller/v1beta1" + typedpolicyv1alpha1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1alpha1" + typedpolicyv1beta1 "github.com/sigstore/cosign/pkg/client/clientset/versioned/typed/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" runtime "k8s.io/apimachinery/pkg/runtime" @@ -96,40 +96,40 @@ func convert(from interface{}, to runtime.Object) error { return nil } -// PolicycontrollerV1alpha1 retrieves the PolicycontrollerV1alpha1Client -func (w *wrapClient) PolicycontrollerV1alpha1() typedpolicycontrollerv1alpha1.PolicycontrollerV1alpha1Interface { - return &wrapPolicycontrollerV1alpha1{ +// PolicyV1alpha1 retrieves the PolicyV1alpha1Client +func (w *wrapClient) PolicyV1alpha1() typedpolicyv1alpha1.PolicyV1alpha1Interface { + return &wrapPolicyV1alpha1{ dyn: w.dyn, } } -type wrapPolicycontrollerV1alpha1 struct { +type wrapPolicyV1alpha1 struct { dyn dynamic.Interface } -func (w *wrapPolicycontrollerV1alpha1) RESTClient() rest.Interface { +func (w *wrapPolicyV1alpha1) RESTClient() rest.Interface { panic("RESTClient called on dynamic client!") } -func (w *wrapPolicycontrollerV1alpha1) ClusterImagePolicies() typedpolicycontrollerv1alpha1.ClusterImagePolicyInterface { - return &wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl{ +func (w *wrapPolicyV1alpha1) ClusterImagePolicies() typedpolicyv1alpha1.ClusterImagePolicyInterface { + return &wrapPolicyV1alpha1ClusterImagePolicyImpl{ dyn: w.dyn.Resource(schema.GroupVersionResource{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1alpha1", Resource: "clusterimagepolicies", }), } } -type wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl struct { +type wrapPolicyV1alpha1ClusterImagePolicyImpl struct { dyn dynamic.NamespaceableResourceInterface } -var _ typedpolicycontrollerv1alpha1.ClusterImagePolicyInterface = (*wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl)(nil) +var _ typedpolicyv1alpha1.ClusterImagePolicyInterface = (*wrapPolicyV1alpha1ClusterImagePolicyImpl)(nil) -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Create(ctx context.Context, in *v1alpha1.ClusterImagePolicy, opts v1.CreateOptions) (*v1alpha1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) Create(ctx context.Context, in *v1alpha1.ClusterImagePolicy, opts v1.CreateOptions) (*v1alpha1.ClusterImagePolicy, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1alpha1", Kind: "ClusterImagePolicy", }) @@ -148,15 +148,15 @@ func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Create(ctx context. return out, nil } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return w.dyn.Delete(ctx, name, opts) } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { return w.dyn.DeleteCollection(ctx, opts, listOpts) } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ClusterImagePolicy, error) { uo, err := w.dyn.Get(ctx, name, opts) if err != nil { return nil, err @@ -168,7 +168,7 @@ func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Get(ctx context.Con return out, nil } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterImagePolicyList, error) { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterImagePolicyList, error) { uo, err := w.dyn.List(ctx, opts) if err != nil { return nil, err @@ -180,7 +180,7 @@ func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) List(ctx context.Co return out, nil } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterImagePolicy, err error) { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterImagePolicy, err error) { uo, err := w.dyn.Patch(ctx, name, pt, data, opts) if err != nil { return nil, err @@ -192,9 +192,9 @@ func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Patch(ctx context.C return out, nil } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Update(ctx context.Context, in *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) Update(ctx context.Context, in *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ClusterImagePolicy, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1alpha1", Kind: "ClusterImagePolicy", }) @@ -213,9 +213,9 @@ func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Update(ctx context. return out, nil } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) UpdateStatus(ctx context.Context, in *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) UpdateStatus(ctx context.Context, in *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ClusterImagePolicy, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1alpha1", Kind: "ClusterImagePolicy", }) @@ -234,44 +234,44 @@ func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) UpdateStatus(ctx co return out, nil } -func (w *wrapPolicycontrollerV1alpha1ClusterImagePolicyImpl) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (w *wrapPolicyV1alpha1ClusterImagePolicyImpl) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return nil, errors.New("NYI: Watch") } -// PolicycontrollerV1beta1 retrieves the PolicycontrollerV1beta1Client -func (w *wrapClient) PolicycontrollerV1beta1() typedpolicycontrollerv1beta1.PolicycontrollerV1beta1Interface { - return &wrapPolicycontrollerV1beta1{ +// PolicyV1beta1 retrieves the PolicyV1beta1Client +func (w *wrapClient) PolicyV1beta1() typedpolicyv1beta1.PolicyV1beta1Interface { + return &wrapPolicyV1beta1{ dyn: w.dyn, } } -type wrapPolicycontrollerV1beta1 struct { +type wrapPolicyV1beta1 struct { dyn dynamic.Interface } -func (w *wrapPolicycontrollerV1beta1) RESTClient() rest.Interface { +func (w *wrapPolicyV1beta1) RESTClient() rest.Interface { panic("RESTClient called on dynamic client!") } -func (w *wrapPolicycontrollerV1beta1) ClusterImagePolicies() typedpolicycontrollerv1beta1.ClusterImagePolicyInterface { - return &wrapPolicycontrollerV1beta1ClusterImagePolicyImpl{ +func (w *wrapPolicyV1beta1) ClusterImagePolicies() typedpolicyv1beta1.ClusterImagePolicyInterface { + return &wrapPolicyV1beta1ClusterImagePolicyImpl{ dyn: w.dyn.Resource(schema.GroupVersionResource{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1beta1", Resource: "clusterimagepolicies", }), } } -type wrapPolicycontrollerV1beta1ClusterImagePolicyImpl struct { +type wrapPolicyV1beta1ClusterImagePolicyImpl struct { dyn dynamic.NamespaceableResourceInterface } -var _ typedpolicycontrollerv1beta1.ClusterImagePolicyInterface = (*wrapPolicycontrollerV1beta1ClusterImagePolicyImpl)(nil) +var _ typedpolicyv1beta1.ClusterImagePolicyInterface = (*wrapPolicyV1beta1ClusterImagePolicyImpl)(nil) -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Create(ctx context.Context, in *v1beta1.ClusterImagePolicy, opts v1.CreateOptions) (*v1beta1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) Create(ctx context.Context, in *v1beta1.ClusterImagePolicy, opts v1.CreateOptions) (*v1beta1.ClusterImagePolicy, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1beta1", Kind: "ClusterImagePolicy", }) @@ -290,15 +290,15 @@ func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Create(ctx context.C return out, nil } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return w.dyn.Delete(ctx, name, opts) } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { return w.dyn.DeleteCollection(ctx, opts, listOpts) } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ClusterImagePolicy, error) { uo, err := w.dyn.Get(ctx, name, opts) if err != nil { return nil, err @@ -310,7 +310,7 @@ func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Get(ctx context.Cont return out, nil } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ClusterImagePolicyList, error) { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ClusterImagePolicyList, error) { uo, err := w.dyn.List(ctx, opts) if err != nil { return nil, err @@ -322,7 +322,7 @@ func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) List(ctx context.Con return out, nil } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterImagePolicy, err error) { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ClusterImagePolicy, err error) { uo, err := w.dyn.Patch(ctx, name, pt, data, opts) if err != nil { return nil, err @@ -334,9 +334,9 @@ func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Patch(ctx context.Co return out, nil } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Update(ctx context.Context, in *v1beta1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1beta1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) Update(ctx context.Context, in *v1beta1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1beta1.ClusterImagePolicy, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1beta1", Kind: "ClusterImagePolicy", }) @@ -355,9 +355,9 @@ func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Update(ctx context.C return out, nil } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) UpdateStatus(ctx context.Context, in *v1beta1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1beta1.ClusterImagePolicy, error) { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) UpdateStatus(ctx context.Context, in *v1beta1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1beta1.ClusterImagePolicy, error) { in.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "policycontroller.sigstore.dev", + Group: "policy.sigstore.dev", Version: "v1beta1", Kind: "ClusterImagePolicy", }) @@ -376,6 +376,6 @@ func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) UpdateStatus(ctx con return out, nil } -func (w *wrapPolicycontrollerV1beta1ClusterImagePolicyImpl) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (w *wrapPolicyV1beta1ClusterImagePolicyImpl) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return nil, errors.New("NYI: Watch") } diff --git a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/clusterimagepolicy.go b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/clusterimagepolicy.go similarity index 75% rename from pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/clusterimagepolicy.go rename to pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/clusterimagepolicy.go index e50f2c4f268a..53173e52476b 100644 --- a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/clusterimagepolicy.go +++ b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/clusterimagepolicy.go @@ -19,12 +19,12 @@ package clusterimagepolicy import ( context "context" - apispolicycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + apispolicyv1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" - v1alpha1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1alpha1" client "github.com/sigstore/cosign/pkg/client/injection/client" factory "github.com/sigstore/cosign/pkg/client/injection/informers/factory" - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1alpha1" + policyv1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" cache "k8s.io/client-go/tools/cache" @@ -43,7 +43,7 @@ type Key struct{} func withInformer(ctx context.Context) (context.Context, controller.Informer) { f := factory.Get(ctx) - inf := f.Policycontroller().V1alpha1().ClusterImagePolicies() + inf := f.Policy().V1alpha1().ClusterImagePolicies() return context.WithValue(ctx, Key{}, inf), inf.Informer() } @@ -57,7 +57,7 @@ func Get(ctx context.Context) v1alpha1.ClusterImagePolicyInformer { untyped := ctx.Value(Key{}) if untyped == nil { logging.FromContext(ctx).Panic( - "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1alpha1.ClusterImagePolicyInformer from context.") + "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1alpha1.ClusterImagePolicyInformer from context.") } return untyped.(v1alpha1.ClusterImagePolicyInformer) } @@ -69,13 +69,13 @@ type wrapper struct { } var _ v1alpha1.ClusterImagePolicyInformer = (*wrapper)(nil) -var _ policycontrollerv1alpha1.ClusterImagePolicyLister = (*wrapper)(nil) +var _ policyv1alpha1.ClusterImagePolicyLister = (*wrapper)(nil) func (w *wrapper) Informer() cache.SharedIndexInformer { - return cache.NewSharedIndexInformer(nil, &apispolicycontrollerv1alpha1.ClusterImagePolicy{}, 0, nil) + return cache.NewSharedIndexInformer(nil, &apispolicyv1alpha1.ClusterImagePolicy{}, 0, nil) } -func (w *wrapper) Lister() policycontrollerv1alpha1.ClusterImagePolicyLister { +func (w *wrapper) Lister() policyv1alpha1.ClusterImagePolicyLister { return w } @@ -87,8 +87,8 @@ func (w *wrapper) SetResourceVersion(resourceVersion string) { w.resourceVersion = resourceVersion } -func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1alpha1.ClusterImagePolicy, err error) { - lo, err := w.client.PolicycontrollerV1alpha1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ +func (w *wrapper) List(selector labels.Selector) (ret []*apispolicyv1alpha1.ClusterImagePolicy, err error) { + lo, err := w.client.PolicyV1alpha1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ LabelSelector: selector.String(), ResourceVersion: w.resourceVersion, }) @@ -101,8 +101,8 @@ func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1a return ret, nil } -func (w *wrapper) Get(name string) (*apispolicycontrollerv1alpha1.ClusterImagePolicy, error) { - return w.client.PolicycontrollerV1alpha1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ +func (w *wrapper) Get(name string) (*apispolicyv1alpha1.ClusterImagePolicy, error) { + return w.client.PolicyV1alpha1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ ResourceVersion: w.resourceVersion, }) } diff --git a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/fake/fake.go b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/fake/fake.go similarity index 90% rename from pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/fake/fake.go rename to pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/fake/fake.go index 5d17892c9656..242ed864d426 100644 --- a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/fake/fake.go +++ b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/fake/fake.go @@ -20,7 +20,7 @@ import ( context "context" fake "github.com/sigstore/cosign/pkg/client/injection/informers/factory/fake" - clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy" + clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy" controller "knative.dev/pkg/controller" injection "knative.dev/pkg/injection" ) @@ -33,6 +33,6 @@ func init() { func withInformer(ctx context.Context) (context.Context, controller.Informer) { f := fake.Get(ctx) - inf := f.Policycontroller().V1beta1().ClusterImagePolicies() + inf := f.Policy().V1alpha1().ClusterImagePolicies() return context.WithValue(ctx, clusterimagepolicy.Key{}, inf), inf.Informer() } diff --git a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/filtered/clusterimagepolicy.go b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/filtered/clusterimagepolicy.go similarity index 77% rename from pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/filtered/clusterimagepolicy.go rename to pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/filtered/clusterimagepolicy.go index b224b3166d66..b352b6f07a8a 100644 --- a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/filtered/clusterimagepolicy.go +++ b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/filtered/clusterimagepolicy.go @@ -19,12 +19,12 @@ package filtered import ( context "context" - apispolicycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + apispolicyv1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" - v1alpha1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1alpha1" client "github.com/sigstore/cosign/pkg/client/injection/client" filtered "github.com/sigstore/cosign/pkg/client/injection/informers/factory/filtered" - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1alpha1" + policyv1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" cache "k8s.io/client-go/tools/cache" @@ -53,7 +53,7 @@ func withInformer(ctx context.Context) (context.Context, []controller.Informer) infs := []controller.Informer{} for _, selector := range labelSelectors { f := filtered.Get(ctx, selector) - inf := f.Policycontroller().V1alpha1().ClusterImagePolicies() + inf := f.Policy().V1alpha1().ClusterImagePolicies() ctx = context.WithValue(ctx, Key{Selector: selector}, inf) infs = append(infs, inf.Informer()) } @@ -79,7 +79,7 @@ func Get(ctx context.Context, selector string) v1alpha1.ClusterImagePolicyInform untyped := ctx.Value(Key{Selector: selector}) if untyped == nil { logging.FromContext(ctx).Panicf( - "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1alpha1.ClusterImagePolicyInformer with selector %s from context.", selector) + "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1alpha1.ClusterImagePolicyInformer with selector %s from context.", selector) } return untyped.(v1alpha1.ClusterImagePolicyInformer) } @@ -91,23 +91,23 @@ type wrapper struct { } var _ v1alpha1.ClusterImagePolicyInformer = (*wrapper)(nil) -var _ policycontrollerv1alpha1.ClusterImagePolicyLister = (*wrapper)(nil) +var _ policyv1alpha1.ClusterImagePolicyLister = (*wrapper)(nil) func (w *wrapper) Informer() cache.SharedIndexInformer { - return cache.NewSharedIndexInformer(nil, &apispolicycontrollerv1alpha1.ClusterImagePolicy{}, 0, nil) + return cache.NewSharedIndexInformer(nil, &apispolicyv1alpha1.ClusterImagePolicy{}, 0, nil) } -func (w *wrapper) Lister() policycontrollerv1alpha1.ClusterImagePolicyLister { +func (w *wrapper) Lister() policyv1alpha1.ClusterImagePolicyLister { return w } -func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1alpha1.ClusterImagePolicy, err error) { +func (w *wrapper) List(selector labels.Selector) (ret []*apispolicyv1alpha1.ClusterImagePolicy, err error) { reqs, err := labels.ParseToRequirements(w.selector) if err != nil { return nil, err } selector = selector.Add(reqs...) - lo, err := w.client.PolicycontrollerV1alpha1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ + lo, err := w.client.PolicyV1alpha1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ LabelSelector: selector.String(), // TODO(mattmoor): Incorporate resourceVersion bounds based on staleness criteria. }) @@ -120,9 +120,9 @@ func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1a return ret, nil } -func (w *wrapper) Get(name string) (*apispolicycontrollerv1alpha1.ClusterImagePolicy, error) { +func (w *wrapper) Get(name string) (*apispolicyv1alpha1.ClusterImagePolicy, error) { // TODO(mattmoor): Check that the fetched object matches the selector. - return w.client.PolicycontrollerV1alpha1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ + return w.client.PolicyV1alpha1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ // TODO(mattmoor): Incorporate resourceVersion bounds based on staleness criteria. }) } diff --git a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/filtered/fake/fake.go b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/filtered/fake/fake.go similarity index 92% rename from pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/filtered/fake/fake.go rename to pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/filtered/fake/fake.go index 631a62e80e81..501a7f460878 100644 --- a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/filtered/fake/fake.go +++ b/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/filtered/fake/fake.go @@ -20,7 +20,7 @@ import ( context "context" factoryfiltered "github.com/sigstore/cosign/pkg/client/injection/informers/factory/filtered" - filtered "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/filtered" + filtered "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/filtered" controller "knative.dev/pkg/controller" injection "knative.dev/pkg/injection" logging "knative.dev/pkg/logging" @@ -42,7 +42,7 @@ func withInformer(ctx context.Context) (context.Context, []controller.Informer) infs := []controller.Informer{} for _, selector := range labelSelectors { f := factoryfiltered.Get(ctx, selector) - inf := f.Policycontroller().V1beta1().ClusterImagePolicies() + inf := f.Policy().V1alpha1().ClusterImagePolicies() ctx = context.WithValue(ctx, filtered.Key{Selector: selector}, inf) infs = append(infs, inf.Informer()) } diff --git a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/clusterimagepolicy.go b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/clusterimagepolicy.go similarity index 75% rename from pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/clusterimagepolicy.go rename to pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/clusterimagepolicy.go index 418700dc7dc0..abccbbbaaff8 100644 --- a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/clusterimagepolicy.go +++ b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/clusterimagepolicy.go @@ -19,12 +19,12 @@ package clusterimagepolicy import ( context "context" - apispolicycontrollerv1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + apispolicyv1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" - v1beta1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1beta1" client "github.com/sigstore/cosign/pkg/client/injection/client" factory "github.com/sigstore/cosign/pkg/client/injection/informers/factory" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1beta1" + policyv1beta1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" cache "k8s.io/client-go/tools/cache" @@ -43,7 +43,7 @@ type Key struct{} func withInformer(ctx context.Context) (context.Context, controller.Informer) { f := factory.Get(ctx) - inf := f.Policycontroller().V1beta1().ClusterImagePolicies() + inf := f.Policy().V1beta1().ClusterImagePolicies() return context.WithValue(ctx, Key{}, inf), inf.Informer() } @@ -57,7 +57,7 @@ func Get(ctx context.Context) v1beta1.ClusterImagePolicyInformer { untyped := ctx.Value(Key{}) if untyped == nil { logging.FromContext(ctx).Panic( - "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1beta1.ClusterImagePolicyInformer from context.") + "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1beta1.ClusterImagePolicyInformer from context.") } return untyped.(v1beta1.ClusterImagePolicyInformer) } @@ -69,13 +69,13 @@ type wrapper struct { } var _ v1beta1.ClusterImagePolicyInformer = (*wrapper)(nil) -var _ policycontrollerv1beta1.ClusterImagePolicyLister = (*wrapper)(nil) +var _ policyv1beta1.ClusterImagePolicyLister = (*wrapper)(nil) func (w *wrapper) Informer() cache.SharedIndexInformer { - return cache.NewSharedIndexInformer(nil, &apispolicycontrollerv1beta1.ClusterImagePolicy{}, 0, nil) + return cache.NewSharedIndexInformer(nil, &apispolicyv1beta1.ClusterImagePolicy{}, 0, nil) } -func (w *wrapper) Lister() policycontrollerv1beta1.ClusterImagePolicyLister { +func (w *wrapper) Lister() policyv1beta1.ClusterImagePolicyLister { return w } @@ -87,8 +87,8 @@ func (w *wrapper) SetResourceVersion(resourceVersion string) { w.resourceVersion = resourceVersion } -func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1beta1.ClusterImagePolicy, err error) { - lo, err := w.client.PolicycontrollerV1beta1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ +func (w *wrapper) List(selector labels.Selector) (ret []*apispolicyv1beta1.ClusterImagePolicy, err error) { + lo, err := w.client.PolicyV1beta1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ LabelSelector: selector.String(), ResourceVersion: w.resourceVersion, }) @@ -101,8 +101,8 @@ func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1b return ret, nil } -func (w *wrapper) Get(name string) (*apispolicycontrollerv1beta1.ClusterImagePolicy, error) { - return w.client.PolicycontrollerV1beta1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ +func (w *wrapper) Get(name string) (*apispolicyv1beta1.ClusterImagePolicy, error) { + return w.client.PolicyV1beta1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ ResourceVersion: w.resourceVersion, }) } diff --git a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/fake/fake.go b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/fake/fake.go similarity index 90% rename from pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/fake/fake.go rename to pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/fake/fake.go index 1f31e71ef445..34d20f5917ee 100644 --- a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/fake/fake.go +++ b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/fake/fake.go @@ -20,7 +20,7 @@ import ( context "context" fake "github.com/sigstore/cosign/pkg/client/injection/informers/factory/fake" - clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy" + clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy" controller "knative.dev/pkg/controller" injection "knative.dev/pkg/injection" ) @@ -33,6 +33,6 @@ func init() { func withInformer(ctx context.Context) (context.Context, controller.Informer) { f := fake.Get(ctx) - inf := f.Policycontroller().V1alpha1().ClusterImagePolicies() + inf := f.Policy().V1beta1().ClusterImagePolicies() return context.WithValue(ctx, clusterimagepolicy.Key{}, inf), inf.Informer() } diff --git a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/filtered/clusterimagepolicy.go b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/filtered/clusterimagepolicy.go similarity index 77% rename from pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/filtered/clusterimagepolicy.go rename to pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/filtered/clusterimagepolicy.go index 2c177e71c9a5..a620e1d5c414 100644 --- a/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy/filtered/clusterimagepolicy.go +++ b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/filtered/clusterimagepolicy.go @@ -19,12 +19,12 @@ package filtered import ( context "context" - apispolicycontrollerv1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + apispolicyv1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" - v1beta1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1beta1" client "github.com/sigstore/cosign/pkg/client/injection/client" filtered "github.com/sigstore/cosign/pkg/client/injection/informers/factory/filtered" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1beta1" + policyv1beta1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" cache "k8s.io/client-go/tools/cache" @@ -53,7 +53,7 @@ func withInformer(ctx context.Context) (context.Context, []controller.Informer) infs := []controller.Informer{} for _, selector := range labelSelectors { f := filtered.Get(ctx, selector) - inf := f.Policycontroller().V1beta1().ClusterImagePolicies() + inf := f.Policy().V1beta1().ClusterImagePolicies() ctx = context.WithValue(ctx, Key{Selector: selector}, inf) infs = append(infs, inf.Informer()) } @@ -79,7 +79,7 @@ func Get(ctx context.Context, selector string) v1beta1.ClusterImagePolicyInforme untyped := ctx.Value(Key{Selector: selector}) if untyped == nil { logging.FromContext(ctx).Panicf( - "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policycontroller/v1beta1.ClusterImagePolicyInformer with selector %s from context.", selector) + "Unable to fetch github.com/sigstore/cosign/pkg/client/informers/externalversions/policy/v1beta1.ClusterImagePolicyInformer with selector %s from context.", selector) } return untyped.(v1beta1.ClusterImagePolicyInformer) } @@ -91,23 +91,23 @@ type wrapper struct { } var _ v1beta1.ClusterImagePolicyInformer = (*wrapper)(nil) -var _ policycontrollerv1beta1.ClusterImagePolicyLister = (*wrapper)(nil) +var _ policyv1beta1.ClusterImagePolicyLister = (*wrapper)(nil) func (w *wrapper) Informer() cache.SharedIndexInformer { - return cache.NewSharedIndexInformer(nil, &apispolicycontrollerv1beta1.ClusterImagePolicy{}, 0, nil) + return cache.NewSharedIndexInformer(nil, &apispolicyv1beta1.ClusterImagePolicy{}, 0, nil) } -func (w *wrapper) Lister() policycontrollerv1beta1.ClusterImagePolicyLister { +func (w *wrapper) Lister() policyv1beta1.ClusterImagePolicyLister { return w } -func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1beta1.ClusterImagePolicy, err error) { +func (w *wrapper) List(selector labels.Selector) (ret []*apispolicyv1beta1.ClusterImagePolicy, err error) { reqs, err := labels.ParseToRequirements(w.selector) if err != nil { return nil, err } selector = selector.Add(reqs...) - lo, err := w.client.PolicycontrollerV1beta1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ + lo, err := w.client.PolicyV1beta1().ClusterImagePolicies().List(context.TODO(), v1.ListOptions{ LabelSelector: selector.String(), // TODO(mattmoor): Incorporate resourceVersion bounds based on staleness criteria. }) @@ -120,9 +120,9 @@ func (w *wrapper) List(selector labels.Selector) (ret []*apispolicycontrollerv1b return ret, nil } -func (w *wrapper) Get(name string) (*apispolicycontrollerv1beta1.ClusterImagePolicy, error) { +func (w *wrapper) Get(name string) (*apispolicyv1beta1.ClusterImagePolicy, error) { // TODO(mattmoor): Check that the fetched object matches the selector. - return w.client.PolicycontrollerV1beta1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ + return w.client.PolicyV1beta1().ClusterImagePolicies().Get(context.TODO(), name, v1.GetOptions{ // TODO(mattmoor): Incorporate resourceVersion bounds based on staleness criteria. }) } diff --git a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/filtered/fake/fake.go b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/filtered/fake/fake.go similarity index 92% rename from pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/filtered/fake/fake.go rename to pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/filtered/fake/fake.go index 18467dd5a8f7..45d4c791f5a2 100644 --- a/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/filtered/fake/fake.go +++ b/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/filtered/fake/fake.go @@ -20,7 +20,7 @@ import ( context "context" factoryfiltered "github.com/sigstore/cosign/pkg/client/injection/informers/factory/filtered" - filtered "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/filtered" + filtered "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy/filtered" controller "knative.dev/pkg/controller" injection "knative.dev/pkg/injection" logging "knative.dev/pkg/logging" @@ -42,7 +42,7 @@ func withInformer(ctx context.Context) (context.Context, []controller.Informer) infs := []controller.Informer{} for _, selector := range labelSelectors { f := factoryfiltered.Get(ctx, selector) - inf := f.Policycontroller().V1alpha1().ClusterImagePolicies() + inf := f.Policy().V1beta1().ClusterImagePolicies() ctx = context.WithValue(ctx, filtered.Key{Selector: selector}, inf) infs = append(infs, inf.Informer()) } diff --git a/pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/controller.go b/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/controller.go similarity index 95% rename from pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/controller.go rename to pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/controller.go index 8a61f951722c..1a0cb9112810 100644 --- a/pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/controller.go +++ b/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/controller.go @@ -24,7 +24,7 @@ import ( versionedscheme "github.com/sigstore/cosign/pkg/client/clientset/versioned/scheme" client "github.com/sigstore/cosign/pkg/client/injection/client" - clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1beta1/clusterimagepolicy" + clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy" zap "go.uber.org/zap" corev1 "k8s.io/api/core/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -42,7 +42,7 @@ import ( const ( defaultControllerAgentName = "clusterimagepolicy-controller" - defaultFinalizerName = "clusterimagepolicies.policycontroller.sigstore.dev" + defaultFinalizerName = "clusterimagepolicies.policy.sigstore.dev" ) // NewImpl returns a controller.Impl that handles queuing and feeding work from @@ -96,7 +96,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF logger = logger.With( zap.String(logkey.ControllerType, ctrTypeName), - zap.String(logkey.Kind, "policycontroller.sigstore.dev.ClusterImagePolicy"), + zap.String(logkey.Kind, "policy.sigstore.dev.ClusterImagePolicy"), ) impl := controller.NewContext(ctx, rec, controller.ControllerOptions{WorkQueueName: ctrTypeName, Logger: logger}) diff --git a/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/reconciler.go b/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/reconciler.go similarity index 96% rename from pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/reconciler.go rename to pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/reconciler.go index 8972125277e6..f79846ab7384 100644 --- a/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/reconciler.go +++ b/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/reconciler.go @@ -21,9 +21,9 @@ import ( json "encoding/json" fmt "fmt" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" - policycontrollerv1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1alpha1" + policyv1alpha1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1alpha1" zap "go.uber.org/zap" v1 "k8s.io/api/core/v1" errors "k8s.io/apimachinery/pkg/api/errors" @@ -80,7 +80,7 @@ type reconcilerImpl struct { Client versioned.Interface // Listers index properties about resources. - Lister policycontrollerv1alpha1.ClusterImagePolicyLister + Lister policyv1alpha1.ClusterImagePolicyLister // Recorder is an event recorder for recording Event resources to the // Kubernetes API. @@ -103,7 +103,7 @@ var _ controller.Reconciler = (*reconcilerImpl)(nil) // Check that our generated Reconciler is always LeaderAware. var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) -func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister policycontrollerv1alpha1.ClusterImagePolicyLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { +func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister policyv1alpha1.ClusterImagePolicyLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { logger.Fatal("Up to one options struct is supported, found: ", len(options)) @@ -316,7 +316,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource return resource, err } - patcher := r.Client.PolicycontrollerV1alpha1().ClusterImagePolicies() + patcher := r.Client.PolicyV1alpha1().ClusterImagePolicies() resourceName := resource.Name updated, err := patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) diff --git a/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/state.go b/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/state.go similarity index 97% rename from pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/state.go rename to pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/state.go index d1eeb4479c8d..d55dc2a2f6a2 100644 --- a/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/state.go +++ b/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy/state.go @@ -19,7 +19,7 @@ package clusterimagepolicy import ( fmt "fmt" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" types "k8s.io/apimachinery/pkg/types" cache "k8s.io/client-go/tools/cache" reconciler "knative.dev/pkg/reconciler" diff --git a/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/controller.go b/pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/controller.go similarity index 95% rename from pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/controller.go rename to pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/controller.go index b169ac26c055..127446ba9f8a 100644 --- a/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy/controller.go +++ b/pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/controller.go @@ -24,7 +24,7 @@ import ( versionedscheme "github.com/sigstore/cosign/pkg/client/clientset/versioned/scheme" client "github.com/sigstore/cosign/pkg/client/injection/client" - clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy" + clusterimagepolicy "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1beta1/clusterimagepolicy" zap "go.uber.org/zap" corev1 "k8s.io/api/core/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -42,7 +42,7 @@ import ( const ( defaultControllerAgentName = "clusterimagepolicy-controller" - defaultFinalizerName = "clusterimagepolicies.policycontroller.sigstore.dev" + defaultFinalizerName = "clusterimagepolicies.policy.sigstore.dev" ) // NewImpl returns a controller.Impl that handles queuing and feeding work from @@ -96,7 +96,7 @@ func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsF logger = logger.With( zap.String(logkey.ControllerType, ctrTypeName), - zap.String(logkey.Kind, "policycontroller.sigstore.dev.ClusterImagePolicy"), + zap.String(logkey.Kind, "policy.sigstore.dev.ClusterImagePolicy"), ) impl := controller.NewContext(ctx, rec, controller.ControllerOptions{WorkQueueName: ctrTypeName, Logger: logger}) diff --git a/pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/reconciler.go b/pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/reconciler.go similarity index 96% rename from pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/reconciler.go rename to pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/reconciler.go index 50192a870f5b..38a5f020a0c6 100644 --- a/pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/reconciler.go +++ b/pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/reconciler.go @@ -21,9 +21,9 @@ import ( json "encoding/json" fmt "fmt" - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" versioned "github.com/sigstore/cosign/pkg/client/clientset/versioned" - policycontrollerv1beta1 "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1beta1" + policyv1beta1 "github.com/sigstore/cosign/pkg/client/listers/policy/v1beta1" zap "go.uber.org/zap" v1 "k8s.io/api/core/v1" errors "k8s.io/apimachinery/pkg/api/errors" @@ -80,7 +80,7 @@ type reconcilerImpl struct { Client versioned.Interface // Listers index properties about resources. - Lister policycontrollerv1beta1.ClusterImagePolicyLister + Lister policyv1beta1.ClusterImagePolicyLister // Recorder is an event recorder for recording Event resources to the // Kubernetes API. @@ -103,7 +103,7 @@ var _ controller.Reconciler = (*reconcilerImpl)(nil) // Check that our generated Reconciler is always LeaderAware. var _ reconciler.LeaderAware = (*reconcilerImpl)(nil) -func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister policycontrollerv1beta1.ClusterImagePolicyLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { +func NewReconciler(ctx context.Context, logger *zap.SugaredLogger, client versioned.Interface, lister policyv1beta1.ClusterImagePolicyLister, recorder record.EventRecorder, r Interface, options ...controller.Options) controller.Reconciler { // Check the options function input. It should be 0 or 1. if len(options) > 1 { logger.Fatal("Up to one options struct is supported, found: ", len(options)) @@ -316,7 +316,7 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx context.Context, resource return resource, err } - patcher := r.Client.PolicycontrollerV1beta1().ClusterImagePolicies() + patcher := r.Client.PolicyV1beta1().ClusterImagePolicies() resourceName := resource.Name updated, err := patcher.Patch(ctx, resourceName, types.MergePatchType, patch, metav1.PatchOptions{}) diff --git a/pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/state.go b/pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/state.go similarity index 97% rename from pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/state.go rename to pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/state.go index f616c8432de2..730c9309a158 100644 --- a/pkg/client/injection/reconciler/policycontroller/v1beta1/clusterimagepolicy/state.go +++ b/pkg/client/injection/reconciler/policy/v1beta1/clusterimagepolicy/state.go @@ -19,7 +19,7 @@ package clusterimagepolicy import ( fmt "fmt" - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" types "k8s.io/apimachinery/pkg/types" cache "k8s.io/client-go/tools/cache" reconciler "knative.dev/pkg/reconciler" diff --git a/pkg/client/listers/policycontroller/v1alpha1/clusterimagepolicy.go b/pkg/client/listers/policy/v1alpha1/clusterimagepolicy.go similarity index 97% rename from pkg/client/listers/policycontroller/v1alpha1/clusterimagepolicy.go rename to pkg/client/listers/policy/v1alpha1/clusterimagepolicy.go index 5eb7e9a0ec5b..6323417d5bee 100644 --- a/pkg/client/listers/policycontroller/v1alpha1/clusterimagepolicy.go +++ b/pkg/client/listers/policy/v1alpha1/clusterimagepolicy.go @@ -17,7 +17,7 @@ package v1alpha1 import ( - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/policycontroller/v1alpha1/expansion_generated.go b/pkg/client/listers/policy/v1alpha1/expansion_generated.go similarity index 100% rename from pkg/client/listers/policycontroller/v1alpha1/expansion_generated.go rename to pkg/client/listers/policy/v1alpha1/expansion_generated.go diff --git a/pkg/client/listers/policycontroller/v1beta1/clusterimagepolicy.go b/pkg/client/listers/policy/v1beta1/clusterimagepolicy.go similarity index 97% rename from pkg/client/listers/policycontroller/v1beta1/clusterimagepolicy.go rename to pkg/client/listers/policy/v1beta1/clusterimagepolicy.go index a44ce329efb9..5fc7517a6353 100644 --- a/pkg/client/listers/policycontroller/v1beta1/clusterimagepolicy.go +++ b/pkg/client/listers/policy/v1beta1/clusterimagepolicy.go @@ -17,7 +17,7 @@ package v1beta1 import ( - v1beta1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1beta1" + v1beta1 "github.com/sigstore/cosign/pkg/apis/policy/v1beta1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/pkg/client/listers/policycontroller/v1beta1/expansion_generated.go b/pkg/client/listers/policy/v1beta1/expansion_generated.go similarity index 100% rename from pkg/client/listers/policycontroller/v1beta1/expansion_generated.go rename to pkg/client/listers/policy/v1beta1/expansion_generated.go diff --git a/pkg/cosign/kubernetes/webhook/clusterimagepolicy/clusterimagepolicy_types.go b/pkg/cosign/kubernetes/webhook/clusterimagepolicy/clusterimagepolicy_types.go index c5c41bace7c4..dfe2b092fa71 100644 --- a/pkg/cosign/kubernetes/webhook/clusterimagepolicy/clusterimagepolicy_types.go +++ b/pkg/cosign/kubernetes/webhook/clusterimagepolicy/clusterimagepolicy_types.go @@ -25,7 +25,7 @@ import ( "github.com/google/go-containerregistry/pkg/authn/k8schain" "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" ociremote "github.com/sigstore/cosign/pkg/oci/remote" "knative.dev/pkg/apis" kubeclient "knative.dev/pkg/client/injection/kube/client" diff --git a/pkg/cosign/kubernetes/webhook/validation.go b/pkg/cosign/kubernetes/webhook/validation.go index 0e3b42de6370..15dbb9f9fa2e 100644 --- a/pkg/cosign/kubernetes/webhook/validation.go +++ b/pkg/cosign/kubernetes/webhook/validation.go @@ -28,7 +28,7 @@ import ( "knative.dev/pkg/logging" "github.com/sigstore/cosign/cmd/cosign/cli/fulcio/fulcioroots" - v1alpha1 "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + v1alpha1 "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" "github.com/sigstore/cosign/pkg/cosign" "github.com/sigstore/cosign/pkg/oci" ociremote "github.com/sigstore/cosign/pkg/oci/remote" diff --git a/pkg/cosign/kubernetes/webhook/validator_test.go b/pkg/cosign/kubernetes/webhook/validator_test.go index 8f73fc783d21..76ebbecdaa5d 100644 --- a/pkg/cosign/kubernetes/webhook/validator_test.go +++ b/pkg/cosign/kubernetes/webhook/validator_test.go @@ -35,7 +35,7 @@ import ( "github.com/google/go-containerregistry/pkg/authn/k8schain" "github.com/google/go-containerregistry/pkg/name" "github.com/sigstore/cosign/pkg/apis/config" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" "github.com/sigstore/cosign/pkg/cosign" webhookcip "github.com/sigstore/cosign/pkg/cosign/kubernetes/webhook/clusterimagepolicy" "github.com/sigstore/cosign/pkg/oci" diff --git a/pkg/reconciler/clusterimagepolicy/clusterimagepolicy.go b/pkg/reconciler/clusterimagepolicy/clusterimagepolicy.go index a26c24927e53..72b501c90fef 100644 --- a/pkg/reconciler/clusterimagepolicy/clusterimagepolicy.go +++ b/pkg/reconciler/clusterimagepolicy/clusterimagepolicy.go @@ -21,9 +21,9 @@ import ( "strings" "github.com/sigstore/cosign/pkg/apis/config" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" "github.com/sigstore/cosign/pkg/apis/utils" - clusterimagepolicyreconciler "github.com/sigstore/cosign/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy" + clusterimagepolicyreconciler "github.com/sigstore/cosign/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy" webhookcip "github.com/sigstore/cosign/pkg/cosign/kubernetes/webhook/clusterimagepolicy" "github.com/sigstore/cosign/pkg/reconciler/clusterimagepolicy/resources" diff --git a/pkg/reconciler/clusterimagepolicy/clusterimagepolicy_test.go b/pkg/reconciler/clusterimagepolicy/clusterimagepolicy_test.go index d95be2da9b8e..b5f9c168b451 100644 --- a/pkg/reconciler/clusterimagepolicy/clusterimagepolicy_test.go +++ b/pkg/reconciler/clusterimagepolicy/clusterimagepolicy_test.go @@ -25,9 +25,9 @@ import ( logtesting "knative.dev/pkg/logging/testing" "github.com/sigstore/cosign/pkg/apis/config" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" fakecosignclient "github.com/sigstore/cosign/pkg/client/injection/client/fake" - "github.com/sigstore/cosign/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy" + "github.com/sigstore/cosign/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/reconciler/clusterimagepolicy/controller.go b/pkg/reconciler/clusterimagepolicy/controller.go index 672300fcf926..57ae94f99582 100644 --- a/pkg/reconciler/clusterimagepolicy/controller.go +++ b/pkg/reconciler/clusterimagepolicy/controller.go @@ -32,15 +32,15 @@ import ( "knative.dev/pkg/system" "github.com/sigstore/cosign/pkg/apis/config" - clusterimagepolicyinformer "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy" - clusterimagepolicyreconciler "github.com/sigstore/cosign/pkg/client/injection/reconciler/policycontroller/v1alpha1/clusterimagepolicy" + clusterimagepolicyinformer "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy" + clusterimagepolicyreconciler "github.com/sigstore/cosign/pkg/client/injection/reconciler/policy/v1alpha1/clusterimagepolicy" cminformer "knative.dev/pkg/injection/clients/namespacedkube/informers/core/v1/configmap" secretinformer "knative.dev/pkg/injection/clients/namespacedkube/informers/core/v1/secret" ) // This is what the default finalizer name is, but make it explicit so we can // use it in tests as well. -const finalizerName = "clusterimagepolicies.policycontroller.sigstore.dev" +const finalizerName = "clusterimagepolicies.policy.sigstore.dev" // NewController creates a Reconciler and returns the result of NewImpl. func NewController( diff --git a/pkg/reconciler/clusterimagepolicy/controller_test.go b/pkg/reconciler/clusterimagepolicy/controller_test.go index 1d08ac77f4b0..e4a4c2038c5e 100644 --- a/pkg/reconciler/clusterimagepolicy/controller_test.go +++ b/pkg/reconciler/clusterimagepolicy/controller_test.go @@ -21,7 +21,7 @@ import ( rtesting "knative.dev/pkg/reconciler/testing" // Fake injection informers - _ "github.com/sigstore/cosign/pkg/client/injection/informers/policycontroller/v1alpha1/clusterimagepolicy/fake" + _ "github.com/sigstore/cosign/pkg/client/injection/informers/policy/v1alpha1/clusterimagepolicy/fake" _ "knative.dev/pkg/client/injection/kube/informers/core/v1/configmap/fake" _ "knative.dev/pkg/injection/clients/namespacedkube/informers/core/v1/configmap/fake" _ "knative.dev/pkg/injection/clients/namespacedkube/informers/core/v1/secret/fake" diff --git a/pkg/reconciler/testing/v1alpha1/clusterimagepolicy.go b/pkg/reconciler/testing/v1alpha1/clusterimagepolicy.go index b30ee409179f..e2cd2242c5cf 100644 --- a/pkg/reconciler/testing/v1alpha1/clusterimagepolicy.go +++ b/pkg/reconciler/testing/v1alpha1/clusterimagepolicy.go @@ -18,11 +18,11 @@ import ( "context" "time" - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -const finalizerName = "clusterimagepolicies.policycontroller.sigstore.dev" +const finalizerName = "clusterimagepolicies.policy.sigstore.dev" // ClusterImagePolicyOption enables further configuration of a ClusterImagePolicy. type ClusterImagePolicyOption func(*v1alpha1.ClusterImagePolicy) diff --git a/pkg/reconciler/testing/v1alpha1/listers.go b/pkg/reconciler/testing/v1alpha1/listers.go index 9d2a67c0d014..d08dece61a5c 100644 --- a/pkg/reconciler/testing/v1alpha1/listers.go +++ b/pkg/reconciler/testing/v1alpha1/listers.go @@ -15,9 +15,9 @@ package testing import ( - "github.com/sigstore/cosign/pkg/apis/policycontroller/v1alpha1" + "github.com/sigstore/cosign/pkg/apis/policy/v1alpha1" fakecosignclientset "github.com/sigstore/cosign/pkg/client/clientset/versioned/fake" - cosignlisters "github.com/sigstore/cosign/pkg/client/listers/policycontroller/v1alpha1" + cosignlisters "github.com/sigstore/cosign/pkg/client/listers/policy/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" fakekubeclientset "k8s.io/client-go/kubernetes/fake" diff --git a/test/e2e_test_cluster_image_policy.sh b/test/e2e_test_cluster_image_policy.sh index 9ed2f2c6671a..a26925dbba18 100755 --- a/test/e2e_test_cluster_image_policy.sh +++ b/test/e2e_test_cluster_image_policy.sh @@ -126,7 +126,7 @@ echo '::endgroup::' echo '::group:: Create test namespace and label for verification' kubectl create namespace demo-keyless-signing -kubectl label namespace demo-keyless-signing policycontroller.sigstore.dev/include=true +kubectl label namespace demo-keyless-signing policy.sigstore.dev/include=true export NS=demo-keyless-signing echo '::endgroup::' @@ -196,7 +196,7 @@ echo '::endgroup::' echo '::group:: Create and label new namespace for verification' kubectl create namespace demo-key-signing -kubectl label namespace demo-key-signing policycontroller.sigstore.dev/include=true +kubectl label namespace demo-key-signing policy.sigstore.dev/include=true echo '::group:: Verify blocks unsigned with the key' if kubectl create -n demo-key-signing job demo --image=${demoimage}; then @@ -264,7 +264,7 @@ echo '::endgroup::' echo '::group:: Create test namespace and label for remote key verification' kubectl create namespace demo-key-remote -kubectl label namespace demo-key-remote policycontroller.sigstore.dev/include=true +kubectl label namespace demo-key-remote policy.sigstore.dev/include=true echo '::endgroup::' echo '::group:: Verify with three CIP, one without correct Source set' diff --git a/test/e2e_test_cluster_image_policy_with_attestations.sh b/test/e2e_test_cluster_image_policy_with_attestations.sh index d963c9b1e8f3..c68d3413f03c 100755 --- a/test/e2e_test_cluster_image_policy_with_attestations.sh +++ b/test/e2e_test_cluster_image_policy_with_attestations.sh @@ -97,7 +97,7 @@ echo '::endgroup::' echo '::group:: Create and label new namespace for verification' kubectl create namespace demo-attestations -kubectl label namespace demo-attestations policycontroller.sigstore.dev/include=true +kubectl label namespace demo-attestations policy.sigstore.dev/include=true export NS=demo-attestations echo '::endgroup::' diff --git a/test/e2e_test_policy_controller.sh b/test/e2e_test_policy_controller.sh index 8081a315b38e..66a9f2c0bf26 100755 --- a/test/e2e_test_policy_controller.sh +++ b/test/e2e_test_policy_controller.sh @@ -92,7 +92,7 @@ echo '::endgroup::' echo '::group:: enable verification' -kubectl label namespace default --overwrite policycontroller.sigstore.dev/include=true +kubectl label namespace default --overwrite policy.sigstore.dev/include=true echo '::endgroup::' @@ -121,7 +121,7 @@ kubectl delete secret -n cosign-system verification-key kubectl create secret generic -n cosign-system verification-key --from-file=cosign.pub=manykeys.pem --from-literal=cosign.password=${COSIGN_PASSWORD} --from-file=cosign.key echo '::group:: disable verification' -kubectl label namespace default --overwrite policycontroller.sigstore.dev/include=false +kubectl label namespace default --overwrite policy.sigstore.dev/include=false echo '::endgroup::' @@ -157,7 +157,7 @@ fi echo '::endgroup::' echo '::group:: enable verification' -kubectl label namespace default --overwrite policycontroller.sigstore.dev/include=true +kubectl label namespace default --overwrite policy.sigstore.dev/include=true echo '::endgroup::' diff --git a/test/testdata/policy-controller/e2e/cip-key-with-attestations.yaml b/test/testdata/policy-controller/e2e/cip-key-with-attestations.yaml index df9ebdc60ffc..5062b8d85059 100644 --- a/test/testdata/policy-controller/e2e/cip-key-with-attestations.yaml +++ b/test/testdata/policy-controller/e2e/cip-key-with-attestations.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy-key-with-attestations diff --git a/test/testdata/policy-controller/e2e/cip-key.yaml b/test/testdata/policy-controller/e2e/cip-key.yaml index b18c6a2f9a5a..b249970847c7 100644 --- a/test/testdata/policy-controller/e2e/cip-key.yaml +++ b/test/testdata/policy-controller/e2e/cip-key.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy-key diff --git a/test/testdata/policy-controller/e2e/cip-keyless-with-attestations.yaml b/test/testdata/policy-controller/e2e/cip-keyless-with-attestations.yaml index df0662318eae..1f47c0818b8b 100644 --- a/test/testdata/policy-controller/e2e/cip-keyless-with-attestations.yaml +++ b/test/testdata/policy-controller/e2e/cip-keyless-with-attestations.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy-keyless-with-attestations diff --git a/test/testdata/policy-controller/e2e/cip-keyless-with-identities-mismatch.yaml b/test/testdata/policy-controller/e2e/cip-keyless-with-identities-mismatch.yaml index 5b09009a4a92..ad4e978ea437 100644 --- a/test/testdata/policy-controller/e2e/cip-keyless-with-identities-mismatch.yaml +++ b/test/testdata/policy-controller/e2e/cip-keyless-with-identities-mismatch.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy-keyless-with-identities-mismatch diff --git a/test/testdata/policy-controller/e2e/cip-keyless-with-identities.yaml b/test/testdata/policy-controller/e2e/cip-keyless-with-identities.yaml index 9bbf03862d5f..f09c33ab9d54 100644 --- a/test/testdata/policy-controller/e2e/cip-keyless-with-identities.yaml +++ b/test/testdata/policy-controller/e2e/cip-keyless-with-identities.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy-keyless-with-identities diff --git a/test/testdata/policy-controller/e2e/cip-keyless.yaml b/test/testdata/policy-controller/e2e/cip-keyless.yaml index db4eaaa96363..a6da330fb8fb 100644 --- a/test/testdata/policy-controller/e2e/cip-keyless.yaml +++ b/test/testdata/policy-controller/e2e/cip-keyless.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy-keyless diff --git a/test/testdata/policy-controller/e2e/cip-requires-two-signatures-and-two-attestations.yaml b/test/testdata/policy-controller/e2e/cip-requires-two-signatures-and-two-attestations.yaml index e6fc6565ad00..092c9a3c7ada 100644 --- a/test/testdata/policy-controller/e2e/cip-requires-two-signatures-and-two-attestations.yaml +++ b/test/testdata/policy-controller/e2e/cip-requires-two-signatures-and-two-attestations.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy-requires-two-signatures-two-attestations diff --git a/test/testdata/policy-controller/invalid/empty-keyless-ref.yaml b/test/testdata/policy-controller/invalid/empty-keyless-ref.yaml index b6ddf6eb1667..1eaaed0820ce 100644 --- a/test/testdata/policy-controller/invalid/empty-keyless-ref.yaml +++ b/test/testdata/policy-controller/invalid/empty-keyless-ref.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/empty-keyref-and-keylessref.yaml b/test/testdata/policy-controller/invalid/empty-keyref-and-keylessref.yaml index 4811f480debc..f73286c9efb7 100644 --- a/test/testdata/policy-controller/invalid/empty-keyref-and-keylessref.yaml +++ b/test/testdata/policy-controller/invalid/empty-keyref-and-keylessref.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/empty-keyref.yaml b/test/testdata/policy-controller/invalid/empty-keyref.yaml index 1dc58187427a..7e8f3639dffe 100644 --- a/test/testdata/policy-controller/invalid/empty-keyref.yaml +++ b/test/testdata/policy-controller/invalid/empty-keyref.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/invalid-glob.yaml b/test/testdata/policy-controller/invalid/invalid-glob.yaml index 828860e7b75b..2caf5a6513ed 100644 --- a/test/testdata/policy-controller/invalid/invalid-glob.yaml +++ b/test/testdata/policy-controller/invalid/invalid-glob.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/invalid-pubkey.yaml b/test/testdata/policy-controller/invalid/invalid-pubkey.yaml index 2f0e1ef042f0..cabf6aeb3215 100644 --- a/test/testdata/policy-controller/invalid/invalid-pubkey.yaml +++ b/test/testdata/policy-controller/invalid/invalid-pubkey.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/keylessref-with-empty-authorities.yaml b/test/testdata/policy-controller/invalid/keylessref-with-empty-authorities.yaml index 0eeb04689ce3..9c79ad1bdfbd 100644 --- a/test/testdata/policy-controller/invalid/keylessref-with-empty-authorities.yaml +++ b/test/testdata/policy-controller/invalid/keylessref-with-empty-authorities.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/keylessref-with-empty-identities.yaml b/test/testdata/policy-controller/invalid/keylessref-with-empty-identities.yaml index c7ea53edec51..9942662479ee 100644 --- a/test/testdata/policy-controller/invalid/keylessref-with-empty-identities.yaml +++ b/test/testdata/policy-controller/invalid/keylessref-with-empty-identities.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/keylessref-with-malformed-issuer.yaml b/test/testdata/policy-controller/invalid/keylessref-with-malformed-issuer.yaml index 272e93a67be4..574bea63e06c 100644 --- a/test/testdata/policy-controller/invalid/keylessref-with-malformed-issuer.yaml +++ b/test/testdata/policy-controller/invalid/keylessref-with-malformed-issuer.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/keylessref-with-malformed-subject.yaml b/test/testdata/policy-controller/invalid/keylessref-with-malformed-subject.yaml index 8c16f48e2f8f..d0f0862d4525 100644 --- a/test/testdata/policy-controller/invalid/keylessref-with-malformed-subject.yaml +++ b/test/testdata/policy-controller/invalid/keylessref-with-malformed-subject.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/keylessref-with-multiple-properties.yaml b/test/testdata/policy-controller/invalid/keylessref-with-multiple-properties.yaml index 63f024d12149..030f5b7912a9 100644 --- a/test/testdata/policy-controller/invalid/keylessref-with-multiple-properties.yaml +++ b/test/testdata/policy-controller/invalid/keylessref-with-multiple-properties.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/keyref-with-multiple-properties.yaml b/test/testdata/policy-controller/invalid/keyref-with-multiple-properties.yaml index 89032ab4a096..45b4c2c1509a 100644 --- a/test/testdata/policy-controller/invalid/keyref-with-multiple-properties.yaml +++ b/test/testdata/policy-controller/invalid/keyref-with-multiple-properties.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/invalid/valid-keyref-and-keylessref.yaml b/test/testdata/policy-controller/invalid/valid-keyref-and-keylessref.yaml index e0dd35da9e8f..eb51b7708a26 100644 --- a/test/testdata/policy-controller/invalid/valid-keyref-and-keylessref.yaml +++ b/test/testdata/policy-controller/invalid/valid-keyref-and-keylessref.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/valid/valid-policy-glob.yaml b/test/testdata/policy-controller/valid/valid-policy-glob.yaml index 26d01bbe25af..798e7f8af806 100644 --- a/test/testdata/policy-controller/valid/valid-policy-glob.yaml +++ b/test/testdata/policy-controller/valid/valid-policy-glob.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy diff --git a/test/testdata/policy-controller/valid/valid-policy.yaml b/test/testdata/policy-controller/valid/valid-policy.yaml index 5cb46ea3d56a..ab1a74e657d0 100644 --- a/test/testdata/policy-controller/valid/valid-policy.yaml +++ b/test/testdata/policy-controller/valid/valid-policy.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -apiVersion: policycontroller.sigstore.dev/v1alpha1 +apiVersion: policy.sigstore.dev/v1alpha1 kind: ClusterImagePolicy metadata: name: image-policy