v1alpha1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the modelregistry v1 API group +kubebuilder:object:generate=true +groupName=modelregistry.opendatahub.io

Index

Constants

This section is empty.

Variables

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

type GrpcSpec struct {

	// Listen port for gRPC connections, defaults to 9090.
	Port *int32 `json:"port,omitempty"`

	// Resource requirements
	//+optional
	Resources *v1.ResourceRequirements `json:"resources,omitempty"`

	// Optional image to support overriding the image deployed by the operator.
	//+optional
	Image string `json:"image,omitempty"`
}

func (*GrpcSpec) DeepCopy

func (in *GrpcSpec) DeepCopy() *GrpcSpec

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

func (*GrpcSpec) DeepCopyInto

func (in *GrpcSpec) DeepCopyInto(out *GrpcSpec)

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

type ModelRegistry

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

	Spec   ModelRegistrySpec   `json:"spec,omitempty"`
	Status ModelRegistryStatus `json:"status,omitempty"`
}

ModelRegistry is the Schema for the modelregistries API

func (*ModelRegistry) DeepCopy

func (in *ModelRegistry) DeepCopy() *ModelRegistry

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

func (*ModelRegistry) DeepCopyInto

func (in *ModelRegistry) DeepCopyInto(out *ModelRegistry)

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

func (*ModelRegistry) DeepCopyObject

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

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

func (*ModelRegistry) Default

func (r *ModelRegistry) Default()

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

func (*ModelRegistry) SetupWebhookWithManager

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

func (*ModelRegistry) ValidateCreate

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

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

func (*ModelRegistry) ValidateDatabase added in v0.1.1

func (r *ModelRegistry) ValidateDatabase() (admission.Warnings, error)

ValidateDatabase validates that at least one database config is present

func (*ModelRegistry) ValidateDelete

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

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

func (*ModelRegistry) ValidateUpdate

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

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

type ModelRegistryList

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

ModelRegistryList contains a list of ModelRegistry

func (*ModelRegistryList) DeepCopy

func (in *ModelRegistryList) DeepCopy() *ModelRegistryList

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

func (*ModelRegistryList) DeepCopyInto

func (in *ModelRegistryList) DeepCopyInto(out *ModelRegistryList)

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

func (*ModelRegistryList) DeepCopyObject

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

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

type ModelRegistrySpec

type ModelRegistrySpec struct {

	// Configuration for REST endpoint
	Rest RestSpec `json:"rest"`

	// Configuration for gRPC endpoint
	Grpc GrpcSpec `json:"grpc"`

	// PostgreSQL configuration options
	//+optional
	Postgres *PostgresConfig `json:"postgres,omitempty"`

	// MySQL configuration options
	//+optional
	MySQL *MySQLConfig `json:"mysql,omitempty"`

	// Flag specifying database upgrade option. If set to true, it enables
	// database migration during initialization (Optional parameter)
	//+optional
	EnableDatabaseUpgrade *bool `json:"enable_database_upgrade,omitempty"`

	// Database downgrade schema version value. If set the database
	// schema version is downgraded to the set value during
	// initialization (Optional Parameter)
	//+optional
	DowngradeDbSchemaVersion *int64 `json:"downgrade_db_schema_version,omitempty"`
}

ModelRegistrySpec defines the desired state of ModelRegistry. One of `postgres` or `mysql` database configurations MUST be provided!

func (*ModelRegistrySpec) DeepCopy

func (in *ModelRegistrySpec) DeepCopy() *ModelRegistrySpec

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

func (*ModelRegistrySpec) DeepCopyInto

func (in *ModelRegistrySpec) DeepCopyInto(out *ModelRegistrySpec)

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

type ModelRegistryStatus

type ModelRegistryStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ModelRegistryStatus defines the observed state of ModelRegistry

func (*ModelRegistryStatus) DeepCopy

func (in *ModelRegistryStatus) DeepCopy() *ModelRegistryStatus

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

func (*ModelRegistryStatus) DeepCopyInto

func (in *ModelRegistryStatus) DeepCopyInto(out *ModelRegistryStatus)

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

type MySQLConfig added in v0.1.1

type MySQLConfig struct {
	//+kubebuilder:required
	// The hostname or IP address of the MYSQL server:
	// If unspecified, a connection to the local host is assumed.
	// Currently, a replicated MYSQL backend is not supported.
	Host string `json:"host"`

	//+kubebuilder:default=3306
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=65535
	// Port number to connect to at the server host.
	// The TCP Port number that the MYSQL server accepts connections on.
	// If unspecified, the default MYSQL port (3306) is used.
	Port *int32 `json:"port,omitempty"`

	//+kubebuilder:required
	// The MYSQL login id.
	Username string `json:"username"`

	// The password to use for `Username`. If empty, only MYSQL user ids that don't
	// have a password set are allowed to connect.
	PasswordSecret *SecretKeyValue `json:"passwordSecret,omitempty"`

	//+kubebuilder:required
	// The database to connect to. Must be specified.
	// After connecting to the MYSQL server, this database is created if not
	// already present unless SkipDBCreation is set.
	// All queries after Connect() are assumed to be for this database.
	Database string `json:"database"`

	//+kubebuilder:default=false
	// True if skipping database instance creation during ML Metadata
	// service initialization. By default, it is false.
	SkipDBCreation bool `json:"skipDBCreation,omitempty"`

	// This parameter specifies the Kubernetes Secret name and key of the client public key certificate.
	SSLCertificateSecret *SecretKeyValue `json:"sslCertificateSecret,omitempty"`
	// This parameter specifies the Kubernetes Secret name and key used for the
	// client private key.
	SSLKeySecret *SecretKeyValue `json:"sslKeySecret,omitempty"`
	// This parameter specifies the Kubernetes Secret name and key containing
	// certificate authority (CA) certificate.
	SSLRootCertificateSecret *SecretKeyValue `json:"sslRootCertificateSecret,omitempty"`
	// This parameter specifies the Kubernetes Secret name containing
	// multiple certificate authority (CA) certificate(s) as keys.
	SSLRootCertificatesSecretName *string `json:"sslRootCertificatesSecretName,omitempty"`
	// This parameter specifies the list of permissible ciphers for SSL encryption.
	SSLCipher *string `json:"sslCipher,omitempty"`
	// If set, enable verification of the server certificate against the host
	// name used when connecting to the server.
	VerifyServerCert *bool `json:"verifyServerCert,omitempty"`
}

func (*MySQLConfig) DeepCopy added in v0.1.1

func (in *MySQLConfig) DeepCopy() *MySQLConfig

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

func (*MySQLConfig) DeepCopyInto added in v0.1.1

func (in *MySQLConfig) DeepCopyInto(out *MySQLConfig)

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

type PostgresConfig

type PostgresConfig struct {
	// Name of host to connect to.
	Host string `json:"host,omitempty"`
	// Numeric IP address of host to connect to. If this field is
	// provided, "host" field is ignored.
	HostAddress string `json:"hostAddress,omitempty"`

	//+kubebuilder:default=5432
	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=65535
	// Port number to connect to at the server host.
	Port *int32 `json:"port,omitempty"`

	//+kubebuilder:required
	// PostgreSQL username to connect as.
	Username string `json:"username,omitempty"`

	// Password to be used if required by the PostgreSQL server.
	PasswordSecret *SecretKeyValue `json:"passwordSecret,omitempty"`

	//+kubebuilder:required
	// The database name.
	Database string `json:"database"`

	//+kubebuilder:default=false
	// True if skipping database instance creation during ML Metadata
	// service initialization. By default, it is false.
	SkipDBCreation bool `json:"skipDBCreation,omitempty"`

	//+kubebuilder:validation:Enum=disable;allow;prefer;require;verify-ca;verify-full
	//+kubebuilder:default=disable
	// PostgreSQL sslmode setup. Values can be disable, allow, prefer,
	// require, verify-ca, verify-full.
	SSLMode string `json:"sslMode,omitempty"`
	// This parameter specifies the Kubernetes Secret name and key of the client SSL certificate.
	SSLCertificateSecret *SecretKeyValue `json:"sslCertificateSecret,omitempty"`
	// This parameter specifies the Kubernetes Secret name and key used for the
	// client certificate SSL secret key.
	SSLKeySecret *SecretKeyValue `json:"sslKeySecret,omitempty"`
	// This parameter specifies the Kubernetes Secret name and key of the password for the SSL secret key
	// specified in sslKeySecret, allowing client certificate private keys
	// to be stored in encrypted form on disk even when interactive
	// passphrase input is not practical.
	SSLPasswordSecret *SecretKeyValue `json:"sslPasswordSecret,omitempty"`
	// This parameter specifies the Kubernetes Secret name and key containing SSL
	// certificate authority (CA) certificate(s).
	SSLRootCertificateSecret *SecretKeyValue `json:"sslRootCertificateSecret,omitempty"`
}

func (*PostgresConfig) DeepCopy

func (in *PostgresConfig) DeepCopy() *PostgresConfig

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

func (*PostgresConfig) DeepCopyInto

func (in *PostgresConfig) DeepCopyInto(out *PostgresConfig)

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

type RestSpec

type RestSpec struct {

	// Listen port for REST connections, defaults to 8080.
	Port *int32 `json:"port,omitempty"`

	//+kubebuilder:validation:Enum=disabled;enabled
	//+kubebuilder:default=disabled
	// Create an OpenShift Route for REST Service
	ServiceRoute string `json:"serviceRoute,omitempty"`

	// Resource requirements
	//+optional
	Resources *v1.ResourceRequirements `json:"resources,omitempty"`

	// Optional image to support overriding the image deployed by the operator.
	//+optional
	Image string `json:"image,omitempty"`
}

func (*RestSpec) DeepCopy

func (in *RestSpec) DeepCopy() *RestSpec

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

func (*RestSpec) DeepCopyInto

func (in *RestSpec) DeepCopyInto(out *RestSpec)

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

type SecretKeyValue

type SecretKeyValue struct {
	// +kubebuilder:validation:Required
	// Kubernetes secret name
	Name string `json:"name"`
	// Key name in secret
	Key string `json:"key"`
}

func (*SecretKeyValue) DeepCopy

func (in *SecretKeyValue) DeepCopy() *SecretKeyValue

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

func (*SecretKeyValue) DeepCopyInto

func (in *SecretKeyValue) DeepCopyInto(out *SecretKeyValue)

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