fierce-terabyte-6114
01/09/2024, 6:25 PMSkipDefaultNodeGroup: true
, but when i let it create the default node group, the nodes never join the clustersalmon-account-74572
01/09/2024, 11:26 PMpulumi-eks
fairly extensively, but I don't generally skip the default node group. Which language are you using? And what version of pulumi-eks
? Also, are you able to share the relevant portions of your code?fierce-terabyte-6114
01/10/2024, 12:26 AMfierce-terabyte-6114
01/10/2024, 12:27 AMpulumi.Parent(eksCluster)
makes pulumi hangfierce-terabyte-6114
01/10/2024, 12:27 AMfierce-terabyte-6114
01/10/2024, 12:30 AMeksCluster, err := eks.NewCluster(ctx, "eks-cluster", &eks.ClusterArgs{
VpcId: eksVpc.VpcId,
PublicSubnetIds: eksVpc.PublicSubnetIds,
PrivateSubnetIds: eksVpc.PrivateSubnetIds,
NodeAssociatePublicIpAddress: pulumi.BoolRef(false),
EndpointPrivateAccess: pulumi.Bool(false),
EndpointPublicAccess: pulumi.Bool(true),
CreateOidcProvider: pulumi.Bool(true),
SkipDefaultNodeGroup: pulumi.BoolRef(true),
Tags: pulumi.StringMap{
"Owner": pulumi.String("pulumi"),
},
})
if err != nil {
return err
}
_, err = eks.NewNodeGroupV2(ctx, "initial-node-group", &eks.NodeGroupV2Args{
Cluster: eksCluster.Core,
Version: pulumi.String("1.28"),
InstanceType: pulumi.String(eksNodeInstanceType),
DesiredCapacity: <http://pulumi.Int|pulumi.Int>(desiredClusterSize),
MinSize: <http://pulumi.Int|pulumi.Int>(minClusterSize),
MaxSize: <http://pulumi.Int|pulumi.Int>(maxClusterSize),
NodeSubnetIds: eksCluster.Core.PrivateSubnetIds(),
NodeRootVolumeSize: <http://pulumi.Int|pulumi.Int>(30),
NodeAssociatePublicIpAddress: pulumi.BoolRef(false),
//Taints: map[string]eks.TaintArgs{
// "@TODO PLACEHOLDER": {Effect: "NoSchedule"},
//},
CloudFormationTags: pulumi.StringMap{
"Owner": pulumi.String("pulumi"),
},
}, pulumi.Parent(eksCluster))
if err != nil {
return err
}
salmon-account-74572
01/10/2024, 4:09 PMpulumi.Parent(eksCluster))
fixes the hang, is that right?fierce-terabyte-6114
01/10/2024, 4:10 PMfierce-terabyte-6114
01/10/2024, 4:11 PMpulumi.StringOutput
to be a regular string that i can use elsewhere? I know ApplyT
exists, but it seems like i cant access the string outside of thatsalmon-account-74572
01/10/2024, 4:12 PMApplyT
. What are you trying to accomplish?fierce-terabyte-6114
01/10/2024, 4:15 PMb, err := os.ReadFile("k8s/values/ciliumValues.yaml.tmpl")
if err != nil {
return err
}
ciliumValuesTemplate := string(b)
ciliumValues, err := renderValues(ciliumValuesTemplate, ciliumArgs)
if err != nil {
return err
}
where ciliumValues
is returned as a pulumi.Map
, but if ciliumArgs
isn't just strings, that seems hard to accomplish. inside renderValues
it is using go templating on a yaml filesalmon-account-74572
01/10/2024, 4:34 PMciliumArgs
coming from? Where or how it is defined?fierce-terabyte-6114
01/10/2024, 4:37 PMmap[string]interface{}
. it is defined near the top with a value that is static right now, and then i want to add two things from pulumi outputs - my eks apiserver endpoint and the arn for an iam role i createdfierce-terabyte-6114
01/10/2024, 4:39 PMciliumArgs := map[string]interface{}{
"isEks": isEks,
}
if isEks {
... create iam role, get eks api server
ciliumArgs["apiServer"] = apiServer
ciliumArgs["roleArn"] = roleArn
}
... deploy cilium using the values template + ciliumArgs
fierce-terabyte-6114
01/10/2024, 4:40 PMsalmon-account-74572
01/10/2024, 5:13 PMpulumi.Sprintf
to get the resolved string values added to ciliumArgs
. Frankly, I can’t say for sure if that will work, but that’s the next step I’d try.fierce-terabyte-6114
01/10/2024, 5:15 PMStringOutput
salmon-account-74572
01/10/2024, 5:16 PMfierce-terabyte-6114
01/10/2024, 5:37 PMtemplatefile()
is very difficultsalmon-account-74572
01/10/2024, 6:48 PMfierce-terabyte-6114
01/10/2024, 7:49 PMfierce-terabyte-6114
01/10/2024, 7:51 PMAll
and ApplyT
salmon-account-74572
01/10/2024, 9:14 PMfierce-terabyte-6114
01/10/2024, 9:18 PMpulumi.All(role.Arn, cluster.Core.Endpoint()).ApplyT(func(args []interface{}) error {
ciliumArgs["roleArn"] = args[0].(string)
ciliumArgs["apiEndpoint"] = strings.TrimPrefix(args[1].(string), "https://")
b, err := os.ReadFile("k8s/values/ciliumValues.yaml.tmpl")
if err != nil {
return err
}
ciliumValuesTemplate := string(b)
ciliumValues, err := renderValues(ciliumValuesTemplate, ciliumArgs)
if err != nil {
return err
}
_, err = helmv3.NewRelease(ctx, "cilium", &helmv3.ReleaseArgs{
Name: pulumi.String("cilium"),
Chart: pulumi.String("cilium"),
Namespace: pulumi.String("kube-system"),
Version: pulumi.String("1.14.5"),
RepositoryOpts: &helmv3.RepositoryOptsArgs{
Repo: pulumi.String("<https://helm.cilium.io/>"),
},
Values: ciliumValues,
}, pulumi.Provider(k8sProvider))
if err != nil {
return err
}
return err
})
salmon-account-74572
01/10/2024, 9:27 PM