5 ms·
As an outsider, that command looks really easy to mess up. * shell interactions with quotes * double quotes * interpolating into image namespace with no autoco
by epivosism 4y ago
As an outsider, that command looks really easy to mess up.
* shell interactions with quotes
* double quotes
* interpolating into image namespace with no autocomplete
* easy to forget an argument
* do you get autocomplete against the deployment name?
Comparison: C# declaration of a complex type - it's less complex than the `kubectl` command above, but IDEs offer way more support to get it right.
* var x = new List<Dictionary<CustomType,int?>>()
This will light up warnings if you get anything wrong;
You get:
* go to definition of `CustomType`
* autocomplete on classnames
* highlighting on type mismatches
* warnings about unused vars.
* if you initialize the var, the IDE will try hard to not let you do it wrong
So structurally,
1) in the code realm, for doing minor work we have really strong guarantees,
2) in deployment realm, even though it's likely going to hit customers harder, the guarantees are weaker.
I think this is behind the feeling that the k8s system is not ready yet.
- kuschku 4y ago1. You’ll use `kubectl set image deployment/gitlab gitlab=gitlab/gitlab-ce:14.9.2-ce.0` in production instead 2. kubernetes will abort the change if it doesn’t syntax check or the types don’t match.
- throwaway894345 4y agoHah, I didn't even know about `set image`.
- throwaway894345 4y agoYou put it in a bash script that gets called from CI and move on with life. No one is typing this into their terminal every time they want to do a deploy. > I think this is behind the feeling that the k8s system is not ready yet. Whether you patch the deployment image from bash or from C# doesn't indict the k8s ecosystem.
- throwaway2037 4y agoAbout quoting rules: We desperately needs static analysis or IDEs (Emacs plugins, whatever) that "explain" exactly what quotes do in a particular context. When I returned to C++ recently, I was blown away by Clang-Tidy (JetBrains CLion integration). Literally: Clang-Tidy seems to "know what you really want" and give intelligent suggestions. For someone whom is a very average C++ programmer, it instantly leveled me up! I could see the same for someone writing /bin/sh, /bin/ksh, /bin/bash shell commands. If the IDE could give some hints, it would be incredibly helpful to many.
- throwaway894345 4y agoThe quotes here have nothing to do with k8s, it's just how you encode JSON in shell.
- peppermint_tea 4y agoapt-get install shellcheck or https://www.shellcheck.net/ https://www.shellcheck.net/
- frazbin 4y agocorrect! Here's why: Kubernetes is an operating system (a workload/IO manager) and its lineage is 16 years old. So it's like Unix around 1979, or Windows/DOS around ~1996. Imagine it's 1996 and you can pick between Windows NT (representing 16 years of MS development) or System 360 (~40 years out from IBMs first transistorized designs). What I'm trying to say is that as an operating system, Kubernetes is now a young adult, and historically speaking, operating systems at this level of maturity have been adopted and ridden for decades, with much success. But, ya know, if you chose OS/360 in 1996 you would have a point.