v1beta1

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

+k8s:openapi-gen=true +k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta +groupName=policy.jspolicy.com

Package v1beta1 contains API Schema definitions for the config v1beta1 API group +kubebuilder:object:generate=true +groupName=policy.jspolicy.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "policy.jspolicy.com", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	// SchemeGroupVersion is a shim that expect this to be present in the api package
	SchemeGroupVersion = GroupVersion
)

Functions

This section is empty.

Types

type AuditPolicyType

type AuditPolicyType string
const (
	AuditPolicyLog  AuditPolicyType = "Log"
	AuditPolicySkip AuditPolicyType = "Skip"
)

type Condition added in v0.2.0

type Condition struct {
	// Type of condition in CamelCase or in foo.example.com/CamelCase.
	// Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
	// can be useful (see .node.status.conditions), the ability to deconflict is important.
	// +required
	Type ConditionType `json:"type"`

	// Status of the condition, one of True, False, Unknown.
	// +required
	Status corev1.ConditionStatus `json:"status"`

	// Severity provides an explicit classification of Reason code, so the users or machines can immediately
	// understand the current situation and act accordingly.
	// The Severity field MUST be set only when Status=False.
	// +optional
	Severity ConditionSeverity `json:"severity,omitempty"`

	// Last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed. If that is not known, then using the time when
	// the API field changed is acceptable.
	// +required
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

	// The reason for the condition's last transition in CamelCase.
	// The specific API may choose whether this field is considered a guaranteed API.
	// This field may not be empty.
	// +optional
	Reason string `json:"reason,omitempty"`

	// A human readable message indicating details about the transition.
	// This field may be empty.
	// +optional
	Message string `json:"message,omitempty"`
}

Condition defines an observation of a Cluster API resource operational state.

func (*Condition) DeepCopy added in v0.2.0

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto added in v0.2.0

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConditionSeverity added in v0.2.0

type ConditionSeverity string

ConditionSeverity expresses the severity of a Condition Type failing.

const (
	// ConditionSeverityError specifies that a condition with `Status=False` is an error.
	ConditionSeverityError ConditionSeverity = "Error"

	// ConditionSeverityWarning specifies that a condition with `Status=False` is a warning.
	ConditionSeverityWarning ConditionSeverity = "Warning"

	// ConditionSeverityInfo specifies that a condition with `Status=False` is informative.
	ConditionSeverityInfo ConditionSeverity = "Info"

	// ConditionSeverityNone should apply only to conditions with `Status=True`.
	ConditionSeverityNone ConditionSeverity = ""
)

type ConditionType added in v0.2.0

type ConditionType string

ConditionType is a valid value for Condition.Type.

const (
	// ReadyCondition defines the Ready condition type that summarizes the operational state of the virtual cluster API object.
	ReadyCondition ConditionType = "Ready"

	// BundleCompiledCondition defines the bundle compiled condition
	BundleCompiledCondition ConditionType = "BundleCompiled"

	// ControllerPolicyReady defines if the controller policy is ready
	ControllerPolicyReady ConditionType = "ControllerReady"

	// WebhookReady defines if the webhook is ready and synced
	WebhookReady ConditionType = "WebhookReady"
)

Common ConditionTypes used by Cluster API objects.

type Conditions added in v0.2.0

type Conditions []Condition

Conditions is an array of conditions

func (Conditions) DeepCopy added in v0.2.0

func (in Conditions) DeepCopy() Conditions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.

func (Conditions) DeepCopyInto added in v0.2.0

func (in Conditions) DeepCopyInto(out *Conditions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JsPolicy

type JsPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   JsPolicySpec   `json:"spec,omitempty"`
	Status JsPolicyStatus `json:"status,omitempty"`
}

JsPolicy holds the webhook configuration +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*JsPolicy) DeepCopy

func (in *JsPolicy) DeepCopy() *JsPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicy.

func (*JsPolicy) DeepCopyInto

func (in *JsPolicy) DeepCopyInto(out *JsPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JsPolicy) DeepCopyObject

func (in *JsPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*JsPolicy) GetConditions added in v0.2.0

func (in *JsPolicy) GetConditions() Conditions

GetConditions returns the set of conditions for this object.

func (*JsPolicy) SetConditions added in v0.2.0

func (in *JsPolicy) SetConditions(conditions Conditions)

SetConditions sets the conditions on this object.

type JsPolicyBundle

type JsPolicyBundle struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   JsPolicyBundleSpec   `json:"spec,omitempty"`
	Status JsPolicyBundleStatus `json:"status,omitempty"`
}

JsPolicyBundle holds the bundled payload +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*JsPolicyBundle) DeepCopy

func (in *JsPolicyBundle) DeepCopy() *JsPolicyBundle

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundle.

func (*JsPolicyBundle) DeepCopyInto

func (in *JsPolicyBundle) DeepCopyInto(out *JsPolicyBundle)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JsPolicyBundle) DeepCopyObject

func (in *JsPolicyBundle) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type JsPolicyBundleList

type JsPolicyBundleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []JsPolicyBundle `json:"items"`
}

JsPolicyBundleList contains a list of JsPolicyBundle

func (*JsPolicyBundleList) DeepCopy

func (in *JsPolicyBundleList) DeepCopy() *JsPolicyBundleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundleList.

func (*JsPolicyBundleList) DeepCopyInto

func (in *JsPolicyBundleList) DeepCopyInto(out *JsPolicyBundleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JsPolicyBundleList) DeepCopyObject

func (in *JsPolicyBundleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type JsPolicyBundleSpec

type JsPolicyBundleSpec struct {
	// Bundle holds the bundled payload (including dependencies and minified javascript code)
	// +optional
	Bundle []byte `json:"bundle,omitempty"`
}

func (*JsPolicyBundleSpec) DeepCopy

func (in *JsPolicyBundleSpec) DeepCopy() *JsPolicyBundleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundleSpec.

func (*JsPolicyBundleSpec) DeepCopyInto

func (in *JsPolicyBundleSpec) DeepCopyInto(out *JsPolicyBundleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JsPolicyBundleStatus

type JsPolicyBundleStatus struct {
}

func (*JsPolicyBundleStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyBundleStatus.

func (*JsPolicyBundleStatus) DeepCopyInto

func (in *JsPolicyBundleStatus) DeepCopyInto(out *JsPolicyBundleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JsPolicyList

type JsPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []JsPolicy `json:"items"`
}

JsPolicyList contains a list of JsPolicy

func (*JsPolicyList) DeepCopy

func (in *JsPolicyList) DeepCopy() *JsPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyList.

func (*JsPolicyList) DeepCopyInto

func (in *JsPolicyList) DeepCopyInto(out *JsPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JsPolicyList) DeepCopyObject

func (in *JsPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type JsPolicySpec

type JsPolicySpec struct {
	// Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or *
	// for all of those operations and any future admission operations that are added.
	// If '*' is present, the length of the slice must be one.
	// Required.
	Operations []admissionregistrationv1.OperationType `json:"operations,omitempty" protobuf:"bytes,1,rep,name=operations,casttype=OperationType"`

	// Resources is a list of resources this rule applies to.
	//
	// For example:
	// 'pods' means pods.
	// 'pods/log' means the log subresource of pods.
	// '*' means all resources, but not subresources.
	// 'pods/*' means all subresources of pods.
	// '*/scale' means all scale subresources.
	// '*/*' means all resources and their subresources.
	//
	// If wildcard is present, the validation rule will ensure resources do not
	// overlap with each other.
	//
	// Depending on the enclosing object, subresources might not be allowed.
	// Required.
	Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"`

	// APIGroups is the API groups the resources belong to. '*' is all groups.
	// If '*' is present, the length of the slice must be one.
	// +optional
	APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"`

	// APIVersions is the API versions the resources belong to. '*' is all versions.
	// If '*' is present, the length of the slice must be one.
	// +optional
	APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"`

	// scope specifies the scope of this rule.
	// Valid values are "Cluster", "Namespaced", and "*"
	// "Cluster" means that only cluster-scoped resources will match this rule.
	// Namespace API objects are cluster-scoped.
	// "Namespaced" means that only namespaced resources will match this rule.
	// "*" means that there are no scope restrictions.
	// Subresources match the scope of their parent resource.
	// Default is "*".
	//
	// +optional
	Scope *admissionregistrationv1.ScopeType `json:"scope,omitempty" protobuf:"bytes,4,rep,name=scope"`

	// FailurePolicy defines how unrecognized errors from the admission endpoint are handled -
	// allowed values are Ignore or Fail. Defaults to Fail.
	// +optional
	FailurePolicy *admissionregistrationv1.FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"`

	// matchPolicy defines how the "rules" list is used to match incoming requests.
	// Allowed values are "Exact" or "Equivalent".
	//
	// - Exact: match a request only if it exactly matches a specified rule.
	// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
	// but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
	// a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.
	//
	// - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version.
	// For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1,
	// and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`,
	// a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
	//
	// Defaults to "Equivalent"
	// +optional
	MatchPolicy *admissionregistrationv1.MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,9,opt,name=matchPolicy,casttype=MatchPolicyType"`

	// NamespaceSelector decides whether to run the webhook on an object based
	// on whether the namespace for that object matches the selector. If the
	// object itself is a namespace, the matching is performed on
	// object.metadata.labels. If the object is another cluster scoped resource,
	// it never skips the webhook.
	//
	// For example, to run the webhook on any objects whose namespace is not
	// associated with "runlevel" of "0" or "1";  you will set the selector as
	// follows:
	// "namespaceSelector": {
	//   "matchExpressions": [
	//     {
	//       "key": "runlevel",
	//       "operator": "NotIn",
	//       "values": [
	//         "0",
	//         "1"
	//       ]
	//     }
	//   ]
	// }
	//
	// If instead you want to only run the webhook on any objects whose
	// namespace is associated with the "environment" of "prod" or "staging";
	// you will set the selector as follows:
	// "namespaceSelector": {
	//   "matchExpressions": [
	//     {
	//       "key": "environment",
	//       "operator": "In",
	//       "values": [
	//         "prod",
	//         "staging"
	//       ]
	//     }
	//   ]
	// }
	//
	// See
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
	// for more examples of label selectors.
	//
	// Default to the empty LabelSelector, which matches everything.
	// +optional
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,5,opt,name=namespaceSelector"`

	// ObjectSelector decides whether to run the webhook based on if the
	// object has matching labels. objectSelector is evaluated against both
	// the oldObject and newObject that would be sent to the webhook, and
	// is considered to match if either object matches the selector. A null
	// object (oldObject in the case of create, or newObject in the case of
	// delete) or an object that cannot have labels (like a
	// DeploymentRollback or a PodProxyOptions object) is not considered to
	// match.
	// Use the object selector only if the webhook is opt-in, because end
	// users may skip the admission webhook by setting the labels.
	// Default to the empty LabelSelector, which matches everything.
	// +optional
	ObjectSelector *metav1.LabelSelector `json:"objectSelector,omitempty" protobuf:"bytes,10,opt,name=objectSelector"`

	// TimeoutSeconds specifies the timeout for this webhook. After the timeout passes,
	// the webhook call will be ignored or the API call will fail based on the
	// failure policy.
	// The timeout value must be between 1 and 30 seconds.
	// Default to 10 seconds.
	// +optional
	TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,7,opt,name=timeoutSeconds"`

	// Violation policy describes how violations should be handled. You can either specify deny (which is the default),
	// warn or dry.
	// +optional
	ViolationPolicy *ViolationPolicyType `json:"violationPolicy,omitempty"`

	// AuditPolicy defines if violations should be logged to the webhook status or not. By default, violations
	// will be logged to the CRD status.
	// +optional
	AuditPolicy *AuditPolicyType `json:"auditPolicy,omitempty"`

	// AuditLogSize defines how many violations should be logged in the status. Defaults to 10
	// +optional
	AuditLogSize *int32 `json:"auditLogSize,omitempty"`

	// Type defines what kind of policy the object represents. Valid values are Validating, Mutating and
	// Controller. Defaults to Validating.
	// +optional
	Type PolicyType `json:"type,omitempty"`

	// Dependencies is a map of npm modules this webhook should be bundled with
	// +optional
	Dependencies map[string]string `json:"dependencies,omitempty"`

	// JavaScript is the payload of the webhook that will be executed. If this is not defined,
	// jsPolicy expects the user to create a JsPolicyBundle for this policy.
	// +optional
	JavaScript string `json:"javascript,omitempty"`
}

func (*JsPolicySpec) DeepCopy

func (in *JsPolicySpec) DeepCopy() *JsPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicySpec.

func (*JsPolicySpec) DeepCopyInto

func (in *JsPolicySpec) DeepCopyInto(out *JsPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JsPolicyStatus

type JsPolicyStatus struct {
	// Phase describes how the syncing status of the webhook is
	// +optional
	Phase WebhookPhase `json:"phase,omitempty"`

	// Reason holds the error in machine-readable language if the webhook is in a failed state
	// +optional
	Reason string `json:"reason,omitempty"`

	// Message describes the error in human-readable language if the webhook is in a failed state
	// +optional
	Message string `json:"message,omitempty"`

	// Conditions holds several conditions the virtual cluster might be in
	// +optional
	Conditions Conditions `json:"conditions,omitempty"`

	// ObservedGeneration is the latest generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// BundleHash is used to determine if we have to re-bundle the javascript
	// +optional
	BundleHash string `json:"bundleHash,omitempty"`
}

func (*JsPolicyStatus) DeepCopy

func (in *JsPolicyStatus) DeepCopy() *JsPolicyStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyStatus.

func (*JsPolicyStatus) DeepCopyInto

func (in *JsPolicyStatus) DeepCopyInto(out *JsPolicyStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JsPolicyViolations

type JsPolicyViolations struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   JsPolicyViolationsSpec   `json:"spec,omitempty"`
	Status JsPolicyViolationsStatus `json:"status,omitempty"`
}

JsPolicyViolations holds the webhook configuration +k8s:openapi-gen=true +kubebuilder:subresource:status

func (*JsPolicyViolations) DeepCopy

func (in *JsPolicyViolations) DeepCopy() *JsPolicyViolations

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolations.

func (*JsPolicyViolations) DeepCopyInto

func (in *JsPolicyViolations) DeepCopyInto(out *JsPolicyViolations)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JsPolicyViolations) DeepCopyObject

func (in *JsPolicyViolations) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type JsPolicyViolationsList

type JsPolicyViolationsList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []JsPolicyViolations `json:"items"`
}

JsPolicyViolationsList contains a list of JsPolicyViolations

func (*JsPolicyViolationsList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolationsList.

func (*JsPolicyViolationsList) DeepCopyInto

func (in *JsPolicyViolationsList) DeepCopyInto(out *JsPolicyViolationsList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JsPolicyViolationsList) DeepCopyObject

func (in *JsPolicyViolationsList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type JsPolicyViolationsSpec

type JsPolicyViolationsSpec struct {
}

func (*JsPolicyViolationsSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolationsSpec.

func (*JsPolicyViolationsSpec) DeepCopyInto

func (in *JsPolicyViolationsSpec) DeepCopyInto(out *JsPolicyViolationsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JsPolicyViolationsStatus

type JsPolicyViolationsStatus struct {
	// Violations is an array of violations that were recorded by the webhook
	// +optional
	Violations []PolicyViolation `json:"violations,omitempty"`
}

func (*JsPolicyViolationsStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JsPolicyViolationsStatus.

func (*JsPolicyViolationsStatus) DeepCopyInto

func (in *JsPolicyViolationsStatus) DeepCopyInto(out *JsPolicyViolationsStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PolicyType

type PolicyType string

PolicyType is the type of a JsPolicy

const (
	// PolicyTypeValidating indicates that the JsPolicy should be a Validating webhook
	PolicyTypeValidating PolicyType = "Validating"
	// PolicyTypeMutating indicates that the JsPolicy should be a Mutating webhook
	PolicyTypeMutating PolicyType = "Mutating"
	// PolicyTypeController indicates that the JsPolicy should be a Kubernetes controller
	PolicyTypeController PolicyType = "Controller"
)

type PolicyViolation

type PolicyViolation struct {
	// Action holds the the action type the webhook reacted with
	// +optional
	Action string `json:"action,omitempty"`

	// Code is the error code that was returned to the client
	// +optional
	Code int32 `json:"code,omitempty"`

	// Reason is the error reason that was returned to the client
	// +optional
	Reason string `json:"reason,omitempty"`

	// Message holds the message that was sent to the client
	// +optional
	Message string `json:"message,omitempty"`

	// The request this violation is about
	// +optional
	RequestInfo *RequestInfo `json:"requestInfo,omitempty"`

	// The user that sent the request
	// +optional
	UserInfo *UserInfo `json:"userInfo,omitempty"`

	// The timestamp when this violation has occurred
	// +optional
	Timestamp metav1.Time `json:"timestamp,omitempty"`
}

func (*PolicyViolation) DeepCopy

func (in *PolicyViolation) DeepCopy() *PolicyViolation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyViolation.

func (*PolicyViolation) DeepCopyInto

func (in *PolicyViolation) DeepCopyInto(out *PolicyViolation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequestInfo

type RequestInfo struct {
	// Name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and
	// rely on the server to generate the name. If that is the case, this field will contain an empty string.
	// +optional
	Name string `json:"name,omitempty"`
	// Namespace is the namespace associated with the request (if any).
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// Kind is the type of object being submitted (for example, Pod or Deployment)
	// +optional
	Kind string `json:"kind,omitempty"`
	// Kind is the type of object being submitted (for example, Pod or Deployment)
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
	// Operation is the operation being performed. This may be different than the operation
	// requested. e.g. a patch can result in either a CREATE or UPDATE Operation.
	// +optional
	Operation admissionv1.Operation `json:"operation,omitempty"`
}

func (*RequestInfo) DeepCopy

func (in *RequestInfo) DeepCopy() *RequestInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestInfo.

func (*RequestInfo) DeepCopyInto

func (in *RequestInfo) DeepCopyInto(out *RequestInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserInfo

type UserInfo struct {
	// The name that uniquely identifies this user among all active users.
	// +optional
	Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"`
	// A unique value that identifies this user across time. If this user is
	// deleted and another user by the same name is added, they will have
	// different UIDs.
	// +optional
	UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"`
}

func (*UserInfo) DeepCopy

func (in *UserInfo) DeepCopy() *UserInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserInfo.

func (*UserInfo) DeepCopyInto

func (in *UserInfo) DeepCopyInto(out *UserInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ViolationPolicyType

type ViolationPolicyType string

ViolationPolicyType specify how to handle violations

const (
	// ViolationPolicyPolicyDeny indicates that the webhook should deny the request
	// if it violates the specified javascript rule.
	ViolationPolicyPolicyDeny ViolationPolicyType = "Deny"
	// ViolationPolicyPolicyWarn indicates that the webhook should warn the user that
	// the request violates the specified javascript rule.
	ViolationPolicyPolicyWarn ViolationPolicyType = "Warn"
	// ViolationPolicyPolicyDry indicates that the webhook should record the violation
	// but not deny or warn the user about it.
	ViolationPolicyPolicyDry ViolationPolicyType = "Dry"
	// ViolationPolicyPolicyController indicates that the violation was written by
	// a controller policy that did not do any action.
	ViolationPolicyPolicyController ViolationPolicyType = "Controller"
)

type WebhookPhase

type WebhookPhase string
const (
	WebhookPhaseSynced WebhookPhase = "Synced"
	WebhookPhaseFailed WebhookPhase = "Failed"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL