6 ms·
> Thinking that JSON is a suitable replacement, imagine writing Ansible or k8s stuff in it; that would be fun ;) Writing in YAML doesn't feel much better. YMMV
by CipherThrowaway 4y ago
> Thinking that JSON is a suitable replacement, imagine writing Ansible or k8s stuff in it; that would be fun ;)
Writing in YAML doesn't feel much better. YMMV but I've been on teams using Pulumi for k8s and the developer experience has been significantly better. I can automate, type check, lint, click through to definitions the same way I do with other typescript.
Pulumi is a young product with many rough edges but it's already been a game changer for me.
- ilyt 4y agoIt's very simple actually. ... just fucking don't, generate config in your configuration management tool of choice and then serialize it to YAML. You get all of the advantages (nice to read)and none of the disadvantages (need editor or it is PITA)
- cocochanel 4y agoI checked the sample Kubernetes project in Java [0] and it looks hideous. YAML looks much better in comparison. [0] https://www.pulumi.com/docs/get-started/kubernetes/review-project/ https://www.pulumi.com/docs/get-started/kubernetes/review-pr...
- CipherThrowaway 4y agoDon't disagree there. Java support is less than a year old and the Java API is.. not great. TypeScript is the more popular and mature choice.
- danudey 4y agoWhat, you mean you don't want to write code like Deployment("nginx",DeploymentArgs.builder().spec(DeploymentSpecArgs.builder().selector(LabelSelectorArgs.builder().matchLabels(labels).build()).replicas(1).template(PodTemplateSpecArgs.builder().metadata(ObjectMetaArgs.builder().labels(labels).build()).spec(PodSpecArgs.builder().containers(ContainerArgs.builder().name("nginx").image("nginx").ports(ContainerPortArgs.builder().containerPort(80).build()).build()).build()).build()).build()).build());
- lifehasleft 4y agoI actually laughed out loud when I looked at the example and just saw a bunch of carefully-indented “.build()”s
- brnewd 4y agoI would love to swap Pulumi for Ansible, but it's cloud-only for the most part.
- PaulHoule 4y agoJSON has no comments. That disqualifies it immediately.
- bogwog 4y ago{ “/*These are the ports we use”: “*/”, “ports”: [22, 80, 443] }
- ok123456 4y agoNow, write a json-schema for that.
- deterministic 4y ago“Comment”: ”This is a comment that is optional and ignored by code”
- zvr 4y ago"Comment": "but you can only have one per object"
- deterministic 4y ago