v1alpha1

package
v0.0.0-...-db94d69 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the monitoring v1alpha1 API group +kubebuilder:object:generate=true +groupName=monitoring.spark.co.nz

Index

Constants

View Source
const (
	EventSource                 = "ContainerScan"
	EventReasonIssuerReconciler = "ContainerScanReconciler"
)
View Source
const (
	MetallbEventSource                 = "MetallbScan"
	MetallbEventReasonIssuerReconciler = "MetallbScanReconciler"
)
View Source
const (
	PortEventSource                 = "PortScan"
	PortEventReasonIssuerReconciler = "PortScanReconciler"
)
View Source
const (
	VmScanEventSource                 = "VmScan"
	VmScanEventReasonIssuerReconciler = "VmScanScanReconciler"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "monitoring.spark.co.nz", 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 ConditionStatus

type ConditionStatus string

ConditionStatus represents a condition's status. +kubebuilder:validation:Enum=True;False;Unknown

const (
	// ConditionTrue represents the fact that a given condition is true
	ConditionTrue ConditionStatus = "True"

	// ConditionFalse represents the fact that a given condition is false
	ConditionFalse ConditionStatus = "False"

	// ConditionUnknown represents the fact that a given condition is unknown
	ConditionUnknown ConditionStatus = "Unknown"
)

These are valid condition statuses. "ConditionTrue" means a resource is in the condition; "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes can't decide if a resource is in the condition or not. In the future, we could add other intermediate conditions, e.g. ConditionDegraded.

type ContainerScan

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

	Spec   ContainerScanSpec   `json:"spec,omitempty"`
	Status ContainerScanStatus `json:"status,omitempty"`
}

ContainerScan is the Schema for the containerscans API +kubebuilder:printcolumn:name="CreatedAt",type="string",JSONPath=".metadata.creationTimestamp",description="object creation timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[].status",description="if set to true, there is no container with non-zero terminate state" +kubebuilder:printcolumn:name="LastSuccessfulTime",type="string",JSONPath=".status.lastRunTime",description="last successful run (where there is no failed containers) timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="ExternalNotified",type="string",JSONPath=".status.externalNotified",description="indicates if the external system is notified" +kubebuilder:printcolumn:name="IncidentID",type="string",JSONPath=".status.incidentID",description="incident ID from service now"

func (*ContainerScan) DeepCopy

func (in *ContainerScan) DeepCopy() *ContainerScan

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

func (*ContainerScan) DeepCopyInto

func (in *ContainerScan) DeepCopyInto(out *ContainerScan)

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

func (*ContainerScan) DeepCopyObject

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

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

func (*ContainerScan) Default

func (r *ContainerScan) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*ContainerScan) SetupWebhookWithManager

func (r *ContainerScan) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager will setup the manager to manage the webhooks

func (*ContainerScan) ValidateContainerScan

func (r *ContainerScan) ValidateContainerScan() error

func (*ContainerScan) ValidateContainerScanName

func (r *ContainerScan) ValidateContainerScanName() *field.Error

func (*ContainerScan) ValidateContainerScanSpec

func (r *ContainerScan) ValidateContainerScanSpec() *field.Error

func (*ContainerScan) ValidateCreate

func (r *ContainerScan) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ContainerScan) ValidateDelete

func (r *ContainerScan) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ContainerScan) ValidateUpdate

func (r *ContainerScan) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ContainerScanCondition

type ContainerScanCondition struct {
	// Type of the condition, known values are 'Ready'.
	Type ContainerScanConditionType `json:"type"`

	// Status of the condition, one of ('True', 'False', 'Unknown')
	Status ConditionStatus `json:"status"`

	// LastTransitionTime is the timestamp of the last update to the status
	// +optional
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason is the machine readable explanation for object's condition
	// +optional
	Reason string `json:"reason,omitempty"`

	// Message is the human readable explanation for object's condition
	Message string `json:"message"`
}

func (*ContainerScanCondition) DeepCopy

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

func (*ContainerScanCondition) DeepCopyInto

func (in *ContainerScanCondition) DeepCopyInto(out *ContainerScanCondition)

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

type ContainerScanConditionType

type ContainerScanConditionType string

ManagedConditionType represents a managed cluster condition value.

const (
	// ContainerScanConditionReady represents the fact that a given managed cluster condition
	// is in reachable from the ACM/source cluster.
	// If the `status` of this condition is `False`, managed cluster is unreachable
	ContainerScanConditionReady ContainerScanConditionType = "Ready"
)

type ContainerScanList

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

ContainerScanList contains a list of ContainerScan

func (*ContainerScanList) DeepCopy

func (in *ContainerScanList) DeepCopy() *ContainerScanList

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

func (*ContainerScanList) DeepCopyInto

func (in *ContainerScanList) DeepCopyInto(out *ContainerScanList)

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

func (*ContainerScanList) DeepCopyObject

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

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

type ContainerScanSpec

type ContainerScanSpec struct {

	// Set suspend to true to disable monitoring the custom resource
	// +optional
	Suspend *bool `json:"suspend"`

	// Containers in the target namespace will be monitored by the controller
	TargetNamespace []string `json:"targetNamespace"`

	// Suspends email alerts if set to true, target email (.spec.email) will not be notified
	// +optional
	SuspendEmailAlert *bool `json:"suspendEmailAlert,omitempty"`

	// Target user's email for container status notification
	// +optional
	Email string `json:"email,omitempty"`

	// SMTP Relay host for sending the email
	// +optional
	RelayHost string `json:"relayHost,omitempty"`

	//aggregate external alerts per pod, if set to false, alarm will be raised for each problematic container
	AggregateAlerts *bool `json:"aggregateAlerts,omitempty"`
	// To notify the external alerting system, boolean (true, false). Set true to notify the external system.
	// +optional
	NotifyExtenal *bool `json:"notifyExternal,omitempty"`

	// URL of the external alert system
	// +optional
	ExternalURL string `json:"externalURL,omitempty"`

	// Data to be sent to the external system in the form of config map
	// +optional
	ExternalData string `json:"externalData,omitempty"`

	// Secret which has the username and password to post the alert notification to the external system
	// +optional
	ExternalSecret string `json:"externalSecret,omitempty"`

	// the frequency of checks to be done, if not set, defaults to 2 minutes
	// +optional
	CheckInterval *int64 `json:"checkInterval,omitempty"`
}

ContainerScanSpec defines the desired state of ContainerScan

func (*ContainerScanSpec) DeepCopy

func (in *ContainerScanSpec) DeepCopy() *ContainerScanSpec

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

func (*ContainerScanSpec) DeepCopyInto

func (in *ContainerScanSpec) DeepCopyInto(out *ContainerScanSpec)

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

type ContainerScanStatus

type ContainerScanStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// list of status conditions to indicate the status of managed cluster
	// known conditions are 'Ready'.
	// +optional
	Conditions []ContainerScanCondition `json:"conditions,omitempty"`

	// last successful timestamp of retrieved cluster status
	// +optional
	LastRunTime *metav1.Time `json:"lastRunTime,omitempty"`

	// Indicates if external alerting system is notified
	// +optional
	ExternalNotified bool `json:"externalNotified,omitempty"`

	// Indicates the timestamp when external alerting system is notified
	// +optional
	ExternalNotifiedTime *metav1.Time `json:"externalNotifiedTime,omitempty"`

	// Incident ID from the rem. Spark specific
	// +optional
	IncidentID []string `json:"incidentID,omitempty"`

	// affected targets
	// +optional
	AffectedPods []string `json:"affectedPods,omitempty"`
}

ContainerScanStatus defines the observed state of ContainerScan

func (*ContainerScanStatus) DeepCopy

func (in *ContainerScanStatus) DeepCopy() *ContainerScanStatus

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

func (*ContainerScanStatus) DeepCopyInto

func (in *ContainerScanStatus) DeepCopyInto(out *ContainerScanStatus)

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

type MetallbScan

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

	Spec   MetallbScanSpec   `json:"spec,omitempty"`
	Status MetallbScanStatus `json:"status,omitempty"`
}

MetallbScan is the Schema for the metallbscans API +kubebuilder:printcolumn:name="CreatedAt",type="string",JSONPath=".metadata.creationTimestamp",description="object creation timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[].status",description="if set to true, all metallb checks are completed successfully" +kubebuilder:printcolumn:name="LastRunTime",type="string",JSONPath=".status.lastRunTime",description="last healthcheck run timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="LastSuccessfulRunTime",type="string",JSONPath=".status.lastSuccessfulRunTime",description="last successful run timestamp(in cluster's timezone) when metallb checks completed successfully" +kubebuilder:printcolumn:name="Healthy",type="string",JSONPath=".status.healthy",description="last successful run timestamp(in cluster's timezone)"

func (*MetallbScan) DeepCopy

func (in *MetallbScan) DeepCopy() *MetallbScan

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

func (*MetallbScan) DeepCopyInto

func (in *MetallbScan) DeepCopyInto(out *MetallbScan)

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

func (*MetallbScan) DeepCopyObject

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

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

type MetallbScanCondition

type MetallbScanCondition struct {
	// Type of the condition, known values are 'Ready'.
	Type MetallbScanConditionType `json:"type"`

	// Status of the condition, one of ('True', 'False', 'Unknown')
	Status ConditionStatus `json:"status"`

	// LastTransitionTime is the timestamp of the last update to the status
	// +optional
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason is the machine readable explanation for object's condition
	// +optional
	Reason string `json:"reason,omitempty"`

	// Message is the human readable explanation for object's condition
	Message string `json:"message"`
}

func (*MetallbScanCondition) DeepCopy

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

func (*MetallbScanCondition) DeepCopyInto

func (in *MetallbScanCondition) DeepCopyInto(out *MetallbScanCondition)

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

type MetallbScanConditionType

type MetallbScanConditionType string

ManagedConditionType represents a managed metallb scan CR condition value.

const (
	// MetallbScanConditionReady represents the fact that set of metallb checks are healthy
	// If the `status` of this condition is `False`, if any checks fails.
	MetallbScanConditionReady MetallbScanConditionType = "Ready"
)

type MetallbScanList

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

MetallbScanList contains a list of MetallbScan

func (*MetallbScanList) DeepCopy

func (in *MetallbScanList) DeepCopy() *MetallbScanList

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

func (*MetallbScanList) DeepCopyInto

func (in *MetallbScanList) DeepCopyInto(out *MetallbScanList)

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

func (*MetallbScanList) DeepCopyObject

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

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

type MetallbScanSpec

type MetallbScanSpec struct {

	// Set suspend to true to disable monitoring the custom resource
	// +optional
	Suspend *bool `json:"suspend"`

	// Set it to true to disable BFD monitoring for a configured BGP Hop in a worker
	// +optional
	IgnoreBFD *bool `json:"ignoreBFD"`

	// Set it to true to disable alerting if no configured BGP hops are found in a worker
	// +optional
	IgnoreNoBGPHop *bool `json:"ignoreNoBGPHop"`

	// Label for selecting workers
	// +optional
	WorkerLabel *map[string]string `json:"workerLabel"`

	// Label for selecting workers and speaker daemonset in metallb namespace
	// +optional
	SpeakerPodLabel *map[string]string `json:"speakerPodLabel"`

	// Suspends email alerts if set to true, target users will not be notified
	// +optional
	SuspendEmailAlert *bool `json:"suspendEmailAlert,omitempty"`

	// Target user's email for metallb scan status change notification
	// +optional
	Email string `json:"email,omitempty"`

	// Target cluster name for using the cluster name in notifications
	// +optional
	Cluster *string `json:"cluster,omitempty"`

	// Target metallb namespace
	// +optional
	MetallbNamespace *string `json:"metalLbNamespace,omitempty"`

	// Relay host for sending the email
	// +optional
	RelayHost string `json:"relayHost,omitempty"`

	// To notify the external alerting system
	// +optional
	NotifyExternal *bool `json:"notifyExternal,omitempty"`

	// URL of the external alert system. Example: http://notify.example.com/ (both http/https supported with basic authentication)
	// +optional
	ExternalURL string `json:"externalURL,omitempty"`

	// Data to be sent to the external system in the form of config map
	// +optional
	ExternalData string `json:"externalData,omitempty"`

	// Secret which has the username and password to post the alert notification to the external system using Authorization header
	// +optional
	ExternalSecret string `json:"externalSecret,omitempty"`

	// frequency of the check. If not set, it defaults to 30 mins.
	// +optional
	CheckInterval *int64 `json:"checkInterval,omitempty"`
}

MetallbScanSpec defines the desired state of MetallbScan

func (*MetallbScanSpec) DeepCopy

func (in *MetallbScanSpec) DeepCopy() *MetallbScanSpec

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

func (*MetallbScanSpec) DeepCopyInto

func (in *MetallbScanSpec) DeepCopyInto(out *MetallbScanSpec)

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

type MetallbScanStatus

type MetallbScanStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// list of status conditions to indicate the status of managed cluster
	// known conditions are 'Ready'.
	// +optional
	Conditions []MetallbScanCondition `json:"conditions,omitempty"`

	// last successful timestamp of retrieved cluster status
	// +optional
	LastRunTime *metav1.Time `json:"lastRunTime,omitempty"`

	// Incident ID from the rem. Spark specific
	// +optional
	IncidentID []string `json:"incidentID,omitempty"`

	// affected targets
	// +optional
	FailedChecks []string `json:"failedChecks,omitempty"`

	// last successful timestamp of metallbscan, indicates if the metallb checks are completely healthy
	// +optional
	LastSuccessfulRunTime *metav1.Time `json:"lastSuccessfulRunTime,omitempty"`

	// Indicates if all load balancer type services running fine/IPs are advertised by metallb speaker pods in the target cluster
	// +optional
	Healthy bool `json:"healthy,omitempty"`
}

MetallbScanStatus defines the observed state of MetallbScan

func (*MetallbScanStatus) DeepCopy

func (in *MetallbScanStatus) DeepCopy() *MetallbScanStatus

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

func (*MetallbScanStatus) DeepCopyInto

func (in *MetallbScanStatus) DeepCopyInto(out *MetallbScanStatus)

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

type PortScan

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

	Spec   PortScanSpec   `json:"spec,omitempty"`
	Status PortScanStatus `json:"status,omitempty"`
}

PortScan is the Schema for the PortScans API +kubebuilder:printcolumn:name="CreatedAt",type="string",JSONPath=".metadata.creationTimestamp",description="object creation timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="Reachable",type="string",JSONPath=".status.conditions[].status",description="whether cluster is reachable on the give IP and port" +kubebuilder:printcolumn:name="LastSuccessfulPollTime",type="string",JSONPath=".status.lastPollTime",description="last poll timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="ExternalNotified",type="string",JSONPath=".status.externalNotified",description="indicates if the external system is notified" +kubebuilder:printcolumn:name="IncidentID",type="string",JSONPath=".status.incidentID",description="incident ID from service now"

func (*PortScan) DeepCopy

func (in *PortScan) DeepCopy() *PortScan

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

func (*PortScan) DeepCopyInto

func (in *PortScan) DeepCopyInto(out *PortScan)

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

func (*PortScan) DeepCopyObject

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

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

func (*PortScan) Default

func (r *PortScan) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*PortScan) SetupWebhookWithManager

func (r *PortScan) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager will setup the manager to manage the webhooks

func (*PortScan) ValidateCreate

func (r *PortScan) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*PortScan) ValidateDelete

func (r *PortScan) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*PortScan) ValidatePortScan

func (r *PortScan) ValidatePortScan() error

func (*PortScan) ValidatePortScanName

func (r *PortScan) ValidatePortScanName() *field.Error

func (*PortScan) ValidatePortScanSpec

func (r *PortScan) ValidatePortScanSpec() *field.Error

func (*PortScan) ValidateUpdate

func (r *PortScan) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type PortScanCondition

type PortScanCondition struct {
	// Type of the condition, known values are 'Ready'.
	Type PortScanConditionType `json:"type"`

	// Status of the condition, one of ('True', 'False', 'Unknown')
	Status ConditionStatus `json:"status"`

	// LastTransitionTime is the timestamp of the last update to the status
	// +optional
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason is the machine readable explanation for object's condition
	// +optional
	Reason string `json:"reason,omitempty"`

	// Message is the human readable explanation for object's condition
	Message string `json:"message"`
}

func (*PortScanCondition) DeepCopy

func (in *PortScanCondition) DeepCopy() *PortScanCondition

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

func (*PortScanCondition) DeepCopyInto

func (in *PortScanCondition) DeepCopyInto(out *PortScanCondition)

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

type PortScanConditionType

type PortScanConditionType string

ManagedConditionType represents a managed cluster condition value.

const (
	// PortScanConditionReady represents the fact that a given managed cluster condition
	// is in reachable from the ACM/source cluster.
	// If the `status` of this condition is `False`, managed cluster is unreachable
	PortScanConditionReady PortScanConditionType = "Ready"
)

type PortScanList

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

PortScanList contains a list of PortScan

func (*PortScanList) DeepCopy

func (in *PortScanList) DeepCopy() *PortScanList

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

func (*PortScanList) DeepCopyInto

func (in *PortScanList) DeepCopyInto(out *PortScanList)

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

func (*PortScanList) DeepCopyObject

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

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

type PortScanSpec

type PortScanSpec struct {

	// Set suspend to true to disable monitoring the custom resource
	// +optional
	Suspend *bool `json:"suspend"`

	// Target is the Openshift/kubernetes cluster hostname URL or any IP/FQDN with port (example: api.test.com:443 ) (If FQDN is used, it should be resolvable via DNS query)
	Target []string `json:"target"`

	// Suspends email alerts if set to true, target users will not be notified
	// +optional
	SuspendEmailAlert *bool `json:"suspendEmail,omitempty"`

	// Target user's email for cluster status notification
	// +optional
	Email string `json:"email,omitempty"`

	// Relay host for sending the email
	// +optional
	RelayHost string `json:"relayHost,omitempty"`

	// To notify the external alerting system
	// +optional
	NotifyExtenal *bool `json:"notifyExternal,omitempty"`

	// URL of the external alert system. Example: http://notify.example.com/ (both http/https supported with basic authentication)
	// +optional
	ExternalURL string `json:"externalURL,omitempty"`

	// Data to be sent to the external system in the form of config map
	// +optional
	ExternalData string `json:"externalData,omitempty"`

	// Secret which has the username and password to post the alert notification to the external system using Authorization header
	// +optional
	ExternalSecret string `json:"externalSecret,omitempty"`

	// frequency of the check. If not set, it defaults to 2 mins.
	// +optional
	CheckInterval *int64 `json:"checkInterval,omitempty"`
}

PortScanSpec defines the desired state of PortScan

func (*PortScanSpec) DeepCopy

func (in *PortScanSpec) DeepCopy() *PortScanSpec

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

func (*PortScanSpec) DeepCopyInto

func (in *PortScanSpec) DeepCopyInto(out *PortScanSpec)

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

type PortScanStatus

type PortScanStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// list of status conditions to indicate the status of managed cluster
	// known conditions are 'Ready'.
	// +optional
	Conditions []PortScanCondition `json:"conditions,omitempty"`

	// last successful timestamp of retrieved cluster status
	// +optional
	LastPollTime *metav1.Time `json:"lastPollTime,omitempty"`

	// Indicates if external alerting system is notified
	// +optional
	ExternalNotified bool `json:"externalNotified,omitempty"`

	// Indicates the timestamp when external alerting system is notified
	// +optional
	ExternalNotifiedTime *metav1.Time `json:"externalNotifiedTime,omitempty"`

	// Incident ID from the rem. Spark specific
	// +optional
	IncidentID []string `json:"incidentID,omitempty"`

	// affected targets
	// +optional
	AffectedTargets []string `json:"affectedTargets,omitempty"`
}

PortScanStatus defines the observed state of PortScan

func (*PortScanStatus) DeepCopy

func (in *PortScanStatus) DeepCopy() *PortScanStatus

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

func (*PortScanStatus) DeepCopyInto

func (in *PortScanStatus) DeepCopyInto(out *PortScanStatus)

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

type VmConditionStatus

type VmConditionStatus string

ConditionStatus represents a condition's status. +kubebuilder:validation:Enum=Violated;NonViolated;Unknown

const (
	// ConditionTrue represents the fact that a given condition is true
	ConditionViolated VmConditionStatus = "Violated"

	// ConditionNonViolated represents the fact that a given condition is non violated
	ConditionNonViolated VmConditionStatus = "NonViolated"

	// ConditionUnknown represents the fact that a given condition is unknown
	ConditionStatusUnknown VmConditionStatus = "Unknown"
)

These are valid condition statuses. "ConditionTrue" means a resource is in the condition; "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes can't decide if a resource is in the condition or not. In the future, we could add other intermediate conditions, e.g. ConditionDegraded.

type VmScan

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

	Spec   VmScanSpec   `json:"spec,omitempty"`
	Status VmScanStatus `json:"status,omitempty"`
}

VmScan is the Schema for the vmscans API +kubebuilder:printcolumn:name="CreatedAt",type="string",JSONPath=".metadata.creationTimestamp",description="object creation timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[].status",description="whether cluster is reachable on the give IP and port" +kubebuilder:printcolumn:name="LastNonViolation",type="string",JSONPath=".status.lastPollTime",description="last poll timestamp(in cluster's timezone)" +kubebuilder:printcolumn:name="ExternalNotified",type="string",JSONPath=".status.externalNotified",description="indicates if the external system is notified" +kubebuilder:printcolumn:name="IncidentID",type="string",JSONPath=".status.incidentID",description="incident ID from service now" +kubebuilder:printcolumn:name="Migrations",type="string",JSONPath=".status.migrations",description="list of VMs with namespace that are either migrating/failed to migrate"

func (*VmScan) DeepCopy

func (in *VmScan) DeepCopy() *VmScan

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

func (*VmScan) DeepCopyInto

func (in *VmScan) DeepCopyInto(out *VmScan)

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

func (*VmScan) DeepCopyObject

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

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

func (*VmScan) Default

func (r *VmScan) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*VmScan) SetupWebhookWithManager

func (r *VmScan) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager will setup the manager to manage the webhooks

func (*VmScan) ValidateCreate

func (r *VmScan) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VmScan) ValidateDelete

func (r *VmScan) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VmScan) ValidateUpdate

func (r *VmScan) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

func (*VmScan) ValidateVmScan

func (r *VmScan) ValidateVmScan() error

func (*VmScan) ValidateVmScanName

func (r *VmScan) ValidateVmScanName() *field.Error

func (*VmScan) ValidateVmScanSpec

func (r *VmScan) ValidateVmScanSpec() *field.Error

type VmScanCondition

type VmScanCondition struct {
	// Type of the condition, known values are 'NonViolation'.
	Type VmScanConditionType `json:"type"`

	// Status of the condition, one of ('Violated', 'NonViolated', 'Unknown')
	Status VmConditionStatus `json:"status"`

	// LastTransitionTime is the timestamp of the last update to the status
	// +optional
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`

	// Reason is the machine readable explanation for object's condition
	// +optional
	Reason string `json:"reason,omitempty"`

	// Message is the human readable explanation for object's condition
	Message string `json:"message"`
}

func (*VmScanCondition) DeepCopy

func (in *VmScanCondition) DeepCopy() *VmScanCondition

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

func (*VmScanCondition) DeepCopyInto

func (in *VmScanCondition) DeepCopyInto(out *VmScanCondition)

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

type VmScanConditionType

type VmScanConditionType string

ManagedConditionType represents a managed cluster condition value.

const (
	// VmScanConditionNonViolation represents the fact that a given managed cluster condition
	// is in reachable from the ACM/source cluster.
	// If the `status` of this condition is `False`, managed cluster is unreachable
	VmScanConditionNonViolation VmScanConditionType = "PlacementStatus"
)

type VmScanList

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

VmScanList contains a list of VmScan

func (*VmScanList) DeepCopy

func (in *VmScanList) DeepCopy() *VmScanList

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

func (*VmScanList) DeepCopyInto

func (in *VmScanList) DeepCopyInto(out *VmScanList)

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

func (*VmScanList) DeepCopyObject

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

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

type VmScanSpec

type VmScanSpec struct {

	// Set suspend to true to disable monitoring the custom resource
	// +optional
	Suspend *bool `json:"suspend"`

	// target namespace to check for vmi
	TargetNamespace []string `json:"targetNamespace"`

	// check interval in integer
	// +optional
	CheckInterval *int64 `json:"checkInterval,omitempty"`

	// Suspends email alerts if set to true, target users will not be notified
	// +optional
	SuspendEmailAlert *bool `json:"suspendEmail,omitempty"`

	// Target user's email for cluster status notification
	// +optional
	Email string `json:"email,omitempty"`

	// Relay host for sending the email
	// +optional
	RelayHost string `json:"relayHost,omitempty"`

	// To notify the external alerting system
	// +optional
	NotifyExtenal *bool `json:"notifyExternal,omitempty"`

	// URL of the external alert system. Example: http://notify.example.com/ (both http/https supported with basic authentication)
	// +optional
	ExternalURL string `json:"externalURL,omitempty"`

	// Data to be sent to the external system in the form of config map
	// +optional
	ExternalData string `json:"externalData,omitempty"`

	// Secret which has the username and password to post the alert notification to the external system using Authorization header
	// +optional
	ExternalSecret string `json:"externalSecret,omitempty"`
}

VmScanSpec defines the desired state of VmScan

func (*VmScanSpec) DeepCopy

func (in *VmScanSpec) DeepCopy() *VmScanSpec

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

func (*VmScanSpec) DeepCopyInto

func (in *VmScanSpec) DeepCopyInto(out *VmScanSpec)

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

type VmScanStatus

type VmScanStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// ImVmant: Run "make" to regenerate code after modifying this file
	// list of status conditions to indicate the status of managed cluster
	// known conditions are 'Ready'.
	// +optional
	Conditions []VmScanCondition `json:"conditions,omitempty"`

	// last successful timestamp of retrieved cluster status
	// +optional
	LastPollTime *metav1.Time `json:"lastPollTime,omitempty"`

	// Indicates if external alerting system is notified
	// +optional
	ExternalNotified bool `json:"externalNotified,omitempty"`

	// Indicates the timestamp when external alerting system is notified
	// +optional
	ExternalNotifiedTime *metav1.Time `json:"externalNotifiedTime,omitempty"`

	// Incident ID from the rem. Spark specific
	// +optional
	IncidentID []string `json:"incidentID,omitempty"`

	// list of affected vmi and node
	// +optional
	AffectedTargets []string `json:"affectedTargets,omitempty"`

	// list of ongoing migration/failed migrations
	// +optional
	Migrations []string `json:"migrations,omitempty"`
}

VmScanStatus defines the observed state of VmScan

func (*VmScanStatus) DeepCopy

func (in *VmScanStatus) DeepCopy() *VmScanStatus

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

func (*VmScanStatus) DeepCopyInto

func (in *VmScanStatus) DeepCopyInto(out *VmScanStatus)

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