Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the policies v1 API group +k8s:deepcopy-gen=package,register +groupName=policy.open-cluster-management.io
Package v1 contains API Schema definitions for the policies v1 API group +k8s:deepcopy-gen=package,register +groupName=policy.open-cluster-management.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "policy.open-cluster-management.io", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
Types ¶
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" // UnknownCompliancy is an ComplianceState UnknownCompliancy ComplianceState = "UnknownCompliancy" )
type Policy ¶
type Policy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` }
Policy is a specification for a Policy resource +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient.
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"` Items []Policy `json:"items"` }
PolicyList is a list of Policy resources +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:lister-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object.
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 RemediationAction ¶
type RemediationAction string
RemediationAction : enforce or inform.
const ( // Enforce is an remediationAction to make changes Enforce RemediationAction = "Enforce" // Inform is an remediationAction to only inform Inform RemediationAction = "Inform" )
type SamplePolicy ¶
type SamplePolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SamplePolicySpec `json:"spec,omitempty"` Status SamplePolicyStatus `json:"status,omitempty"` }
SamplePolicy is the Schema for the samplepolicies API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=samplepolicies,scope=Namespaced.
func (*SamplePolicy) DeepCopy ¶
func (in *SamplePolicy) DeepCopy() *SamplePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamplePolicy.
func (*SamplePolicy) DeepCopyInto ¶
func (in *SamplePolicy) DeepCopyInto(out *SamplePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SamplePolicy) DeepCopyObject ¶
func (in *SamplePolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SamplePolicyList ¶
type SamplePolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SamplePolicy `json:"items"` }
SamplePolicyList contains a list of SamplePolicy.
func (*SamplePolicyList) DeepCopy ¶
func (in *SamplePolicyList) DeepCopy() *SamplePolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamplePolicyList.
func (*SamplePolicyList) DeepCopyInto ¶
func (in *SamplePolicyList) DeepCopyInto(out *SamplePolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SamplePolicyList) DeepCopyObject ¶
func (in *SamplePolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SamplePolicySpec ¶
type SamplePolicySpec struct { Severity Severity `json:"severity,omitempty"` //low, medium, high RemediationAction RemediationAction `json:"remediationAction,omitempty"` //enforce, inform NamespaceSelector Target `json:"namespaceSelector,omitempty"` // selecting a list of namespaces where the policy applies LabelSelector map[string]string `json:"labelSelector,omitempty"` MaxRoleBindingUsersPerNamespace int `json:"maxRoleBindingUsersPerNamespace,omitempty"` MaxRoleBindingGroupsPerNamespace int `json:"maxRoleBindingGroupsPerNamespace,omitempty"` MaxClusterRoleBindingUsers int `json:"maxClusterRoleBindingUsers,omitempty"` MaxClusterRoleBindingGroups int `json:"maxClusterRoleBindingGroups,omitempty"` }
SamplePolicySpec defines the desired state of SamplePolicy +k8s:openapi-gen=true.
func (*SamplePolicySpec) DeepCopy ¶
func (in *SamplePolicySpec) DeepCopy() *SamplePolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamplePolicySpec.
func (*SamplePolicySpec) DeepCopyInto ¶
func (in *SamplePolicySpec) DeepCopyInto(out *SamplePolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SamplePolicyStatus ¶
type SamplePolicyStatus struct { ComplianceState ComplianceState `json:"compliant,omitempty"` // Compliant, NonCompliant, UnkownCompliancy CompliancyDetails map[string]map[string][]string `json:"compliancyDetails,omitempty"` // reason for non-compliancy }
SamplePolicyStatus defines the observed state of SamplePolicy +k8s:openapi-gen=true.
func (*SamplePolicyStatus) DeepCopy ¶
func (in *SamplePolicyStatus) DeepCopy() *SamplePolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SamplePolicyStatus.
func (*SamplePolicyStatus) DeepCopyInto ¶
func (in *SamplePolicyStatus) DeepCopyInto(out *SamplePolicyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Target ¶
type Target struct { Include []string `json:"include,omitempty"` Exclude []string `json:"exclude,omitempty"` }
Target defines the list of namespaces to include/exclude.
func (*Target) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.
func (*Target) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.