/
config.go
1368 lines (1226 loc) · 53.9 KB
/
config.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
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package eksconfig defines EKS test configuration.
package eksconfig
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"sync"
"text/template"
"time"
"github.com/aws/aws-k8s-tester/ec2config"
"github.com/aws/aws-k8s-tester/pkg/fileutil"
"github.com/aws/aws-k8s-tester/pkg/logutil"
"github.com/aws/aws-k8s-tester/pkg/randutil"
"github.com/aws/aws-k8s-tester/pkg/terminal"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/mitchellh/colorstring"
"sigs.k8s.io/yaml" // must use "sigs.k8s.io/yaml"
)
// AWS_K8S_TESTER_EKS_PREFIX is the environment variable prefix used for "eksconfig".
const AWS_K8S_TESTER_EKS_PREFIX = "AWS_K8S_TESTER_EKS_"
// EnvironmentVariablePrefixParameters is the environment variable prefix used for "eksconfig".
const EnvironmentVariablePrefixParameters = AWS_K8S_TESTER_EKS_PREFIX + "PARAMETERS_"
// Config defines EKS configuration.
type Config struct {
mu *sync.RWMutex
// Name is the cluster name.
// If empty, deployer auto-populates it.
Name string `json:"name"`
// Partition is the AWS partition for EKS deployment region.
// If empty, set default partition "aws".
Partition string `json:"partition"`
// Region is the AWS geographic area for EKS deployment.
// If empty, set default region.
Region string `json:"region"`
// ConfigPath is the configuration file path.
// Deployer is expected to update this file with latest status.
ConfigPath string `json:"config-path,omitempty"`
// KubectlCommandsOutputPath is the output path for kubectl commands.
KubectlCommandsOutputPath string `json:"kubectl-commands-output-path,omitempty"`
// RemoteAccessCommandsOutputPath is the output path for ssh commands.
RemoteAccessCommandsOutputPath string `json:"remote-access-commands-output-path,omitempty"`
// LogColor is true to output logs in color.
LogColor bool `json:"log-color"`
// LogColorOverride is true to use "LogColor" setting
// even if the current terminal does not support color outputs.
// Useful to output in color in HTML based log outputs (e.g. Prow).
LogColorOverride bool `json:"log-color-override"`
// LogLevel configures log level. Only supports debug, info, warn, error, panic, or fatal. Default 'info'.
LogLevel string `json:"log-level"`
// LogOutputs is a list of log outputs. Valid values are 'default', 'stderr', 'stdout', or file names.
// Logs are appended to the existing file, if any.
// Multiple values are accepted. If empty, it sets to 'default', which outputs to stderr.
// See https://pkg.go.dev/go.uber.org/zap#Open and https://pkg.go.dev/go.uber.org/zap#Config for more details.
LogOutputs []string `json:"log-outputs,omitempty"`
// AWSCLIPath is the path for AWS CLI path.
AWSCLIPath string `json:"aws-cli-path,omitempty"`
// KubectlPath is the path to download the "kubectl".
KubectlPath string `json:"kubectl-path,omitempty"`
// KubectlDownloadURL is the download URL to download "kubectl" binary from.
KubectlDownloadURL string `json:"kubectl-download-url,omitempty"`
// KubeConfigPath is the file path of KUBECONFIG for the EKS cluster.
// If empty, auto-generate one.
// Deployer is expected to delete this on cluster tear down.
KubeConfigPath string `json:"kubeconfig-path,omitempty"`
// AWSIAMAuthenticatorPath is the path to aws-iam-authenticator.
AWSIAMAuthenticatorPath string `json:"aws-iam-authenticator-path,omitempty"`
// AWSIAMAuthenticatorDownloadURL is the download URL to download "aws-iam-authenticator" binary from.
AWSIAMAuthenticatorDownloadURL string `json:"aws-iam-authenticator-download-url,omitempty"`
// OnFailureDelete is true to delete all resources on creation fail.
OnFailureDelete bool `json:"on-failure-delete"`
// OnFailureDeleteWaitSeconds is the seconds to wait before deleting
// all resources on creation fail.
OnFailureDeleteWaitSeconds uint64 `json:"on-failure-delete-wait-seconds"`
// CommandAfterCreateCluster is the command to execute after creating clusters.
// Currently supported variables are:
// - "GetRef.Name" for cluster name
// - "GetRef.ClusterARN" for cluster ARN
CommandAfterCreateCluster string `json:"command-after-create-cluster"`
CommandAfterCreateClusterOutputPath string `json:"command-after-create-cluster-output-path" read-only:"true"`
CommandAfterCreateClusterTimeout time.Duration `json:"command-after-create-cluster-timeout"`
CommandAfterCreateClusterTimeoutString string `json:"command-after-create-cluster-timeout-string" read-only:"true"`
// CommandAfterCreateAddOns is the command to execute after creating clusters and add-ons.
// Currently supported variables are:
// - "GetRef.Name" for cluster name
// - "GetRef.ClusterARN" for cluster ARN
CommandAfterCreateAddOns string `json:"command-after-create-add-ons"`
CommandAfterCreateAddOnsOutputPath string `json:"command-after-create-add-ons-output-path" read-only:"true"`
CommandAfterCreateAddOnsTimeout time.Duration `json:"command-after-create-add-ons-timeout"`
CommandAfterCreateAddOnsTimeoutString string `json:"command-after-create-add-ons-timeout-string" read-only:"true"`
// S3BucketCreate is true to auto-create S3 bucket.
S3BucketCreate bool `json:"s3-bucket-create"`
// S3BucketCreateKeep is true to not delete auto-created S3 bucket.
// The created S3 bucket is kept.
S3BucketCreateKeep bool `json:"s3-bucket-create-keep"`
// S3BucketName is the name of cluster S3.
S3BucketName string `json:"s3-bucket-name"`
// S3BucketLifecycleExpirationDays is expiration in days for the lifecycle of the object.
S3BucketLifecycleExpirationDays int64 `json:"s3-bucket-lifecycle-expiration-days"`
// CWNamespace is the CloudWatch namespace to put metric datum.
CWNamespace string `json:"cw-namespace"`
// SkipDeleteClusterAndNodes is true to skip EKS "cluster" and "nodes" deletion.
// The created EKS "cluster" and all resources created "before" cluster are kept.
// For example, CMK key, VPC, IAM role are not deleted if cluster is to be kept.
// All node groups and managed node groups are kept.
// Use this to use existing clusters to create/delete add-ons.
SkipDeleteClusterAndNodes bool `json:"skip-delete-cluster-and-nodes"`
// Parameters defines EKS "cluster" creation parameters.
// It's ok to leave any parameters empty.
// If empty, it will use default values.
Parameters *Parameters `json:"parameters,omitempty"`
// RemoteAccessKeyCreate is true to create the remote SSH access private key.
RemoteAccessKeyCreate bool `json:"remote-access-key-create"`
// RemoteAccessKeyName is the key name for node group SSH EC2 key pair.
// ref. https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html
// ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html
RemoteAccessKeyName string `json:"remote-access-key-name,omitempty"`
// RemoteAccessPrivateKeyPath is the file path to store node group key pair private key.
// Thus, deployer must delete the private key right after node group creation.
// MAKE SURE PRIVATE KEY NEVER GETS UPLOADED TO CLOUD STORAGE AND DELETE AFTER USE!!!
// ref. https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html
// ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html
RemoteAccessPrivateKeyPath string `json:"remote-access-private-key-path,omitempty"`
// Clients is the number of kubernetes clients to create.
// Default is 1.
// This field is used for "eks/stresser" tester. Configure accordingly.
// Rate limit is done via "k8s.io/client-go/util/flowcontrol.NewTokenBucketRateLimiter".
Clients int `json:"clients"`
// ClientQPS is the QPS for kubernetes client.
// To use while talking with kubernetes apiserver.
//
// Kubernetes client DefaultQPS is 5.
// Kubernetes client DefaultBurst is 10.
// ref. https://github.com/kubernetes/kubernetes/blob/4d0e86f0b8d1eae00a202009858c8739e4c9402e/staging/src/k8s.io/client-go/rest/config.go#L43-L46
//
// kube-apiserver default inflight requests limits are:
// FLAG: --max-mutating-requests-inflight="200"
// FLAG: --max-requests-inflight="400"
// ref. https://github.com/kubernetes/kubernetes/blob/4d0e86f0b8d1eae00a202009858c8739e4c9402e/staging/src/k8s.io/apiserver/pkg/server/config.go#L300-L301
//
// This field is used for "eks/stresser" tester. Configure accordingly.
// Rate limit is done via "k8s.io/client-go/util/flowcontrol.NewTokenBucketRateLimiter".
ClientQPS float32 `json:"client-qps"`
// ClientBurst is the burst for kubernetes client.
// To use while talking with kubernetes apiserver
//
// Kubernetes client DefaultQPS is 5.
// Kubernetes client DefaultBurst is 10.
// ref. https://github.com/kubernetes/kubernetes/blob/4d0e86f0b8d1eae00a202009858c8739e4c9402e/staging/src/k8s.io/client-go/rest/config.go#L43-L46
//
// kube-apiserver default inflight requests limits are:
// FLAG: --max-mutating-requests-inflight="200"
// FLAG: --max-requests-inflight="400"
// ref. https://github.com/kubernetes/kubernetes/blob/4d0e86f0b8d1eae00a202009858c8739e4c9402e/staging/src/k8s.io/apiserver/pkg/server/config.go#L300-L301
//
// This field is used for "eks/stresser" tester. Configure accordingly.
// Rate limit is done via "k8s.io/client-go/util/flowcontrol.NewTokenBucketRateLimiter".
ClientBurst int `json:"client-burst"`
// ClientTimeout is the client timeout.
ClientTimeout time.Duration `json:"client-timeout"`
ClientTimeoutString string `json:"client-timeout-string,omitempty" read-only:"true"`
// AddOnNodeGroups defines EKS "Node Group"
// creation parameters.
AddOnNodeGroups *AddOnNodeGroups `json:"add-on-node-groups,omitempty"`
// AddOnManagedNodeGroups defines EKS "Managed Node Group"
// creation parameters. If empty, it will use default values.
// ref. https://docs.aws.amazon.com/eks/latest/userguide/create-managed-node-group.html
// ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html
AddOnManagedNodeGroups *AddOnManagedNodeGroups `json:"add-on-managed-node-groups,omitempty"`
// TotalNodes is the total number of nodes from all node groups.
TotalNodes int64 `json:"total-nodes" read-only:"true"`
TotalHollowNodes int64 `json:"total-hollow-nodes" read-only:"true"`
// AddOnCNIVPC defines parameters for https://github.com/aws/amazon-vpc-cni-k8s.
AddOnCNIVPC *AddOnCNIVPC `json:"add-on-cni-vpc"`
// AddOnCWAgent defines parameters for EKS cluster
// add-on Fluentd.
AddOnCWAgent *AddOnCWAgent `json:"add-on-cw-agent,omitempty"`
// AddOnFluentd defines parameters for EKS cluster
// add-on Fluentd.
AddOnFluentd *AddOnFluentd `json:"add-on-fluentd,omitempty"`
// AddOnMetricsServer defines parameters for EKS cluster
// add-on metrics server.
AddOnMetricsServer *AddOnMetricsServer `json:"add-on-metrics-server,omitempty"`
// AddOnConformance defines parameters for EKS cluster
// add-on Conformance.
AddOnConformance *AddOnConformance `json:"add-on-conformance,omitempty"`
// AddOnAppMesh defines parameters for EKS cluster
// add-on "EKS App Mesh Integration".
AddOnAppMesh *AddOnAppMesh `json:"add-on-app-mesh,omitempty"`
// AddOnCSIEBS defines parameters for EKS cluster
// add-on AWS EBS CSI Driver.
AddOnCSIEBS *AddOnCSIEBS `json:"add-on-csi-ebs,omitempty"`
// AddOnKubernetesDashboard defines parameters for EKS cluster
// add-on Dashboard.
AddOnKubernetesDashboard *AddOnKubernetesDashboard `json:"add-on-kubernetes-dashboard,omitempty"`
// AddOnPrometheusGrafana defines parameters for EKS cluster
// add-on Prometheus/Grafana.
AddOnPrometheusGrafana *AddOnPrometheusGrafana `json:"add-on-prometheus-grafana,omitempty"`
// AddOnPHPApache defines parameters for EKS cluster
// add-on PHP Apache.
AddOnPHPApache *AddOnPHPApache `json:"add-on-php-apache,omitempty"`
// AddOnNLBHelloWorld defines parameters for EKS cluster
// add-on NLB hello-world service.
AddOnNLBHelloWorld *AddOnNLBHelloWorld `json:"add-on-nlb-hello-world,omitempty"`
// AddOnNLBGuestbook defines parameters for EKS cluster
// add-on NLB guestbook service.
// ref. https://docs.aws.amazon.com/eks/latest/userguide/eks-guestbook.html
AddOnNLBGuestbook *AddOnNLBGuestbook `json:"add-on-nlb-guestbook,omitempty"`
// AddOnALB2048 defines parameters for EKS cluster
// add-on ALB 2048 service.
AddOnALB2048 *AddOnALB2048 `json:"add-on-alb-2048,omitempty"`
// AddOnJobsPi defines parameters for EKS cluster
// add-on Job with pi Perl command.
AddOnJobsPi *AddOnJobsPi `json:"add-on-jobs-pi,omitempty"`
// AddOnJobsEcho defines parameters for EKS cluster
// add-on Job with echo.
AddOnJobsEcho *AddOnJobsEcho `json:"add-on-jobs-echo,omitempty"`
// AddOnCronJobs defines parameters for EKS cluster
// add-on with CronJob.
AddOnCronJobs *AddOnCronJobs `json:"add-on-cron-jobs,omitempty"`
// AddOnCSRsLocal defines parameters for EKS cluster
// add-on "CertificateSigningRequest" local.
// It generates loads from the local host machine.
AddOnCSRsLocal *AddOnCSRsLocal `json:"add-on-csrs-local,omitempty"`
// AddOnCSRsRemote defines parameters for EKS cluster
// add-on "CertificateSigningRequest" remote.
// It generates loads from the remote workers (Pod) in the cluster.
AddOnCSRsRemote *AddOnCSRsRemote `json:"add-on-csrs-remote,omitempty"`
// AddOnConfigmapsLocal defines parameters for EKS cluster
// add-on "ConfigMap" local.
// It generates loads from the local host machine.
AddOnConfigmapsLocal *AddOnConfigmapsLocal `json:"add-on-configmaps-local,omitempty"`
// AddOnConfigmapsRemote defines parameters for EKS cluster
// add-on "ConfigMap" remote.
// It generates loads from the remote workers (Pod) in the cluster.
AddOnConfigmapsRemote *AddOnConfigmapsRemote `json:"add-on-configmaps-remote,omitempty"`
// AddOnSecretsLocal defines parameters for EKS cluster
// add-on "Secrets" local.
// It generates loads from the local host machine.
AddOnSecretsLocal *AddOnSecretsLocal `json:"add-on-secrets-local,omitempty"`
// AddOnSecretsRemote defines parameters for EKS cluster
// add-on "Secrets" remote.
// It generates loads from the remote workers (Pod) in the cluster.
AddOnSecretsRemote *AddOnSecretsRemote `json:"add-on-secrets-remote,omitempty"`
// AddOnFargate defines parameters for EKS cluster
// add-on "EKS on Fargate".
AddOnFargate *AddOnFargate `json:"add-on-fargate,omitempty"`
// AddOnIRSA defines parameters for EKS cluster
// add-on "IAM Roles for Service Accounts (IRSA)".
AddOnIRSA *AddOnIRSA `json:"add-on-irsa,omitempty"`
// AddOnIRSAFargate defines parameters for EKS cluster
// add-on "IAM Roles for Service Accounts (IRSA)" with Fargate.
AddOnIRSAFargate *AddOnIRSAFargate `json:"add-on-irsa-fargate,omitempty"`
// AddOnWordpress defines parameters for EKS cluster
// add-on WordPress.
AddOnWordpress *AddOnWordpress `json:"add-on-wordpress,omitempty"`
// AddOnJupyterHub defines parameters for EKS cluster
// add-on JupyterHub.
AddOnJupyterHub *AddOnJupyterHub `json:"add-on-jupyter-hub,omitempty"`
// AddOnKubeflow defines parameters for EKS cluster
// add-on Kubeflow.
AddOnKubeflow *AddOnKubeflow `json:"add-on-kubeflow,omitempty"`
// AddOnCUDAVectorAdd defines parameters for EKS cluster
// add-on cuda-vector-add.
AddOnCUDAVectorAdd *AddOnCUDAVectorAdd `json:"add-on-cuda-vector-add,omitempty"`
// AddOnClusterLoaderLocal defines parameters for EKS cluster
// add-on cluster loader local.
// It generates loads from the local host machine.
// ref. https://github.com/kubernetes/perf-tests/tree/master/clusterloader2
AddOnClusterLoaderLocal *AddOnClusterLoaderLocal `json:"add-on-cluster-loader-local,omitempty"`
// AddOnClusterLoaderRemote defines parameters for EKS cluster
// add-on cluster loader remote.
// It generates loads from the remote host machine.
// ref. https://github.com/kubernetes/perf-tests/tree/master/clusterloader2
AddOnClusterLoaderRemote *AddOnClusterLoaderRemote `json:"add-on-cluster-loader-remote,omitempty"`
// AddOnHollowNodesLocal defines parameters for EKS cluster
// add-on hollow nodes local.
// It generates loads from the local host machine.
AddOnHollowNodesLocal *AddOnHollowNodesLocal `json:"add-on-hollow-nodes-local,omitempty"`
// AddOnHollowNodesRemote defines parameters for EKS cluster
// add-on hollow nodes remote.
// It generates loads from the remote workers (Pod) in the cluster.
AddOnHollowNodesRemote *AddOnHollowNodesRemote `json:"add-on-hollow-nodes-remote,omitempty"`
// AddOnStresserLocal defines parameters for EKS cluster
// add-on cluster loader local.
// It generates loads from the local host machine.
// ref. https://github.com/kubernetes/perf-tests
AddOnStresserLocal *AddOnStresserLocal `json:"add-on-stresser-local,omitempty"`
// AddOnStresserRemote defines parameters for EKS cluster
// add-on cluster loader remote.
// It generates loads from the remote workers (Pod) in the cluster.
// ref. https://github.com/kubernetes/perf-tests
AddOnStresserRemote *AddOnStresserRemote `json:"add-on-stresser-remote,omitempty"`
// AddOnClusterVersionUpgrade defines parameters
// for EKS cluster version upgrade add-on.
AddOnClusterVersionUpgrade *AddOnClusterVersionUpgrade `json:"add-on-cluster-version-upgrade,omitempty"`
// Status represents the current status of AWS resources.
// Status is read-only.
// Status cannot be configured via environmental variables.
Status *Status `json:"status,omitempty" read-only:"true"`
}
// Colorize prints colorized input, if color output is supported.
func (c Config) Colorize(input string) string {
colorize := colorstring.Colorize{
Colors: colorstring.DefaultColors,
Disable: !c.LogColor,
Reset: true,
}
return colorize.Color(input)
}
// Parameters defines EKS "cluster" creation parameters.
// It's ok to leave any parameters empty.
// If empty, it will use default values.
type Parameters struct {
// RoleName is the name of cluster role.
RoleName string `json:"role-name"`
// RoleCreate is true to auto-create and delete cluster role.
RoleCreate bool `json:"role-create"`
// RoleARN is the role ARN that EKS uses to create AWS resources for Kubernetes.
// By default, it's empty which triggers tester to create one.
RoleARN string `json:"role-arn"`
// RoleServicePrincipals is the EKS Role Service Principals
RoleServicePrincipals []string `json:"role-service-principals"`
// RoleManagedPolicyARNs is EKS Role managed policy ARNs.
RoleManagedPolicyARNs []string `json:"role-managed-policy-arns"`
RoleCFNStackID string `json:"role-cfn-stack-id" read-only:"true"`
RoleCFNStackYAMLPath string `json:"role-cfn-stack-yaml-path" read-only:"true"`
RoleCFNStackYAMLS3Key string `json:"role-cfn-stack-yaml-s3-key" read-only:"true"`
// Tags defines EKS create cluster tags.
Tags map[string]string `json:"tags"`
// RequestHeaderKey defines EKS create cluster request header key.
RequestHeaderKey string `json:"request-header-key"`
// RequestHeaderValue defines EKS create cluster request header value.
RequestHeaderValue string `json:"request-header-value"`
// ResolverURL defines an AWS resolver endpoint for EKS API.
// Must be left empty to use production EKS service.
ResolverURL string `json:"resolver-url"`
// SigningName is the EKS create request signing name.
SigningName string `json:"signing-name"`
// VPCCreate is true to auto-create and delete VPC.
VPCCreate bool `json:"vpc-create"`
// VPCID is the VPC ID for cluster creation.
// If not empty, VPC is reused and not deleted.
// If empty, VPC is created anew and deleted on cluster deletion.
VPCID string `json:"vpc-id"`
VPCCFNStackID string `json:"vpc-cfn-stack-id" read-only:"true"`
VPCCFNStackYAMLPath string `json:"vpc-cfn-stack-yaml-path" read-only:"true"`
VPCCFNStackYAMLS3Key string `json:"vpc-cfn-stack-yaml-s3-key" read-only:"true"`
// VpcCIDR is the IP range (CIDR notation) for VPC, must be a valid private
// (RFC 1918) CIDR range.
VPCCIDR string `json:"vpc-cidr,omitempty"`
// PublicSubnetCIDR1 is the CIDR Block for subnet 1 within the VPC.
PublicSubnetCIDR1 string `json:"public-subnet-cidr-1,omitempty"`
// PublicSubnetCIDR2 is the CIDR Block for subnet 2 within the VPC.
PublicSubnetCIDR2 string `json:"public-subnet-cidr-2,omitempty"`
// PublicSubnetCIDR3 is the CIDR Block for subnet 3 within the VPC.
PublicSubnetCIDR3 string `json:"public-subnet-cidr-3,omitempty"`
// PrivateSubnetCIDR1 is the CIDR Block for subnet 1 within the VPC.
PrivateSubnetCIDR1 string `json:"private-subnet-cidr-1,omitempty"`
// PrivateSubnetCIDR2 is the CIDR Block for subnet 2 within the VPC.
PrivateSubnetCIDR2 string `json:"private-subnet-cidr-2,omitempty"`
// PublicSubnetIDs is the list of all public subnets in the VPC.
PublicSubnetIDs []string `json:"public-subnet-ids" read-only:"true"`
// PrivateSubnetIDs is the list of all private subnets in the VPC.
PrivateSubnetIDs []string `json:"private-subnet-ids" read-only:"true"`
// DHCPOptionsDomainName is used to complete unqualified DNS hostnames for VPC.
// ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html
// ref. https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
DHCPOptionsDomainName string `json:"dhcp-options-domain-name"`
// DHCPOptionsDomainNameServers is a list of strings.
// The IPv4 addresses of up to four domain name servers, or AmazonProvidedDNS, for VPC.
// ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html
// ref. https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
DHCPOptionsDomainNameServers []string `json:"dhcp-options-domain-name-servers"`
// Version is the version of EKS Kubernetes "cluster".
// If empty, set default version.
Version string `json:"version"`
VersionValue float64 `json:"version-value" read-only:"true"`
// EncryptionCMKCreate is true to auto-create and delete KMS CMK
// for encryption feature.
EncryptionCMKCreate bool `json:"encryption-cmk-create"`
// EncryptionCMKARN is the KMS CMK ARN for encryption feature.
// If not empty, the cluster is created with encryption feature
// enabled.
EncryptionCMKARN string `json:"encryption-cmk-arn"`
}
func getDefaultParameters() *Parameters {
return &Parameters{
RoleCreate: true,
VPCCreate: true,
SigningName: "eks",
Version: "1.17",
EncryptionCMKCreate: true,
}
}
// Load loads configuration from YAML.
// Useful when injecting shared configuration via ConfigMap.
//
// Example usage:
//
// import "github.com/aws/aws-k8s-tester/eksconfig"
// cfg := eksconfig.Load("test.yaml")
// err := cfg.ValidateAndSetDefaults()
//
// Do not set default values in this function.
// "ValidateAndSetDefaults" must be called separately,
// to prevent overwriting previous data when loaded from disks.
func Load(p string) (cfg *Config, err error) {
var d []byte
d, err = ioutil.ReadFile(p)
if err != nil {
return nil, err
}
cfg = new(Config)
if err = yaml.Unmarshal(d, cfg); err != nil {
return nil, err
}
cfg.mu = new(sync.RWMutex)
if cfg.ConfigPath != p {
cfg.ConfigPath = p
}
var ap string
ap, err = filepath.Abs(p)
if err != nil {
return nil, err
}
cfg.ConfigPath = ap
cfg.unsafeSync()
return cfg, nil
}
// EvaluateCommandRefs updates "CommandAfterCreateCluster" and "CommandAfterCreateAddOns".
// currently, only support "GetRef.Name" and "GetRef.ClusterARN"
func (cfg *Config) EvaluateCommandRefs() error {
cfg.mu.Lock()
err := cfg.evaluateCommandRefs()
cfg.mu.Unlock()
return err
}
func (cfg *Config) evaluateCommandRefs() error {
if cfg.CommandAfterCreateCluster != "" {
ss := strings.Split(cfg.CommandAfterCreateCluster, " ")
p, err := exec.LookPath(ss[0])
if err != nil {
return fmt.Errorf("%q does not exist (%v)", ss[0], err)
}
ss[0] = p
cfg.CommandAfterCreateCluster = strings.Join(ss, " ")
}
if cfg.CommandAfterCreateAddOns != "" {
ss := strings.Split(cfg.CommandAfterCreateAddOns, " ")
p, err := exec.LookPath(ss[0])
if err != nil {
return fmt.Errorf("%q does not exist (%v)", ss[0], err)
}
ss[0] = p
cfg.CommandAfterCreateAddOns = strings.Join(ss, " ")
}
if cfg.Name != "" && strings.Contains(cfg.CommandAfterCreateCluster, "GetRef.Name") {
cfg.CommandAfterCreateCluster = strings.ReplaceAll(cfg.CommandAfterCreateCluster, "GetRef.Name", cfg.Name)
}
if cfg.Status != nil && cfg.Status.ClusterARN != "" && strings.Contains(cfg.CommandAfterCreateCluster, "GetRef.ClusterARN") {
cfg.CommandAfterCreateCluster = strings.ReplaceAll(cfg.CommandAfterCreateCluster, "GetRef.ClusterARN", cfg.Status.ClusterARN)
}
if cfg.Name != "" && strings.Contains(cfg.CommandAfterCreateAddOns, "GetRef.Name") {
cfg.CommandAfterCreateAddOns = strings.ReplaceAll(cfg.CommandAfterCreateAddOns, "GetRef.Name", cfg.Name)
}
if cfg.Status != nil && cfg.Status.ClusterARN != "" && strings.Contains(cfg.CommandAfterCreateAddOns, "GetRef.ClusterARN") {
cfg.CommandAfterCreateAddOns = strings.ReplaceAll(cfg.CommandAfterCreateAddOns, "GetRef.ClusterARN", cfg.Status.ClusterARN)
}
return cfg.unsafeSync()
}
// Sync persists current configuration and states to disk.
func (cfg *Config) Sync() (err error) {
cfg.mu.Lock()
defer cfg.mu.Unlock()
return cfg.unsafeSync()
}
func (cfg *Config) unsafeSync() (err error) {
var p string
if cfg.ConfigPath != "" && !filepath.IsAbs(cfg.ConfigPath) {
p, err = filepath.Abs(cfg.ConfigPath)
if err != nil {
return fmt.Errorf("failed to 'filepath.Abs(%s)' %v", cfg.ConfigPath, err)
}
cfg.ConfigPath = p
}
if cfg.KubeConfigPath != "" && !filepath.IsAbs(cfg.KubeConfigPath) {
p, err = filepath.Abs(cfg.KubeConfigPath)
if err != nil {
return fmt.Errorf("failed to 'filepath.Abs(%s)' %v", cfg.KubeConfigPath, err)
}
cfg.KubeConfigPath = p
}
var d []byte
d, err = yaml.Marshal(cfg)
if err != nil {
return fmt.Errorf("failed to 'yaml.Marshal' %v", err)
}
err = ioutil.WriteFile(cfg.ConfigPath, d, 0600)
if err != nil {
return fmt.Errorf("failed to write file %q (%v)", cfg.ConfigPath, err)
}
if cfg.RemoteAccessCommandsOutputPath != "" {
err = ioutil.WriteFile(cfg.RemoteAccessCommandsOutputPath, []byte(cmdTop+cfg.unsafeSSHCommands()), 0600)
if err != nil {
return fmt.Errorf("failed to write RemoteAccessCommandsOutputPath %q (%v)", cfg.RemoteAccessCommandsOutputPath, err)
}
}
if cfg.KubectlCommandsOutputPath != "" {
err = ioutil.WriteFile(cfg.KubectlCommandsOutputPath, []byte(cmdTop+cfg.KubectlCommands()), 0600)
if err != nil {
return fmt.Errorf("failed to write KubectlCommandsOutputPath %q (%v)", cfg.KubectlCommandsOutputPath, err)
}
}
return nil
}
const cmdTop = `#!/bin/bash
set -e
set -x
`
// KubectlCommand returns the kubectl command.
func (cfg *Config) KubectlCommand() string {
return fmt.Sprintf("%s --kubeconfig=%s", cfg.KubectlPath, cfg.KubeConfigPath)
}
// KubectlCommands returns the various kubectl commands.
func (cfg *Config) KubectlCommands() (s string) {
if cfg.KubeConfigPath == "" {
return ""
}
tpl := template.Must(template.New("kubectlTmpl").Parse(kubectlTmpl))
buf := bytes.NewBuffer(nil)
if err := tpl.Execute(buf, struct {
KubeConfigPath string
KubectlCommand string
KubernetesDashboardEnabled bool
KubernetesDashboardURL string
KubernetesDashboardAuthenticationToken string
}{
cfg.KubeConfigPath,
cfg.KubectlCommand(),
cfg.IsEnabledAddOnKubernetesDashboard(),
cfg.getAddOnKubernetesDashboardURL(),
cfg.getAddOnKubernetesDashboardAuthenticationToken(),
}); err != nil {
return ""
}
return buf.String()
}
const kubectlTmpl = `
###########################
# kubectl commands
export KUBECONFIG={{ .KubeConfigPath }}
export KUBECTL="{{ .KubectlCommand }}"
{{ .KubectlCommand }} version
{{ .KubectlCommand }} cluster-info
{{ .KubectlCommand }} get cs
{{ .KubectlCommand }} --namespace=kube-system get pods
{{ .KubectlCommand }} --namespace=kube-system get ds
{{ .KubectlCommand }} get pods
{{ .KubectlCommand }} get csr -o=yaml
{{ .KubectlCommand }} get nodes --show-labels -o=wide
{{ .KubectlCommand }} get nodes -o=wide
###########################
{{ if .KubernetesDashboardEnabled }}
###########################
{{ .KubectlCommand }} proxy
# Kubernetes Dashboard URL:
{{ .KubernetesDashboardURL }}
# Kubernetes Dashboard Authentication Token:
{{ .KubernetesDashboardAuthenticationToken }}
###########################
{{ end }}
`
// SSHCommands returns the SSH commands.
func (cfg *Config) SSHCommands() string {
cfg.mu.RLock()
defer cfg.mu.RUnlock()
return cfg.unsafeSSHCommands()
}
func (cfg *Config) unsafeSSHCommands() (s string) {
buf := bytes.NewBuffer(nil)
buf.WriteByte('\n')
if cfg.AddOnNodeGroups != nil && cfg.AddOnNodeGroups.Enable {
for name, cur := range cfg.AddOnNodeGroups.ASGs {
if len(cur.Instances) == 0 {
buf.WriteString(fmt.Sprintf("no ASG instances found for node group %s\n", name))
continue
}
buf.WriteString("ASG name from node group \"" + name + "\":\n")
asg := &ec2config.ASG{
Name: name,
Instances: cur.Instances,
}
buf.WriteString(asg.SSHCommands(cfg.Region, cfg.RemoteAccessPrivateKeyPath, cfg.AddOnNodeGroups.ASGs[name].RemoteAccessUserName))
buf.WriteString("\n\n")
}
}
if cfg.AddOnManagedNodeGroups != nil && cfg.AddOnManagedNodeGroups.Enable {
for name, cur := range cfg.AddOnManagedNodeGroups.MNGs {
if len(cur.Instances) == 0 {
buf.WriteString(fmt.Sprintf("no ASG instances found for managed node group %s\n", name))
continue
}
buf.WriteString("ASG name from managed node group \"" + name + "\":\n")
asg := &ec2config.ASG{
Name: name,
Instances: cur.Instances,
}
buf.WriteString(asg.SSHCommands(cfg.Region, cfg.RemoteAccessPrivateKeyPath, cfg.AddOnManagedNodeGroups.MNGs[name].RemoteAccessUserName))
buf.WriteString("\n\n")
}
}
return buf.String()
}
const (
// DefaultClients is the default number of clients to create.
DefaultClients = 2
// DefaultClientQPS is the default client QPS.
DefaultClientQPS float32 = 10
// DefaultClientBurst is the default client burst.
DefaultClientBurst = 20
// DefaultClientTimeout is the default client timeout.
DefaultClientTimeout = 15 * time.Second
DefaultCommandAfterCreateClusterTimeout = 3 * time.Minute
DefaultCommandAfterCreateAddOnsTimeout = 3 * time.Minute
// DefaultNodeInstanceTypeCPU is the default EC2 instance type for CPU worker node.
DefaultNodeInstanceTypeCPU = "c5.xlarge"
// DefaultNodeInstanceTypeGPU is the default EC2 instance type for GPU worker node.
DefaultNodeInstanceTypeGPU = "p3.8xlarge"
// DefaultNodeVolumeSize is the default EC2 instance volume size for a worker node.
DefaultNodeVolumeSize = 40
// NGsMaxLimit is the maximum number of "Node Group"s per a EKS cluster.
NGsMaxLimit = 10
// NGMaxLimit is the maximum number of nodes per a "Node Group".
NGMaxLimit = 5000
// MNGsMaxLimit is the maximum number of "Managed Node Group"s per a EKS cluster.
MNGsMaxLimit = 10
// MNGMaxLimit is the maximum number of nodes per a "Managed Node Group".
MNGMaxLimit = 100
)
// NewDefault returns a default configuration.
// - empty string creates a non-nil object for pointer-type field
// - omitting an entire field returns nil value
// - make sure to check both
func NewDefault() *Config {
name := fmt.Sprintf("eks-%s-%s", getTS()[:10], randutil.String(12))
if v := os.Getenv(AWS_K8S_TESTER_EKS_PREFIX + "NAME"); v != "" {
name = v
}
cfg := Config{
mu: new(sync.RWMutex),
Name: name,
Partition: endpoints.AwsPartitionID,
Region: endpoints.UsWest2RegionID,
// to be auto-generated
ConfigPath: "",
KubectlCommandsOutputPath: "",
KubeConfigPath: "",
AWSCLIPath: "",
LogColor: true,
LogColorOverride: false,
LogLevel: logutil.DefaultLogLevel,
// default, stderr, stdout, or file name
// log file named with cluster name will be added automatically
LogOutputs: []string{"stderr"},
// https://github.com/kubernetes/kubernetes/tags
// https://kubernetes.io/docs/tasks/tools/install-kubectl/
// https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html
KubectlPath: "/tmp/kubectl-test-v1.17.6",
KubectlDownloadURL: "https://storage.googleapis.com/kubernetes-release/release/v1.17.6/bin/linux/amd64/kubectl",
OnFailureDelete: true,
OnFailureDeleteWaitSeconds: 120,
S3BucketName: "",
S3BucketCreate: true,
S3BucketCreateKeep: true,
S3BucketLifecycleExpirationDays: 0,
CWNamespace: "aws-k8s-tester-eks",
SkipDeleteClusterAndNodes: false,
Parameters: getDefaultParameters(),
RemoteAccessKeyCreate: true,
// keep in-sync with the default value in https://pkg.go.dev/k8s.io/kubernetes/test/e2e/framework#GetSigner
// RemoteAccessPrivateKeyPath: filepath.Join(homedir.HomeDir(), ".ssh", "kube_aws_rsa"),
RemoteAccessPrivateKeyPath: filepath.Join(os.TempDir(), randutil.String(15)+".insecure.key"),
// Kubernetes client DefaultQPS is 5.
// Kubernetes client DefaultBurst is 10.
// ref. https://github.com/kubernetes/kubernetes/blob/4d0e86f0b8d1eae00a202009858c8739e4c9402e/staging/src/k8s.io/client-go/rest/config.go#L43-L46
//
// kube-apiserver default inflight requests limits are:
// FLAG: --max-mutating-requests-inflight="200"
// FLAG: --max-requests-inflight="400"
// ref. https://github.com/kubernetes/kubernetes/blob/4d0e86f0b8d1eae00a202009858c8739e4c9402e/staging/src/k8s.io/apiserver/pkg/server/config.go#L300-L301
//
Clients: DefaultClients,
ClientQPS: DefaultClientQPS,
ClientBurst: DefaultClientBurst,
AddOnNodeGroups: getDefaultAddOnNodeGroups(name),
AddOnManagedNodeGroups: getDefaultAddOnManagedNodeGroups(name),
AddOnCNIVPC: getDefaultAddOnCNIVPC(),
AddOnCWAgent: getDefaultAddOnCWAgent(),
AddOnFluentd: getDefaultAddOnFluentd(),
AddOnMetricsServer: getDefaultAddOnMetricsServer(),
AddOnConformance: getDefaultAddOnConformance(),
AddOnAppMesh: getDefaultAddOnAppMesh(),
AddOnCSIEBS: getDefaultAddOnCSIEBS(),
AddOnKubernetesDashboard: getDefaultAddOnKubernetesDashboard(),
AddOnPrometheusGrafana: getDefaultAddOnPrometheusGrafana(),
AddOnPHPApache: getDefaultAddOnPHPApache(),
AddOnNLBHelloWorld: getDefaultAddOnNLBHelloWorld(),
AddOnNLBGuestbook: getDefaultAddOnNLBGuestbook(),
AddOnALB2048: getDefaultAddOnALB2048(),
AddOnJobsPi: getDefaultAddOnJobsPi(),
AddOnJobsEcho: getDefaultAddOnJobsEcho(),
AddOnCronJobs: getDefaultAddOnCronJobs(),
AddOnCSRsLocal: getDefaultAddOnCSRsLocal(),
AddOnCSRsRemote: getDefaultAddOnCSRsRemote(),
AddOnConfigmapsLocal: getDefaultAddOnConfigmapsLocal(),
AddOnConfigmapsRemote: getDefaultAddOnConfigmapsRemote(),
AddOnSecretsLocal: getDefaultAddOnSecretsLocal(),
AddOnSecretsRemote: getDefaultAddOnSecretsRemote(),
AddOnFargate: getDefaultAddOnFargate(),
AddOnIRSA: getDefaultAddOnIRSA(),
AddOnIRSAFargate: getDefaultAddOnIRSAFargate(),
AddOnWordpress: getDefaultAddOnWordpress(),
AddOnJupyterHub: getDefaultAddOnJupyterHub(),
AddOnKubeflow: getDefaultAddOnKubeflow(),
AddOnCUDAVectorAdd: getDefaultAddOnCUDAVectorAdd(),
AddOnClusterLoaderLocal: getDefaultAddOnClusterLoaderLocal(),
AddOnClusterLoaderRemote: getDefaultAddOnClusterLoaderRemote(),
AddOnHollowNodesLocal: getDefaultAddOnHollowNodesLocal(),
AddOnHollowNodesRemote: getDefaultAddOnHollowNodesRemote(),
AddOnStresserLocal: getDefaultAddOnStresserLocal(),
AddOnStresserRemote: getDefaultAddOnStresserRemote(),
AddOnClusterVersionUpgrade: getDefaultAddOnClusterVersionUpgrade(),
// read-only
Status: &Status{
Up: false,
PrivateDNSToNodeInfo: make(map[string]NodeInfo),
},
}
// https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html
// pip3 install awscli --no-cache-dir --upgrade
var err error
cfg.AWSCLIPath, err = exec.LookPath("aws")
if err != nil {
panic(fmt.Errorf("aws CLI is not installed (%v)", err))
}
if runtime.GOOS == "darwin" {
cfg.KubectlDownloadURL = strings.Replace(cfg.KubectlDownloadURL, "linux", "darwin", -1)
}
return &cfg
}
// ValidateAndSetDefaults returns an error for invalid configurations.
// And updates empty fields with default values.
// At the end, it writes populated YAML to aws-k8s-tester config path.
// "read-only" fields cannot be set, causing errors.
func (cfg *Config) ValidateAndSetDefaults() error {
if cfg.mu == nil {
cfg.mu = new(sync.RWMutex)
}
cfg.mu.Lock()
defer func() {
cfg.unsafeSync()
cfg.mu.Unlock()
}()
if err := cfg.validateConfig(); err != nil {
return fmt.Errorf("validateConfig failed [%v]", err)
}
if err := cfg.validateParameters(); err != nil {
return fmt.Errorf("validateParameters failed [%v]", err)
}
if err := cfg.validateAddOnNodeGroups(); err != nil {
return fmt.Errorf("validateAddOnNodeGroups failed [%v]", err)
}
if err := cfg.validateAddOnManagedNodeGroups(); err != nil {
return fmt.Errorf("validateAddOnManagedNodeGroups failed [%v]", err)
}
total := int64(0)
if cfg.IsEnabledAddOnNodeGroups() {
for _, cur := range cfg.AddOnNodeGroups.ASGs {
total += cur.ASGDesiredCapacity
}
}
if cfg.IsEnabledAddOnManagedNodeGroups() {
for _, cur := range cfg.AddOnManagedNodeGroups.MNGs {
total += int64(cur.ASGDesiredCapacity)
}
}
cfg.TotalNodes = total
totalHollowNodes := int64(0)
if cfg.IsEnabledAddOnHollowNodesLocal() {
totalHollowNodes += int64(cfg.AddOnHollowNodesLocal.Nodes)
}
if cfg.IsEnabledAddOnHollowNodesRemote() {
totalHollowNodes += int64(cfg.AddOnHollowNodesRemote.Nodes) * int64(cfg.AddOnHollowNodesRemote.ReplicationControllerReplicas)
}
cfg.TotalHollowNodes = totalHollowNodes
if err := cfg.validateAddOnCNIVPC(); err != nil {
return fmt.Errorf("validateAddOnCNIVPC failed [%v]", err)
}
if err := cfg.validateAddOnCWAgent(); err != nil {
return fmt.Errorf("validateAddOnCWAgent failed [%v]", err)
}
if err := cfg.validateAddOnFluentd(); err != nil {
return fmt.Errorf("validateAddOnFluentd failed [%v]", err)
}
if err := cfg.validateAddOnMetricsServer(); err != nil {
return fmt.Errorf("validateAddOnMetricsServer failed [%v]", err)
}
if err := cfg.validateAddOnConformance(); err != nil {
return fmt.Errorf("validateAddOnConformance failed [%v]", err)
}
if err := cfg.validateAddOnAppMesh(); err != nil {
return fmt.Errorf("validateAddOnAppMesh failed [%v]", err)
}
if err := cfg.validateAddOnCSIEBS(); err != nil {
return fmt.Errorf("validateAddOnCSIEBS failed [%v]", err)
}
if err := cfg.validateAddOnKubernetesDashboard(); err != nil {
return fmt.Errorf("validateAddOnKubernetesDashboard failed [%v]", err)
}
if err := cfg.validateAddOnPrometheusGrafana(); err != nil {
return fmt.Errorf("validateAddOnPrometheusGrafana failed [%v]", err)
}
if err := cfg.validateAddOnPHPApache(); err != nil {
return fmt.Errorf("validateAddOnPHPApache failed [%v]", err)
}
if err := cfg.validateAddOnNLBHelloWorld(); err != nil {
return fmt.Errorf("validateAddOnNLBHelloWorld failed [%v]", err)
}
if err := cfg.validateAddOnNLBGuestbook(); err != nil {
return fmt.Errorf("validateAddOnNLBGuestbook failed [%v]", err)
}
if err := cfg.validateAddOnALB2048(); err != nil {
return fmt.Errorf("validateAddOnALB2048 failed [%v]", err)
}
if err := cfg.validateAddOnJobsPi(); err != nil {
return fmt.Errorf("validateAddOnJobsPi failed [%v]", err)
}
if err := cfg.validateAddOnJobsEcho(); err != nil {
return fmt.Errorf("validateAddOnJobsEcho failed [%v]", err)
}
if err := cfg.validateAddOnCronJobs(); err != nil {
return fmt.Errorf("validateAddOnCronJobs failed [%v]", err)
}
if err := cfg.validateAddOnCSRsLocal(); err != nil {
return fmt.Errorf("validateAddOnCSRsLocal failed [%v]", err)
}
if err := cfg.validateAddOnCSRsRemote(); err != nil {
return fmt.Errorf("validateAddOnCSRsRemote failed [%v]", err)
}
if err := cfg.validateAddOnConfigmapsLocal(); err != nil {
return fmt.Errorf("validateAddOnConfigmapsLocal failed [%v]", err)
}
if err := cfg.validateAddOnConfigmapsRemote(); err != nil {
return fmt.Errorf("validateAddOnConfigmapsRemote failed [%v]", err)
}
if err := cfg.validateAddOnSecretsLocal(); err != nil {
return fmt.Errorf("validateAddOnSecretsLocal failed [%v]", err)
}
if err := cfg.validateAddOnSecretsRemote(); err != nil {
return fmt.Errorf("validateAddOnSecretsRemote failed [%v]", err)
}
if err := cfg.validateAddOnFargate(); err != nil {
return fmt.Errorf("validateAddOnFargate failed [%v]", err)
}
if err := cfg.validateAddOnIRSA(); err != nil {
return fmt.Errorf("validateAddOnIRSA failed [%v]", err)
}
if err := cfg.validateAddOnIRSAFargate(); err != nil {
return fmt.Errorf("validateIRSAAddOnFargate failed [%v]", err)
}
if err := cfg.validateAddOnWordpress(); err != nil {
return fmt.Errorf("validateAddOnWordpress failed [%v]", err)
}
if err := cfg.validateAddOnJupyterHub(); err != nil {
return fmt.Errorf("validateAddOnJupyterHub failed [%v]", err)
}
if err := cfg.validateAddOnKubeflow(); err != nil {
return fmt.Errorf("validateAddOnKubeflow failed [%v]", err)
}
if err := cfg.validateAddOnCUDAVectorAdd(); err != nil {
return fmt.Errorf("validateAddOnCUDAVectorAdd failed [%v]", err)
}