v1alpha1

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the validation v1alpha1 API group +kubebuilder:object:generate=true +groupName=validation.spectrocloud.labs

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "validation.spectrocloud.labs", Version: "v1alpha1"}

	// 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 ComputeResourceRule

type ComputeResourceRule struct {
	validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"`

	// RuleName is the name of the compute resource validation rule.
	RuleName string `json:"name" yaml:"name"`

	// ClusterName is required when the vCenter entity resides beneath a Cluster in the vCenter object hierarchy.
	ClusterName string `json:"clusterName,omitempty" yaml:"clusterName"`

	// Scope is the scope of the compute resource validation rule.
	Scope string `json:"scope" yaml:"scope"`

	// EntityName is the name of the entity to validate.
	EntityName string `json:"entityName" yaml:"entityName"`

	// NodepoolResourceRequirements is the list of nodepool resource requirements.
	NodepoolResourceRequirements []NodepoolResourceRequirement `json:"nodepoolResourceRequirements" yaml:"nodepoolResourceRequirements"`
}

ComputeResourceRule defines a compute resource validation rule.

func (*ComputeResourceRule) DeepCopy

func (in *ComputeResourceRule) DeepCopy() *ComputeResourceRule

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

func (*ComputeResourceRule) DeepCopyInto

func (in *ComputeResourceRule) DeepCopyInto(out *ComputeResourceRule)

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

func (ComputeResourceRule) Name

func (r ComputeResourceRule) Name() string

Name returns the name of the compute resource validation rule.

func (*ComputeResourceRule) SetName added in v0.0.32

func (r *ComputeResourceRule) SetName(name string)

SetName sets the name of the compute resource validation rule.

type NTPValidationRule

type NTPValidationRule struct {
	validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"`

	// RuleName is the name of the NTP validation rule.
	RuleName string `json:"name" yaml:"name"`

	// ClusterName is required when the vCenter Host(s) reside beneath a Cluster in the vCenter object hierarchy.
	ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"`

	// Hosts is the list of vCenter Hosts to validate NTP configuration for.
	Hosts []string `json:"hosts" yaml:"hosts"`
}

NTPValidationRule defines an NTP validation rule.

func (*NTPValidationRule) DeepCopy

func (in *NTPValidationRule) DeepCopy() *NTPValidationRule

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

func (*NTPValidationRule) DeepCopyInto

func (in *NTPValidationRule) DeepCopyInto(out *NTPValidationRule)

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

func (NTPValidationRule) Name

func (r NTPValidationRule) Name() string

Name returns the name of the NTP validation rule.

func (*NTPValidationRule) SetName added in v0.0.32

func (r *NTPValidationRule) SetName(name string)

SetName sets the name of the NTP validation rule.

type NodepoolResourceRequirement

type NodepoolResourceRequirement struct {
	// Name is the name of the node pool.
	Name string `json:"name" yaml:"name"`

	// NumberOfNodes is the number of nodes in the node pool.
	NumberOfNodes int `json:"numberOfNodes" yaml:"numberOfNodes"`

	// CPU is the CPU requirement for the node pool.
	CPU string `json:"cpu" yaml:"cpu"`

	// Memory is the memory requirement for the node pool.
	Memory string `json:"memory" yaml:"memory"`

	// DiskSpace is the disk space requirement for the node pool.
	DiskSpace string `json:"diskSpace" yaml:"diskSpace"`
}

NodepoolResourceRequirement defines the resource requirements for a node pool.

func (*NodepoolResourceRequirement) DeepCopy

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

func (*NodepoolResourceRequirement) DeepCopyInto

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

type PrivilegeValidationRule added in v0.1.0

type PrivilegeValidationRule struct {
	validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"`

	// RuleName is the name of the privilege validation rule.
	RuleName string `json:"name" yaml:"name"`

	// ClusterName is required when the vCenter entity resides beneath a Cluster in the vCenter object hierarchy.
	ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"`

	// EntityType is the type of the vCenter entity to validate.
	EntityType string `json:"entityType" yaml:"entityType"`

	// EntityName is the name of the vCenter entity to validate privileges on.
	EntityName string `json:"entityName" yaml:"entityName"`

	// Privileges is the list of privileges to validate that the user has with respect to the designated vCenter entity.
	Privileges []string `json:"privileges" yaml:"privileges"`

	// Propagation validation configuration for permissions that grant the user privileges on the vCenter entity.
	Propagation Propagation `json:"propagation,omitempty" yaml:"propagation,omitempty"`
}

PrivilegeValidationRule defines a privilege validation rule.

func (*PrivilegeValidationRule) DeepCopy added in v0.1.0

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

func (*PrivilegeValidationRule) DeepCopyInto added in v0.1.0

func (in *PrivilegeValidationRule) DeepCopyInto(out *PrivilegeValidationRule)

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

func (PrivilegeValidationRule) Name added in v0.1.0

Name returns the name of the privilege validation rule.

func (*PrivilegeValidationRule) SetName added in v0.1.0

func (r *PrivilegeValidationRule) SetName(name string)

SetName sets the name of the privilege validation rule.

type Propagation added in v0.1.0

type Propagation struct {
	// Enabled controls whether propagation validation is performed.
	Enabled bool `json:"enabled" yaml:"enabled"`

	// GroupPrincipals is an optional list of vCenter group principals that the user is a member of.
	// Group membership can be determined dynamically by a vSphere admin user, but specifying
	// group principals manually allows privilege validation for non-admin users.
	// Group principals must be of the format DOMAIN\group-name, e.g., VSPHERE.LOCAL\my-custom-group.
	GroupPrincipals []string `json:"groupPrincipals,omitempty" yaml:"groupPrincipals,omitempty"`

	// Propagated indicates whether the permission that grants privileges to the user for the rule's
	// entity is expected to be propagated or not.
	Propagated bool `json:"propagated" yaml:"propagated"`
}

Propagation contains configuration related to propagation validation.

func (*Propagation) DeepCopy added in v0.1.0

func (in *Propagation) DeepCopy() *Propagation

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

func (*Propagation) DeepCopyInto added in v0.1.0

func (in *Propagation) DeepCopyInto(out *Propagation)

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

type TagValidationRule

type TagValidationRule struct {
	validationrule.ManuallyNamed `json:",inline" yaml:",omitempty"`

	// RuleName is the name of the tag validation rule.
	RuleName string `json:"name" yaml:"name"`

	// ClusterName is required when the vCenter entity resides beneath a Cluster in the vCenter object hierarchy.
	ClusterName string `json:"clusterName,omitempty" yaml:"clusterName"`

	// EntityType is the type of the vCenter entity to validate.
	EntityType string `json:"entityType" yaml:"entityType"`

	// EntityName is the name of the vCenter entity to validate tags on.
	EntityName string `json:"entityName" yaml:"entityName"`

	// Tag is the tag to validate on the vCenter entity.
	Tag string `json:"tag" yaml:"tag"`
}

TagValidationRule defines a tag validation rule.

func (*TagValidationRule) DeepCopy

func (in *TagValidationRule) DeepCopy() *TagValidationRule

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

func (*TagValidationRule) DeepCopyInto

func (in *TagValidationRule) DeepCopyInto(out *TagValidationRule)

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

func (TagValidationRule) Name

func (r TagValidationRule) Name() string

Name returns the name of the tag validation rule.

func (*TagValidationRule) SetName added in v0.0.32

func (r *TagValidationRule) SetName(name string)

SetName sets the name of the tag validation rule.

type VsphereAuth

type VsphereAuth struct {
	// SecretName is the name of the secret containing vCenter credentials.
	SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`

	// Account is the vCenter account to use for authentication.
	Account *vcenter.Account `json:"account,omitempty" yaml:"account,omitempty"`
}

VsphereAuth defines authentication configuration for a vSphere validator.

func (*VsphereAuth) DeepCopy

func (in *VsphereAuth) DeepCopy() *VsphereAuth

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

func (*VsphereAuth) DeepCopyInto

func (in *VsphereAuth) DeepCopyInto(out *VsphereAuth)

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

type VsphereValidator

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

	Spec   VsphereValidatorSpec   `json:"spec,omitempty"`
	Status VsphereValidatorStatus `json:"status,omitempty"`
}

VsphereValidator is the Schema for the vspherevalidators API.

func (*VsphereValidator) DeepCopy

func (in *VsphereValidator) DeepCopy() *VsphereValidator

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

func (*VsphereValidator) DeepCopyInto

func (in *VsphereValidator) DeepCopyInto(out *VsphereValidator)

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

func (*VsphereValidator) DeepCopyObject

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

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

func (VsphereValidator) GetKind added in v0.0.30

func (v VsphereValidator) GetKind() string

GetKind returns the vSphere validator's kind.

func (VsphereValidator) PluginCode added in v0.0.29

func (v VsphereValidator) PluginCode() string

PluginCode returns the vSphere validator's plugin code.

func (VsphereValidator) ResultCount added in v0.0.29

func (v VsphereValidator) ResultCount() int

ResultCount returns the number of validation results expected for a vSphere validator.

type VsphereValidatorList

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

VsphereValidatorList contains a list of vSphere validator.

func (*VsphereValidatorList) DeepCopy

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

func (*VsphereValidatorList) DeepCopyInto

func (in *VsphereValidatorList) DeepCopyInto(out *VsphereValidatorList)

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

func (*VsphereValidatorList) DeepCopyObject

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

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

type VsphereValidatorSpec

type VsphereValidatorSpec struct {
	Auth                     VsphereAuth               `json:"auth" yaml:"auth"`
	Datacenter               string                    `json:"datacenter" yaml:"datacenter"`
	PrivilegeValidationRules []PrivilegeValidationRule `json:"privilegeValidationRules,omitempty" yaml:"privilegeValidationRules,omitempty"`
	TagValidationRules       []TagValidationRule       `json:"tagValidationRules,omitempty" yaml:"tagValidationRules,omitempty"`
	ComputeResourceRules     []ComputeResourceRule     `json:"computeResourceRules,omitempty" yaml:"computeResourceRules,omitempty"`
	NTPValidationRules       []NTPValidationRule       `json:"ntpValidationRules,omitempty" yaml:"ntpValidationRules,omitempty"`
}

VsphereValidatorSpec defines the desired state of a vSphere validator.

func (*VsphereValidatorSpec) DeepCopy

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

func (*VsphereValidatorSpec) DeepCopyInto

func (in *VsphereValidatorSpec) DeepCopyInto(out *VsphereValidatorSpec)

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

func (VsphereValidatorSpec) PluginCode added in v0.0.29

func (s VsphereValidatorSpec) PluginCode() string

PluginCode returns the vSphere validator's plugin code.

func (VsphereValidatorSpec) ResultCount

func (s VsphereValidatorSpec) ResultCount() int

ResultCount returns the number of validation results expected for a VsphereValidatorSpec.

type VsphereValidatorStatus

type VsphereValidatorStatus struct{}

VsphereValidatorStatus defines the observed state of a vSphere validator.

func (*VsphereValidatorStatus) DeepCopy

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

func (*VsphereValidatorStatus) DeepCopyInto

func (in *VsphereValidatorStatus) DeepCopyInto(out *VsphereValidatorStatus)

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

Jump to

Keyboard shortcuts

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