Coder Social home page Coder Social logo

bridge-marker's Introduction

KubeVirt

Build Status Go Report Card Licensed under Apache License version 2.0 Coverage Status CII Best Practices Visit our Slack channel FOSSA Status Quality Gate Status

KubeVirt is a virtual machine management add-on for Kubernetes. The aim is to provide a common ground for virtualization solutions on top of Kubernetes.

Introduction

Virtualization extension for Kubernetes

At its core, KubeVirt extends Kubernetes by adding additional virtualization resource types (especially the VM type) through Kubernetes's Custom Resource Definitions API. By using this mechanism, the Kubernetes API can be used to manage these VM resources alongside all other resources Kubernetes provides.

The resources themselves are not enough to launch virtual machines. For this to happen the functionality and business logic needs to be added to the cluster. The functionality is not added to Kubernetes itself, but rather added to a Kubernetes cluster by running additional controllers and agents on an existing cluster.

The necessary controllers and agents are provided by KubeVirt.

As of today KubeVirt can be used to declaratively

  • Create a predefined VM
  • Schedule a VM on a Kubernetes cluster
  • Launch a VM
  • Stop a VM
  • Delete a VM

To start using KubeVirt

Try our quickstart at kubevirt.io.

See our user documentation at kubevirt.io/docs.

Once you have the basics, you can learn more about how to run KubeVirt and its newest features by taking a look at:

To start developing KubeVirt

To set up a development environment please read our Getting Started Guide. To learn how to contribute, please read our contribution guide.

You can learn more about how KubeVirt is designed (and why it is that way), and learn more about the major components by taking a look at our developer documentation:

Useful links

The KubeVirt SIG-release repo is responsible for information regarding upcoming and previous releases.

Community

If you got enough of code and want to speak to people, then you got a couple of options:

Related resources

Submitting patches

When sending patches to the project, the submitter is required to certify that they have the legal right to submit the code. This is achieved by adding a line

Signed-off-by: Real Name <[email protected]>

to the bottom of every commit message. Existence of such a line certifies that the submitter has complied with the Developer's Certificate of Origin 1.1, (as defined in the file docs/developer-certificate-of-origin).

This line can be automatically added to a commit in the correct format, by using the '-s' option to 'git commit'.

License

KubeVirt is distributed under the Apache License, Version 2.0.

Copyright 2016

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

FOSSA Status

FOSSA Status

bridge-marker's People

Contributors

0xfelix avatar alonsadan avatar dankenigsberg avatar kobi86 avatar oshoval avatar phoracek avatar qinqon avatar ramlavi avatar rmohr avatar schseba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bridge-marker's Issues

invalid `ip link` example in README

[phoracek@t470s ~]$ sudo ip link add test type testBridge
Error: Unknown device type.

I believe it should be

ip link add test-bridge type bridge

panic running bridge marker: out of bounds

❯ klo bridge-marker-rmsxv
E0119 07:31:28.783950       1 runtime.go:78] Observed a panic: runtime.boundsError{x:0, y:0, signed:true, code:0x0} (runtime error: index out of range [0] with length 0)
goroutine 1 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x13ea5a0, 0xc00002c960)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0xa3
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x82
panic(0x13ea5a0, 0xc00002c960)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/build/_output/bin/go/src/runtime/panic.go:679 +0x1b2
github.com/vishvananda/netlink.parseIptunData(0x166b120, 0xc00013a000, 0xc000104800, 0xd, 0x10)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/github.com/vishvananda/netlink/link_linux.go:2580 +0x2d7
github.com/vishvananda/netlink.LinkDeserialize(0x0, 0xc000250838, 0x594, 0x258c, 0x166b4e0, 0xc000141b80, 0x0, 0x0)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/github.com/vishvananda/netlink/link_linux.go:1608 +0x148c
github.com/vishvananda/netlink.(*Handle).LinkList(0x2054e60, 0x7e01, 0x0, 0x166d7e0, 0xc000310c00, 0x166d7e0)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/github.com/vishvananda/netlink/link_linux.go:1813 +0x2c6
github.com/vishvananda/netlink.LinkList(...)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/github.com/vishvananda/netlink/link_linux.go:1791
github.com/kubevirt/bridge-marker/pkg/marker.getAvailableResources(0x15, 0xc000022c60, 0x203000)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/pkg/marker/marker.go:63 +0x40
github.com/kubevirt/bridge-marker/pkg/marker.Update(0x7fffeecd776e, 0xc, 0xc00055ff10, 0xc0003a6ea0, 0xc000022c01)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/pkg/marker/marker.go:97 +0x37
main.main.func1()
	/home/prow/go/src/github.com/kubevirt/bridge-marker/cmd/marker/main.go:60 +0xea
k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1(0xc00038df30)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155 +0x5e
k8s.io/apimachinery/pkg/util/wait.BackoffUntil(0xc00055ff30, 0x1663a80, 0xc0003a6e70, 0x1, 0xc000046b40)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156 +0xa3
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc00038df30, 0xdf8475800, 0x3ff3333333333333, 0x1, 0xc000046b40)
	/home/prow/go/src/github.com/kubevirt/bridge-marker/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0xaa
main.main()
	/home/prow/go/src/github.com/kubevirt/bridge-marker/cmd/marker/main.go:44 +0x2ba
panic: runtime error: index out of range [0] with length 0 [recovered]
	panic: runtime error: index out of range [0] with length 0

Looks like the panic is raised from github.com/vishvananda/netlink.parseIptunData(0x166b120, 0xc00013a000, 0xc000104800, 0xd, 0x10)

Change the order in the manifest

I take a look on the std-ci logs and found that it takes time for the service account to exist.

daemonset.extensions/bridge-marker created
clusterrole.rbac.authorization.k8s.io/bridge-marker-cr created
clusterrolebinding.rbac.authorization.k8s.io/bridge-marker-crb created
serviceaccount/bridge-marker created
+ timeout=300
+ sample=30
+ current_time=0
+ true
++ kubectl describe daemonset bridge-marker -n kube-system
++ cluster/kubectl.sh describe daemonset bridge-marker -n kube-system
+ describe_result='Name:           bridge-marker
Selector:       app=bridge-marker,tier=node
Node-Selector:  beta.kubernetes.io/arch=amd64
Labels:         app=bridge-marker
                tier=node
Annotations:    <none>
Desired Number of Nodes Scheduled: 0
Current Number of Nodes Scheduled: 0
Number of Nodes Scheduled with Up-to-date Pods: 0
Number of Nodes Scheduled with Available Pods: 0
Number of Nodes Misscheduled: 0
Pods Status:  0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           app=bridge-marker
                    tier=node
  Service Account:  bridge-marker
  Containers:
   bridge-marker:
    Image:      quay.io/kubevirt/bridge-marker:latest
    Port:       <none>
    Host Port:  <none>
    Args:
      -node-name
      $(NODE_NAME)
    Environment:
      NODE_NAME:   (v1:spec.nodeName)
    Mounts:       <none>
  Volumes:        <none>
Events:
  Type     Reason        Age   From                  Message
  ----     ------        ----  ----                  -------
  Warning  FailedCreate  1s    daemonset-controller  Error creating: pods "bridge-marker-" is forbidden: error looking up service account kube-system/bridge-marker: serviceaccount "bridge-marker" not found'
++ echo 'Name:           bridge-marker
Selector:       app=bridge-marker,tier=node
Node-Selector:  beta.kubernetes.io/arch=amd64
Labels:         app=bridge-marker
                tier=node
Annotations:    <none>
Desired Number of Nodes Scheduled: 0
Current Number of Nodes Scheduled: 0
Number of Nodes Scheduled with Up-to-date Pods: 0
Number of Nodes Scheduled with Available Pods: 0
Number of Nodes Misscheduled: 0
Pods Status:  0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           app=bridge-marker
                    tier=node
  Service Account:  bridge-marker
  Containers:
   bridge-marker:
    Image:      quay.io/kubevirt/bridge-marker:latest
    Port:       <none>
    Host Port:  <none>
    Args:
      -node-name
      $(NODE_NAME)
    Environment:
      NODE_NAME:   (v1:spec.nodeName)
    Mounts:       <none>
  Volumes:        <none>
Events:
  Type     Reason        Age   From                  Message
  ----     ------        ----  ----                  -------
  Warning  FailedCreate  1s    daemonset-controller  Error creating: pods "bridge-marker-" is forbidden: error looking up service account kube-system/bridge-marker: serviceaccount "bridge-marker" not found'
++ grep 'Desired Number of Nodes Scheduled'
++ awk -F : '{print $2}'
+ desired_nodes=' 0'
++ echo 'Name:           bridge-marker
Selector:       app=bridge-marker,tier=node
Node-Selector:  beta.kubernetes.io/arch=amd64
Labels:         app=bridge-marker
                tier=node
Annotations:    <none>
Desired Number of Nodes Scheduled: 0
Current Number of Nodes Scheduled: 0
Number of Nodes Scheduled with Up-to-date Pods: 0
Number of Nodes Scheduled with Available Pods: 0
Number of Nodes Misscheduled: 0
Pods Status:  0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           app=bridge-marker
                    tier=node
  Service Account:  bridge-marker
  Containers:
   bridge-marker:
    Image:      quay.io/kubevirt/bridge-marker:latest
    Port:       <none>
    Host Port:  <none>
    Args:
      -node-name
      $(NODE_NAME)
    Environment:
      NODE_NAME:   (v1:spec.nodeName)
    Mounts:       <none>
  Volumes:        <none>
Events:
  Type     Reason        Age   From                  Message
  ----     ------        ----  ----                  -------
  Warning  FailedCreate  1s    daemonset-controller  Error creating: pods "bridge-marker-" is forbidden: error looking up service account kube-system/bridge-marker: serviceaccount "bridge-marker" not found'
++ grep 'Number of Nodes Scheduled with Up-to-date Pods'
++ awk -F : '{print $2}'
+ current_nodes=' 0'
+ '[' 0 -eq 0 ']'
+ break

I think if we move the daemonset to the end of the manifest file it will help.

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.