Code Monkey home page Code Monkey logo

k8syncer's Introduction

K8Syncer

REUSE status

K8Syncer is a tool to backup k8s resources into some kind of storage. While it was designed to be easily extensible with further storage options, the primary goal was to be able to backup resources from a k8s cluster into a git repository, and the tool does not support much more than this use-case at the moment.

See here for a documentation of the supported storage types and here for how to configure the tool.

Limitations

At the moment, K8Syncer reacts only to changes on the metadata fields generation, labels, and ownerReferences of k8s resources. This means that resources kinds for which the k8s apiserver does not increase the generation are not synced on a spec update. This applies to namespaces and secrets, for example. A workaround would be to trigger a sync by changing a label on the resource.

How to use K8Syncer

Although it is possible to run K8Syncer locally - one simply has to provide its configuration via --config and a kubeconfig for the target cluster, either via KUBECONFIG env var or --kubeconfig - it was designed to run as a controller inside a kubernetes cluster. The easiest way to install it is by using the provided helm chart.

image: # can usually be left out
  repository: eu.gcr.io/gardener-project/k8syncer
  tag: "0.1.0"

config:
  # kubeconfig has to be provided if k8syncer should watch another cluster than the one it is running in
  # kubeconfig: |
  #   apiVersion: v1
  #   clusters:
  #   - cluster: ...

  syncConfigs: # goes directly into the k8syncer configuration, see docs/usage/configuration.md
  - id: dummyWatcher
    resource:
      group: k8syncer.gardener.cloud
      version: v1
      kind: Dummy
    storageRefs:
    - name: mockStorage
    state:
      type: annotation
      verbosity: detail

  storageDefinitions: # goes directly into the k8syncer configuration, see docs/usage/configuration.md
  - name: mockStorage
    type: mock

# resources:
#   requests:
#     cpu: 100m
#     memory: 256Mi
#   limits:
#     cpu: 500m
#     memory: 2Gi

logging:
  verbosity: info # error, info, or debug (defaults to 'info' if omitted)

Learn more!

Have a look at the documentation:

k8syncer's People

Contributors

diaphteiros avatar guewa avatar dependabot[bot] avatar gardener-robot-ci-1 avatar gardener-robot-ci-2 avatar gardener-robot-ci-3 avatar raphaelvogel avatar

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.