4 ms·
I really like k8s itself and I think these yaml files are a great API layer, but the way people produce these files nowadays (templating systems and a lot of gl
by dpc_pw 7y ago
I really like k8s itself and I think these yaml files are a great API layer, but the way people produce these files nowadays (templating systems and a lot of glue like helm) is a joke and in a real, even mildy complex environment becomes a terrible mess really quickly. What I really want is a typed programming language, where using normal code we describe how to produce all these yaml-described k8s resources using whatever abstractions make sense in our business.
Twitter thread I had about it a while ago: https://twitter.com/dpc_pw/status/1182022825361625088 https://twitter.com/dpc_pw/status/1182022825361625088
- ones_and_zeros 7y agoAny reason pulumi, per the twitter thread, doesn't meet your needs?
- dpc_pw 7y agoI still haven't got to trying it. I'm a bit suspicious, because it look like a SaaS kind of thing, while I was looking just for an open source tool to write some code that will spit out bunch of `yaml` files to feed to `kubectl`.
- eropple 7y agoThe runner is free, as is the tool chain. One of my employers has paid money for the SaaS state management; two others have not. We’ve gotten by just fine.
- dpc_pw 7y agoThanks for explaining!
- ahnick 7y agoI am also suspicious as well. The biggest turn off for me initially was the fact that you had to login to use even the free tool. Apparently though this has been addressed somewhat overtime. (https://www.reddit.com/r/devops/comments/bcdwsn/pulumi/ https://www.reddit.com/r/devops/comments/bcdwsn/pulumi/)
- deleted 7y ago[deleted]
- lukehoban 7y ago> What I really want is a typed programming language, where using normal code we describe how to produce all these yaml-described k8s resources using whatever abstractions make sense in our business. This is more or less exactly what we’re working on at Pulumi. Using a language like TypeScript to describe Kubernetes infrastructure provides a nice mix of simple JSON-like resource definition, strong typing, and the ability to use variables, loops, functions, classes, packages, test frameworks, and more from an expressive general purpose programming language. You still have access to the full fidelity of the raw Kubernetes API, but also all the tools you need to apply proper software engineering on top of it. https://www.pulumi.com/kubernetes/ https://www.pulumi.com/kubernetes/
- dpc_pw 7y ago"We're"? Oh. So I have one question - what's the deal with Pricing then? What's the line exactly between "take it for free" and "pay us some well deserved money for our hard work"? Anyway - from what you're saying, that's exactly what I'm looking for.
- lidHanteyk 7y agoHuh, why build an entirely proprietary language for this? There are existing toolchains that bend existing rich configuration languages, like Nix [0] or Dhall [1], to produce Kubernetes object definitions. In this way, not only can existing libraries be leveraged, but no new semantics have to be learned, and no third party needs their palms crossed. This had to be pointed out; Pulumi's docs repeat the adjective "real", as if its competitors aren't real. "real code", "real package management" [2], "real languages" [3], "real programming model" [4]... Nix and Dhall are quite real, though. So is this an incomplete survey, or are Pulumi's docs unrealistically self-aggrandizing? TBH even just this one paragraph of yours is pretty tough to stomach, as if loops and functions in a configuration language were a novel concept. [0] https://github.com/xtruder/kubenix https://github.com/xtruder/kubenix [1] https://github.com/dhall-lang/dhall-kubernetes https://github.com/dhall-lang/dhall-kubernetes [2] https://www.pulumi.com/docs/intro/vs/k8s_yaml_dsls/ https://www.pulumi.com/docs/intro/vs/k8s_yaml_dsls/ [3] https://www.pulumi.com/docs/intro/vs/chef_puppet_etc/ https://www.pulumi.com/docs/intro/vs/chef_puppet_etc/ [4] https://www.pulumi.com/docs/intro/vs/custom/ https://www.pulumi.com/docs/intro/vs/custom/
- jmillikin 7y agoIf you're willing to relax the "Turing-complete" part, and do a bit of final assembly yourself, you might try https://github.com/stripe/skycfg https://github.com/stripe/skycfg which uses the Python-like Starlark language. Cruise built a more complex DSL on top of it: https://github.com/cruise-automation/isopod https://github.com/cruise-automation/isopod
- mrorbitman 7y ago> What I really want is a typed programming language, where using normal code we describe how to produce all these yaml-described k8s resources using whatever abstractions make sense in our business For what it's worth, that's what AWS cdk is. Not for k8s but for AWS CloudFormation yaml templates. https://docs.aws.amazon.com/cdk/latest/guide/home.html https://docs.aws.amazon.com/cdk/latest/guide/home.html
- igetspam 7y agoI had high hopes for CDK but after following the recommended path for a not very complex deployment and ending up with 3x more code than terraform, I had to declare it unfit for mass consumption. I spoken with my rep about it and he tried really hard to steer away from it because they know it's just not there yet. It's better than CFN but only because it's not plain yaml. As it matures, if they can get community buy in, I'm sure it'll be good enough but I'd leave it alone for now.
- datashaman 7y agohttps://github.com/cuelang/cue https://github.com/cuelang/cue seems to do some of what you need. Disclaimer: I've not used it, just seen it touted for this purpose.