-
Notifications
You must be signed in to change notification settings - Fork 8
/
benchmarkoperator_types.go
77 lines (62 loc) · 2.32 KB
/
benchmarkoperator_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
73
74
75
76
77
/*
* Copyright 2022- IBM Inc. All rights reserved
* SPDX-License-Identifier: Apache2.0
*/
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
type HelmSpec struct {
Entity string `json:"entity"`
Release string `json:"release,omitempty"`
RepoName string `json:"repoName"`
URL string `json:"url"`
Username string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
ValuesYaml string `json:"valuesYaml,omitempty"`
}
type YAMLSpec struct {
Host string `json:"host"`
Paths []string `json:"paths,omitempty"`
}
type DeploymentSpec struct {
Namespace string `json:"namespace,omitempty"`
YAML YAMLSpec `json:"yaml,omitempty"`
Helm HelmSpec `json:"helm,omitempty"`
}
// BenchmarkOperatorSpec defines the desired state of BenchmarkOperator
type BenchmarkOperatorSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
APIVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Adaptor string `json:"adaptor,omitempty"`
CRD YAMLSpec `json:"crd,omitempty"`
DeploySpec DeploymentSpec `json:"deploySpec"`
}
// BenchmarkOperatorStatus defines the observed state of BenchmarkOperator
type BenchmarkOperatorStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
// BenchmarkOperator is the Schema for the benchmarkoperators API
type BenchmarkOperator struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec BenchmarkOperatorSpec `json:"spec,omitempty"`
Status BenchmarkOperatorStatus `json:"status,omitempty"`
}
//+kubebuilder:object:root=true
// BenchmarkOperatorList contains a list of BenchmarkOperator
type BenchmarkOperatorList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []BenchmarkOperator `json:"items"`
}
func init() {
SchemeBuilder.Register(&BenchmarkOperator{}, &BenchmarkOperatorList{})
}