forked from goharbor/harbor-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notarysigner_types.go
72 lines (55 loc) · 2.6 KB
/
notarysigner_types.go
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
package v1alpha3
import (
harbormetav1 "github.com/plotly/harbor-operator/apis/meta/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const NotarySignerAPIPort = 7899
// +genclient
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// +kubebuilder:object:root=true
// +k8s:openapi-gen=true
// +resource:path=notarysigner
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories="goharbor"
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.",priority=1
// +kubebuilder:printcolumn:name="Failure",type=string,JSONPath=`.status.conditions[?(@.type=="Failed")].message`,description="Human readable message describing the failure",priority=5
// NotarySigner is the Schema for the NotarySigner API.
type NotarySigner struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NotarySignerSpec `json:"spec,omitempty"`
Status harbormetav1.ComponentStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// NotarySignerList contains a list of NotarySigner.
type NotarySignerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NotarySigner `json:"items"`
}
// NotarySignerSpec defines the desired state of NotarySigner.
type NotarySignerSpec struct {
harbormetav1.ComponentSpec `json:",inline"`
// +kubebuilder:validation:Required
Authentication NotarySignerAuthenticationSpec `json:"authentatication"`
// +kubebuilder:validation:Optional
Logging NotaryLoggingSpec `json:"logging,omitempty"`
// +kubebuilder:validation:Required
Storage NotarySignerStorageSpec `json:"storage"`
// +kubebuilder:validation:Optional
MigrationEnabled *bool `json:"migrationEnabled,omitempty"`
}
type NotarySignerAuthenticationSpec 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"`
}
type NotarySignerStorageSpec struct {
NotaryStorageSpec `json:",inline"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
AliasesRef string `json:"aliasesRef"`
}
func init() { //nolint:gochecknoinits
SchemeBuilder.Register(&NotarySigner{}, &NotarySignerList{})
}