summaryrefslogtreecommitdiff
path: root/.zsh/completion/_eksctl.zsh
blob: 8a89c9f18210d0228f294b4b6cb6d71a5cd518a3 (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
#compdef _eksctl eksctl


function _eksctl {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "create:Create resource(s)"
      "get:Get resource(s)"
      "update:Update resource(s)"
      "upgrade:Upgrade resource(s)"
      "delete:Delete resource(s)"
      "set:Set values"
      "unset:Unset values"
      "scale:Scale resources(s)"
      "drain:Drain resource(s)"
      "utils:Various utils"
      "completion:Generates shell completion scripts"
      "version:Output the version of eksctl"
      "help:Help about any command"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  create)
    _eksctl_create
    ;;
  get)
    _eksctl_get
    ;;
  update)
    _eksctl_update
    ;;
  upgrade)
    _eksctl_upgrade
    ;;
  delete)
    _eksctl_delete
    ;;
  set)
    _eksctl_set
    ;;
  unset)
    _eksctl_unset
    ;;
  scale)
    _eksctl_scale
    ;;
  drain)
    _eksctl_drain
    ;;
  utils)
    _eksctl_utils
    ;;
  completion)
    _eksctl_completion
    ;;
  version)
    _eksctl_version
    ;;
  help)
    _eksctl_help
    ;;
  esac
}


function _eksctl_create {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "cluster:Create a cluster"
      "nodegroup:Create a nodegroup"
      "iamserviceaccount:Create an iamserviceaccount - AWS IAM role bound to a Kubernetes service account"
      "iamidentitymapping:Create an IAM identity mapping"
      "fargateprofile:Create a Fargate profile"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  cluster)
    _eksctl_create_cluster
    ;;
  nodegroup)
    _eksctl_create_nodegroup
    ;;
  iamserviceaccount)
    _eksctl_create_iamserviceaccount
    ;;
  iamidentitymapping)
    _eksctl_create_iamidentitymapping
    ;;
  fargateprofile)
    _eksctl_create_fargateprofile
    ;;
  esac
}

function _eksctl_create_cluster {
  _arguments \
    '--alb-ingress-access[enable full access for alb-ingress-controller]' \
    '--appmesh-access[enable full access to AppMesh]' \
    '--asg-access[enable IAM policy for cluster-autoscaler]' \
    '--authenticator-role-arn[AWS IAM role to assume for authenticator]:' \
    '--auto-kubeconfig[save kubeconfig file by cluster name, e.g. "/home/tklauser/.kube/eksctl/clusters/beautiful-wardrobe-1581428364"]' \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '--external-dns-access[enable IAM policy for external-dns]' \
    '--fargate[Create a Fargate profile scheduling pods in the default and kube-system namespaces onto Fargate]' \
    '--full-ecr-access[enable full access to ECR]' \
    '--install-vpc-controllers[Install VPC controller that'\''s required for Windows workloads]' \
    '--kubeconfig[path to write kubeconfig (incompatible with --auto-kubeconfig)]:' \
    '--managed[Create EKS-managed nodegroup]' \
    '--max-pods-per-node[maximum number of pods per node (set automatically if unspecified)]:' \
    '(-n --name)'{-n,--name}'[EKS cluster name (generated if unspecified, e.g. "beautiful-wardrobe-1581428364")]:' \
    '--node-ami[Advanced use cases only. If '\''static'\'' is supplied (default) then eksctl will use static AMIs; if '\''auto'\'' is supplied then eksctl will automatically set the AMI based on version/region/instance type; if any other value is supplied it will override the AMI to use for the nodes. Use with extreme care.]:' \
    '--node-ami-family[Advanced use cases only. If '\''AmazonLinux2'\'' is supplied (default), then eksctl will use the official AWS EKS AMIs (Amazon Linux 2); if '\''Ubuntu1804'\'' is supplied, then eksctl will use the official Canonical EKS AMIs (Ubuntu 18.04).]:' \
    '--node-labels[Extra labels to add when registering the nodes in the nodegroup, e.g. "partition=backend,nodeclass=hugememory"]:' \
    '(-P --node-private-networking)'{-P,--node-private-networking}'[whether to make nodegroup networking private]' \
    '*--node-security-groups[Attach additional security groups to nodes, so that it can be used to allow extra ingress/egress access from/to pods]:' \
    '(-t --node-type)'{-t,--node-type}'[node instance type]:' \
    '--node-volume-size[node volume size in GB]:' \
    '--node-volume-type[node volume type (valid options: gp2, io1, sc1, st1)]:' \
    '*--node-zones[(inherited from the cluster if unspecified)]:' \
    '--nodegroup-name[name of the nodegroup (generated if unspecified, e.g. "ng-111eb0c5")]:' \
    '(-N --nodes)'{-N,--nodes}'[total number of nodes (for a static ASG)]:' \
    '(-M --nodes-max)'{-M,--nodes-max}'[maximum nodes in ASG]:' \
    '(-m --nodes-min)'{-m,--nodes-min}'[minimum nodes in ASG]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--set-kubeconfig-context[if true then current-context will be set in kubeconfig; if a context is already set then it will be overwritten]' \
    '--ssh-access[control SSH access for nodes. Uses ~/.ssh/id_rsa.pub as default key path if enabled]' \
    '--ssh-public-key[SSH public key to use for nodes (import from local path, or use existing EC2 key pair)]:' \
    '--tags[A list of KV pairs used to tag the AWS resources (e.g. "Owner=John Doe,Team=Some Team")]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '--version[Kubernetes version (valid options: 1.12, 1.13, 1.14)]:' \
    '--vpc-cidr[global CIDR to use for VPC]:' \
    '--vpc-from-kops-cluster[re-use VPC from a given kops cluster]:' \
    '--vpc-nat-mode[VPC NAT mode, valid options: HighlyAvailable, Single, Disable]:' \
    '*--vpc-private-subnets[re-use private subnets of an existing VPC]:' \
    '*--vpc-public-subnets[re-use public subnets of an existing VPC]:' \
    '--without-nodegroup[if set, initial nodegroup will not be created]' \
    '--write-kubeconfig[toggle writing of kubeconfig]' \
    '*--zones[(auto-select if unspecified)]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_create_nodegroup {
  _arguments \
    '--alb-ingress-access[enable full access for alb-ingress-controller]' \
    '--appmesh-access[enable full access to AppMesh]' \
    '--asg-access[enable IAM policy for cluster-autoscaler]' \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '--cluster[name of the EKS cluster to add the nodegroup to]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '*--exclude[nodegroups to exclude (list of globs), e.g.: '\''ng-team-?,prod-*'\'']:' \
    '--external-dns-access[enable IAM policy for external-dns]' \
    '--full-ecr-access[enable full access to ECR]' \
    '*--include[nodegroups to include (list of globs), e.g.: '\''ng-team-?,prod-*'\'']:' \
    '--managed[Create EKS-managed nodegroup]' \
    '--max-pods-per-node[maximum number of pods per node (set automatically if unspecified)]:' \
    '(-n --name)'{-n,--name}'[name of the new nodegroup (generated if unspecified, e.g. "ng-cb0d148f")]:' \
    '--node-ami[Advanced use cases only. If '\''static'\'' is supplied (default) then eksctl will use static AMIs; if '\''auto'\'' is supplied then eksctl will automatically set the AMI based on version/region/instance type; if any other value is supplied it will override the AMI to use for the nodes. Use with extreme care.]:' \
    '--node-ami-family[Advanced use cases only. If '\''AmazonLinux2'\'' is supplied (default), then eksctl will use the official AWS EKS AMIs (Amazon Linux 2); if '\''Ubuntu1804'\'' is supplied, then eksctl will use the official Canonical EKS AMIs (Ubuntu 18.04).]:' \
    '--node-labels[Extra labels to add when registering the nodes in the nodegroup, e.g. "partition=backend,nodeclass=hugememory"]:' \
    '(-P --node-private-networking)'{-P,--node-private-networking}'[whether to make nodegroup networking private]' \
    '*--node-security-groups[Attach additional security groups to nodes, so that it can be used to allow extra ingress/egress access from/to pods]:' \
    '(-t --node-type)'{-t,--node-type}'[node instance type]:' \
    '--node-volume-size[node volume size in GB]:' \
    '--node-volume-type[node volume type (valid options: gp2, io1, sc1, st1)]:' \
    '*--node-zones[(inherited from the cluster if unspecified)]:' \
    '(-N --nodes)'{-N,--nodes}'[total number of nodes (for a static ASG)]:' \
    '(-M --nodes-max)'{-M,--nodes-max}'[maximum nodes in ASG]:' \
    '(-m --nodes-min)'{-m,--nodes-min}'[minimum nodes in ASG]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--ssh-access[control SSH access for nodes. Uses ~/.ssh/id_rsa.pub as default key path if enabled]' \
    '--ssh-public-key[SSH public key to use for nodes (import from local path, or use existing EC2 key pair)]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '--update-auth-configmap[Remove nodegroup IAM role from aws-auth configmap]' \
    '--version[Kubernetes version (valid options: 1.12, 1.13, 1.14) [for nodegroups "auto" and "latest" can be used to automatically inherit version from the control plane or force latest]]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_create_iamserviceaccount {
  _arguments \
    '--approve[Apply the changes]' \
    '*--attach-policy-arn[ARN of the policy where to create the iamserviceaccount]:' \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '--cluster[name of the EKS cluster to add the iamserviceaccount to]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '*--exclude[iamserviceaccounts to exclude (list of globs), e.g.: '\''default/s3-reader,*/dynamo-*'\'']:' \
    '*--include[iamserviceaccounts to include (list of globs), e.g.: '\''default/s3-reader,*/dynamo-*'\'']:' \
    '--name[name of the iamserviceaccount to create]:' \
    '--namespace[namespace where to create the iamserviceaccount]:' \
    '--override-existing-serviceaccounts[create IAM roles for existing serviceaccounts and update the serviceaccount]' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_create_iamidentitymapping {
  _arguments \
    '--arn[ARN of the IAM role or user to create]:' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '*--group[Group within Kubernetes to which IAM role is mapped]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '--username[User name within Kubernetes to map to IAM role]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_create_fargateprofile {
  _arguments \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-l --labels)'{-l,--labels}'[Kubernetes selector labels of the workloads to schedule on Fargate, e.g. k1=v1,k2=v2]:' \
    '--name[Fargate profile'\''s name]:' \
    '--namespace[Kubernetes namespace of the workloads to schedule on Fargate]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_get {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "cluster:Get cluster(s)"
      "nodegroup:Get nodegroup(s)"
      "iamserviceaccount:Get iamserviceaccount(s)"
      "iamidentitymapping:Get IAM identity mapping(s)"
      "labels:Get nodegroup labels"
      "fargateprofile:Get Fargate profile(s)"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  cluster)
    _eksctl_get_cluster
    ;;
  nodegroup)
    _eksctl_get_nodegroup
    ;;
  iamserviceaccount)
    _eksctl_get_iamserviceaccount
    ;;
  iamidentitymapping)
    _eksctl_get_iamidentitymapping
    ;;
  labels)
    _eksctl_get_labels
    ;;
  fargateprofile)
    _eksctl_get_fargateprofile
    ;;
  esac
}

function _eksctl_get_cluster {
  _arguments \
    '(-A --all-regions)'{-A,--all-regions}'[List clusters across all supported regions]' \
    '--chunk-size[return large lists in chunks rather than all at once, pass 0 to disable]:' \
    '(-n --name)'{-n,--name}'[EKS cluster name]:' \
    '(-o --output)'{-o,--output}'[specifies the output format (valid option: table, json, yaml)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_get_nodegroup {
  _arguments \
    '--chunk-size[return large lists in chunks rather than all at once, pass 0 to disable]:' \
    '--cluster[EKS cluster name]:' \
    '(-n --name)'{-n,--name}'[Name of the nodegroup]:' \
    '(-o --output)'{-o,--output}'[specifies the output format (valid option: table, json, yaml)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_get_iamserviceaccount {
  _arguments \
    '--chunk-size[return large lists in chunks rather than all at once, pass 0 to disable]:' \
    '--cluster[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '--name[name of the iamserviceaccount to delete]:' \
    '--namespace[namespace where to delete the iamserviceaccount]:' \
    '(-o --output)'{-o,--output}'[specifies the output format (valid option: table, json, yaml)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_get_iamidentitymapping {
  _arguments \
    '--arn[ARN of the IAM role or user to create]:' \
    '--chunk-size[return large lists in chunks rather than all at once, pass 0 to disable]:' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-o --output)'{-o,--output}'[specifies the output format (valid option: table, json, yaml)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_get_labels {
  _arguments \
    '--cluster[EKS cluster name]:' \
    '(-n --nodegroup)'{-n,--nodegroup}'[Nodegroup name]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_get_fargateprofile {
  _arguments \
    '--chunk-size[return large lists in chunks rather than all at once, pass 0 to disable]:' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '--name[Fargate profile'\''s name]:' \
    '(-o --output)'{-o,--output}'[specifies the output format (valid option: table, json, yaml)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_update {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "cluster:Update cluster"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  cluster)
    _eksctl_update_cluster
    ;;
  esac
}

function _eksctl_update_cluster {
  _arguments \
    '--approve[Apply the changes]' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-n --name)'{-n,--name}'[EKS cluster name]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_upgrade {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "nodegroup:Upgrade nodegroup"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  nodegroup)
    _eksctl_upgrade_nodegroup
    ;;
  esac
}

function _eksctl_upgrade_nodegroup {
  _arguments \
    '--cluster[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '--kubernetes-version[Kubernetes version]:' \
    '--name[Nodegroup name]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_delete {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "cluster:Delete a cluster"
      "nodegroup:Delete a nodegroup"
      "iamserviceaccount:Delete an IAM service account"
      "iamidentitymapping:Delete a IAM identity mapping"
      "fargateprofile:Delete Fargate profile"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  cluster)
    _eksctl_delete_cluster
    ;;
  nodegroup)
    _eksctl_delete_nodegroup
    ;;
  iamserviceaccount)
    _eksctl_delete_iamserviceaccount
    ;;
  iamidentitymapping)
    _eksctl_delete_iamidentitymapping
    ;;
  fargateprofile)
    _eksctl_delete_fargateprofile
    ;;
  esac
}

function _eksctl_delete_cluster {
  _arguments \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-n --name)'{-n,--name}'[EKS cluster name]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-w --wait)'{-w,--wait}'[wait for deletion of all resources before exiting]' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_delete_nodegroup {
  _arguments \
    '--approve[Apply the changes]' \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '--cluster[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '--drain[Drain and cordon all nodes in the nodegroup before deletion]' \
    '*--exclude[nodegroups to exclude (list of globs), e.g.: '\''ng-team-?,prod-*'\'']:' \
    '*--include[nodegroups to include (list of globs), e.g.: '\''ng-team-?,prod-*'\'']:' \
    '(-n --name)'{-n,--name}'[Name of the nodegroup to delete]:' \
    '--only-missing[Only delete nodegroups that are not defined in the given config file]' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '--update-auth-configmap[Remove nodegroup IAM role from aws-auth configmap]' \
    '(-w --wait)'{-w,--wait}'[wait for deletion of all resources before exiting]' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_delete_iamserviceaccount {
  _arguments \
    '--approve[Apply the changes]' \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '--cluster[name of the EKS cluster to delete the iamserviceaccount from]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '*--exclude[iamserviceaccounts to exclude (list of globs), e.g.: '\''default/s3-reader,*/dynamo-*'\'']:' \
    '*--include[iamserviceaccounts to include (list of globs), e.g.: '\''default/s3-reader,*/dynamo-*'\'']:' \
    '--name[name of the iamserviceaccount to delete]:' \
    '--namespace[namespace where to delete the iamserviceaccount]:' \
    '--only-missing[Only delete nodegroups that are not defined in the given config file]' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-w --wait)'{-w,--wait}'[wait for deletion of all resources before exiting]' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_delete_iamidentitymapping {
  _arguments \
    '--all[Delete all matching mappings instead of just one]' \
    '--arn[ARN of the IAM role or user to create]:' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_delete_fargateprofile {
  _arguments \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '--name[Fargate profile'\''s name]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-w --wait)'{-w,--wait}'[wait for wait for the deletion of the Fargate profile, which may take from a couple seconds to a couple minutes. before exiting]' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_set {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "labels:Create or overwrite labels"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  labels)
    _eksctl_set_labels
    ;;
  esac
}

function _eksctl_set_labels {
  _arguments \
    '--cluster[EKS cluster name]:' \
    '(-l --labels)'{-l,--labels}'[Create Labels]:' \
    '(-n --nodegroup)'{-n,--nodegroup}'[Nodegroup name]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_unset {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "labels:Create removeLabels"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  labels)
    _eksctl_unset_labels
    ;;
  esac
}

function _eksctl_unset_labels {
  _arguments \
    '--cluster[EKS cluster name]:' \
    '(*-l *--labels)'{\*-l,\*--labels}'[List of labels to remove]:' \
    '(-n --nodegroup)'{-n,--nodegroup}'[Nodegroup name]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_scale {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "nodegroup:Scale a nodegroup"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  nodegroup)
    _eksctl_scale_nodegroup
    ;;
  esac
}

function _eksctl_scale_nodegroup {
  _arguments \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '--cluster[EKS cluster name]:' \
    '(-n --name)'{-n,--name}'[Name of the nodegroup to scale]:' \
    '(-N --nodes)'{-N,--nodes}'[total number of nodes (scale to this number)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_drain {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "nodegroup:Cordon and drain a nodegroup"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  nodegroup)
    _eksctl_drain_nodegroup
    ;;
  esac
}

function _eksctl_drain_nodegroup {
  _arguments \
    '--approve[Apply the changes]' \
    '--cfn-role-arn[IAM role used by CloudFormation to call AWS API on your behalf]:' \
    '--cluster[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '*--exclude[nodegroups to exclude (list of globs), e.g.: '\''ng-team-?,prod-*'\'']:' \
    '*--include[nodegroups to include (list of globs), e.g.: '\''ng-team-?,prod-*'\'']:' \
    '(-n --name)'{-n,--name}'[Name of the nodegroup to delete]:' \
    '--only-missing[Only drain nodegroups that are not defined in the given config file]' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '--undo[Uncordone the nodegroup]' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_utils {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "wait-nodes:Wait for nodes"
      "write-kubeconfig:Write kubeconfig file for a given cluster"
      "describe-stacks:Describe CloudFormation stack for a given cluster"
      "update-cluster-stack:DEPRECATED: Use 'eksctl update cluster' instead"
      "update-kube-proxy:Update kube-proxy add-on to ensure image matches Kubernetes control plane version"
      "update-aws-node:Update aws-node add-on to latest released version"
      "update-coredns:Update coredns add-on to ensure image matches the standard Amazon EKS version"
      "update-cluster-logging:Update cluster logging configuration"
      "associate-iam-oidc-provider:Setup IAM OIDC provider for a cluster to enable IAM roles for pods"
      "install-vpc-controllers:Install Windows VPC controller to support running Windows workloads"
      "update-cluster-endpoints:Update Kubernetes API endpoint access configuration"
      "set-public-access-cidrs:Update public access CIDRs"
      "nodegroup-health:Get nodegroup health for a managed node"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  wait-nodes)
    _eksctl_utils_wait-nodes
    ;;
  write-kubeconfig)
    _eksctl_utils_write-kubeconfig
    ;;
  describe-stacks)
    _eksctl_utils_describe-stacks
    ;;
  update-cluster-stack)
    _eksctl_utils_update-cluster-stack
    ;;
  update-kube-proxy)
    _eksctl_utils_update-kube-proxy
    ;;
  update-aws-node)
    _eksctl_utils_update-aws-node
    ;;
  update-coredns)
    _eksctl_utils_update-coredns
    ;;
  update-cluster-logging)
    _eksctl_utils_update-cluster-logging
    ;;
  associate-iam-oidc-provider)
    _eksctl_utils_associate-iam-oidc-provider
    ;;
  install-vpc-controllers)
    _eksctl_utils_install-vpc-controllers
    ;;
  update-cluster-endpoints)
    _eksctl_utils_update-cluster-endpoints
    ;;
  set-public-access-cidrs)
    _eksctl_utils_set-public-access-cidrs
    ;;
  nodegroup-health)
    _eksctl_utils_nodegroup-health
    ;;
  esac
}

function _eksctl_utils_wait-nodes {
  _arguments \
    '--kubeconfig[path to read kubeconfig]:' \
    '(-m --nodes-min)'{-m,--nodes-min}'[minimum number of nodes to wait for]:' \
    '--timeout[how long to wait]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_write-kubeconfig {
  _arguments \
    '--authenticator-role-arn[AWS IAM role to assume for authenticator]:' \
    '--auto-kubeconfig[save kubeconfig file by cluster name, e.g. "/home/tklauser/.kube/eksctl/clusters/<name>"]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '--kubeconfig[path to write kubeconfig (incompatible with --auto-kubeconfig)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--set-kubeconfig-context[if true then current-context will be set in kubeconfig; if a context is already set then it will be overwritten]' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_describe-stacks {
  _arguments \
    '--all[include deleted stacks]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '--events[include stack events]' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '--trail[lookup CloudTrail events for the cluster]' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_update-cluster-stack {
  _arguments \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_update-kube-proxy {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_update-aws-node {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_update-coredns {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_update-cluster-logging {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '*--disable-types[Log types to be disabled, the rest will be disabled. Supported log types: (all, none, api, audit, authenticator, controllerManager, scheduler)]:' \
    '*--enable-types[Log types to be enabled. Supported log types: (all, none, api, audit, authenticator, controllerManager, scheduler)]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_associate-iam-oidc-provider {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_install-vpc-controllers {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_update-cluster-endpoints {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '--private-access[access for private (VPC) clients]' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '--public-access[access for public clients]' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_set-public-access-cidrs {
  _arguments \
    '--approve[Apply the changes]' \
    '(-c --cluster)'{-c,--cluster}'[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_utils_nodegroup-health {
  _arguments \
    '--cluster[EKS cluster name]:' \
    '(-f --config-file)'{-f,--config-file}'[load configuration from a file (or stdin if set to '\''-'\'')]:' \
    '(-n --name)'{-n,--name}'[Name of the nodegroup]:' \
    '(-p --profile)'{-p,--profile}'[AWS credentials profile to use (overrides the AWS_PROFILE environment variable)]:' \
    '(-r --region)'{-r,--region}'[AWS region]:' \
    '--timeout[maximum waiting time for any long-running operation]:' \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}


function _eksctl_completion {
  local -a commands

  _arguments -C \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:' \
    "1: :->cmnds" \
    "*::arg:->args"

  case $state in
  cmnds)
    commands=(
      "bash:Generates bash completion scripts"
      "zsh:Generates zsh completion scripts"
    )
    _describe "command" commands
    ;;
  esac

  case "$words[1]" in
  bash)
    _eksctl_completion_bash
    ;;
  zsh)
    _eksctl_completion_zsh
    ;;
  esac
}

function _eksctl_completion_bash {
  _arguments \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_completion_zsh {
  _arguments \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_version {
  _arguments \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}

function _eksctl_help {
  _arguments \
    '(-C --color)'{-C,--color}'[toggle colorized logs (valid options: true, false, fabulous)]:' \
    '(-h --help)'{-h,--help}'[help for this command]' \
    '(-v --verbose)'{-v,--verbose}'[set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging]:'
}