-
Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathmodel_registry_kind.go
More file actions
95 lines (78 loc) · 3.02 KB
/
model_registry_kind.go
File metadata and controls
95 lines (78 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package models
import (
"time"
)
type ModelRegistryKind struct {
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata Metadata `json:"metadata"`
Spec ModelRegistrySpec `json:"spec"`
Status Status `json:"status"`
}
type ModelRegistryAndCredentials struct {
ModelRegistry ModelRegistryKind `json:"modelRegistryKind"`
DatabasePassword string `json:"databasePassword"`
}
type Metadata struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
CreationTimestamp time.Time `json:"creationTimestamp"`
DeletionTimestamp *time.Time `json:"deletionTimestamp,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
// EmptyObject represents an empty object at create time, properties here aren't used by the UI
type EmptyObject struct{}
type ModelRegistrySpec struct {
GRPC EmptyObject `json:"grpc"` // Empty object at create time, properties here aren't used by the UI
REST EmptyObject `json:"rest"` // Empty object at create time, properties here aren't used by the UI
Istio IstioConfig `json:"istio"`
DatabaseConfig DatabaseConfig `json:"databaseConfig"`
}
type IstioConfig struct {
Gateway GatewayConfig `json:"gateway"`
}
type GatewayConfig struct {
GRPC GRPCConfig `json:"grpc"`
REST RESTConfig `json:"rest"`
}
type GRPCConfig struct {
TLS EmptyObject `json:"tls"` // Empty object at create time, properties here aren't used by the UI
}
type RESTConfig struct {
TLS EmptyObject `json:"tls"` // Empty object at create time, properties here aren't used by the UI
}
type DatabaseType string
const (
MySQL DatabaseType = "mysql"
Postgres DatabaseType = "postgres"
)
type Entry struct {
Name string `json:"name"`
Key string `json:"key"`
}
type DatabaseConfig struct {
DatabaseType DatabaseType `json:"databaseType"`
Database string `json:"database"`
Host string `json:"host"`
PasswordSecret PasswordSecret `json:"passwordSecret,omitempty"`
Port int `json:"port"`
SkipDBCreation bool `json:"skipDBCreation"`
Username string `json:"username"`
SSLRootCertificateConfigMap *Entry `json:"sslRootCertificateConfigMap,omitempty"`
SSLRootCertificateSecret *Entry `json:"sslRootCertificateSecret,omitempty"`
}
type PasswordSecret struct {
Key string `json:"key"`
Name string `json:"name"`
Value string `json:"-"` // Excluded from JSON serialization to prevent accidental exposure in API responses
}
type Status struct {
Conditions []Condition `json:"conditions"`
}
type Condition struct {
LastTransitionTime time.Time `json:"lastTransitionTime"`
Message string `json:"message"`
Reason string `json:"reason"`
Status string `json:"status"`
Type string `json:"type"`
}