-
Notifications
You must be signed in to change notification settings - Fork 474
/
types.go
691 lines (596 loc) · 19.7 KB
/
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
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
package kubernetes
import (
apps_v1 "k8s.io/api/apps/v1"
autoscaling_v1 "k8s.io/api/autoscaling/v1"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
const (
// Kubernetes Controllers
ConfigMapType = "ConfigMap"
CronJobType = "CronJob"
DeploymentType = "Deployment"
DeploymentConfigType = "DeploymentConfig"
JobType = "Job"
PodType = "Pod"
ReplicationControllerType = "ReplicationController"
ReplicaSetType = "ReplicaSet"
ServiceType = "Service"
StatefulSetType = "StatefulSet"
// Networking
DestinationRules = "destinationrules"
DestinationRuleType = "DestinationRule"
DestinationRuleTypeList = "DestinationRuleList"
Gateways = "gateways"
GatewayType = "Gateway"
GatewayTypeList = "GatewayList"
EnvoyFilters = "envoyfilters"
EnvoyFilterType = "EnvoyFilter"
EnvoyFilterTypeList = "EnvoyFilterList"
Sidecars = "sidecars"
SidecarType = "Sidecar"
SidecarTypeList = "SidecarList"
ServiceEntries = "serviceentries"
ServiceEntryType = "ServiceEntry"
ServiceentryTypeList = "ServiceEntryList"
VirtualServices = "virtualservices"
VirtualServiceType = "VirtualService"
VirtualServiceTypeList = "VirtualServiceList"
WorkloadEntries = "workloadentries"
WorkloadEntryType = "WorkloadEntry"
WorkloadEntryTypeList = "WorkloadEntryList"
// Quotas
QuotaSpecs = "quotaspecs"
QuotaSpecType = "QuotaSpec"
QuotaSpecTypeList = "QuotaSpecList"
QuotaSpecBindings = "quotaspecbindings"
QuotaSpecBindingType = "QuotaSpecBinding"
QuotaSpecBindingTypeList = "QuotaSpecBindingList"
// PeerAuthentications
Policies = "policies"
PolicyType = "Policy"
PolicyTypeList = "PolicyList"
//MeshPeerAuthentications
MeshPolicies = "meshpolicies"
MeshPolicyType = "MeshPolicy"
MeshPolicyTypeList = "MeshPolicyList"
// Rbac
ClusterRbacConfigs = "clusterrbacconfigs"
ClusterRbacConfigType = "ClusterRbacConfig"
ClusterRbacConfigTypeList = "ClusterRbacConfigList"
RbacConfigs = "rbacconfigs"
RbacConfigType = "RbacConfig"
RbacConfigTypeList = "RbacConfigList"
ServiceRoles = "serviceroles"
ServiceRoleType = "ServiceRole"
ServiceRoleTypeList = "ServiceRoleList"
ServiceRoleBindings = "servicerolebindings"
ServiceRoleBindingType = "ServiceRoleBinding"
ServiceRoleBindingTypeList = "ServiceRoleBindingList"
// Authorization PeerAuthentications
AuthorizationPolicies = "authorizationpolicies"
AuthorizationPoliciesType = "AuthorizationPolicy"
AuthorizationPoliciesTypeList = "AuthorizationPolicyList"
// Peer Authentications
PeerAuthentications = "peerauthentications"
PeerAuthenticationsType = "PeerAuthentication"
PeerAuthenticationsTypeList = "PeerAuthenticationList"
// Request Authentications
RequestAuthentications = "requestauthentications"
RequestAuthenticationsType = "RequestAuthentication"
RequestAuthenticationsTypeList = "RequestAuthenticationList"
// AttributeManifest
AttributeManifests = "attributemanifests"
AttributeManifestType = "attributemanifest"
AttributeManifestTypeList = "attributemanifestList"
// HttpApiSpecBinding
HttpApiSpecBindings = "httpapispecbindings"
HttpApiSpecBindingType = "HTTPAPISpecBinding"
HttpApiSpecBindingTypeList = "HTTPAPISpecBindingList"
// HttpApiSpec
HttpApiSpecs = "httpapispecs"
HttpApiSpecType = "HTTPAPISpec"
HttpApiSpecTypeList = "HTTPAPISpecList"
// Config - Rules
Rules = "rules"
RuleType = "rule"
RuleTypeList = "ruleList"
// Config - Adapters
Adapters = "adapters"
AdapterType = "adapter"
AdapterTypeList = "adapterList"
Handlers = "handlers"
HandlerType = "handler"
HandlerTypeList = "handlerList"
// Config - Templates
Instances = "instances"
InstanceType = "instance"
InstanceTypeList = "instanceList"
Templates = "templates"
TemplateType = "template"
TemplateTypeList = "templateList"
// Iter8 types
Iter8Experiments = "experiments"
Iter8ExperimentType = "Experiment"
Iter8ExperimentTypeList = "ExperimentList"
Iter8ConfigMap = "iter8config-metrics"
)
var (
ConfigGroupVersion = schema.GroupVersion{
Group: "config.istio.io",
Version: "v1alpha2",
}
ApiConfigVersion = ConfigGroupVersion.Group + "/" + ConfigGroupVersion.Version
NetworkingGroupVersion = schema.GroupVersion{
Group: "networking.istio.io",
Version: "v1alpha3",
}
ApiNetworkingVersion = NetworkingGroupVersion.Group + "/" + NetworkingGroupVersion.Version
AuthenticationGroupVersion = schema.GroupVersion{
Group: "authentication.istio.io",
Version: "v1alpha1",
}
ApiAuthenticationVersion = AuthenticationGroupVersion.Group + "/" + AuthenticationGroupVersion.Version
RbacGroupVersion = schema.GroupVersion{
Group: "rbac.istio.io",
Version: "v1alpha1",
}
ApiRbacVersion = RbacGroupVersion.Group + "/" + RbacGroupVersion.Version
MaistraAuthenticationGroupVersion = schema.GroupVersion{
Group: "authentication.maistra.io",
Version: "v1",
}
ApiMaistraAuthenticationVersion = MaistraAuthenticationGroupVersion.Group + "/" + MaistraAuthenticationGroupVersion.Version
MaistraRbacGroupVersion = schema.GroupVersion{
Group: "rbac.maistra.io",
Version: "v1",
}
ApiMaistraRbacVersion = MaistraRbacGroupVersion.Group + "/" + MaistraRbacGroupVersion.Version
SecurityGroupVersion = schema.GroupVersion{
Group: "security.istio.io",
Version: "v1beta1",
}
ApiSecurityVersion = SecurityGroupVersion.Group + "/" + SecurityGroupVersion.Version
// We will add a new extesion API in a similar way as we added the Kubernetes + Istio APIs
Iter8GroupVersion = schema.GroupVersion{
Group: "iter8.tools",
Version: "v1alpha2",
}
ApiIter8Version = Iter8GroupVersion.Group + "/" + Iter8GroupVersion.Version
networkingTypes = []struct {
objectKind string
collectionKind string
}{
{
objectKind: GatewayType,
collectionKind: GatewayTypeList,
},
{
objectKind: VirtualServiceType,
collectionKind: VirtualServiceTypeList,
},
{
objectKind: DestinationRuleType,
collectionKind: DestinationRuleTypeList,
},
{
objectKind: ServiceEntryType,
collectionKind: ServiceentryTypeList,
},
{
objectKind: SidecarType,
collectionKind: SidecarTypeList,
},
{
objectKind: WorkloadEntryType,
collectionKind: WorkloadEntryTypeList,
},
{
objectKind: EnvoyFilterType,
collectionKind: EnvoyFilterTypeList,
},
}
configTypes = []struct {
objectKind string
collectionKind string
}{
{
objectKind: RuleType,
collectionKind: RuleTypeList,
},
// Quota specs depends on Quota template but are not a "template" object itselft
{
objectKind: QuotaSpecType,
collectionKind: QuotaSpecTypeList,
},
{
objectKind: QuotaSpecBindingType,
collectionKind: QuotaSpecBindingTypeList,
},
{
objectKind: AttributeManifestType,
collectionKind: AttributeManifestTypeList,
},
{
objectKind: HttpApiSpecBindingType,
collectionKind: HttpApiSpecBindingTypeList,
},
{
objectKind: HttpApiSpecType,
collectionKind: HttpApiSpecTypeList,
},
}
authenticationTypes = []struct {
objectKind string
collectionKind string
}{
{
objectKind: PolicyType,
collectionKind: PolicyTypeList,
},
{
objectKind: MeshPolicyType,
collectionKind: MeshPolicyTypeList,
},
}
securityTypes = []struct {
objectKind string
collectionKind string
}{
{
objectKind: PeerAuthenticationsType,
collectionKind: PeerAuthenticationsTypeList,
},
{
objectKind: AuthorizationPoliciesType,
collectionKind: AuthorizationPoliciesTypeList,
},
{
objectKind: RequestAuthenticationsType,
collectionKind: RequestAuthenticationsTypeList,
},
}
// TODO Adapters and Templates can be loaded from external config for easy maintenance
adapterTypes = []struct {
objectKind string
collectionKind string
}{
{
objectKind: AdapterType,
collectionKind: AdapterTypeList,
},
{
objectKind: HandlerType,
collectionKind: HandlerTypeList,
},
}
templateTypes = []struct {
objectKind string
collectionKind string
}{
{
objectKind: InstanceType,
collectionKind: InstanceTypeList,
},
{
objectKind: TemplateType,
collectionKind: TemplateTypeList,
},
}
rbacTypes = []struct {
objectKind string
collectionKind string
}{
{
objectKind: ClusterRbacConfigType,
collectionKind: ClusterRbacConfigTypeList,
},
{
objectKind: RbacConfigType,
collectionKind: RbacConfigTypeList,
},
{
objectKind: ServiceRoleType,
collectionKind: ServiceRoleTypeList,
},
{
objectKind: ServiceRoleBindingType,
collectionKind: ServiceRoleBindingTypeList,
},
}
iter8Types = []struct {
objectKind string
collectionKind string
}{
{
objectKind: Iter8ExperimentType,
collectionKind: Iter8ExperimentTypeList,
},
}
// A map to get the plural for a Istio type using the singlar type
PluralType = map[string]string{
// Networking
Gateways: GatewayType,
VirtualServices: VirtualServiceType,
DestinationRules: DestinationRuleType,
ServiceEntries: ServiceEntryType,
Sidecars: SidecarType,
WorkloadEntries: WorkloadEntryType,
EnvoyFilters: EnvoyFilterType,
// Main Config files
Rules: RuleType,
QuotaSpecs: QuotaSpecType,
QuotaSpecBindings: QuotaSpecBindingType,
AttributeManifests: AttributeManifestType,
HttpApiSpecBindings: HttpApiSpecBindingType,
HttpApiSpecs: HttpApiSpecType,
Adapters: AdapterType,
Handlers: HandlerType,
Instances: InstanceType,
Templates: TemplateType,
// PeerAuthentications
Policies: PolicyType,
MeshPolicies: MeshPolicyType,
// Rbac
ClusterRbacConfigs: ClusterRbacConfigType,
RbacConfigs: RbacConfigType,
ServiceRoles: ServiceRoleType,
ServiceRoleBindings: ServiceRoleBindingType,
// Security
AuthorizationPolicies: AuthorizationPoliciesType,
PeerAuthentications: PeerAuthenticationsType,
RequestAuthentications: RequestAuthenticationsType,
// Iter8
Iter8Experiments: Iter8ExperimentType,
}
ResourceTypesToAPI = map[string]string{
DestinationRules: NetworkingGroupVersion.Group,
VirtualServices: NetworkingGroupVersion.Group,
ServiceEntries: NetworkingGroupVersion.Group,
Gateways: NetworkingGroupVersion.Group,
Sidecars: NetworkingGroupVersion.Group,
WorkloadEntries: NetworkingGroupVersion.Group,
EnvoyFilters: NetworkingGroupVersion.Group,
Adapters: ConfigGroupVersion.Group,
Templates: ConfigGroupVersion.Group,
Rules: ConfigGroupVersion.Group,
Handlers: ConfigGroupVersion.Group,
Instances: ConfigGroupVersion.Group,
QuotaSpecs: ConfigGroupVersion.Group,
QuotaSpecBindings: ConfigGroupVersion.Group,
AttributeManifests: ConfigGroupVersion.Group,
HttpApiSpecBindings: ConfigGroupVersion.Group,
HttpApiSpecs: ConfigGroupVersion.Group,
Policies: AuthenticationGroupVersion.Group,
MeshPolicies: AuthenticationGroupVersion.Group,
ClusterRbacConfigs: RbacGroupVersion.Group,
RbacConfigs: RbacGroupVersion.Group,
ServiceRoles: RbacGroupVersion.Group,
ServiceRoleBindings: RbacGroupVersion.Group,
AuthorizationPolicies: SecurityGroupVersion.Group,
PeerAuthentications: SecurityGroupVersion.Group,
RequestAuthentications: SecurityGroupVersion.Group,
// Extensions
Iter8Experiments: Iter8GroupVersion.Group,
}
ApiToVersion = map[string]string{
NetworkingGroupVersion.Group: ApiNetworkingVersion,
ConfigGroupVersion.Group: ApiConfigVersion,
AuthenticationGroupVersion.Group: ApiAuthenticationVersion,
RbacGroupVersion.Group: ApiRbacVersion,
MaistraAuthenticationGroupVersion.Group: ApiMaistraAuthenticationVersion,
MaistraRbacGroupVersion.Group: ApiMaistraRbacVersion,
SecurityGroupVersion.Group: ApiSecurityVersion,
}
)
// IstioObject is a k8s wrapper interface for config objects.
// Taken from istio.io
type IstioObject interface {
runtime.Object
GetSpec() map[string]interface{}
SetSpec(map[string]interface{})
GetStatus() map[string]interface{}
SetStatus(map[string]interface{})
GetTypeMeta() meta_v1.TypeMeta
SetTypeMeta(meta_v1.TypeMeta)
GetObjectMeta() meta_v1.ObjectMeta
SetObjectMeta(meta_v1.ObjectMeta)
DeepCopyIstioObject() IstioObject
HasWorkloadSelectorLabels() bool
HasMatchLabelsSelector() bool
}
// IstioObjectList is a k8s wrapper interface for list config objects.
// Taken from istio.io
type IstioObjectList interface {
runtime.Object
GetItems() []IstioObject
}
type IstioMeshConfig struct {
DisableMixerHttpReports bool `yaml:"disableMixerHttpReports,omitempty"`
EnableAutoMtls *bool `yaml:"enableAutoMtls,omitempty"`
}
// ServiceList holds list of services, pods and deployments
type ServiceList struct {
Services *core_v1.ServiceList
Pods *core_v1.PodList
Deployments *apps_v1.DeploymentList
}
// ServiceDetails is a wrapper to group full Service description, Endpoints and Pods.
// Used to fetch all details in a single operation instead to invoke individual APIs per each group.
type ServiceDetails struct {
Service *core_v1.Service `json:"service"`
Endpoints *core_v1.Endpoints `json:"endpoints"`
Deployments *apps_v1.DeploymentList `json:"deployments"`
Autoscalers *autoscaling_v1.HorizontalPodAutoscalerList `json:"autoscalers"`
Pods []core_v1.Pod `json:"pods"`
}
// IstioDetails is a wrapper to group all Istio objects related to a Service.
// Used to fetch all Istio information in a single operation instead to invoke individual APIs per each group.
type IstioDetails struct {
VirtualServices []IstioObject `json:"virtualservices"`
DestinationRules []IstioObject `json:"destinationrules"`
ServiceEntries []IstioObject `json:"serviceentries"`
Gateways []IstioObject `json:"gateways"`
Sidecars []IstioObject `json:"sidecars"`
RequestAuthentications []IstioObject `json:"requestauthentications"`
}
// MTLSDetails is a wrapper to group all Istio objects related to non-local mTLS configurations
type MTLSDetails struct {
DestinationRules []IstioObject `json:"destinationrules"`
MeshPeerAuthentications []IstioObject `json:"meshpeerauthentications"`
PeerAuthentications []IstioObject `json:"peerauthentications"`
EnabledAutoMtls bool `json:"enabledautomtls"`
}
// RBACDetails is a wrapper for objects related to Istio RBAC (Role Based Access Control)
type RBACDetails struct {
ClusterRbacConfigs []IstioObject `json:"clusterrbacconfigs"`
ServiceRoles []IstioObject `json:"serviceroles"`
ServiceRoleBindings []IstioObject `json:"servicerolebindings"`
AuthorizationPolicies []IstioObject `json:"authorizationpolicies"`
}
// GenericIstioObject is a type to test Istio types defined by Istio as a Kubernetes extension.
type GenericIstioObject struct {
meta_v1.TypeMeta `json:",inline" yaml:",inline"`
meta_v1.ObjectMeta `json:"metadata" yaml:"metadata"`
Spec map[string]interface{} `json:"spec"`
Status map[string]interface{} `json:"status"`
}
// GenericIstioObjectList is the generic Kubernetes API list wrapper
type GenericIstioObjectList struct {
meta_v1.TypeMeta `json:",inline"`
meta_v1.ListMeta `json:"metadata"`
Items []GenericIstioObject `json:"items"`
}
// GetSpec from a wrapper
func (in *GenericIstioObject) GetSpec() map[string]interface{} {
return in.Spec
}
// SetSpec for a wrapper
func (in *GenericIstioObject) SetSpec(spec map[string]interface{}) {
in.Spec = spec
}
// GetTypeMeta from a wrapper
func (in *GenericIstioObject) GetTypeMeta() meta_v1.TypeMeta {
return in.TypeMeta
}
// SetObjectMeta for a wrapper
func (in *GenericIstioObject) SetTypeMeta(typemeta meta_v1.TypeMeta) {
in.TypeMeta = typemeta
}
// GetObjectMeta from a wrapper
func (in *GenericIstioObject) GetObjectMeta() meta_v1.ObjectMeta {
return in.ObjectMeta
}
// SetObjectMeta for a wrapper
func (in *GenericIstioObject) SetObjectMeta(metadata meta_v1.ObjectMeta) {
in.ObjectMeta = metadata
}
// GetStatus from a wrapper
func (in *GenericIstioObject) GetStatus() map[string]interface{} {
return in.Status
}
// SetStatus for a wrapper
func (in *GenericIstioObject) SetStatus(status map[string]interface{}) {
in.Status = status
}
func (in *GenericIstioObject) HasWorkloadSelectorLabels() bool {
hwsl := false
if ws, found := in.GetSpec()["workloadSelector"]; found {
if wsCasted, ok := ws.(map[string]interface{}); ok {
if _, found := wsCasted["labels"]; found {
hwsl = true
}
}
}
return hwsl
}
func (in *GenericIstioObject) HasMatchLabelsSelector() bool {
hwsl := false
if s, found := in.GetSpec()["selector"]; found {
if sCasted, ok := s.(map[string]interface{}); ok {
if ml, found := sCasted["matchLabels"]; found {
if mlCasted, ok := ml.(map[string]interface{}); ok {
if len(mlCasted) > 0 {
hwsl = true
}
}
}
}
}
return hwsl
}
// GetItems from a wrapper
func (in *GenericIstioObjectList) GetItems() []IstioObject {
out := make([]IstioObject, len(in.Items))
for i := range in.Items {
out[i] = &in.Items[i]
}
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GenericIstioObject) DeepCopyInto(out *GenericIstioObject) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericIstioObject.
func (in *GenericIstioObject) DeepCopy() *GenericIstioObject {
if in == nil {
return nil
}
out := new(GenericIstioObject)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GenericIstioObject) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyIstioObject is an autogenerated deepcopy function, copying the receiver, creating a new IstioObject.
func (in *GenericIstioObject) DeepCopyIstioObject() IstioObject {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GenericIstioObjectList) DeepCopyInto(out *GenericIstioObjectList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]GenericIstioObject, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericIstioObjectList.
func (in *GenericIstioObjectList) DeepCopy() *GenericIstioObjectList {
if in == nil {
return nil
}
out := new(GenericIstioObjectList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *GenericIstioObjectList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
func (imc IstioMeshConfig) GetEnableAutoMtls() bool {
if imc.EnableAutoMtls == nil {
return true
}
return *imc.EnableAutoMtls
}