-
Notifications
You must be signed in to change notification settings - Fork 185
/
configuration.go
154 lines (152 loc) 路 4.89 KB
/
configuration.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
package crds
import (
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func NewConfiguration() *apiextensionsv1.CustomResourceDefinition {
return &apiextensionsv1.CustomResourceDefinition{
TypeMeta: metav1.TypeMeta{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1",
},
ObjectMeta: metav1.ObjectMeta{
Name: "odigosconfigurations.odigos.io",
},
Spec: apiextensionsv1.CustomResourceDefinitionSpec{
Group: "odigos.io",
Names: apiextensionsv1.CustomResourceDefinitionNames{
Plural: "odigosconfigurations",
Singular: "odigosconfiguration",
Kind: "OdigosConfiguration",
ListKind: "OdigosConfigurationList",
},
Scope: apiextensionsv1.NamespaceScoped,
Versions: []apiextensionsv1.CustomResourceDefinitionVersion{
{
Name: "v1alpha1",
Served: true,
Storage: true,
Schema: &apiextensionsv1.CustomResourceValidation{
OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
Description: "OdigosConfiguration is the Schema for the odigos configuration",
Type: "object",
Properties: map[string]apiextensionsv1.JSONSchemaProps{
"apiVersion": {
Type: "string",
},
"kind": {
Type: "string",
},
"metadata": {
Type: "object",
},
"spec": {
Description: "OdigosConfigurationSpec defines the desired state of OdigosConfiguration",
Type: "object",
Required: []string{"odigosVersion", "configVersion"},
Properties: map[string]apiextensionsv1.JSONSchemaProps{
"autoscalerImage": {
Type: "string",
},
"configVersion": {
Type: "integer",
},
"defaultSDKs": {
Type: "object",
AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
Allows: true,
Schema: &apiextensionsv1.JSONSchemaProps{
Type: "object",
Properties: map[string]apiextensionsv1.JSONSchemaProps{
"sdkTier": {
Type: "string",
},
"sdkType": {
Type: "string",
Description: "Odigos supports two types of OpenTelemetry SDKs: native and ebpf.",
},
},
Required: []string{"sdkTier", "sdkType"},
},
},
},
"ignoredNamespaces": {
Type: "array",
Items: &apiextensionsv1.JSONSchemaPropsOrArray{
Schema: &apiextensionsv1.JSONSchemaProps{
Type: "string",
},
},
},
"imagePrefix": {
Type: "string",
},
"instrumentorImage": {
Type: "string",
},
"odigletImage": {
Type: "string",
},
"odigosVersion": {
Type: "string",
},
"psp": {
Type: "boolean",
},
"telemetryEnabled": {
Type: "boolean",
},
"supportedSDKs": {
Type: "object",
AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
Allows: true,
Schema: &apiextensionsv1.JSONSchemaProps{
Type: "array",
Items: &apiextensionsv1.JSONSchemaPropsOrArray{
Schema: &apiextensionsv1.JSONSchemaProps{
Type: "object",
Properties: map[string]apiextensionsv1.JSONSchemaProps{
"sdkTier": {
Type: "string",
},
"sdkType": {
Type: "string",
},
},
Required: []string{"sdkTier", "sdkType"},
},
},
},
},
},
"collectorGateway": {
Type: "object",
Properties: map[string]apiextensionsv1.JSONSchemaProps{
"requestMemoryMiB": {
Description: "requestMemoryMi is the memory request for the cluster gateway collector deployment.",
Type: "integer",
},
"memoryLimiterLimitMiB": {
Description: "this parameter sets the 'limit_mib' parameter in the memory limiter configuration for the collector gateway.",
Type: "integer",
},
"memoryLimiterSpikeLimitMiB": {
Description: "this parameter sets the 'spike_limit_mib' parameter in the memory limiter configuration for the collector gateway.",
Type: "integer",
},
"goMemLimitMiB": {
Description: "the GOMEMLIMIT environment variable value for the collector gateway deployment.",
Type: "integer",
},
},
},
},
},
},
},
},
},
},
},
}
}