Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the validation v1alpha1 API group +kubebuilder:object:generate=true +groupName=validation.spectrocloud.labs
Index ¶
- Constants
- Variables
- type ConditionType
- type HelmChart
- type HelmConfig
- type HelmRelease
- type Sink
- type SinkEmitState
- type ValidationCondition
- type ValidationResult
- type ValidationResultList
- type ValidationResultSpec
- type ValidationResultStatus
- type ValidationState
- type ValidatorConfig
- type ValidatorConfigList
- type ValidatorConfigSpec
- type ValidatorConfigStatus
- type ValidatorPluginCondition
Constants ¶
const SinkEmission clusterv1beta1.ConditionType = "SinkEmission"
SinkEmission is the type of condition that is emitted to the sink.
Variables ¶
var (
// APIVersion is the API version used to reference v1alpha1 objects.
APIVersion = GroupVersion.String()
// Group is the API group used to reference validator objects.
Group = "validation.spectrocloud.labs"
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: Group, 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
// ValidatorConfigKind is the kind of the ValidatorConfig object.
ValidatorConfigKind = reflect.TypeOf(ValidatorConfig{}).Name()
// ValidatorConfigGroupResource is the name of the ValidatorConfig resource.
ValidatorConfigGroupResource = schema.GroupResource{Group: Group, Resource: "validatorconfigs"}
// ValidationResultKind is the kind of the ValidationResult object.
ValidationResultKind = reflect.TypeOf(ValidationResult{}).Name()
// ValidationResultGroupResource is the name of the ValidationResult resource.
ValidationResultGroupResource = schema.GroupResource{Group: Group, Resource: "validationresults"}
)
Functions ¶
This section is empty.
Types ¶
type ConditionType ¶
type ConditionType string
ConditionType is a valid value for Condition.Type.
const HelmChartDeployedCondition ConditionType = "HelmChartDeployed"
HelmChartDeployedCondition defines whether the helm chart was installed/pulled/upgraded correctly.
type HelmChart ¶
type HelmChart struct {
// Name of the Helm chart.
Name string `json:"name" yaml:"name"`
// Repository of the Helm chart.
Repository string `json:"repository" yaml:"repository"`
// Version of the Helm chart.
Version string `json:"version" yaml:"version"`
}
HelmChart defines the configuration for a Helm chart.
func (*HelmChart) DeepCopy ¶
func (in *HelmChart) DeepCopy() *HelmChart
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChart.
func (*HelmChart) DeepCopyInto ¶
func (in *HelmChart) DeepCopyInto(out *HelmChart)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmConfig ¶ added in v0.0.51
type HelmConfig struct {
// Registry is the URL of the Helm registry.
Registry string `json:"registry" yaml:"registry"`
// CAFile is the path to the CA certificate for the Helm repository.
CAFile string `json:"caFile,omitempty" yaml:"caFile,omitempty"`
// InsecureSkipTLSVerify skips the verification of the server's certificate chain and host name.
InsecureSkipTLSVerify bool `json:"insecureSkipVerify,omitempty" yaml:"insecureSkipVerify,omitempty"`
// AuthSecretName is the name of the K8s secret containing the authentication details for the Helm repository.
AuthSecretName string `json:"authSecretName,omitempty" yaml:"authSecretName,omitempty"`
}
HelmConfig defines the configuration for the Helm registry.
func (*HelmConfig) DeepCopy ¶ added in v0.0.51
func (in *HelmConfig) DeepCopy() *HelmConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmConfig.
func (*HelmConfig) DeepCopyInto ¶ added in v0.0.51
func (in *HelmConfig) DeepCopyInto(out *HelmConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmRelease ¶
type HelmRelease struct {
// Chart defines the Helm chart to be installed.
Chart HelmChart `json:"chart" yaml:"chart"`
// Values defines the values to be passed to the Helm chart.
Values string `json:"values" yaml:"values"`
}
HelmRelease defines the configuration for a Helm chart release.
func (*HelmRelease) DeepCopy ¶
func (in *HelmRelease) DeepCopy() *HelmRelease
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease.
func (*HelmRelease) DeepCopyInto ¶
func (in *HelmRelease) DeepCopyInto(out *HelmRelease)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Sink ¶
type Sink struct {
// Type of the sink.
// +kubebuilder:validation:Enum=alertmanager;slack
Type string `json:"type" yaml:"type"`
// SecretName is the name of a K8s secret containing configuration details for the sink.
SecretName string `json:"secretName" yaml:"secretName"`
}
Sink defines the configuration for a notification sink.
func (*Sink) DeepCopy ¶
func (in *Sink) DeepCopy() *Sink
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sink.
func (*Sink) DeepCopyInto ¶
func (in *Sink) DeepCopyInto(out *Sink)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SinkEmitState ¶
type SinkEmitState string
SinkEmitState is the state of the sink emission.
const (
// SinkEmitNA indicates that the sink emission is not applicable.
SinkEmitNA SinkEmitState = "SinkEmitNA"
// SinkEmitFailed indicates that the sink emission has failed.
SinkEmitFailed SinkEmitState = "SinkEmitFailed"
// SinkEmitSucceeded indicates that the sink emission has succeeded.
SinkEmitSucceeded SinkEmitState = "SinkEmitSucceeded"
)
type ValidationCondition ¶
type ValidationCondition struct {
// Unique, one-word description of the validation type associated with the condition.
ValidationType string `json:"validationType"`
// Unique, one-word description of the validation rule associated with the condition.
ValidationRule string `json:"validationRule"`
// Human-readable message indicating details about the last transition.
Message string `json:"message,omitempty"`
// Human-readable messages indicating additional details for the last transition.
Details []string `json:"details,omitempty"`
// Human-readable messages indicating additional failure details for the last transition.
Failures []string `json:"failures,omitempty"`
// True if the validation rule succeeded, otherwise False.
Status corev1.ConditionStatus `json:"status"`
// Timestamp of most recent execution of the validation rule associated with the condition.
LastValidationTime metav1.Time `json:"lastValidationTime"`
}
ValidationCondition describes the state of a validation rule.
func DefaultValidationCondition ¶
func DefaultValidationCondition() ValidationCondition
DefaultValidationCondition returns a default ValidationCondition.
func (*ValidationCondition) DeepCopy ¶
func (in *ValidationCondition) DeepCopy() *ValidationCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationCondition.
func (*ValidationCondition) DeepCopyInto ¶
func (in *ValidationCondition) DeepCopyInto(out *ValidationCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValidationResult ¶
type ValidationResult struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ValidationResultSpec `json:"spec,omitempty"`
Status ValidationResultStatus `json:"status,omitempty"`
}
ValidationResult is the Schema for the validationresults API.
func (*ValidationResult) DeepCopy ¶
func (in *ValidationResult) DeepCopy() *ValidationResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResult.
func (*ValidationResult) DeepCopyInto ¶
func (in *ValidationResult) DeepCopyInto(out *ValidationResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ValidationResult) DeepCopyObject ¶
func (in *ValidationResult) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ValidationResultList ¶
type ValidationResultList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ValidationResult `json:"items"`
}
ValidationResultList contains a list of ValidationResult.
func (*ValidationResultList) DeepCopy ¶
func (in *ValidationResultList) DeepCopy() *ValidationResultList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultList.
func (*ValidationResultList) DeepCopyInto ¶
func (in *ValidationResultList) DeepCopyInto(out *ValidationResultList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ValidationResultList) DeepCopyObject ¶
func (in *ValidationResultList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ValidationResultSpec ¶
type ValidationResultSpec struct {
// Plugin is the plugin code of the validator plugin that was executed.
Plugin string `json:"plugin"`
// The number of rules in the validator plugin spec, hence the number of expected ValidationResults.
// +kubebuilder:validation:Minimum=1
ExpectedResults int `json:"expectedResults"`
}
ValidationResultSpec defines the desired state of ValidationResult.
func (*ValidationResultSpec) DeepCopy ¶
func (in *ValidationResultSpec) DeepCopy() *ValidationResultSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultSpec.
func (*ValidationResultSpec) DeepCopyInto ¶
func (in *ValidationResultSpec) DeepCopyInto(out *ValidationResultSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValidationResultStatus ¶
type ValidationResultStatus struct {
// State is the overall state of the validation result.
State ValidationState `json:"state"`
// Conditions is a list of conditions that describe the current state of the ValidationResult.
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
Conditions []clusterv1beta1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// ValidationConditions is a list of conditions that describe the validation rules associated with the ValidationResult.
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
ValidationConditions []ValidationCondition `json:"validationConditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
ValidationResultStatus defines the observed state of ValidationResult.
func (*ValidationResultStatus) DeepCopy ¶
func (in *ValidationResultStatus) DeepCopy() *ValidationResultStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultStatus.
func (*ValidationResultStatus) DeepCopyInto ¶
func (in *ValidationResultStatus) DeepCopyInto(out *ValidationResultStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValidationState ¶
type ValidationState string
ValidationState records the overall state of a validation result.
const (
// ValidationFailed indicates that the validation result has failed.
ValidationFailed ValidationState = "Failed"
// ValidationInProgress indicates that the validation result is in progress.
ValidationInProgress ValidationState = "InProgress"
// ValidationSucceeded indicates that the validation result has succeeded.
ValidationSucceeded ValidationState = "Succeeded"
)
type ValidatorConfig ¶
type ValidatorConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ValidatorConfigSpec `json:"spec,omitempty"`
Status ValidatorConfigStatus `json:"status,omitempty"`
}
ValidatorConfig is the Schema for the validatorconfigs API.
func (*ValidatorConfig) DeepCopy ¶
func (in *ValidatorConfig) DeepCopy() *ValidatorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfig.
func (*ValidatorConfig) DeepCopyInto ¶
func (in *ValidatorConfig) DeepCopyInto(out *ValidatorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ValidatorConfig) DeepCopyObject ¶
func (in *ValidatorConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ValidatorConfigList ¶
type ValidatorConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ValidatorConfig `json:"items"`
}
ValidatorConfigList contains a list of ValidatorConfig.
func (*ValidatorConfigList) DeepCopy ¶
func (in *ValidatorConfigList) DeepCopy() *ValidatorConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfigList.
func (*ValidatorConfigList) DeepCopyInto ¶
func (in *ValidatorConfigList) DeepCopyInto(out *ValidatorConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ValidatorConfigList) DeepCopyObject ¶
func (in *ValidatorConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ValidatorConfigSpec ¶
type ValidatorConfigSpec struct {
// HelmConfig defines the configuration for the Helm registry.
HelmConfig HelmConfig `json:"helmConfig" yaml:"helmConfig"`
// Plugins defines the configuration for the validator plugins.
Plugins []HelmRelease `json:"plugins,omitempty" yaml:"plugins,omitempty"`
// Sink defines the configuration for the notification sink.
Sink *Sink `json:"sink,omitempty" yaml:"sink,omitempty"`
}
ValidatorConfigSpec defines the desired state of ValidatorConfig.
func (*ValidatorConfigSpec) DeepCopy ¶
func (in *ValidatorConfigSpec) DeepCopy() *ValidatorConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfigSpec.
func (*ValidatorConfigSpec) DeepCopyInto ¶
func (in *ValidatorConfigSpec) DeepCopyInto(out *ValidatorConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValidatorConfigStatus ¶
type ValidatorConfigStatus struct {
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
Conditions []ValidatorPluginCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
ValidatorConfigStatus defines the observed state of ValidatorConfig
func (*ValidatorConfigStatus) DeepCopy ¶
func (in *ValidatorConfigStatus) DeepCopy() *ValidatorConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfigStatus.
func (*ValidatorConfigStatus) DeepCopyInto ¶
func (in *ValidatorConfigStatus) DeepCopyInto(out *ValidatorConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValidatorPluginCondition ¶
type ValidatorPluginCondition 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"`
// Name of the Validator plugin.
// +required
PluginName string `json:"pluginName"`
// Status of the condition, one of True, False, Unknown.
// +required
Status corev1.ConditionStatus `json:"status"`
// A human readable message indicating details about the transition.
// This field may be empty.
// +optional
Message string `json:"message,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:"lastUpdatedTime"`
}
ValidatorPluginCondition describes the state of a Validator plugin.
func (*ValidatorPluginCondition) DeepCopy ¶
func (in *ValidatorPluginCondition) DeepCopy() *ValidatorPluginCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorPluginCondition.
func (*ValidatorPluginCondition) DeepCopyInto ¶
func (in *ValidatorPluginCondition) DeepCopyInto(out *ValidatorPluginCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.