Git Product home page Git Product logo

kubevela's Introduction



Make shipping applications more enjoyable.

Build status Go Report Card Docker Pulls codecov LICENSE Releases TODOs Twitter Artifact HUB CII Best Practices E2E status OpenSSF Scorecard

Introduction

KubeVela is a modern application delivery platform that makes deploying and operating applications across today's hybrid, multi-cloud environments easier, faster and more reliable.

kubevela

Highlights

KubeVela practices the "render, orchestrate, deploy" workflow with below highlighted values added to existing ecosystem:

Deployment as Code

Declare your deployment plan as workflow, run it automatically with any CI/CD or GitOps system, extend or re-program the workflow steps with CUE. No ad-hoc scripts, no dirty glue code, just deploy. The deployment workflow in KubeVela is powered by Open Application Model.

Built-in observability, multi-tenancy and security support

Choose from the wide range of LDAP integrations we provided out-of-box, enjoy enhanced multi-tenancy and multi-cluster authorization and authentication, pick and apply fine-grained RBAC modules and customize them as per your own supply chain requirements. All delivery process has fully automated observability dashboards.

Multi-cloud/hybrid-environments app delivery as first-class citizen

Natively supports multi-cluster/hybrid-cloud scenarios such as progressive rollout across test/staging/production environments, automatic canary, blue-green and continuous verification, rich placement strategy across clusters and clouds, along with automated cloud environments provision.

Lightweight but highly extensible architecture

Minimize your control plane deployment with only one pod and 0.5c1g resources to handle thousands of application delivery. Glue and orchestrate all your infrastructure capabilities as reusable modules with a highly extensible architecture and share the large growing community addons.

Getting Started

Documentation

Full documentation is available on the KubeVela website.

Blog

Official blog is available on KubeVela blog.

Community

We want your contributions and suggestions! One of the easiest ways to contribute is to participate in discussions on the Github Issues/Discussion, chat on IM or the bi-weekly community calls. For more information on the community engagement, developer and contributing guidelines and more, head over to the KubeVela community repo.

Contact Us

Reach out with any questions you may have and we'll make sure to answer them as soon as possible!

Community Call

Every two weeks we host a community call to showcase new features, review upcoming milestones, and engage in a Q&A. All are welcome!

Talks and Conferences

Check out KubeVela videos for these talks and conferences.

Contributing

Check out CONTRIBUTING to see how to develop with KubeVela.

Report Vulnerability

Security is a first priority thing for us at KubeVela. If you come across a related issue, please send email to [email protected] .

Code of Conduct

KubeVela adopts CNCF Code of Conduct.

kubevela's People

Contributors

aichovy avatar barnettzqg avatar captainroy-hy avatar charlie0129 avatar chivalryq avatar dependabot[bot] avatar fogdong avatar fourierr avatar hanmengnan avatar hanxie-crypto avatar hongchaodeng avatar iyear avatar leejanee avatar majian159 avatar nuclearwu avatar resouer avatar ryanzhang-oss avatar somefive avatar stevenleizhang avatar sunny0826 avatar suwliang3 avatar szihai avatar wangyikewxgm avatar wangyuan249 avatar wonderflow avatar yangsoon avatar yue9944882 avatar yyzxw avatar zhaohuiweixiao avatar zzxwill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubevela's Issues

[Feature] show: get detail spec of your app

This command should show app info like this:

$ rudr show frontend
About:
   Appset: myapp
   ENV: test
ComponentType: deployment
  image: oam/dev:v1
  port: 8080
Route:
  domain: example.com

Error: list workload Definition err: an empty namespace may not be set when a resource name is provided

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/RudrX/cmd/rudrx git:(master) ✗ go run main.go run containerizedworkload app -n default
Error: list workload Definition err: an empty namespace may not be set when a resource name is provided
Usage:
  rudrx run [WORKLOAD_KIND] [args]

Examples:

  rudrx run containerized frontend -p 80 oam-dev/demo:v1


Flags:
  -h, --help   help for run

Global Flags:
      --as string                      Username to impersonate for the operation
      --as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --cache-dir string               Default HTTP cache directory (default "/Users/zhouzhengxi/.kube/http-cache")
      --certificate-authority string   Path to a cert file for the certificate authority
      --client-certificate string      Path to a client certificate file for TLS
      --client-key string              Path to a client key file for TLS
      --cluster string                 The name of the kubeconfig cluster to use
      --context string                 The name of the kubeconfig context to use
      --insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string              Path to the kubeconfig file to use for CLI requests.
  -n, --namespace string               If present, the namespace scope for this CLI request
      --password string                Password for basic authentication to the API server
      --request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
  -s, --server string                  The address and port of the Kubernetes API server
      --tls-server-name string         Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
      --token string                   Bearer token for authentication to the API server
      --user string                    The name of the kubeconfig user to use
      --username string                Username for basic authentication to the API server

[feature] Add and update subcommand of `make`

  • add make build command, build the binary of rudr
  • make install depends on kustomize, which should only depend on kubectl
  • add e2e test command make test e2e
  • add make clean command
  • IMG ?= controller:latest need to change the image name

[feature] support auto generate definition files

The overall idea is to generate workloaddefinition, traitdefinition, scopedefinition Automatically.

rudr generate workload deployments.apps
rudr generate trait routes.serving.knative.dev
rudr generate workload --group apps.kruise.io

[BUG] Application created with wrong workload if there are more than one workloaddefinition

There are more than one workloaddefinitions.

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/cloud-native-application/RudrX git:(e2e) ✗ k get workloaddefinition
NAME                                  DEFINITION-NAME
containerizedworkloads.core.oam.dev   containerizedworkloads.core.oam.dev
deployments.apps                      deployments.apps

Run rudr run containerized app-testworkloadrun-basic -p 80 nginx:1.9.4 to create an application. We found the expected workload wasn't containerized.

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/cloud-native-application/RudrX git:(e2e) ✗ k get applicationconfiguration
NAME                        AGE
app-testworkloadrun-basic   39s
➜  /Users/zhouzhengxi/Programming/golang/src/github.com/cloud-native-application/RudrX git:(e2e) ✗ k get applicationconfiguration app-testworkloadrun-basic -p yaml
Error: unknown shorthand flag: 'p' in -p
See 'kubectl get --help' for usage.
➜  /Users/zhouzhengxi/Programming/golang/src/github.com/cloud-native-application/RudrX git:(e2e) ✗ k get applicationconfiguration app-testworkloadrun-basic -o yaml
apiVersion: core.oam.dev/v1alpha2
kind: ApplicationConfiguration
metadata:
  creationTimestamp: "2020-07-31T03:21:34Z"
  generation: 1
  name: app-testworkloadrun-basic
  namespace: default
  resourceVersion: "12355749"
  selfLink: /apis/core.oam.dev/v1alpha2/namespaces/default/applicationconfigurations/app-testworkloadrun-basic
  uid: 5ea82dd9-f5a7-413b-a7c2-1d09e6cdedc6
spec:
  components:
  - componentName: app-testworkloadrun-basic

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/cloud-native-application/RudrX git:(e2e) ✗ k get component app-testworkloadrun-basic -o yaml
apiVersion: core.oam.dev/v1alpha2
kind: Component
metadata:
  creationTimestamp: "2020-07-31T03:21:34Z"
  generation: 1
  name: app-testworkloadrun-basic
  namespace: default
  resourceVersion: "12355747"
  selfLink: /apis/core.oam.dev/v1alpha2/namespaces/default/components/app-testworkloadrun-basic
  uid: 6de83a51-0b9f-4019-84b0-306d752dddd2
spec:
  workload:
    apiVersion: core.oam.dev/v1alpha2
    kind: deployment
    metadata:
      name: app-testworkloadrun-basic
    spec:
      containers:
      - image: nginx:1.9.4
        name: master
        ports:
        - containerPort: 80
          name: tbd
          protocol: TCP
status:
  latestRevision:
    name: app-testworkloadrun-basic-bshoshbd0cvka7locstg
    revision: 1

Move root command to cmd/root.go

Move root command from main.go to cmd/root.go, just import root command and execute in main.go.
There are 2 considers:

  1. Add test root command and keep main.go clean in cmd directory.
  2. Root command and subcommands are in the same package and share variables.

[feature]Support type for parameter

At least, we need support below four types:

apiVersion: core.oam.dev/v1alpha2
kind: WorkloadDefinition
...
    parameters: 
      - name: image # --image
        short: i # -i
        required: true
        type: image
        fieldPaths: 
        - "spec.containers[0].image"
      - name: port # --port
        short: p # -p
        required: false
        type: int
        fieldPaths:
        - "spec.containers[0].ports[0].containerPort"
    lastCommandParam: image # so image will become the default command

[Feature] show currently using env

Provide a way to show currently using env.

Or mark the currently using one in the list.

✗ rudr env
NAME     	NAMESPACE
default  	default
env-hello(*current*)	env-hello
env-world	default
test     	test

[Feature] Monitoring trait (monitoring as code)

This is input from Xiang.

  1. We will propose a concept named "monitoring as code" after monitoring trait is ready (and installation is fully automated).
  2. Same trait, different provider (e.g. this trait should work on Alibaba Cloud ARMS as backend besides OSS Prometheus stack).

Make `lastCommandParam as a subcommand and enhance corner cases

  • Make lastCommandParam like image as a subcommand instead of a flag.

Yes: rudr run containerized app-0709 -p 80 nginx:1.9.4.
No: rudr run containerized app-0709 -p 80 -i nginx:1.9.4

  • Validate whether lastCommandParam is set.

If not, prompt warnings as below.

$ rudr run containerized app-0709
You must specify `image` as the last command.
See 'rudr run -h' for help and examples
  • check whether all flags are set.

If not, prompt warnings as below.

$ rudr run containerized app-0709 nginx:1.9.4
Flag `port` is NOT set, please check and try again. 
See 'rudr run -h' for help and examples

[feature] Support Appset to bundle your apps

appset init will create a directory

$ rudr appset:init myapp --tags env=prod,team=MyTeam --domain example.com
Creating at  ~/rudr/myapp/rudr.cue
SUCCESS!

$ rudr deployment:init frontend -p 80 --image resouer/demo:v1
Adding component frontend to myapp
Updating ~/rudr/myapp/frontend.cue
SUCCESS!

$ rudr route frontend --domian frontend.oam.dev
Binding route --- frontend
Updating ~/rudr/myapp/frontend.cue
SUCCESS!

$ rudr run frontend
Deploying frontend
Updating ~/rudr/myapp/rudr.cue
SUCCESS!

$ rudr delete frontend

Provide available workloads in help message when executing "rudr run" or "rudr run -h"

Print all available workloads, like containerized, deployments.apps, statefulsets.apps to help user to choose one of them.

$ rudr run

You must specify a workload, like containerized, deployments.apps, statefulsets.apps
See 'rudr run -h' for help and examples

PS. In the current, there are three workloaddefinitions.

$ kubectl get workloaddefinition
NAME                                  DEFINITION-NAME
containerizedworkloads.core.oam.dev   containerizedworkloads.core.oam.dev
deployments.apps                      deployments.apps
statefulsets.apps                     statefulsets.apps

[Feature] status: get running status of your app

$ rudr status frontend
Running Status  1/1 (OK)
Workload:
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: frontend
  status:
    ...
Route:
  apiVersion: core.oam.dev/v1alpha2
  kind: Route
  metadata:
    name: frontend-xxx-trait
  status:
    ...

[feature] rudr ps

rudr ps provides overview information that the AppConfig List under namespace

$ rudr ps
NAME       workload                                      traits                                                AGE
frontend   frontend/ContainerizedWorkload                frontend/ManualScalerTrait,frontend/IngressTrait      2d
backend    backend/ContainerizedWorkload                 backend/AutoScalerTrait,backend/VolumeMounterTrait    2d

[feature] Workload should be ready to consume after run

When a Workload is created by rudr run, everything it needed as a runnable application should be configured successfully by default (could be a bunch of default trait). The result is user could open a browser to visit his app after rudr run.

[bug] several concepts are not clearly defined

rudr workloads <- this one shows workload types (definitions), users need to do rudr components to check his workload instances.

rudr traits <- this one shows traits definitions, so we actually have no way to check existing trait instance for now.

Here are some takes:

  1. We don't need the concept of Component in app engine, we only need Workload.
  2. If we makerudr workloads and rudr traits show instances. Then we need to create another command to show supported types, for example:
$ rudr workload-types
$ rudr addons:workloads
$ rudr features:workloads

Prettify usage

Rudrx should be friendly to the end-users, and there are two points we should do

  • showing all global flags controller-runtime client need in a clean way
  • classify commands like kubectl or istioctl

Run workload without flags hit got panic

✗ go run main.go run containerized app2057 nginx:1.9.4
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x1d8f012]

goroutine 1 [running]:
github.com/cloud-native-application/rudrx/pkg/cmd/run.(*runOptions).Complete(0xc000166000, 0x21e6640, 0xc000454560, 0xc000134a00, 0xc000323540, 0x2, 0x2, 0x1d2c100, 0xc0007b5d18)
	/Users/zhouzhengxi/Downloads/tmp/RudrX/pkg/cmd/run/run.go:162 +0x682
github.com/cloud-native-application/rudrx/pkg/cmd/run.NewCmdRun.func2(0xc000134a00, 0xc000323540, 0x2, 0x2)
	/Users/zhouzhengxi/Downloads/tmp/RudrX/pkg/cmd/run/run.go:104 +0x7d
github.com/spf13/cobra.(*Command).execute(0xc000134a00, 0xc0003234a0, 0x2, 0x2, 0xc000134a00, 0xc0003234a0)
	/Users/zhouzhengxi/Programming/golang/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001ee500, 0x16219fd635a886e8, 0x2b6d6e0, 0xc000133960)
	/Users/zhouzhengxi/Programming/golang/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/zhouzhengxi/Programming/golang/pkg/mod/github.com/spf13/[email protected]/command.go:864
main.main()
	/Users/zhouzhengxi/Downloads/tmp/RudrX/cmd/rudrx/main.go:49 +0xcd
exit status 2

[feature] support rudr plugin system discovery/install/uninstall

$ rudr plugins:config --repo https://github.com/<owner>/<repo>/<path>
$ rudr plugins:ls
NAME    		TYPE				DEFINITION              	STATUS 				APPLIES TO
scale   		trait			  hpa.autoscaling.k8s.io     installed		containerized,apps.k8s.io
ingress 		trait			  ingress.networking.k8s.io	 installed	  containerized,apps.k8s.io
deployment 	workload    deployments.apps.k8s.io		 installed
statefulset workload    statefulsets.apps.k8s.io	 uninstall
cloneset   	workload    cloneset.apps.alibaba.com  uninstall				
$ rudr plugins:install cloneset
$ rudr plugins:uninstall cloneset

Assuming we use github as repo, that will be:

# List
$ curl https://api.github.com/repos/<owner>/<repo>/contents/<path-to-dir>
[
  {
    "name": "a.yaml",
    "path": "path/a.yaml",
    "download_url": "...",
    "type": "file",
     ...
  },
  {
    "name": "b.yaml",
    "path": "path/b.yaml",
    "download_url": "...",
    "type": "file",
     ...
  }
]

# use download_url field to get the real file info
$ curl https://raw.githubusercontent.com/<owner>/<repo>/<branch>/<path-to-content>
apiVersion: core.oam.dev/v1alpha2
kind: WorkloadDefinition
metadata:
  name: serving.knative.com
  annotations:
    short: serving
spec:
  definitionRef:
    name: serving.knative.com
  # extended fields
  extension:
    ...
    install:
      helm:
      # chart  install dependency
      -  repo: https://charts.crossplane.io/master/
         name: knative
         version: 0.0.1

Umbrella Issue for Features of CLI MVP version

Basic Usage

  • version: show your current cli version #40
  • env: set your environment #57
  • ls: list your apps #34 #56
  • show: get detail spec of your app #58 @erdun
  • status: get running status of your app #59
  • delete: remove your app #6
  • workloads: list all workload types #62
  • rudr <workload-type>: run <appname> : eg: rudr deployment:run myapp #63
  • traits: list all trait types #8 #60
  • rudr <trait> <appname>: eg: rudr route myapp --domain myapp.com #18
  • Update Readme

Advanced Usage:

  • support CUE as definition template file #35 @wonderflow
  • appset: bundle your apps #20 (we don't support this feature in MVP)
  • snapshot: make a snapshort for your app #37 (we don't support this feature in MVP)
  • plugins: discovery/install plugins #19 @zzxwill
  • dashboard: run a dashboard locally @ryanzhang-oss #154
  • completion: build auto completion shell script #88 @sunny0826
  • admin: administrator operations, like install/init #12

[BUG] env:init doesn't create namespace

✗ rudr env:init env-hello --namespace env-hello
Create env succeed, current env is env-hello

✗ rudr env env-hello
NAME     	NAMESPACE
env-hello	env-hello%           

✗ kubectl get ns | grep env-hello

[BUG] `rudr env:init test` created an environment `test` with namespace `default`

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/RudrX git:(master) ✗ rudr env:init test
Create env succeed, current env is test
➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/RudrX git:(master) ✗ rudr env
NAME   	NAMESPACE
default	default
test   	default  %
  • If we can allow the names of env and namespace to be different, we should remind the user.

Binding a trait hit the issue `Operation cannot be fulfilled`

Applying trait ManualScaler to the workload of ApplicationConfiguration/Component poc07171442 hit the issue as below.

rudr bind poc07171442 ManualScaler --replicaCount 4
Applying trait for component poc07171442
Applying trait hit an issue: Operation cannot be fulfilled on applicationconfigurations.core.oam.dev "poc07171442": the object has been modified; please apply your changes to the latest version and try again

[BUG] `%s` is appended to list commands.

%s is appended to list commands.

➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/RudrX git:(master) ✗ go run cmd/rudrx/main.go ls
NAME   	WORKLOAD             	TRAITS                    	STATUS	CREATED-TIME
app    	ContainerizedWorkload	manualscaler              	False 	2020-08-03 17:08:10 +0800 CST
poc1039	ContainerizedWorkload	poc1039-manualscaler-trait	False 	2020-08-02 10:39:54 +0800 CST
poc1447	ContainerizedWorkload	                          	True  	2020-08-03 14:48:16 +0800 CST
poc2348	ContainerizedWorkload	                          	True  	2020-08-02 23:48:20 +0800 CST%                                                                                                      ➜  /Users/zhouzhengxi/Programming/golang/src/github.com/zzxwill/RudrX git:(master) ✗ go run cmd/rudrx/main.go env

NAME   	NAMESPACE
default	default
test   	default  %

[BUG] Refine command help or prompt message

  • check app name is inputted for rudr
$ go run cmd/rudrx/main.go containerized:run
Error: required flag(s) "image" not set
$ go run cmd/rudrx/main.go containerized:run -image nginx:1.9.4
Creating AppConfig nginx:1.9.4
Error: create component err: Component.core.oam.dev "nginx:1.9.4" is invalid: metadata.name: Invalid value: "nginx:1.9.4": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
  • Don't ask to set flag which has default value.
$ go run cmd/rudrx/main.go manualscaler poc1039
Error: required flag(s) "replicaCount" not set

[BUG]Workload's complete information cannot be displayed in output fields of traits.

Description

Command "rudr traits" field "APPLIES TO" should use workload's short name. Otherwise, the workload's complete info cannot displayed.

How to reproduce

Steps to reproduce the behavior:
1 Run command "rudr traits" in terminal
2 Check command output

Expected behavior

Workload's complete information can be displayed.

Screenshots

Screen Shot 2020-07-31 at 11 35 15 AM

Cluster information

Describe your kubernetes cluster information.

  • Kubernetes Version 1.16.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.