v1alpha1

package
v0.0.0-...-b3aaee5 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0

Package v1alpha1 Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0

Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	// PolicyStandby describes the standby status of the policy.
	PolicyStandby = "Standby"
	// PolicySuspend describes the suspend status of the policy.
	PolicySuspend = "Suspend"
)
View Source
const (
	// CronjobInpsection describes the Inspection type of cronjob.
	CronjobInpsection = "Inpection"
	// DaemonSetKubebench describes the Kubebench type of the cronjob.
	DaemonSetKubebench = "Kubebench"
	// CronjobRisk describes the Risk type of the cronjob.
	CronjobRisk = "Risk"
	// CronjobWorkloadscanner describes the Workloadscanner type of the cronjob
	CronjobWorkloadscanner = "Workloadscanner"
)
View Source
const (
	// ProviderAccessKey is the key of provider access key.
	ProviderAccessKey = "accessKey"
	// ProviderAccessSecret is the key of provider access secret.
	ProviderAccessSecret = "accessSecret"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "goharbor.goharbor.io", 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 Cache

type Cache struct {
	// Kind of the cache.
	// +kubebuilder:validation:Enum:=Redis
	Kind string `json:"kind"`
	// Address of the cache. e.g: redis://xxx.com.
	// +kubebuilder:validation:Required
	Address string `json:"address"`
	// CredentialRef for providing access credential.
	// Empty credentialRef is acceptable if the cache service is public.
	// +kubebuilder:validation:Optional
	CredentialRef *v1.ObjectReference `json:"credentialRef,omitempty"`
	// Database index for connecting to.
	// +kubebuilder:validation:Optional
	Database *int `json:"database,omitempty"`
	// Settings of cache.
	// +kubebuilder:validation:Optional
	Settings CacheSettings `json:"settings,omitempty"`
}

Cache defines cache configurations for caching data from the provider.

func (*Cache) DeepCopy

func (in *Cache) DeepCopy() *Cache

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

func (*Cache) DeepCopyInto

func (in *Cache) DeepCopyInto(out *Cache)

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

type CacheSettings

type CacheSettings struct {
	// LivingTime (seconds) specifies the living time of the cache data.
	// After cache data longer than the `LivingTime`, the cache data must be refreshed again.
	// +kubebuilder:default:=3600
	LivingTime int64 `json:"livingTime"`
	// SkipTLSVerify indicates whether skip the TLS verification. Only active when 'rediss' scheme is configured.
	// +kubebuilder:validation:Optional
	SkipTLSVerify *bool `json:"skipTLSVerify,omitempty"`
}

CacheSettings defines settings for the cache.

func (*CacheSettings) DeepCopy

func (in *CacheSettings) DeepCopy() *CacheSettings

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

func (*CacheSettings) DeepCopyInto

func (in *CacheSettings) DeepCopyInto(out *CacheSettings)

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

type ComplianceBaseline

type ComplianceBaseline struct {
	// Kind of inspector.
	// +kubebuilder:validation:Enum:=vulnerability;malware;misconfiguration;license;BOM
	Kind InspectionDimension `json:"kind"`
	// Version of data scheme used for the compliance check.
	// +kubebuilder:validation:Required
	Version string `json:"version"`
	// Scheme of data.
	// +kubebuilder:validation:Required
	Scheme string `json:"scheme"`
	// Baseline for the compliance of this kind.
	// +kubebuilder:validation:Required
	Baseline string `json:"baseline"`
}

ComplianceBaseline defines the expecting compliance baseline.

func (*ComplianceBaseline) DeepCopy

func (in *ComplianceBaseline) DeepCopy() *ComplianceBaseline

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

func (*ComplianceBaseline) DeepCopyInto

func (in *ComplianceBaseline) DeepCopyInto(out *ComplianceBaseline)

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

type ConcurrencyRule

type ConcurrencyRule string

ConcurrencyRule defines the currency handling strategy.

type Condition

type Condition struct {
	// Type of condition.
	// +kubebuilder:validation:Required
	Type ConditionType `json:"type"`
	// Status of condition, one of True, False, Unknown
	// +kubebuilder:validation:Required
	Status ConditionStatus `json:"status"`
	// LastTransitionTime is the last time the condition transitioned from one
	// status to another.
	// +kubebuilder:validation:Optional
	LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
	// Reason is the reason for condition's last transition.
	// +kubebuilder:validation:Optional
	Reason string `json:"reason,omitempty"`
	// Message is a human readable message indicating details about the
	// transition.
	// +kubebuilder:validation:Optional
	Message string `json:"message,omitempty"`
}

Condition is the schema for condition.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

func (*Condition) IsFalse

func (c *Condition) IsFalse() bool

IsFalse checks if the condition status if False.

func (*Condition) IsTrue

func (c *Condition) IsTrue() bool

IsTrue checks if the condition status is True.

func (*Condition) IsUnknown

func (c *Condition) IsUnknown() bool

IsUnknown checks if the condition status is Unknown.

type ConditionStatus

type ConditionStatus string

ConditionStatus is the status of condition.

const (
	// ConditionStatusTrue represents the condition status is True.
	ConditionStatusTrue ConditionStatus = "True"
	// ConditionStatusFalse represents the condition status is False.
	ConditionStatusFalse ConditionStatus = "False"
	// ConditionStatusUnknown represents the condition status is Unknown.
	ConditionStatusUnknown ConditionStatus = "Unknown"
)

type ConditionType

type ConditionType string

ConditionType is a camel-cased condition type.

const (
	// ConditionTypeDataSourceReady is the condition type of data source ready.
	ConditionTypeDataSourceReady ConditionType = "DataSourceReady"
	// ConditionTypeKnownRegistryRegistered is the condition type of known registry registered.
	ConditionTypeKnownRegistryRegistered ConditionType = "KnownRegistryRegistered"
	// ConditionTypeApplyConfigReady is the condition type of apply config ready.
	ConditionTypeApplyConfigReady ConditionType = "ApplyConfigReady"
)

type Conditions

type Conditions []Condition

Conditions is the schema for collected conditions.

func (Conditions) DeepCopy

func (in Conditions) DeepCopy() Conditions

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

func (Conditions) DeepCopyInto

func (in Conditions) DeepCopyInto(out *Conditions)

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

type Connection

type Connection struct {
	// Insecure HTTP client will be used to connect to the provider.
	// +kubebuilder:default:=true
	Insecure bool `json:"insecure"`
}

Connection settings for connecting to the provider with HTTP.

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

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

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

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

type Credential

type Credential struct {
	AccessKey    string `json:"accessKey"`
	AccessSecret string `json:"accessSecret"`
}

Credential is defined to keep access key and secret.

func (*Credential) DeepCopy

func (in *Credential) DeepCopy() *Credential

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

func (*Credential) DeepCopyInto

func (in *Credential) DeepCopyInto(out *Credential)

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

type DataProvider

type DataProvider struct {
	// Identity of the provider.
	// +kubebuilder:validation:Enum:=Harbor
	Provider string `json:"provider"`
	// Endpoint for accessing.
	// +kubebuilder:validation:Required
	Endpoint string `json:"endpoint"`
	// Credential for providing access key and secret.
	// Empty credential is acceptable if the endpoint is public.
	// +kubebuilder:validation:Optional
	Credential *Credential `json:"credential,omitempty"`
	// Cache configuration if existing.
	// +kubebuilder:validation:Optional
	Cache *Cache `json:"cache,omitempty"`
	// Connection settings.
	Connection Connection `json:"connection"`
}

DataProvider defines the provider of the security data used to do inspector.

func (*DataProvider) DeepCopy

func (in *DataProvider) DeepCopy() *DataProvider

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

func (*DataProvider) DeepCopyInto

func (in *DataProvider) DeepCopyInto(out *DataProvider)

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

type DataSource

type DataSource struct {
	// Registry inherits common registry spec.
	// +kubebuilder:validation:Required
	Registry `json:",inline"`
	// Provider defines the registry provider type.
	// +kubebuilder:validation:Enum:=Harbor
	Provider ProviderType `json:"provider"`
	// Disable defines whether this data source disable or enable, default is
	// enable.
	// +kubebuilder:validation:Optional
	Disabled bool `json:"disabled,omitempty"`
	// ScanSchedule defines the scan schedule for the data source.
	// +kubebuilder:validation:Required
	ScanSchedule string `json:"scanSchedule"`
}

DataSource defines the properties of data source.

func (*DataSource) DeepCopy

func (in *DataSource) DeepCopy() *DataSource

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

func (*DataSource) DeepCopyInto

func (in *DataSource) DeepCopyInto(out *DataSource)

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

type ExportConfig

type ExportConfig struct {
	// +kubebuilder:validation:Optional
	OpenSearch OpensearchOutputConfig `json:"openSearch,omitempty"`
	// +kubebuilder:validation:Optional
	Governor GovernorOutputConfig `json:"governor,omitempty"`
}

func (*ExportConfig) DeepCopy

func (in *ExportConfig) DeepCopy() *ExportConfig

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

func (*ExportConfig) DeepCopyInto

func (in *ExportConfig) DeepCopyInto(out *ExportConfig)

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

type FollowupAction

type FollowupAction struct {
	// Kind of action.
	// +kubebuilder:validation:Enum:=forbid_vulnerable_deployment;quarantine_vulnerable_workload;alert
	Kind string `json:"kind"`
	// Ignore applying actions to the workloads with the specified labels.
	// +kubebuilder:validation:Optional
	Ignore *metav1.LabelSelector `json:"ignore,omitempty"`
	// Settings of the action.
	// +kubebuilder:validation:Optional
	Settings map[string]string `json:"settings,omitempty"`
}

FollowupAction defines what actions should be applied when security expectations are matched.

func (*FollowupAction) DeepCopy

func (in *FollowupAction) DeepCopy() *FollowupAction

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

func (*FollowupAction) DeepCopyInto

func (in *FollowupAction) DeepCopyInto(out *FollowupAction)

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

type GovernorOutputConfig

type GovernorOutputConfig struct {
	// Unique identifier of the cluster
	// +kubebuilder:validation:Optional
	ClusterID string `json:"clusterId"`
	// Api url to send telemetry data
	// +kubebuilder:validation:Optional
	URL string `json:"url"`
	// Secret name where CSP api token is stored in cnsi-system namespace
	// +kubebuilder:validation:Optional
	CspSecretName string `json:"cspSecretName"`
}

GovernorOutputConfig contains policies for governor to send report

func (*GovernorOutputConfig) DeepCopy

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

func (*GovernorOutputConfig) DeepCopyInto

func (in *GovernorOutputConfig) DeepCopyInto(out *GovernorOutputConfig)

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

type InspectionConfiguration

type InspectionConfiguration struct {
	// Actions of protection.
	// +kubebuilder:validation:Optional
	Actions []*FollowupAction `json:"actions"`
	// Baselines of cluster compliance.
	// +kubebuilder:validation:Optional
	Baselines []*ComplianceBaseline `json:"baselines"`
	// NamespaceSelector provides a way to select the specified namespaces.
	// +kubebuilder:validation:Optional
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
	// WorkloadSelector provides a way to select the specified workloads.
	// +kubebuilder:validation:Optional
	WorkloadSelector *metav1.LabelSelector `json:"workloadSelector,omitempty"`
}

InspectionConfiguration contains the configurations of the inspection.

func (*InspectionConfiguration) DeepCopy

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

func (*InspectionConfiguration) DeepCopyInto

func (in *InspectionConfiguration) DeepCopyInto(out *InspectionConfiguration)

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

type InspectionDimension

type InspectionDimension string

InspectionDimension defines the dimension of the inspector.

type InspectionPolicy

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

	Spec   InspectionPolicySpec   `json:"spec,omitempty"`
	Status InspectionPolicyStatus `json:"status,omitempty"`
}

InspectionPolicy is the Schema for the inspectionpolicies API

func (*InspectionPolicy) DeepCopy

func (in *InspectionPolicy) DeepCopy() *InspectionPolicy

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

func (*InspectionPolicy) DeepCopyInto

func (in *InspectionPolicy) DeepCopyInto(out *InspectionPolicy)

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

func (*InspectionPolicy) DeepCopyObject

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

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

type InspectionPolicyList

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

InspectionPolicyList contains a list of InspectionPolicy

func (*InspectionPolicyList) DeepCopy

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

func (*InspectionPolicyList) DeepCopyInto

func (in *InspectionPolicyList) DeepCopyInto(out *InspectionPolicyList)

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

func (*InspectionPolicyList) DeepCopyObject

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

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

type InspectionPolicySpec

type InspectionPolicySpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// DataSource is the data source definitions.
	// +kubebuilder:validation:Optional
	SettingsName string `json:"settingsName"`

	// Enabled defines whether this inspection policy disable or enable, default is enabled.
	// +kubebuilder:validation:Optional
	Enabled bool `json:"enabled,omitempty"`

	// WorkNamespace specify the namespace for creating the underlying inspection resources.
	// If it is not specified, a new namespace with the same name of this policy will be created.
	// If the namespace with the name of this policy is existing and it's not created by the controller,
	// conflict error will occur.
	// +kubebuilder:validation:Optional
	WorkNamespace *string `json:"workNamespace"`

	// Schedule of the inspector.
	// Cron format. Reference: https://en.wikipedia.org/wiki/Cron
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern:=`(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})`
	Schedule string `json:"schedule"`

	// Inspection defines the configurations of the inspector.
	Inspection InspectionConfiguration `json:"inspection"`

	// Strategy of the inspector.
	// +kubebuilder:default:={suspend: false}
	// +kubebuilder:validation:Optional
	Strategy Strategy `json:"strategy"`

	// Inspector (image) for doing the inspection.
	// +kubebuilder:validation:Optional
	Inspector *Inspector `json:"inspector,omitempty"`
}

InspectionPolicySpec defines the desired state of InspectionPolicy

func (*InspectionPolicySpec) DeepCopy

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

func (*InspectionPolicySpec) DeepCopyInto

func (in *InspectionPolicySpec) DeepCopyInto(out *InspectionPolicySpec)

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

type InspectionPolicyStatus

type InspectionPolicyStatus struct {

	// InspectionExecutor of this policy. It is always an object reference to the underlying cronjob.
	// +kubebuilder:validation:Optional
	InspectionExecutor *corev1.ObjectReference `json:"inspectionExecutor"`

	// KubebenchExecutor of this policy. It is always an object reference to the underlying cronjob.
	// +kubebuilder:validation:Optional
	KubebenchExecutor []*corev1.ObjectReference `json:"kubebenchExecutor"`

	// RiskExecutor of this policy. It is always an object reference to the underlying cronjob.
	// +kubebuilder:validation:Optional
	RiskExecutor *corev1.ObjectReference `json:"riskExecutor"`

	// WorkloadscannerExecutor of this policy. It is always an object reference to the underlying cronjob.
	// +kubebuilder:validation:Optional
	WorkloadScannerExecutor *corev1.ObjectReference `json:"workloadScannerExecutor"`

	// Status of the policy.
	// Pending, Standby, Suspend.
	Status string `json:"status"`
}

InspectionPolicyStatus defines the observed state of InspectionPolicy

func (*InspectionPolicyStatus) DeepCopy

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

func (*InspectionPolicyStatus) DeepCopyInto

func (in *InspectionPolicyStatus) DeepCopyInto(out *InspectionPolicyStatus)

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

type Inspector

type Inspector struct {
	// +kubebuilder:validation:Optional
	ExportConfig ExportConfig `json:"exportConfig,omitempty"`
	// Image of the inspector.
	// +kubebuilder:validation:Optional
	Image string `json:"image"`
	// Image of the kubebench.
	// +kubebuilder:validation:Optional
	KubebenchImage string `json:"kubebenchImage"`
	// Image of the risk.
	// +kubebuilder:validation:Optional
	RiskImage string `json:"riskImage"`
	// Image of the workloadscanner.
	// +kubebuilder:validation:Optional
	WorkloadScannerImage string `json:"workloadscannerImage"`
	// Image pull policy.
	// +kubebuilder:default:=IfNotPresent
	// +kubebuilder:validation:Optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy"`
	// Image pull secrets.
	// +kubebuilder:validation:Optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

Inspector contains the image configuration of the inspector.

func (*Inspector) DeepCopy

func (in *Inspector) DeepCopy() *Inspector

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

func (*Inspector) DeepCopyInto

func (in *Inspector) DeepCopyInto(out *Inspector)

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

type KnownRegistry

type KnownRegistry struct {
	// Registry inherits common registry spec.
	// +kubebuilder:validation:Required
	Registry `json:",inline"`
	// Provider defines the registry provider type.
	// +kubebuilder:validation:Enum:=ali-acr;artifact-hub;aws-ecr;azure-acr;docker-hub;docker-registry;dtr;github-ghcr;gitlab;google-gcr;harbor;helm-hub;huawei-SWR;jfrog-artifactory;quay;tencent-tcr
	Provider ProviderType `json:"provider"`
}

KnownRegistry defines the spec of known registry.

func (*KnownRegistry) DeepCopy

func (in *KnownRegistry) DeepCopy() *KnownRegistry

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

func (*KnownRegistry) DeepCopyInto

func (in *KnownRegistry) DeepCopyInto(out *KnownRegistry)

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

type NameReference

type NameReference string

NameReference is a reference of the resource name.

type OpensearchOutputConfig

type OpensearchOutputConfig struct {
	HostPort string `json:"hostport"`
	// +kubebuilder:validation:Optional
	Index     string `json:"index,omitempty"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	CheckCert bool   `json:"checkCert"`
	MutualTLS bool   `json:"mutualTLS"`
}

func (*OpensearchOutputConfig) DeepCopy

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

func (*OpensearchOutputConfig) DeepCopyInto

func (in *OpensearchOutputConfig) DeepCopyInto(out *OpensearchOutputConfig)

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

type ProviderType

type ProviderType string

ProviderType defines the provider common type.

const (
	// ProviderHarbor represents harbor provider.
	ProviderHarbor ProviderType = "Harbor"
)

func (ProviderType) String

func (p ProviderType) String() string

type Registry

type Registry struct {
	// Name is the registry name.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// Endpoint defines the endpoint of the registry.
	// +kubebuilder:validation:Required
	Endpoint string `json:"endpoint"`
	// CredentialRef defines the authorization info for registry,
	// the value is a reference to secret.
	// +kubebuilder:validation:Optional
	CredentialRef *v1.ObjectReference `json:"credentialRef,omitempty"`
	// TLSVerify defines whether need to verify tls cert.
	// +kubebuilder:validation:Optional
	SkipTLSVerify bool `json:"skipTLSVerify,omitempty"`
}

Registry defines the common spec of registry.

func (*Registry) DeepCopy

func (in *Registry) DeepCopy() *Registry

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

func (*Registry) DeepCopyInto

func (in *Registry) DeepCopyInto(out *Registry)

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

type ReportData

type ReportData struct {
	// Source indicates the report is from which source
	Source string `json:"source"`
	// Config indicates the consumer configurations
	ExportConfig ExportConfig `json:"exportConfig"`
	// Payload is the actual report content
	Payload string `json:"payload"`
}

ReportData defines the protocol between scanners and exporters

func (*ReportData) DeepCopy

func (in *ReportData) DeepCopy() *ReportData

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

func (*ReportData) DeepCopyInto

func (in *ReportData) DeepCopyInto(out *ReportData)

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

type Setting

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

	Spec   SettingSpec   `json:"spec,omitempty"`
	Status SettingStatus `json:"status,omitempty"`
}

Setting is the Schema for the cnsi related configs.

func (*Setting) DeepCopy

func (in *Setting) DeepCopy() *Setting

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

func (*Setting) DeepCopyInto

func (in *Setting) DeepCopyInto(out *Setting)

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

func (*Setting) DeepCopyObject

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

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

type SettingList

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

SettingList contains a list of Setting.

func (*SettingList) DeepCopy

func (in *SettingList) DeepCopy() *SettingList

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

func (*SettingList) DeepCopyInto

func (in *SettingList) DeepCopyInto(out *SettingList)

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

func (*SettingList) DeepCopyObject

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

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

type SettingSpec

type SettingSpec struct {
	// KnownRegistries is the registered private registry collections.
	// +kubebuilder:validation:Optional
	KnownRegistries []KnownRegistry `json:"knownRegistries,omitempty"`
	// DataSource is the data source definitions.
	// +kubebuilder:validation:Required
	DataSource DataSource `json:"dataSource,omitempty"`
	// Cache is the cache configurations.
	// +kubebuilder:validation:Optional
	Cache *Cache `json:"cache,omitempty"`
}

SettingSpec defines the spec of setting.

func (*SettingSpec) DeepCopy

func (in *SettingSpec) DeepCopy() *SettingSpec

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

func (*SettingSpec) DeepCopyInto

func (in *SettingSpec) DeepCopyInto(out *SettingSpec)

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

type SettingStatus

type SettingStatus struct {
	// Status represents the health status of setting.
	// +kubebuilder:validation:Enum:=Unknown;Healthy;Unhealthy
	Status SettingStatusType `json:"status"`
	// Conditions represents the collections of setting condition.
	// +kubebuilder:validation:Optional
	Conditions Conditions `json:"conditions,omitempty"`
}

SettingStatus defines the status of setting.

func (*SettingStatus) AggregateStatus

func (s *SettingStatus) AggregateStatus() *SettingStatus

AggregateStatus aggregates status by conditions.

func (*SettingStatus) DeepCopy

func (in *SettingStatus) DeepCopy() *SettingStatus

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

func (*SettingStatus) DeepCopyInto

func (in *SettingStatus) DeepCopyInto(out *SettingStatus)

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

func (*SettingStatus) GetCondition

func (s *SettingStatus) GetCondition(t ConditionType) *Condition

GetCondition fetches the condition of the specified type.

func (*SettingStatus) SetCondition

func (s *SettingStatus) SetCondition(cond *Condition)

SetCondition sets condition to status, update when exist and append when not exist.

type SettingStatusType

type SettingStatusType string

SettingStatus defines the setting health status type.

const (
	// SettingStatusUnknown defines the unknown status.
	SettingStatusUnknown SettingStatusType = "Unknown"
	// SettingStatusHealthy defines the healthy status.
	SettingStatusHealthy SettingStatusType = "Healthy"
	// SettingStatusUnhealthy defines the unhealthy status.
	SettingStatusUnhealthy SettingStatusType = "Unhealthy"
)

type Strategy

type Strategy struct {
	// HistoryLimit limits the max number of the completed inspections.
	// +kubebuilder:default:=25
	// +kubebuilder:validation:Optional
	HistoryLimit *int32 `json:"historyLimit"`
	// Suspend the subsequent inspections temporarily.
	// +kubebuilder:validation:Optional
	Suspend *bool `json:"suspend,omitempty"`
	// ConcurrencyRule indicates how to handle the overlapped inspector processes.
	// +kubebuilder:validation:Enum:=Allow;Forbid;Replace
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=Forbid
	ConcurrencyRule ConcurrencyRule `json:"concurrencyRule"`
}

Strategy of inspector.

func (*Strategy) DeepCopy

func (in *Strategy) DeepCopy() *Strategy

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

func (*Strategy) DeepCopyInto

func (in *Strategy) DeepCopyInto(out *Strategy)

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