numerous-artist-1705
07/09/2020, 5:04 PMtall-librarian-49374
07/09/2020, 7:33 PMwet-noon-14291
07/09/2020, 8:00 PMtall-librarian-49374
07/10/2020, 9:46 AMwet-noon-14291
07/10/2020, 10:15 AMnumerous-artist-1705
07/10/2020, 1:13 PMwet-noon-14291
07/10/2020, 1:13 PM$ref
part that says it should be json:
data: {
type: "object",
$ref: "pulumi.json#/Json",
description: "Data is the serialized representation of the state."
},
Do you know if that is correct @tall-librarian-49374? If you are interested in the progress it is in this branch: https://github.com/mastoj/Pulumi.FSharp.Azure/tree/k8sversionnumerous-artist-1705
07/10/2020, 1:13 PMtall-librarian-49374
07/10/2020, 1:33 PM$
in names like $ref
Ref
wet-noon-14291
07/10/2020, 8:54 PMlet appDeploy =
deployment {
name "MyDeploy"
spec deploySpec
}
Sample usage here: https://github.com/mastoj/Pulumi.FSharp.Azure/blob/k8sversion/samples/KubernetesSample/Program.fs
To make it really useful nested types also needs to be generated.let appDeploy =
deployment {
name "MyDeploy"
spec (deploymentSpec {
replicas 1
})
}
tall-librarian-49374
07/11/2020, 9:19 PMlet appDeploy =
deployment {
name "MyDeploy"
deploymentSpec {
replicas 1
}
}
wet-noon-14291
07/11/2020, 9:56 PMnumerous-artist-1705
07/12/2020, 5:54 AMwet-noon-14291
07/12/2020, 8:07 AMtall-librarian-49374
07/12/2020, 6:10 PMnumerous-artist-1705
07/12/2020, 6:26 PMwet-noon-14291
07/12/2020, 10:58 PMlet appDeployCe =
deployment {
name "MyDeploy"
spec (deploymentSpec {
replicas 1
selector (labelSelector {
matchLabels ["app", input "nginx" ]
})
template (podTemplateSpec {
metadata (ObjectMetaArgs(Labels = appLabels))
spec (podSpec {
containers [
input (container {
name "nginx"
image "nginx"
ports [
input (containerPort {
containerPortValue 80
})
]
})
]
})
})
})
}
and yes, it would be nice if we could remove some parenthesis 🙂
It takes a while to run this for kubernetes as well, around 15 minutes... but then I also process the types and not just the resources.tall-librarian-49374
07/13/2020, 8:21 AMwet-noon-14291
07/13/2020, 9:57 AMyield
in front of the nested CE. Also, I do think this might be abusing the CE quite a lot and the tooling will struggle to help suggesting where to use nested CEs I think. When using custom operations the available operations in a CE is given to you by the tooling, and I don't think that is the case with the yields. My feeling is that the "correct" way is to use custom operations and live with the extra parenthesis.... but I'm more than glad to be proven wrong here 🙂.
Here's my manually modified builder code: https://github.com/mastoj/Pulumi.FSharp.Azure/blob/k8sversion/samples/KubernetesSample/Modified.fs
And I get the warning here: https://github.com/mastoj/Pulumi.FSharp.Azure/blob/k8sversion/samples/KubernetesSample/Program.fs#L48-L50 (if I don't use yield)numerous-artist-1705
07/14/2020, 10:03 PMwet-noon-14291
07/14/2020, 10:18 PM