New Pulumi Open Source Projects for Kubernetes
pulumi.com
pulumi.com
What are the use cases where having this sort of dynamic-ish declaritive-ish hybrid is a solution to an issue that people are having today?
subnet = aws.vpc.Create()
subnet.Add(webServerInstance)
subnet.Add(appInstance)
appToDB = iam.create('name')
appToDB.add(appInstance)
appToDB.add(rds1)
and so onPulumi can deploy existing helm charts- just create a Helm resource, tell it where to look for the helm file, and it will deploy it and own its state moving forward.
Terraform modules are definitely a bit rough in places, for example having to define `variables` and `outputs` at each layer of composition.
But on the flip-side, spelunking into TF modules is really easy when you want to figure out what's going on (I can usually make sense of the module from reading the Git repo), and I've found the Pulumi intermediate representation to be significantly harder to grok (especially if you're pointing Pulumi at a Terraform module that they have translated to TypeScript...)
Here’s the annotation:
cloud.google.com/neg-status: '{"network_endpoint_groups":{"443":"k8s1-5487ae62-istio-system-istio-ingressgateway-443-811432aa"},"zones":["us-east1-d"]}'
And here’s the Pulumi code snippet in TypeScript required to parse it. // This defines a callback that runs once the Service is provisioned.
const neg_status = svc.metadata.annotations.apply(x => {
const status = x['cloud.google.com/neg-status'];
const obj = JSON.parse(status);
return obj["network_endpoint_groups"]["443"]
});
// Using the computed value from the callback to dynamically retrieve another value.
const neg = gcp.compute.getNetworkEndpointGroup({
name: neg_status,
zone: "us-east1-d"
});Terraform has been making great strides, but at this point Pulumi really leads in policy, modularity, extensibility via Dynamic providers etc.
I think what they are doing with a K8s provisioner is really interesting. I know that the Kubernetes ecosystem has a dizzying amount of ways to build yaml (and json) config, but Pulumi can reach many other places, all with great type hints.