v1alpha1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

This package contains structure to describe a connection to a Postgres database

+kubebuilder:object:generate=true

Index

Constants

View Source
const (
	PortalHTTPPortName  = "http"
	PortalHTTPSPortName = "https"
)
View Source
const (
	ChartMuseumHTTPPortName  = "http"
	ChartMuseumHTTPSPortName = "https"
)
View Source
const (
	CoreHTTPPortName  = "http"
	CoreHTTPSPortName = "https"
)
View Source
const (
	JobServiceHTTPPortName  = "http"
	JobServiceHTTPSPortName = "https"
)
View Source
const (
	RegistryControllerHTTPPortName  = "http"
	RegistryControllerHTTPSPortName = "https"
)
View Source
const (
	RegistryAPIPortName     = "api"
	RegistryMetricsPortName = "metrics"
)
View Source
const (
	TrivyHTTPPortName  = "http"
	TrivyHTTPSPortName = "https"
)
View Source
const (
	CoreDatabase         = "core"
	NotaryServerDatabase = "notaryserver"
	NotarySignerDatabase = "notarysigner"
	ClairDatabase        = "clair"
)
View Source
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
)
View Source
const (
	// SecretTypeSharedSecret contains a single secret to share.
	//
	// Required field:
	// - Secret.Data["secret"] - secret to shared.
	SecretTypeSingle corev1.SecretType = "goharbor.io/single"

	// SharedSecretKey is the password required for SecretTypeSingle.
	SharedSecretKey = "secret"
)
View Source
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
)
View Source
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 = "postgresql-password" // nolint:gosec
)
View Source
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"
)
View Source
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"
)
View Source
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"
)
View Source
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
)
View Source
const (
	HTTPSPort = 443
	HTTPPort  = 80
)
View Source
const (
	NotaryServerAPIPortName = "api"
)
View Source
const (
	NotarySignerAPIPortName = "api"
)
View Source
const PostgresClientEncodingKey = "client_encoding"
View Source
const PostgresConnectTimeoutKey = "connect_timeout"
View Source
const PostgresSSLModeKey = "sslmode"
View Source
const PostgresScheme = "postgres"
View Source
const RedisScheme = "redis"

Variables

View Source
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
	NotaryServerComponent                        // notaryserver
	NotarySignerComponent                        // notarysigner
	ClairComponent                               // clair
	TrivyComponent                               // trivy

)

func (Component) String

func (i Component) String() string

type ComponentSpec

type ComponentSpec struct {
	// +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
	// +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"`

	// +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"`
}

+kubebuilder:validation:Type=object 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:Required
	// +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"`
}

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

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.

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 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) 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 IngressController

type IngressController string

+kubebuilder:validation:Type=string +kubebuilder:validation:Enum={"default","gce","ncp"} 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"
)

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

type PostgresConnectTimeout metav1.Duration

+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

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"`

	// +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) GetDSN

func (c *PostgresConnection) GetDSN(password string) *url.URL

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"`
}

func (*PostgresConnectionWithParameters) DeepCopy

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

func (*PostgresConnectionWithParameters) DeepCopyInto

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.

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 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) GetDSN

func (c *RedisConnection) GetDSN(password string) *url.URL

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"`
}

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","warn","error"} RegistryLogLevel is the log level for Registry.

const (
	RegistryDebug   RegistryLogLevel = "debug"
	RegistryInfo    RegistryLogLevel = "info"
	RegistryWarning RegistryLogLevel = "warning"
	RegistryError   RegistryLogLevel = "error"
)

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 (
	TrivyUnkownSeverity   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

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.

Jump to

Keyboard shortcuts

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