You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -537,6 +547,10 @@ func confirmInstallClusterConfig(clusterConfig *clusterconfig.Config, awsCreds A
537
547
fmt.Print(fmt.Sprintf("warning: you've configured the operator load balancer to be internal; you must configure VPC Peering to connect your CLI to your cluster operator (see https://docs.cortex.dev/v/%s/)\n\n", consts.CortexVersionMinor))
538
548
}
539
549
550
+
iflen(clusterConfig.Subnets) >0 {
551
+
fmt.Print("warning: you've configured your cluster to be installed in an existing VPC; if your cluster doesn't spin up or function as expected, please double-check your VPC configuration (here are the requirements: https://eksctl.io/usage/vpc-networking/#use-existing-vpc-other-custom-configuration)\n\n")
fmt.Printf("warning: you've disabled on-demand instances (%s=0 and %s=0); spot instances are not guaranteed to be available so please take that into account for production clusters; see https://docs.cortex.dev/v/%s/ for more information\n\n", clusterconfig.OnDemandBaseCapacityKey, clusterconfig.OnDemandPercentageAboveBaseCapacityKey, consts.CortexVersionMinor)
@@ -573,6 +587,9 @@ func clusterConfigConfirmationStr(clusterConfig clusterconfig.Config, awsCreds A
# note: if using "internal", you must configure VPC Peering to connect your CLI to your cluster operator
63
63
operator_load_balancer_scheme: internet-facing
64
64
65
+
# to install Cortex in an existing VPC, you can provide a list of subnets for your cluster to use
66
+
# subnet_visibility (specified above in this file) must match your subnets' visibility
67
+
# this is an advanced feature (not recommended for first-time users) and requires your VPC to be configured correctly; see https://eksctl.io/usage/vpc-networking/#use-existing-vpc-other-custom-configuration
68
+
# here is an example:
69
+
# subnets:
70
+
# - availability_zone: us-west-2a
71
+
# subnet_id: subnet-060f3961c876872ae
72
+
# - availability_zone: us-west-2b
73
+
# subnet_id: subnet-0faed05adf6042ab7
74
+
65
75
# additional tags to assign to AWS resources (all resources will automatically be tagged with cortex.dev/cluster-name: <cluster_name>)
Copy file name to clipboardExpand all lines: pkg/lib/configreader/reader.go
+31-7Lines changed: 31 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -37,10 +37,11 @@ import (
37
37
)
38
38
39
39
typeStructFieldValidationstruct {
40
-
Keystring// Required, defaults to json key or "StructField"
41
-
StructFieldstring// Required
42
-
DefaultFieldstring// Optional. Will set the default to the runtime value of this field
43
-
DefaultFieldFuncfunc(interface{}) interface{} // Optional. Will call the func with the value of DefaultField
40
+
Keystring// Required, defaults to json key or "StructField"
41
+
StructFieldstring// Required
42
+
DefaultFieldstring// Optional. Will set the default to the runtime value of this field
43
+
DefaultDependentFields []string// Optional. Will be passed in to DefaultDependentFieldsFunc. Dependent fields must be listed first in the `[]*cr.StructFieldValidation`.
44
+
DefaultDependentFieldsFuncfunc([]interface{}) interface{} // Optional. Will be called with DefaultDependentFields
44
45
45
46
// Provide one of the following:
46
47
StringValidation*StringValidation
@@ -94,6 +95,9 @@ type StructListValidation struct {
94
95
Requiredbool
95
96
AllowExplicitNullbool
96
97
TreatNullAsEmptybool// If explicit null or if it's top level and the file is empty, treat as empty map
98
+
MinLengthint
99
+
MaxLengthint
100
+
InvalidLengths []int
97
101
CantBeSpecifiedErrStr*string
98
102
ShortCircuitbool
99
103
}
@@ -399,6 +403,22 @@ func StructList(dest interface{}, inter interface{}, v *StructListValidation) (i
0 commit comments