Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename ValidationPolicy to ValidatingPolicy #155

Merged
merged 3 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
name: validationpolicies.json.kyverno.io
name: validatingpolicies.json.kyverno.io
spec:
group: json.kyverno.io
names:
kind: ValidationPolicy
listKind: ValidationPolicyList
plural: validationpolicies
singular: validationpolicy
kind: ValidatingPolicy
listKind: ValidatingPolicyList
plural: validatingpolicies
singular: validatingpolicy
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ValidationPolicy is the resource that contains the policy definition.
description: ValidatingPolicy is the resource that contains the policy definition.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down
20 changes: 10 additions & 10 deletions .schemas/json/_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16458,8 +16458,8 @@
}
}
},
"io.kyverno.json.v1alpha1.ValidationPolicy": {
"description": "ValidationPolicy is the resource that contains the policy definition.",
"io.kyverno.json.v1alpha1.ValidatingPolicy": {
"description": "ValidatingPolicy is the resource that contains the policy definition.",
"type": "object",
"required": [
"spec"
Expand All @@ -16476,7 +16476,7 @@
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string",
"enum": [
"ValidationPolicy"
"ValidatingPolicy"
]
},
"metadata": {
Expand Down Expand Up @@ -16617,13 +16617,13 @@
"x-kubernetes-group-version-kind": [
{
"group": "json.kyverno.io",
"kind": "ValidationPolicy",
"kind": "ValidatingPolicy",
"version": "v1alpha1"
}
]
},
"io.kyverno.json.v1alpha1.ValidationPolicyList": {
"description": "ValidationPolicyList is a list of ValidationPolicy",
"io.kyverno.json.v1alpha1.ValidatingPolicyList": {
"description": "ValidatingPolicyList is a list of ValidatingPolicy",
"type": "object",
"required": [
"items"
Expand All @@ -16637,17 +16637,17 @@
]
},
"items": {
"description": "List of validationpolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md",
"description": "List of validatingpolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md",
"type": "array",
"items": {
"$ref": "#/definitions/io.kyverno.json.v1alpha1.ValidationPolicy"
"$ref": "#/definitions/io.kyverno.json.v1alpha1.ValidatingPolicy"
}
},
"kind": {
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
"type": "string",
"enum": [
"ValidationPolicyList"
"ValidatingPolicyList"
]
},
"metadata": {
Expand All @@ -16658,7 +16658,7 @@
"x-kubernetes-group-version-kind": [
{
"group": "json.kyverno.io",
"kind": "ValidationPolicyList",
"kind": "ValidatingPolicyList",
"version": "v1alpha1"
}
]
Expand Down
4 changes: 2 additions & 2 deletions .schemas/json/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -1492,10 +1492,10 @@
"$ref": "_definitions.json#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.ServiceReference"
},
{
"$ref": "_definitions.json#/definitions/io.kyverno.json.v1alpha1.ValidationPolicy"
"$ref": "_definitions.json#/definitions/io.kyverno.json.v1alpha1.ValidatingPolicy"
},
{
"$ref": "_definitions.json#/definitions/io.kyverno.json.v1alpha1.ValidationPolicyList"
"$ref": "_definitions.json#/definitions/io.kyverno.json.v1alpha1.ValidatingPolicyList"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "ValidationPolicy is the resource that contains the policy definition.",
"description": "ValidatingPolicy is the resource that contains the policy definition.",
"type": "object",
"required": [
"spec"
Expand All @@ -22,7 +22,7 @@
"null"
],
"enum": [
"ValidationPolicy"
"ValidatingPolicy"
]
},
"metadata": {
Expand Down Expand Up @@ -457,7 +457,7 @@
"x-kubernetes-group-version-kind": [
{
"group": "json.kyverno.io",
"kind": "ValidationPolicy",
"kind": "ValidatingPolicy",
"version": "v1alpha1"
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"description": "ValidationPolicyList is a list of ValidationPolicy",
"description": "ValidatingPolicyList is a list of ValidatingPolicy",
"type": "object",
"required": [
"items"
Expand All @@ -16,13 +16,13 @@
]
},
"items": {
"description": "List of validationpolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md",
"description": "List of validatingpolicies. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md",
"type": [
"array",
"null"
],
"items": {
"description": "ValidationPolicy is the resource that contains the policy definition.",
"description": "ValidatingPolicy is the resource that contains the policy definition.",
"type": [
"object",
"null"
Expand All @@ -48,7 +48,7 @@
"null"
],
"enum": [
"ValidationPolicy"
"ValidatingPolicy"
]
},
"metadata": {
Expand Down Expand Up @@ -480,7 +480,7 @@
"x-kubernetes-group-version-kind": [
{
"group": "json.kyverno.io",
"kind": "ValidationPolicy",
"kind": "ValidatingPolicy",
"version": "v1alpha1"
}
]
Expand All @@ -493,7 +493,7 @@
"null"
],
"enum": [
"ValidationPolicyList"
"ValidatingPolicyList"
]
},
"metadata": {
Expand Down Expand Up @@ -538,7 +538,7 @@
"x-kubernetes-group-version-kind": [
{
"group": "json.kyverno.io",
"kind": "ValidationPolicyList",
"kind": "ValidatingPolicyList",
"version": "v1alpha1"
}
],
Expand Down
2 changes: 1 addition & 1 deletion .schemas/openapi/v2/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .schemas/openapi/v3/apis/json.kyverno.io/v1alpha1.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion catalog/aws/policy-1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: json.kyverno.io/v1alpha1
kind: ValidationPolicy
kind: ValidatingPolicy
metadata:
name: test
labels:
Expand Down
2 changes: 1 addition & 1 deletion catalog/ecs/policy-1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: json.kyverno.io/v1alpha1
kind: ValidationPolicy
kind: ValidatingPolicy
metadata:
name: test
spec:
Expand Down
12 changes: 6 additions & 6 deletions charts/kyverno-json/templates/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
controller-gen.kubebuilder.io/version: v0.12.0
name: validationpolicies.json.kyverno.io
name: validatingpolicies.json.kyverno.io
spec:
group: json.kyverno.io
names:
kind: ValidationPolicy
listKind: ValidationPolicyList
plural: validationpolicies
singular: validationpolicy
kind: ValidatingPolicy
listKind: ValidatingPolicyList
plural: validatingpolicies
singular: validatingpolicy
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: ValidationPolicy is the resource that contains the policy definition.
description: ValidatingPolicy is the resource that contains the policy definition.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster

// ValidationPolicy is the resource that contains the policy definition.
type ValidationPolicy struct {
// ValidatingPolicy is the resource that contains the policy definition.
type ValidatingPolicy struct {
metav1.TypeMeta `json:",inline"`

// Standard object's metadata.
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`

// Policy spec.
Spec PolicySpec `json:"spec"`
Spec ValidatingPolicySpec `json:"spec"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ValidationPolicyList is a list of Policy instances.
type ValidationPolicyList struct {
// ValidatingPolicyList is a list of Policy instances.
type ValidatingPolicyList struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ListMeta `json:"metadata" yaml:"metadata"`
Items []ValidationPolicy `json:"items" yaml:"items"`
Items []ValidatingPolicy `json:"items" yaml:"items"`
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package v1alpha1

type PolicySpec struct {
type ValidatingPolicySpec struct {
// Rules is a list of Rule instances. A Policy contains multiple rules and each rule can validate, mutate, or generate resources.
Rules []ValidationRule `json:"rules,omitempty"`
Rules []ValidatingRule `json:"rules,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package v1alpha1

type ValidationRule struct {
type ValidatingRule struct {
// Name is a label to identify the rule, It must be unique within the policy.
// +kubebuilder:validation:MaxLength=63
Name string `json:"name"`
Expand Down
Loading
Loading