Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the policy v1 API group +kubebuilder:object:generate=true +groupName=policy.open-cluster-management.io
Index ¶
- Constants
- Variables
- type ComplianceHistory
- type CompliancePerClusterStatus
- type ComplianceState
- type DetailsPerTemplate
- type Placement
- type PlacementBinding
- type PlacementBindingList
- type PlacementBindingStatus
- type PlacementDecision
- type PlacementSubject
- type Policy
- type PolicyList
- type PolicySpec
- type PolicyStatus
- type PolicyTemplate
- type RemediationAction
- type Subject
Constants ¶
const Kind = "Policy"
Kind Policy
const PolicySetKind = "PolicySet"
PolicySetKind Policy
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "policy.open-cluster-management.io", Version: "v1"} SchemeGroupVersion = GroupVersion // 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 )
Functions ¶
This section is empty.
Types ¶
type ComplianceHistory ¶
type ComplianceHistory struct { LastTimestamp metav1.Time `json:"lastTimestamp,omitempty" protobuf:"bytes,7,opt,name=lastTimestamp"` Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` EventName string `json:"eventName,omitempty"` }
ComplianceHistory defines compliance details history
func (*ComplianceHistory) DeepCopy ¶
func (in *ComplianceHistory) DeepCopy() *ComplianceHistory
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComplianceHistory.
func (*ComplianceHistory) DeepCopyInto ¶
func (in *ComplianceHistory) DeepCopyInto(out *ComplianceHistory)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CompliancePerClusterStatus ¶
type CompliancePerClusterStatus struct { ComplianceState ComplianceState `json:"compliant,omitempty"` ClusterName string `json:"clustername,omitempty"` ClusterNamespace string `json:"clusternamespace,omitempty"` }
CompliancePerClusterStatus defines compliance per cluster status
func (*CompliancePerClusterStatus) DeepCopy ¶
func (in *CompliancePerClusterStatus) DeepCopy() *CompliancePerClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompliancePerClusterStatus.
func (*CompliancePerClusterStatus) DeepCopyInto ¶
func (in *CompliancePerClusterStatus) DeepCopyInto(out *CompliancePerClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComplianceState ¶
type ComplianceState string
ComplianceState shows the state of enforcement
const ( // Compliant is an ComplianceState Compliant ComplianceState = "Compliant" // NonCompliant is an ComplianceState NonCompliant ComplianceState = "NonCompliant" )
type DetailsPerTemplate ¶
type DetailsPerTemplate struct { // +kubebuilder:pruning:PreserveUnknownFields TemplateMeta metav1.ObjectMeta `json:"templateMeta,omitempty"` ComplianceState ComplianceState `json:"compliant,omitempty"` History []ComplianceHistory `json:"history,omitempty"` }
DetailsPerTemplate defines compliance details and history
func (*DetailsPerTemplate) DeepCopy ¶
func (in *DetailsPerTemplate) DeepCopy() *DetailsPerTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetailsPerTemplate.
func (*DetailsPerTemplate) DeepCopyInto ¶
func (in *DetailsPerTemplate) DeepCopyInto(out *DetailsPerTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Placement ¶
type Placement struct { PlacementBinding string `json:"placementBinding,omitempty"` PlacementRule string `json:"placementRule,omitempty"` Placement string `json:"placement,omitempty"` Decisions []appsv1.PlacementDecision `json:"decisions,omitempty"` PolicySet string `json:"policySet,omitempty"` }
Placement defines the placement results
func (*Placement) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
func (*Placement) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementBinding ¶
type PlacementBinding struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // +kubebuilder:validation:Required PlacementRef PlacementSubject `json:"placementRef"` // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 Subjects []Subject `json:"subjects"` Status PlacementBindingStatus `json:"status,omitempty"` }
PlacementBinding is the Schema for the placementbindings API +kubebuilder:subresource:status +kubebuilder:resource:path=placementbindings,scope=Namespaced +kubebuilder:resource:path=placementbindings,shortName=pb
func (*PlacementBinding) DeepCopy ¶
func (in *PlacementBinding) DeepCopy() *PlacementBinding
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementBinding.
func (*PlacementBinding) DeepCopyInto ¶
func (in *PlacementBinding) DeepCopyInto(out *PlacementBinding)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlacementBinding) DeepCopyObject ¶
func (in *PlacementBinding) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PlacementBindingList ¶
type PlacementBindingList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PlacementBinding `json:"items"` }
PlacementBindingList contains a list of PlacementBinding
func (*PlacementBindingList) DeepCopy ¶
func (in *PlacementBindingList) DeepCopy() *PlacementBindingList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementBindingList.
func (*PlacementBindingList) DeepCopyInto ¶
func (in *PlacementBindingList) DeepCopyInto(out *PlacementBindingList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PlacementBindingList) DeepCopyObject ¶
func (in *PlacementBindingList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PlacementBindingStatus ¶
type PlacementBindingStatus struct{}
PlacementBindingStatus defines the observed state of PlacementBinding
func (*PlacementBindingStatus) DeepCopy ¶
func (in *PlacementBindingStatus) DeepCopy() *PlacementBindingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementBindingStatus.
func (*PlacementBindingStatus) DeepCopyInto ¶
func (in *PlacementBindingStatus) DeepCopyInto(out *PlacementBindingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementDecision ¶
type PlacementDecision struct { ClusterName string `json:"clusterName,omitempty"` ClusterNamespace string `json:"clusterNamespace,omitempty"` }
PlacementDecision defines the decision made by controller
func (*PlacementDecision) DeepCopy ¶
func (in *PlacementDecision) DeepCopy() *PlacementDecision
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDecision.
func (*PlacementDecision) DeepCopyInto ¶
func (in *PlacementDecision) DeepCopyInto(out *PlacementDecision)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementSubject ¶
type PlacementSubject struct { // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Enum=apps.open-cluster-management.io;cluster.open-cluster-management.io APIGroup string `json:"apiGroup"` // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Enum=PlacementRule;Placement Kind string `json:"kind"` // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 Name string `json:"name"` }
PlacementSubject defines the resource that can be used as PlacementBinding placementRef
func (*PlacementSubject) DeepCopy ¶
func (in *PlacementSubject) DeepCopy() *PlacementSubject
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementSubject.
func (*PlacementSubject) DeepCopyInto ¶
func (in *PlacementSubject) DeepCopyInto(out *PlacementSubject)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Policy ¶
type Policy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec PolicySpec `json:"spec"` Status PolicyStatus `json:"status,omitempty"` }
Policy is the Schema for the policies API +kubebuilder:subresource:status +kubebuilder:resource:path=policies,scope=Namespaced +kubebuilder:resource:path=policies,shortName=plc +kubebuilder:printcolumn:name="Remediation action",type="string",JSONPath=".spec.remediationAction" +kubebuilder:printcolumn:name="Compliance state",type="string",JSONPath=".status.compliant" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*Policy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (*Policy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Policy) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PolicyList ¶
type PolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Policy `json:"items"` }
PolicyList contains a list of Policy
func (*PolicyList) DeepCopy ¶
func (in *PolicyList) DeepCopy() *PolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList.
func (*PolicyList) DeepCopyInto ¶
func (in *PolicyList) DeepCopyInto(out *PolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolicyList) DeepCopyObject ¶
func (in *PolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PolicySpec ¶
type PolicySpec struct { Disabled bool `json:"disabled"` RemediationAction RemediationAction `json:"remediationAction,omitempty"` // Enforce, Inform PolicyTemplates []*PolicyTemplate `json:"policy-templates"` }
PolicySpec defines the desired state of Policy
func (*PolicySpec) DeepCopy ¶
func (in *PolicySpec) DeepCopy() *PolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicySpec.
func (*PolicySpec) DeepCopyInto ¶
func (in *PolicySpec) DeepCopyInto(out *PolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyStatus ¶
type PolicyStatus struct { Placement []*Placement `json:"placement,omitempty"` // used by root policy Status []*CompliancePerClusterStatus `json:"status,omitempty"` // used by root policy // +kubebuilder:validation:Enum=Compliant;NonCompliant ComplianceState ComplianceState `json:"compliant,omitempty"` // used by replicated policy Details []*DetailsPerTemplate `json:"details,omitempty"` // used by replicated policy }
PolicyStatus defines the observed state of Policy
func (*PolicyStatus) DeepCopy ¶
func (in *PolicyStatus) DeepCopy() *PolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStatus.
func (*PolicyStatus) DeepCopyInto ¶
func (in *PolicyStatus) DeepCopyInto(out *PolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyTemplate ¶
type PolicyTemplate struct { // +kubebuilder:pruning:PreserveUnknownFields ObjectDefinition runtime.RawExtension `json:"objectDefinition"` }
PolicyTemplate template for custom security policy
func (*PolicyTemplate) DeepCopy ¶
func (in *PolicyTemplate) DeepCopy() *PolicyTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyTemplate.
func (*PolicyTemplate) DeepCopyInto ¶
func (in *PolicyTemplate) DeepCopyInto(out *PolicyTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemediationAction ¶
type RemediationAction string
RemediationAction describes weather to enforce or inform +kubebuilder:validation:Enum=Inform;inform;Enforce;enforce
const ( // Enforce is an remediationAction to make changes Enforce RemediationAction = "Enforce" // Inform is an remediationAction to only inform Inform RemediationAction = "Inform" )
type Subject ¶
type Subject struct { // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Enum=policy.open-cluster-management.io APIGroup string `json:"apiGroup"` // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Enum=Policy;PolicySet Kind string `json:"kind"` // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 Name string `json:"name"` }
Subject defines the resource that can be used as PlacementBinding subject
func (*Subject) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subject.
func (*Subject) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.