@@ -33,24 +33,26 @@ import (
33
33
)
34
34
35
35
type GCPConfig struct {
36
- Provider types.ProviderType `json:"provider" yaml:"provider"`
37
- Project * string `json:"project" yaml:"project"`
38
- Zone * string `json:"zone" yaml:"zone"`
39
- InstanceType * string `json:"instance_type" yaml:"instance_type"`
40
- AcceleratorType * string `json:"accelerator_type" yaml:"accelerator_type"`
41
- Network * string `json:"network" yaml:"network"`
42
- Subnet * string `json:"subnet" yaml:"subnet"`
43
- MinInstances * int64 `json:"min_instances" yaml:"min_instances"`
44
- MaxInstances * int64 `json:"max_instances" yaml:"max_instances"`
45
- ClusterName string `json:"cluster_name" yaml:"cluster_name"`
46
- Telemetry bool `json:"telemetry" yaml:"telemetry"`
47
- ImageOperator string `json:"image_operator" yaml:"image_operator"`
48
- ImageManager string `json:"image_manager" yaml:"image_manager"`
49
- ImageDownloader string `json:"image_downloader" yaml:"image_downloader"`
50
- ImageFluentBit string `json:"image_fluent_bit" yaml:"image_fluent_bit"`
51
- ImageIstioProxy string `json:"image_istio_proxy" yaml:"image_istio_proxy"`
52
- ImageIstioPilot string `json:"image_istio_pilot" yaml:"image_istio_pilot"`
53
- ImageGooglePause string `json:"image_google_pause" yaml:"image_google_pause"`
36
+ Provider types.ProviderType `json:"provider" yaml:"provider"`
37
+ Project * string `json:"project" yaml:"project"`
38
+ Zone * string `json:"zone" yaml:"zone"`
39
+ InstanceType * string `json:"instance_type" yaml:"instance_type"`
40
+ AcceleratorType * string `json:"accelerator_type" yaml:"accelerator_type"`
41
+ Network * string `json:"network" yaml:"network"`
42
+ Subnet * string `json:"subnet" yaml:"subnet"`
43
+ APILoadBalancerScheme LoadBalancerScheme `json:"api_load_balancer_scheme" yaml:"api_load_balancer_scheme"`
44
+ OperatorLoadBalancerScheme LoadBalancerScheme `json:"operator_load_balancer_scheme" yaml:"operator_load_balancer_scheme"`
45
+ MinInstances * int64 `json:"min_instances" yaml:"min_instances"`
46
+ MaxInstances * int64 `json:"max_instances" yaml:"max_instances"`
47
+ ClusterName string `json:"cluster_name" yaml:"cluster_name"`
48
+ Telemetry bool `json:"telemetry" yaml:"telemetry"`
49
+ ImageOperator string `json:"image_operator" yaml:"image_operator"`
50
+ ImageManager string `json:"image_manager" yaml:"image_manager"`
51
+ ImageDownloader string `json:"image_downloader" yaml:"image_downloader"`
52
+ ImageFluentBit string `json:"image_fluent_bit" yaml:"image_fluent_bit"`
53
+ ImageIstioProxy string `json:"image_istio_proxy" yaml:"image_istio_proxy"`
54
+ ImageIstioPilot string `json:"image_istio_pilot" yaml:"image_istio_pilot"`
55
+ ImageGooglePause string `json:"image_google_pause" yaml:"image_google_pause"`
54
56
}
55
57
56
58
type InternalGCPConfig struct {
@@ -148,6 +150,26 @@ var UserGCPValidation = &cr.StructValidation{
148
150
AllowExplicitNull : true ,
149
151
},
150
152
},
153
+ {
154
+ StructField : "APILoadBalancerScheme" ,
155
+ StringValidation : & cr.StringValidation {
156
+ AllowedValues : LoadBalancerSchemeStrings (),
157
+ Default : InternetFacingLoadBalancerScheme .String (),
158
+ },
159
+ Parser : func (str string ) (interface {}, error ) {
160
+ return LoadBalancerSchemeFromString (str ), nil
161
+ },
162
+ },
163
+ {
164
+ StructField : "OperatorLoadBalancerScheme" ,
165
+ StringValidation : & cr.StringValidation {
166
+ AllowedValues : LoadBalancerSchemeStrings (),
167
+ Default : InternetFacingLoadBalancerScheme .String (),
168
+ },
169
+ Parser : func (str string ) (interface {}, error ) {
170
+ return LoadBalancerSchemeFromString (str ), nil
171
+ },
172
+ },
151
173
{
152
174
StructField : "MinInstances" ,
153
175
Int64PtrValidation : & cr.Int64PtrValidation {
@@ -501,6 +523,8 @@ func (cc *GCPConfig) UserTable() table.KeyValuePairs {
501
523
if cc .Subnet != nil {
502
524
items .Add (SubnetUserKey , * cc .Subnet )
503
525
}
526
+ items .Add (APILoadBalancerSchemeUserKey , cc .APILoadBalancerScheme )
527
+ items .Add (OperatorLoadBalancerSchemeUserKey , cc .OperatorLoadBalancerScheme )
504
528
items .Add (TelemetryUserKey , cc .Telemetry )
505
529
items .Add (ImageOperatorUserKey , cc .ImageOperator )
506
530
items .Add (ImageManagerUserKey , cc .ImageManager )
@@ -536,6 +560,8 @@ func (cc *GCPConfig) TelemetryEvent() map[string]interface{} {
536
560
if cc .Subnet != nil {
537
561
event ["subnet._is_defined" ] = true
538
562
}
563
+ event ["api_load_balancer_scheme" ] = cc .APILoadBalancerScheme
564
+ event ["operator_load_balancer_scheme" ] = cc .OperatorLoadBalancerScheme
539
565
if cc .MinInstances != nil {
540
566
event ["min_instances._is_defined" ] = true
541
567
event ["min_instances" ] = * cc .MinInstances
0 commit comments