Documentation ¶
Overview ¶
This package contains structure to describe a connection to a Postgres database
+kubebuilder:object:generate=true
Index ¶
- Constants
- Variables
- func AddPrometheusAnnotations(annotations map[string]string, port int32, path string) map[string]string
- func GetLargestComponentNameSize() int
- type Component
- type ComponentSpec
- type ComponentStatus
- type ComponentWithRedis
- type ComponentWithTLS
- type ComponentsTLSSpec
- type Condition
- type CoreLogLevel
- type DatabaseName
- type ErrPostgresNoHost
- type ExporterLogLevel
- type HarborLogLevel
- func (l HarborLogLevel) Core() CoreLogLevel
- func (l HarborLogLevel) Exporter() ExporterLogLevel
- func (l HarborLogLevel) JobService() JobServiceLogLevel
- func (l HarborLogLevel) Notary() NotaryLogLevel
- func (l HarborLogLevel) Registry() RegistryLogLevel
- func (l HarborLogLevel) RegistryCtl() RegistryCtlLogLevel
- func (l HarborLogLevel) Trivy() TrivyLogLevel
- type ImageSourceSpec
- type ImageSpec
- type IngressController
- type JaegerAgentSpec
- type JaegerCollectorSpec
- type JaegerModeType
- type JaegerSpec
- type JobServiceLogLevel
- type MetricsSpec
- func (spec *MetricsSpec) AddPrometheusAnnotations(annotations map[string]string) map[string]string
- func (in *MetricsSpec) DeepCopy() *MetricsSpec
- func (in *MetricsSpec) DeepCopyInto(out *MetricsSpec)
- func (spec *MetricsSpec) GetEnvVars(component string) ([]corev1.EnvVar, error)
- func (spec *MetricsSpec) IsEnabled() bool
- type Network
- type NotaryLogLevel
- type OperatorStatus
- type OtelSpec
- type PostgresClientEncoding
- type PostgresConnectTimeout
- type PostgresConnection
- func (in *PostgresConnection) DeepCopy() *PostgresConnection
- func (in *PostgresConnection) DeepCopyInto(out *PostgresConnection)
- func (c *PostgresConnection) GetDSN(password string) *url.URL
- func (c *PostgresConnection) GetDSNNoCredentials() *url.URL
- func (c *PostgresConnection) GetDSNStringWithRawPassword(password string) string
- type PostgresConnectionWithParameters
- func (in *PostgresConnectionWithParameters) DeepCopy() *PostgresConnectionWithParameters
- func (in *PostgresConnectionWithParameters) DeepCopyInto(out *PostgresConnectionWithParameters)
- func (c *PostgresConnectionWithParameters) GetDSN(password string) *url.URL
- func (c *PostgresConnectionWithParameters) GetDSNNoCredentials() *url.URL
- func (c *PostgresConnectionWithParameters) GetDSNStringWithRawPassword(password string) string
- type PostgresCredentials
- type PostgresHostSpec
- type PostgresSSLMode
- type ProxySpec
- type RedisConnection
- func (in *RedisConnection) DeepCopy() *RedisConnection
- func (in *RedisConnection) DeepCopyInto(out *RedisConnection)
- func (c *RedisConnection) GetDSN(password string) *url.URL
- func (c *RedisConnection) GetDSNNoCredentials() *url.URL
- func (c *RedisConnection) GetDSNStringWithRawPassword(password string) string
- type RedisCredentials
- type RedisHostSpec
- type RegistryCtlLogLevel
- type RegistryLogFormatter
- type RegistryLogLevel
- type TraceProviderSpec
- type TraceProviderType
- type TraceSpec
- func (spec *TraceSpec) AddEnvVars(component string, envs []corev1.EnvVar) ([]corev1.EnvVar, error)
- func (in *TraceSpec) DeepCopy() *TraceSpec
- func (in *TraceSpec) DeepCopyInto(out *TraceSpec)
- func (spec *TraceSpec) GetEnvVars(component string) ([]corev1.EnvVar, error)
- func (spec *TraceSpec) IsEnabled() bool
- func (spec *TraceSpec) Validate(rootPath *field.Path) *field.Error
- type TrivyLogLevel
- type TrivySeverityType
- type TrivySeverityTypes
- type TrivyVulnerabilityType
- type TrivyVulnerabilityTypes
Constants ¶
const ( PrometheusScrapeAnnotationKey = "prometheus.io/scrape" PrometheusPathAnnotationKey = "prometheus.io/path" PrometheusPortAnnotationKey = "prometheus.io/port" )
const ( NetworkPoliciesAnnotationName = "goharbor.io/network-policies" NetworkPoliciesAnnotationEnabled = "true" NetworkPoliciesAnnotationDisabled = "false" )
const ( PortalHTTPPortName = "http" PortalHTTPSPortName = "https" )
const ( ChartMuseumHTTPPortName = "http" ChartMuseumHTTPSPortName = "https" )
const ( CoreHTTPPortName = "http" CoreHTTPSPortName = "https" CoreMetricsPortName = "metrics" )
const ( JobServiceHTTPPortName = "http" JobServiceHTTPSPortName = "https" JobServiceMetricsPortName = "metrics" )
const ( RegistryControllerHTTPPortName = "http" RegistryControllerHTTPSPortName = "https" )
const ( RegistryAPIPortName = "api" RegistryMetricsPortName = "metrics" )
const ( TrivyHTTPPortName = "http" TrivyHTTPSPortName = "https" )
const ( CoreDatabase = "core" NotaryServerDatabase = "notaryserver" NotarySignerDatabase = "notarysigner" )
const ( CoreRedis = ComponentWithRedis(CoreComponent) JobServiceRedis = ComponentWithRedis(JobServiceComponent) RegistryRedis = ComponentWithRedis(RegistryComponent) ChartMuseumRedis = ComponentWithRedis(ChartMuseumComponent) TrivyRedis = ComponentWithRedis(TrivyComponent) )
const ( RedisScheme = "redis" RedisSentinelScheme = "redis+sentinel" )
const ( // SecretTypeHTPasswd contains data needed for authenticate users against password. // // Required field: // - Secret.Data["auth"] - File containing user:password lines. SecretTypeHTPasswd corev1.SecretType = "goharbor.io/htpasswd" //nolint:gosec // HTPasswdFileName is the file of the users required for SecretTypeHTPasswd secrets. HTPasswdFileName = "htpasswd" // https://kubernetes.github.io/ingress-nginx/examples/auth/basic/#basic-authentication )
const ( // SecretTypeSharedSecret contains a single secret to share. // // Required field: // - Secret.Data["secret"] - secret to shared. SecretTypeSingle corev1.SecretType = "goharbor.io/single" SharedSecretKey = "secret" )
const ( // SecretTypeRedis contains a password to connect to redis. // // Required field: // - Secret.Data["redis-password"] - password to connect to redis, may be empty. SecretTypeRedis corev1.SecretType = "goharbor.io/redis" // RedisPasswordKey is the password to connect to redis. RedisPasswordKey = "redis-password" // https://github.com/bitnami/charts/blob/master/bitnami/redis/templates/secret.yaml#L14 )
const ( // SecretTypeSharedSecret contains password for a postgresql user. // // Required field: // - Secret.Data["redis-password"] - password to connect to redis, may be empty. SecretTypePostgresql corev1.SecretType = "goharbor.io/postgresql" // PostgresqlPasswordKey is the password to connect to postgresql. PostgresqlPasswordKey = "postgres-password" )
const ( // SecretTypeCSRF contains data needed for CSRF security. // // Required field: // - Secret.Data["key"] - CSRF key. SecretTypeCSRF corev1.SecretType = "goharbor.io/csrf" //nolint:gosec // CSRFSecretKey is the key for SecretTypeCSRF. CSRFSecretKey = "key" )
const ( // SecretTypeNotarySignerAliases contains aliases for encryption keys. // Only "default" key is required. // Keys must match [a-zA-Z]([a-zA-Z0-9_]*[a-zA-Z0-9])? // Passwords may be any string. // // Required field: // - Secret.Data["default"] - The default password. SecretTypeNotarySignerAliases corev1.SecretType = "goharbor.io/notary-signer-aliases" // SharedSecretKey is the default password to use. DefaultAliasSecretKey = "default" )
const ( // SecretTypeGithubToken contains credentials to contact Github API. // // Required field: // - Secret.Data["github-token"] - The Github token. SecretTypeGithubToken corev1.SecretType = "goharbor.io/github" //nolint:gosec // GithubTokenKey is the token to use with the account. GithubTokenKey = "github-token" )
const ( // SecretTypeRegistry contains secret to configure a Docker registry. // // Registry try to yaml unmarshal fields. // So all fields must be yaml marshalled. // Otherwise, a string starting with yaml special character may break the configuration. SecretTypeRegistry corev1.SecretType = "goharbor.io/registry" //nolint:gosec // RegistryHTTPSecret is the http secret. RegistryHTTPSecret = "REGISTRY_HTTP_SECRET" //nolint:gosec )
const ( CoreTLS = ComponentWithTLS(CoreComponent) ChartMuseumTLS = ComponentWithTLS(ChartMuseumComponent) ExporterTLS = ComponentWithTLS(ExporterComponent) JobServiceTLS = ComponentWithTLS(JobServiceComponent) PortalTLS = ComponentWithTLS(PortalComponent) RegistryTLS = ComponentWithTLS(RegistryComponent) RegistryControllerTLS = ComponentWithTLS(RegistryControllerComponent) NotaryServerTLS = ComponentWithTLS(NotaryServerComponent) TrivyTLS = ComponentWithTLS(TrivyComponent) )
const ( HTTPSPort = 443 HTTPPort = 80 )
const (
ExporterMetricsPortName = "metrics"
)
const (
// JaegerAgentPasswordKey is the password to connect to jaeger.
JaegerAgentPasswordKey = "jaeger-password"
)
const (
NetworkAnnotationName = "goharbor.io/network"
)
const (
NotaryServerAPIPortName = "api"
)
const (
NotarySignerAPIPortName = "api"
)
const PostgresConnectTimeoutKey = "connect_timeout"
const PostgresSSLModeKey = "sslmode"
const PostgresScheme = "postgres"
Variables ¶
var ErrUnsupportedComponent = errors.New("component not supported")
Functions ¶
func GetLargestComponentNameSize ¶
func GetLargestComponentNameSize() int
Types ¶
type Component ¶
type Component int
const ( CoreComponent Component = iota // core JobServiceComponent // jobservice PortalComponent // portal RegistryComponent // registry RegistryControllerComponent // registryctl ChartMuseumComponent // chartmuseum ExporterComponent // exporter NotaryServerComponent // notaryserver NotarySignerComponent // notarysigner TrivyComponent // trivy )
type ComponentSpec ¶
type ComponentSpec struct { // +kubebuilder:validation:Optional // Custom annotations to be added into the pods TemplateAnnotations map[string]string `json:"templateAnnotations,omitempty"` // +kubebuilder:validation:Optional // Custom Labels to be added into the pods TemplateLabels map[string]string `json:"templateLabels,omitempty"` ImageSpec `json:",inline"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=0 // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller Replicas *int32 `json:"replicas,omitempty"` // +kubebuilder:validation:Optional // ServiceAccountName is the name of the ServiceAccount to use to run this component. // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ ServiceAccountName string `json:"serviceAccountName,omitempty"` // +kubebuilder:validation:Optional // NodeSelector is a selector which must be true for the component to fit on a node. // Selector which must match a node's labels for the pod to be scheduled on that node. // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ NodeSelector map[string]string `json:"nodeSelector,omitempty"` // +kubebuilder:validation:Optional // If specified, the pod's tolerations. Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // +kubebuilder:validation:Optional // Compute Resources required by this component. // Cannot be updated. // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ Resources corev1.ResourceRequirements `json:"resources,omitempty"` }
func (*ComponentSpec) ApplyToDeployment ¶
func (c *ComponentSpec) ApplyToDeployment(deploy *appsv1.Deployment)
func (*ComponentSpec) DeepCopy ¶
func (in *ComponentSpec) DeepCopy() *ComponentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec.
func (*ComponentSpec) DeepCopyInto ¶
func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentStatus ¶
type ComponentStatus struct { // +kubebuilder:validation:Optional Operator OperatorStatus `json:"operator,omitempty"` ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Current number of pods. // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=0 Replicas *int32 `json:"replicas,omitempty"` // Conditions list of extracted conditions from Resource // +listType:map // +listMapKey:type Conditions []Condition `json:"conditions"` }
ComponentStatus represents the current status of the resource. https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
func (*ComponentStatus) DeepCopy ¶
func (in *ComponentStatus) DeepCopy() *ComponentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus.
func (*ComponentStatus) DeepCopyInto ¶
func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ComponentStatus) MarshalJSON ¶
func (s ComponentStatus) MarshalJSON() ([]byte, error)
type ComponentWithRedis ¶
type ComponentWithRedis Component
func (ComponentWithRedis) Index ¶
func (r ComponentWithRedis) Index() int32
func (ComponentWithRedis) String ¶
func (r ComponentWithRedis) String() string
type ComponentWithTLS ¶
type ComponentWithTLS Component
func (ComponentWithTLS) GetName ¶
func (r ComponentWithTLS) GetName() string
func (ComponentWithTLS) String ¶
func (r ComponentWithTLS) String() string
type ComponentsTLSSpec ¶
type ComponentsTLSSpec struct { // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" CertificateRef string `json:"certificateRef,omitempty"` }
func (*ComponentsTLSSpec) DeepCopy ¶
func (in *ComponentsTLSSpec) DeepCopy() *ComponentsTLSSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentsTLSSpec.
func (*ComponentsTLSSpec) DeepCopyInto ¶
func (in *ComponentsTLSSpec) DeepCopyInto(out *ComponentsTLSSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentsTLSSpec) Enabled ¶
func (tls *ComponentsTLSSpec) Enabled() bool
func (*ComponentsTLSSpec) GetInternalPort ¶
func (tls *ComponentsTLSSpec) GetInternalPort() int32
func (*ComponentsTLSSpec) GetScheme ¶
func (tls *ComponentsTLSSpec) GetScheme() corev1.URIScheme
type Condition ¶
type Condition struct { // +kubebuilder:validation:Required // Type condition type Type status.ConditionType `json:"type"` // +kubebuilder:validation:Required // Status String that describes the condition status Status corev1.ConditionStatus `json:"status"` // +kubebuilder:validation:Optional // Reason one work CamelCase reason Reason string `json:"reason,omitempty"` // +kubebuilder:validation:Optional // Message Human readable reason string Message string `json:"message,omitempty"` }
Condition defines the general format for conditions on Kubernetes resources. In practice, each kubernetes resource defines their own format for conditions, but most (maybe all) follows this structure.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CoreLogLevel ¶
type CoreLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"debug","info","warn","error"} CoreLogLevel is the log level for Core.
const ( CoreDebug CoreLogLevel = "debug" CoreInfo CoreLogLevel = "info" CoreWarning CoreLogLevel = "warn" CoreError CoreLogLevel = "error" )
type DatabaseName ¶
type DatabaseName string
type ErrPostgresNoHost ¶
type ErrPostgresNoHost bool
func NewErrPostgresNoHost ¶
func NewErrPostgresNoHost() *ErrPostgresNoHost
func (*ErrPostgresNoHost) Error ¶
func (err *ErrPostgresNoHost) Error() string
type ExporterLogLevel ¶
type ExporterLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"debug","info","warning","error","panic"} ExporterLogLevel is the log level for Exporter.
const ( ExporterDebug ExporterLogLevel = "debug" ExporterInfo ExporterLogLevel = "info" ExporterWarning ExporterLogLevel = "warning" ExporterError ExporterLogLevel = "error" ExporterFatal ExporterLogLevel = "panic" )
func (ExporterLogLevel) String ¶
func (l ExporterLogLevel) String() string
type HarborLogLevel ¶
type HarborLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"debug","info","warning","error","fatal"} HarborLogLevel is the log level for Harbor.
const ( HarborDebug HarborLogLevel = "debug" HarborInfo HarborLogLevel = "info" HarborWarning HarborLogLevel = "warning" HarborError HarborLogLevel = "error" HarborFatal HarborLogLevel = "fatal" )
func (HarborLogLevel) Core ¶
func (l HarborLogLevel) Core() CoreLogLevel
Core get the log level for Core component.
func (HarborLogLevel) Exporter ¶
func (l HarborLogLevel) Exporter() ExporterLogLevel
func (HarborLogLevel) JobService ¶
func (l HarborLogLevel) JobService() JobServiceLogLevel
JobService get the log level for JobService component.
func (HarborLogLevel) Notary ¶
func (l HarborLogLevel) Notary() NotaryLogLevel
Notary get the log level for Notary component.
func (HarborLogLevel) Registry ¶
func (l HarborLogLevel) Registry() RegistryLogLevel
Registry get the log level for Registry component.
func (HarborLogLevel) RegistryCtl ¶
func (l HarborLogLevel) RegistryCtl() RegistryCtlLogLevel
RegistryCtl get the log level for RegistryController component.
func (HarborLogLevel) Trivy ¶
func (l HarborLogLevel) Trivy() TrivyLogLevel
Trivy get the log level for Trivy component.
type ImageSourceSpec ¶
type ImageSourceSpec struct { // +kubebuilder:validation:Required // The default repository for the images of the components. eg docker.io/goharbor/ Repository string `json:"repository,omitempty"` // +kubebuilder:validation:Optional // The tag suffix for the images of the images of the components. eg '-patch1' TagSuffix string `json:"tagSuffix,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Enum={"Always","Never","IfNotPresent"} // Image pull policy. // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // +kubebuilder:validation:Optional // +listType:map // +listMapKey:name ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name"` }
func (*ImageSourceSpec) AddRepositoryAndTagSuffixOptions ¶
func (spec *ImageSourceSpec) AddRepositoryAndTagSuffixOptions(options ...image.Option) []image.Option
func (*ImageSourceSpec) DeepCopy ¶
func (in *ImageSourceSpec) DeepCopy() *ImageSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSourceSpec.
func (*ImageSourceSpec) DeepCopyInto ¶
func (in *ImageSourceSpec) DeepCopyInto(out *ImageSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageSpec ¶
type ImageSpec struct { // +kubebuilder:validation:Optional // Image name for the component. Image string `json:"image,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Enum={"Always","Never","IfNotPresent"} // Image pull policy. // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // +kubebuilder:validation:Optional // +listType:map // +listMapKey:name ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name"` }
func (*ImageSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.
func (*ImageSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IngressController ¶
type IngressController string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"default","gce","ncp","contour"} Type of ingress controller if it has specific requirements.
const ( // Default ingress controller. IngressControllerDefault IngressController = "default" // Google Cloud Engine ingress controller. IngressControllerGCE IngressController = "gce" // NSX-T Container Plugin ingress controller. IngressControllerNCP IngressController = "ncp" // Contour ingress controller. IngressControllerContour IngressController = "contour" // ingress-controller name. IngressControllerAnnotationName = "goharbor.io/ingress-controller" )
type JaegerAgentSpec ¶
type JaegerAgentSpec struct { // +kubebuilder:validation:Required // The host of the jaeger agent. Host string `json:"host,omitempty"` // +kubebuilder:validation:Required // The port of the jaeger agent. Port int `json:"port,omitempty"` }
func (*JaegerAgentSpec) DeepCopy ¶
func (in *JaegerAgentSpec) DeepCopy() *JaegerAgentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JaegerAgentSpec.
func (*JaegerAgentSpec) DeepCopyInto ¶
func (in *JaegerAgentSpec) DeepCopyInto(out *JaegerAgentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JaegerCollectorSpec ¶
type JaegerCollectorSpec struct { // +kubebuilder:validation:Required // The endpoint of the jaeger collector. Endpoint string `json:"endpoint"` // +kubebuilder:validation:Optional // The username of the jaeger collector. Username string `json:"username,omitempty"` // +kubebuilder:validation:Optional // The password secret reference name of the jaeger collector. PasswordRef string `json:"passwordRef,omitempty"` }
func (*JaegerCollectorSpec) DeepCopy ¶
func (in *JaegerCollectorSpec) DeepCopy() *JaegerCollectorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JaegerCollectorSpec.
func (*JaegerCollectorSpec) DeepCopyInto ¶
func (in *JaegerCollectorSpec) DeepCopyInto(out *JaegerCollectorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JaegerModeType ¶
type JaegerModeType string
+kubebuilder:validation:Enum={"collector", "agent"} +kubebuilder:validation:Type="string" The jaeger mode: 'collector' or 'agent'.
const ( JaegerCollectorMode JaegerModeType = "collector" JaegerAgentMode JaegerModeType = "agent" )
type JaegerSpec ¶
type JaegerSpec struct { // +kubebuilder:validation:Required Mode JaegerModeType `json:"mode"` // +kubebuilder:validation:Optional Collector *JaegerCollectorSpec `json:"collector,omitempty"` // +kubebuilder:validation:Optional Agent *JaegerAgentSpec `json:"agent,omitempty"` }
func (*JaegerSpec) DeepCopy ¶
func (in *JaegerSpec) DeepCopy() *JaegerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JaegerSpec.
func (*JaegerSpec) DeepCopyInto ¶
func (in *JaegerSpec) DeepCopyInto(out *JaegerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobServiceLogLevel ¶
type JobServiceLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"DEBUG","INFO","WARNING","ERROR","FATAL"} JobServiceLogLevel is the log level for JobService.
const ( JobServiceDebug JobServiceLogLevel = "DEBUG" JobServiceInfo JobServiceLogLevel = "INFO" JobServiceWarning JobServiceLogLevel = "WARNING" JobServiceError JobServiceLogLevel = "ERROR" JobServiceFatal JobServiceLogLevel = "FATAL" )
type MetricsSpec ¶
type MetricsSpec struct { // +kubebuilder:validation:Optional // +kubebuilder:default=false Enabled bool `json:"enabled"` // +kubebuilder:validation:Optional // +kubebuilder:default=8001 // +kubebuilder:validation:Minimum=1 // The port of the metrics. Port int32 `json:"port"` // +kubebuilder:validation:Optional // +kubebuilder:default="/metrics" // +kubebuilder:validation:Pattern="/.+" // The path of the metrics. Path string `json:"path"` }
func (*MetricsSpec) AddPrometheusAnnotations ¶
func (spec *MetricsSpec) AddPrometheusAnnotations(annotations map[string]string) map[string]string
func (*MetricsSpec) DeepCopy ¶
func (in *MetricsSpec) DeepCopy() *MetricsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsSpec.
func (*MetricsSpec) DeepCopyInto ¶
func (in *MetricsSpec) DeepCopyInto(out *MetricsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricsSpec) GetEnvVars ¶
func (spec *MetricsSpec) GetEnvVars(component string) ([]corev1.EnvVar, error)
func (*MetricsSpec) IsEnabled ¶
func (spec *MetricsSpec) IsEnabled() bool
type Network ¶
type Network struct { // +kubebuilder:validation:Optional IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"` }
func (*Network) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Network) IsIPv4Enabled ¶
func (*Network) IsIPv6Enabled ¶
type NotaryLogLevel ¶
type NotaryLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"debug","info","warning","error","fatal","panic"} NotaryLogLevel is the log level for NotaryServer and NotarySigner.
const ( NotaryDebug NotaryLogLevel = "debug" NotaryInfo NotaryLogLevel = "info" NotaryWarning NotaryLogLevel = "warning" NotaryError NotaryLogLevel = "error" NotaryFatal NotaryLogLevel = "fatal" NotaryPanic NotaryLogLevel = "panic" )
type OperatorStatus ¶
type OperatorStatus struct { // +kubebuilder:validation:Optional // +kubebuilder:validation:MinLength=1 ControllerGitCommit string `json:"controllerGitCommit,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:MinLength=1 ControllerVersion string `json:"controllerVersion,omitempty"` // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 ControllerName string `json:"controllerName,omitempty"` }
+kubebuilder:validation:Type=object ControllerStatus represents the current status of the operator.
func (*OperatorStatus) DeepCopy ¶
func (in *OperatorStatus) DeepCopy() *OperatorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorStatus.
func (*OperatorStatus) DeepCopyInto ¶
func (in *OperatorStatus) DeepCopyInto(out *OperatorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OtelSpec ¶
type OtelSpec struct { // +kubebuilder:validation:Required // The endpoint of otel. Endpoint string `json:"endpoint"` // +kubebuilder:validation:Required // The URL path of otel. URLPath string `json:"urlPath"` // +kubebuilder:validation:Optional // Whether enable compression or not for otel. Compression bool `json:"compression,omitempty"` // +kubebuilder:validation:Optional // Whether establish insecure connection or not for otel. Insecure bool `json:"insecure,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:default="10s" // The timeout of otel. Timeout *metav1.Duration `json:"timeout,omitempty"` }
func (*OtelSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OtelSpec.
func (*OtelSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostgresClientEncoding ¶
type PostgresClientEncoding string
+kubebuilder:default="auto" This sets the client_encoding configuration parameter for this connection. In addition to the values accepted by the corresponding server option, you can use auto to determine the right encoding from the current locale in the client (LC_CTYPE environment variable on Unix systems).
func (*PostgresClientEncoding) Add ¶
func (p *PostgresClientEncoding) Add(query url.Values)
type PostgresConnectTimeout ¶
+kubebuilder:validation:Optional Maximum wait for connection. Zero, negative, or not specified means wait indefinitely. The minimum allowed timeout is 2 seconds, therefore a value of 1 is interpreted as 2. This timeout applies separately to each host name or IP address. For example, if you specify two hosts and connect_timeout is 5, each host will time out if no connection is made within 5 seconds, so the total time spent waiting for a connection might be up to 10 seconds.
func (*PostgresConnectTimeout) Add ¶
func (p *PostgresConnectTimeout) Add(query url.Values)
func (*PostgresConnectTimeout) DeepCopy ¶
func (in *PostgresConnectTimeout) DeepCopy() *PostgresConnectTimeout
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresConnectTimeout.
func (*PostgresConnectTimeout) DeepCopyInto ¶
func (in *PostgresConnectTimeout) DeepCopyInto(out *PostgresConnectTimeout)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostgresConnection ¶
type PostgresConnection struct { PostgresCredentials `json:",inline"` // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 Hosts []PostgresHostSpec `json:"hosts,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:MinLength=1 // The database name. Defaults to be the same as the user name. // In certain contexts, the value is checked for extended formats. Database string `json:"database,omitempty"` }
func (*PostgresConnection) DeepCopy ¶
func (in *PostgresConnection) DeepCopy() *PostgresConnection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresConnection.
func (*PostgresConnection) DeepCopyInto ¶
func (in *PostgresConnection) DeepCopyInto(out *PostgresConnection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PostgresConnection) GetDSNNoCredentials ¶
func (c *PostgresConnection) GetDSNNoCredentials() *url.URL
func (*PostgresConnection) GetDSNStringWithRawPassword ¶
func (c *PostgresConnection) GetDSNStringWithRawPassword(password string) string
type PostgresConnectionWithParameters ¶
type PostgresConnectionWithParameters struct { PostgresConnection `json:",inline"` // +kubebuilder:validation:Optional // libpq parameters. Parameters map[string]string `json:"parameters,omitempty"` }
func (*PostgresConnectionWithParameters) DeepCopy ¶
func (in *PostgresConnectionWithParameters) DeepCopy() *PostgresConnectionWithParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresConnectionWithParameters.
func (*PostgresConnectionWithParameters) DeepCopyInto ¶
func (in *PostgresConnectionWithParameters) DeepCopyInto(out *PostgresConnectionWithParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PostgresConnectionWithParameters) GetDSN ¶
func (c *PostgresConnectionWithParameters) GetDSN(password string) *url.URL
func (*PostgresConnectionWithParameters) GetDSNNoCredentials ¶
func (c *PostgresConnectionWithParameters) GetDSNNoCredentials() *url.URL
func (*PostgresConnectionWithParameters) GetDSNStringWithRawPassword ¶
func (c *PostgresConnectionWithParameters) GetDSNStringWithRawPassword(password string) string
type PostgresCredentials ¶
type PostgresCredentials struct { // +kubebuilder:validation:Optional // +kubebuilder:validation:MinLength=1 // PostgreSQL user name to connect as. // Defaults to be the same as the operating system name of the user running the application. Username string `json:"username,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" // Secret containing the password to be used if the server demands password authentication. PasswordRef string `json:"passwordRef,omitempty"` }
func (*PostgresCredentials) DeepCopy ¶
func (in *PostgresCredentials) DeepCopy() *PostgresCredentials
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresCredentials.
func (*PostgresCredentials) DeepCopyInto ¶
func (in *PostgresCredentials) DeepCopyInto(out *PostgresCredentials)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PostgresCredentials) GetPasswordEnvVarSource ¶
func (p *PostgresCredentials) GetPasswordEnvVarSource() *corev1.EnvVarSource
type PostgresHostSpec ¶
type PostgresHostSpec struct { // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // Name of host to connect to. // If a host name begins with a slash, it specifies Unix-domain communication rather than // TCP/IP communication; the value is the name of the directory in which the socket file is stored. Host string `json:"host"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:ExclusiveMinimum=true // Port number to connect to at the server host, // or socket file name extension for Unix-domain connections. // Zero, specifies the default port number established when PostgreSQL was built. Port int32 `json:"port,omitempty"` }
func (*PostgresHostSpec) DeepCopy ¶
func (in *PostgresHostSpec) DeepCopy() *PostgresHostSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresHostSpec.
func (*PostgresHostSpec) DeepCopyInto ¶
func (in *PostgresHostSpec) DeepCopyInto(out *PostgresHostSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostgresSSLMode ¶
type PostgresSSLMode string
+kubebuilder:validation:Enum={"disable","allow","prefer","require","verify-ca","verify-full"} +kubebuilder:default="prefer" PostgreSQL has native support for using SSL connections to encrypt client/server communications for increased security.
const ( PostgresSSLModeDisable PostgresSSLMode = "disable" PostgresSSLModeAllow PostgresSSLMode = "allow" PostgresSSLModePrefer PostgresSSLMode = "prefer" PostgresSSLModeRequire PostgresSSLMode = "require" PostgresSSLModeVerifyCA PostgresSSLMode = "verify-ca" PostgresSSLModeVerifyFull PostgresSSLMode = "verify-full" )
func (*PostgresSSLMode) Add ¶
func (p *PostgresSSLMode) Add(query url.Values)
type ProxySpec ¶
type ProxySpec struct { // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern="https?://.+" HTTPProxy string `json:"httpProxy,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern="https?://.+" HTTPSProxy string `json:"httpsProxy,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:default={"127.0.0.1","localhost",".local",".internal"} NoProxy []string `json:"noProxy,omitempty"` }
func (*ProxySpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxySpec.
func (*ProxySpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProxySpec) GetEnvVars ¶
type RedisConnection ¶
type RedisConnection struct { RedisHostSpec `json:",inline"` RedisCredentials `json:",inline"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=8 // +kubebuilder:default=0 // The database number. Database int32 `json:"database,omitempty"` }
func (*RedisConnection) DeepCopy ¶
func (in *RedisConnection) DeepCopy() *RedisConnection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisConnection.
func (*RedisConnection) DeepCopyInto ¶
func (in *RedisConnection) DeepCopyInto(out *RedisConnection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedisConnection) GetDSNNoCredentials ¶
func (c *RedisConnection) GetDSNNoCredentials() *url.URL
func (*RedisConnection) GetDSNStringWithRawPassword ¶
func (c *RedisConnection) GetDSNStringWithRawPassword(password string) string
type RedisCredentials ¶
type RedisCredentials struct { // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" // Secret containing the password to use when connecting to the server. PasswordRef string `json:"passwordRef,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*" // Secret containing the client certificate to authenticate with. CertificateRef string `json:"certificateRef,omitempty"` }
func (*RedisCredentials) DeepCopy ¶
func (in *RedisCredentials) DeepCopy() *RedisCredentials
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisCredentials.
func (*RedisCredentials) DeepCopyInto ¶
func (in *RedisCredentials) DeepCopyInto(out *RedisCredentials)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisHostSpec ¶
type RedisHostSpec struct { // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // Server hostname. Host string `json:"host"` // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:ExclusiveMinimum=true // Server port. Port int32 `json:"port,omitempty"` // +kubebuilder:validation:Optional // for Sentinel MasterSet. SentinelMasterSet string `json:"sentinelMasterSet,omitempty"` }
func (*RedisHostSpec) DeepCopy ¶
func (in *RedisHostSpec) DeepCopy() *RedisHostSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisHostSpec.
func (*RedisHostSpec) DeepCopyInto ¶
func (in *RedisHostSpec) DeepCopyInto(out *RedisHostSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegistryCtlLogLevel ¶
type RegistryCtlLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"debug","info","warning","error","fatal"} RegistryCtlLogLevel is the log level for RegistryController.
const ( RegistryCtlDebug RegistryCtlLogLevel = "debug" RegistryCtlInfo RegistryCtlLogLevel = "info" RegistryCtlWarning RegistryCtlLogLevel = "warning" RegistryCtlError RegistryCtlLogLevel = "error" RegistryCtlFatal RegistryCtlLogLevel = "fatal" )
type RegistryLogFormatter ¶
type RegistryLogFormatter string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"text","json","logstash"} RegistryLogFormatter is the log formatter for Registry.
const ( RegistryTextFormatter RegistryLogFormatter = "text" RegistryJSONFormatter RegistryLogFormatter = "json" RegistryLogstashFormatter RegistryLogFormatter = "logstash" )
type RegistryLogLevel ¶
type RegistryLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"debug","info","warning","error"} RegistryLogLevel is the log level for Registry.
const ( RegistryDebug RegistryLogLevel = "debug" RegistryInfo RegistryLogLevel = "info" RegistryWarning RegistryLogLevel = "warning" RegistryError RegistryLogLevel = "error" )
type TraceProviderSpec ¶
type TraceProviderSpec struct { // +kubebuilder:validation:Optional Jaeger *JaegerSpec `json:"jaeger,omitempty"` // +kubebuilder:validation:Optional Otel *OtelSpec `json:"otel,omitempty"` }
func (*TraceProviderSpec) DeepCopy ¶
func (in *TraceProviderSpec) DeepCopy() *TraceProviderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceProviderSpec.
func (*TraceProviderSpec) DeepCopyInto ¶
func (in *TraceProviderSpec) DeepCopyInto(out *TraceProviderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TraceProviderType ¶
type TraceProviderType string
+kubebuilder:validation:Enum={"jaeger", "otel"} +kubebuilder:validation:Type="string" The tracing provider: 'jaeger' or 'otel'.
const ( TraceJaegerProvider TraceProviderType = "jaeger" TraceOtelProvider TraceProviderType = "otel" )
type TraceSpec ¶
type TraceSpec struct { // +kubebuilder:validation:Optional // +kubebuilder:default=false // Enable tracing or not. Enabled bool `json:"enabled,omitempty"` // +kubebuilder:validation:Optional // Namespace used to differentiate different harbor services. Namespace string `json:"namespace,omitempty"` // +kubebuilder:validation:Optional // +kubebuilder:default=1 // Set `sampleRate` to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth. SampleRate int `json:"sampleRate,omitempty"` // +kubebuilder:validation:Optional // A key value dict contains user defined attributes used to initialize trace provider. Attributes map[string]string `json:"attributes,omitempty"` // +kubebuilder:validation:Required Provder TraceProviderType `json:"provider"` TraceProviderSpec `json:",inline"` }
func (*TraceSpec) AddEnvVars ¶
func (*TraceSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceSpec.
func (*TraceSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TraceSpec) GetEnvVars ¶
type TrivyLogLevel ¶
type TrivyLogLevel string
+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"debug","info","warning","error","fatal","panic"} TrivyLogLevel is the log level for Trivy.
const ( TrivyDebug TrivyLogLevel = "debug" TrivyInfo TrivyLogLevel = "info" TrivyWarning TrivyLogLevel = "warning" TrivyError TrivyLogLevel = "error" TrivyFatal TrivyLogLevel = "fatal" TrivyPanic TrivyLogLevel = "panic" )
type TrivySeverityType ¶
type TrivySeverityType string
+kubebuilder:validation:Enum={"UNKNOWN","LOW","MEDIUM","HIGH","CRITICAL"} +kubebuilder:validation:Type="string" TrivyServerSeverityType represents a CVE severity type for trivy.
const ( TrivyUnknownSeverity TrivySeverityType = "UNKNOWN" TrivyLowSeverity TrivySeverityType = "LOW" TrivyMediumSeverity TrivySeverityType = "MEDIUM" TrivyHighSeverity TrivySeverityType = "HIGH" TrivyCriticalSeverity TrivySeverityType = "CRITICAL" )
type TrivySeverityTypes ¶
type TrivySeverityTypes struct { // +kubebuilder:validation:Optional // +kubebuilder:default={"UNKNOWN","LOW","MEDIUM","HIGH","CRITICAL"} // List of severities to be displayed Severities *[]TrivySeverityType `json:"severities,omitempty"` }
func (*TrivySeverityTypes) DeepCopy ¶
func (in *TrivySeverityTypes) DeepCopy() *TrivySeverityTypes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrivySeverityTypes.
func (*TrivySeverityTypes) DeepCopyInto ¶
func (in *TrivySeverityTypes) DeepCopyInto(out *TrivySeverityTypes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TrivySeverityTypes) GetValue ¶
func (s *TrivySeverityTypes) GetValue() string
GetSeverities joins array of severities type into a string separated by commas.
type TrivyVulnerabilityType ¶
type TrivyVulnerabilityType string
+kubebuilder:validation:Enum={"os","library"} +kubebuilder:validation:Type="string" TrivyServerVulnerabilityType represents a CVE vulnerability type for trivy.
const ( TrivyOSVulnerability TrivyVulnerabilityType = "os" TrivyLibraryVulnerability TrivyVulnerabilityType = "library" )
type TrivyVulnerabilityTypes ¶
type TrivyVulnerabilityTypes struct { // +kubebuilder:validation:Optional // +kubebuilder:default={"os","library"} // Comma-separated list of vulnerability types. VulnerabilityTypes *[]TrivyVulnerabilityType `json:"vulnerabilityTypes,omitempty"` }
func (*TrivyVulnerabilityTypes) DeepCopy ¶
func (in *TrivyVulnerabilityTypes) DeepCopy() *TrivyVulnerabilityTypes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrivyVulnerabilityTypes.
func (*TrivyVulnerabilityTypes) DeepCopyInto ¶
func (in *TrivyVulnerabilityTypes) DeepCopyInto(out *TrivyVulnerabilityTypes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TrivyVulnerabilityTypes) GetValue ¶
func (v *TrivyVulnerabilityTypes) GetValue() string
GetVulnerabilities joins array of vulnerabilities type into a string separated by commas.