clivern / beetle Goto Github PK
View Code? Open in Web Editor NEW๐ฅ Kubernetes multi-cluster deployment automation service.
License: MIT License
๐ฅ Kubernetes multi-cluster deployment automation service.
License: MIT License
showing beetle, beetle workers, database, kubernetes clusters, namespaces, beetle reading from configMaps ...etc
It could be a cmd video of how to run beetle
should be pretty similar to #29
beetle to revert back in case deployment failed (error, not enough resources, unhealthy pods ....etc)
GET /api/v1/cluster/<clusterName>/namespace/<namespaceName>/application
Cluster Configs
If only version (eg. 1.0.0
or 1.1.0
) will be provided to deployment & rollback endpoints
applications:
-
name: Toad App
id: toad
image: clivern/toad:release-[.Release]
If only version or version with suffix (eg. 1.0.0
or release-1.1.0
or version-1.0.0
) will be provided to deployment & rollback endpoints
applications:
-
name: Toad App
id: toad
image: clivern/toad:[.Release]
If the whole image will be provided (eg. clivern/toad:1.0.0
or clivern/toad:release-1.1.0
or clivern/toad:version-1.0.0
) will be provided to deployment & rollback endpoints
applications:
-
name: Toad App
id: toad
image: [.Release]
GET /api/v1/cluster/<clusterName>
update readme & add k8s yml files
will be part of beetle & split later
Change clientset to be a parameter/configurable so i can use https://github.com/kubernetes/client-go/blob/master/kubernetes/fake/clientset_generated.go#L114 for unit/func testing.
prototype
clientset := fake.NewSimpleClientset(&v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "toad",
Namespace: "default",
Annotations: map[string]string{},
},
}, &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "clivern",
Namespace: "default",
Annotations: map[string]string{},
},
})
go to https://editor.swagger.io/, import this file https://raw.githubusercontent.com/Clivern/Beetle/master/swagger.yaml & then open a PR with ur changes
We can mount clusters configs to beetle pod but go-client
supports also InClusterConfig
.
https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration
https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens
GET /api/v1/cluster/<clusterName>/namespace/<namespaceName>
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
k8s.io/api
, k8s.io/apimachinery
, k8s.io/client-go
)These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
deployment/docker/docker-compose.yml
redis 7.2-alpine
prom/prometheus v2.53.0
grafana/grafana 9.5.20
Dockerfile
golang 1.20.2
.github/workflows/build.yml
actions/checkout v4
actions/setup-go v4
.github/workflows/release.yml
actions/checkout v4
actions/setup-go v4
goreleaser/goreleaser-action v3
.github/workflows/release_pkg.yml
actions/checkout v4
actions/setup-go v4
go.mod
go 1.20
github.com/briandowns/spinner v1.23.0
github.com/drone/envsubst v1.0.3
github.com/gin-gonic/gin v1.10.0
github.com/jinzhu/gorm v1.9.16
github.com/logrusorgru/aurora/v3 v3.0.0
github.com/olekukonko/tablewriter v0.0.5
github.com/prometheus/client_golang v1.18.0
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.18.2
k8s.io/api v0.27.4
k8s.io/apimachinery v0.27.4
k8s.io/client-go v0.27.4
/api/v1/cluster/<clusterName>/namespace/<namespaceName>/application/<AppID>
Global Configs -> beetle yaml config file.
Other Configs that change per cluster & namespace -> namespaced configMaps
Something like that to load cluster.namespace configs?
"github.com/clivern/beetle/internal/app/model"
var data = []byte(`
version: 0.1.0
`)
// ideally from here
item, _ := cluster.GetConfigMap(context.Background(), "namespace-here", "k8s-cluster-configmap-name")
item.Data
nc := model.NamespaceConfigs{}
nc.LoadFromYAML([]byte(item.Data))
narrowed down to
cluster.GetConfig(context.Background(), "~namespace-name~")
beetle should have http driver to read application version by app slug
GET -H 'X-AUTH-TOKEN: ...' $EXTERNAL_SERVICE_URL/<app_slug>
GET /api/v1/cluster
{
"_metadata": {
"totalCount": 2,
"limit": 10,
"offset": 0
},
"cluster": [
{"id":"default"},
{"id":"prod"},
{"id":"staging"}
]
}
GET /api/v1/cluster/<clusterName>/namespace
ability to use beetle binary as command line tool to interact with running beetle instance. fetch data, deploy apps ... etc
or just terraform operator ๐ค
This project looks very cool, and is speaking my language (I think) when it comes to solving a very real need that I have experienced when running applications on k8s. But, back to the "I think" from above... what exactly is it? Is it meant to compete with something like Helm? Does it use/interoperate with Helm? Is it a wrapper around Helm? Is it a wrapper around the terraform k8s plugin? Is it a service harness/chassis/runtime and a central server and some other glue for introspection on running/apps deployments (the example config file makes me feel like it might be something like that... but I honestly can't tell from the README...)
Anyway, saw this on the Changelog newsletter, and I'm intrigued... but I still am not really sure what it is.
So I guess my feature request would be a section in the README that explains that.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
it could be separate processes talking through redis (for now) or rabbitmq. separate go routines talking via
ORredis or go channel.
Figure out how to do that. Also a way to get all releases available for deployment or text input/api parameter
Deployment strategies that can be supported.
recreate: terminate the old version and release the new one.
ramped: release a new version on a rolling update fashion, one after the other.
blue/green: release a new version alongside the old version then switch traffic.
canary: release a new version to a subset of users, then proceed to a full rollout.
Client -->
https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/core_client.go
ref.
https://semaphoreci.com/blog/kubernetes-deployment
https://www.weave.works/technologies/manually-updating-kubernetes-workloads/
$ kubectl patch deployment patch-demo --patch '{
"spec": {
"template": {
"spec": {
"containers": [
{
"name": "nginx",
"image": "nginx:1.7.9"
}
]
}
}
}
}'
payload := []model.PatchStringValue{
model.PatchStringValue{
Op: "replace",
Path: "/spec/template/spec/containers/0/image",
Value: "clivern/toad:release-0.2.3",
},
}
data, _ := util.ConvertToJSON(payload)
fmt.Println(cluster.PatchDeployment(
context.Background(),
ns,
"toad-deployment",
data,
))
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.