syndesis
syndesis copied to clipboard
Convert all syndesis bash scripts into single go-lang binary
Advantages
- Detecting compile-time errors;
- Single connection interface to kubernetes platform, using client-go, rather than being concerned with either
oc
orkubectl
; - Architectural elements like structs for inter-functional communication;
- Proper function return typing rather than resorting to eval, global variables or other workarounds;
- Wait functions built-in and typed return objects from kubernetes-related function calls, eg.
kube get secret
returns a secret typed object; - Sync up with other projects such as camel-k.
- ...
Disadvantages
- Compilation requires a binary release;
- Some command-line actions may not be so readily available inside the go-lang environment (helpful to list them as we go along);
- Code maintenance will require a knowledge of go (seems to be a requirement anyway going forward)
- ....
@phantomjinx you might be able to apply extream leverage to this item by exploring https://skaffold.dev - unless this is not about repo / dev / ops tooling.
So thinking a little bit more about this. The scripts can be broken down into categories:
- Installation
- crc
- minikube
- minishift
- install: installing to existing cluster regardless
- Building & Compilation
- build
- Development Environment
- completion: changes the completion of local CLI (does anyone use this?)
- kube: convenience functions wrapping
kubectl
- ui: convenience functions for only bringing up the UI
- kamel: convenience functions for interacting with camel-k
- dev: set of miscellaneous development functions, eg. port-forwarding, flushing pvs, updating versions
- Testing & Deployment
- system-test
- integration-test
- release
To me, this looks like 2 distinct groups, ie. user installation & development.
- User installation:
- Requires download of binaries, configuration of resources, multiple calls to the same commands with different user-requested parameters. Could these scripts be pushed into the syndesis-operator binary, which then becomes the single point of installation?
- Development:
- Wraps common processes, interacts with different binaries, produces artifacts, uploads changes, triggers testing environments. Could these scripts be superceded by some existing managed environment, such as skaffold.dev?
Related to #6997
It looks like skaffold.dev could also provide installation procedures. See how it can act aproriately upon certain context heuristics (local or remote):
- https://skaffold.dev/docs/environment/local-cluster/
- also: https://skaffold.dev/docs/environment/templating/
To absolutely nail dev experience, I can strongly recommend a shell.nix
file which could provide appropriate (pinned) versions of minikube
/ minishift
, kamel
& kubectl
upon running nix-shell
.
I could help with that since I'm currently setting up repo tooling at our place this way.