Re:Ask HN: If Kubernetes is the solution, why are there so m...
by throwaway2037 on Wednesday June 01, 2022 @01:00PM
(#31584766)
About 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.
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by throwaway894345 on Wednesday June 01, 2022 @01:29PM
(#31585203)
The quotes here have nothing to do with k8s, it's just how you encode JSON in shell.
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by peppermint_tea on Wednesday June 01, 2022 @02:40PM
(#31586250)
apt-get install shellcheck
or
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by throwaway894345 on Wednesday June 01, 2022 @12:07PM
(#31583988)
You 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.
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by frazbin on Wednesday June 01, 2022 @02:38PM
(#31586228)
correct! 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.
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by kuschku on Wednesday June 01, 2022 @12:04PM
(#31583939)
1. 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.
Re:Ask HN: If Kubernetes is the solution, why are there so m...
by throwaway894345 on Wednesday June 01, 2022 @12:08PM
(#31584007)
Hah, I didn't even know about `set image`.
* 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.