Giter Club home page Giter Club logo

vcluster-fs-syncer's Introduction

vcluster-fs-syncer

go.dev reference Generated via Bootstrap Coverage Status

Synchronizes /var/lib/kubelet/pods into predictable vcluster scoped paths at /var/lib/loft/<vclusterName>/pods

Contributing

Please read the CONTRIBUTING.md document for guidelines on developing and contributing changes.

High-level Overview

This service is a light-weight service that reacts to pod creation, update, and delete events.

When a pod event is received, it looks for the following annotations to determine if a pod is deployed in a vcluster and to grab information on the virtual pod (within the vcluster):

  • vcluster.loft.sh/uid - UUID of the pod inside the vcluster
  • vcluster.loft.sh/name - Name of the pod inside the vcluster
  • vcluster.loft.sh/namespace - Namespace of the pod inside the vcluster
  • vcluster.loft.sh/managed-by - Name of the vcluster that the pod is deployed in

If the pod contains all of these annotations, the pod is considered to be deployed in a vcluster and the pod directory is bind mounted into the vcluster scoped directory at /var/lib/loft/<vclusterName>/pods/<podUID>.

If the pod does not contain all of these annotations, the pod is considered to be deployed in the host cluster and no action is taken.

The ideal use case for this service is to run daemonsets inside of a virtual cluster that need access to the pod directory. For example, Velero which needs it for the restic (now called node-agent) daemonset. In order to use the per-vcluster pod directory, the /var/lib/loft/<vclusterName>/pods directory must be mounted in your Kubernetes resource at whatever path you need it to be.

Deploying

The vcluster-fs-syncer is deployed as a Kubernetes Deployment. It is deployed in the vcluster-fs-syncer--bento1a namespace.

To deploy, run the following:

./scripts/shell-wrapper.sh deploy-to-dev.sh show | kubectl apply -f -

Adding and Deleting Service in Development Environment

First, make sure you set up your development environment.

To add this service to your developer environment:

devenv apps deploy vcluster-fs-syncer

To delete this service from your developer environment:

devenv apps delete vcluster-fs-syncer

vcluster-fs-syncer's People

Contributors

dependabot[bot] avatar deregtd avatar edmangimelli-outreach avatar getoutreach-ci-1[bot] avatar jaredallard avatar

Stargazers

 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

Forkers

sitedata

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.