janekbaraniewski / kubeserial Goto Github PK
View Code? Open in Web Editor NEWk8s operator for managing serial devices.
License: Apache License 2.0
k8s operator for managing serial devices.
License: Apache License 2.0
Some values are hardcoded, they should be stored in some common place for const values:
On Kubernetes 1.17, I get the below crashloop when running this:
{"level":"error","ts":1585579148.2771335,"logger":"cmd","msg":"Manager exited non-zero","error":"no matches for kind \"DaemonSet\" in version \"apps/v1beta2\"","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/janek/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128\nmain.main\n\tkubeserial/cmd/manager/main.go:150\nruntime.main\n\t/usr/lib/go/src/runtime/proc.go:203"}
apps/v1
is the stable apiVersion since at least K8S v1.14
I have been working on alot of home automation stuff in kubernetes.
Was wondering if there was any way of reaching you to ask some questions regarding how to possible work with this to port some stuff like my serial zwave device over so i could use it in k8s.
thanks
clusterrole.rbac.authorization.k8s.io/kubeserial created
clusterrolebinding.rbac.authorization.k8s.io/kubeserial created
customresourcedefinition.apiextensions.k8s.io/kubeserials.app.kubeserial.com created
Error from server (NotFound): error when creating "kubeserial.yaml": namespaces "kubeserial" not found
Error from server (NotFound): error when creating "kubeserial.yaml": namespaces "kubeserial" not found
Dummy metrics are in place, once everything is working they should be improved to provide some actual data.
It would also be cool to include some default dashboard in chart
Instead of keeping all configuration in one crd, devices should be defined in separate objects, one per device
ATM version in project files is always APP_VERSION
or 0.0.1
and then it's substituted using hack/update-chart-version.sh
This results in local dev images always build with tag 0.0.1-<git-sha>
, even though they are modifying different version
Would be good to commit bump of this version as part of release workflow
Need to support scenario where user wants to manage software that's using serial device on their own. Example can be home automation using HomeAssistant:
in such cases KubeSerial would schedule device gateway which then would be mounted by dedicated sidecar container running in management software pod on shared volume
Q:
Currently when running helm upgrade with new version, managers and other components that are created by operator are not updated.
➜ VERSION=0.1.5 make deploy-dev
controller-gen... Done!
helm upgrade --install kubeserial-crds ./deploy/chart/kubeserial-crds
Release "kubeserial-crds" has been upgraded. Happy Helming!
NAME: kubeserial-crds
LAST DEPLOYED: Tue Apr 26 14:36:56 2022
NAMESPACE: default
STATUS: deployed
REVISION: 11
TEST SUITE: None
helm upgrade --install kubeserial ./deploy/chart/kubeserial -f ./deploy/chart/kubeserial/values-local.yaml
Release "kubeserial" has been upgraded. Happy Helming!
NAME: kubeserial
LAST DEPLOYED: Tue Apr 26 14:37:00 2022
NAMESPACE: default
STATUS: deployed
REVISION: 11
TEST SUITE: None
➜ k get deploy kubeserial -o=jsonpath='{.spec.template.spec.containers[0].image}'
janekbaraniewski/kubeserial:0.1.5
➜ k get daemonset kubeserial-monitor -o=jsonpath='{.spec.template.spec.containers[0].image}'
janekbaraniewski/kubeserial-device-monitor:0.0.1-de8647a
Current implementation requires managers to be hardcoded. This makes it difficult to test and extend and impossible for end users to add their own managers according to their needs.
Would be much easier to add separate CRD to define new managers as k8s objects
since sidecar approach doesn't work that's the only path left
Would be good to have small docs site (gh pages) describing
ATM device monitor will be scheduled to all cluster nodes. It's possible that we don't really want that - some nodes are running in cloud, some are running physically and we want only physical ones to monitor for devices.
First, this is a really cool project. Thank you for doing all the work.
I think this project can be used with lot of home automation products. Such as Zwave or zigbee dongles. Is there anyway to achieve this without rebuilding the official images/charts?
kubeserial/deploy/kubeserial.yaml
Line 192 in 156abef
changing this to latest and it downloaded the image as expected.
replace things like os.Getenv("NODE_NAME")
with flags passed to binary
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.