GithubHelp home page GithubHelp logo

metalmatze / kube-cockroachdb Goto Github PK

View Code? Open in Web Editor NEW
28.0 2.0 6.0 348 KB

Deploy CockroachDB on Kubernetes using YAML or an Operator

License: Apache License 2.0

Makefile 9.33% Jsonnet 38.73% Go 50.55% Dockerfile 1.38%
cockroachdb-operator kube-cockroachdb jsonnet cockroachdb-clusters

kube-cockroachdb's People

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

Watchers

 avatar  avatar

kube-cockroachdb's Issues

Add Prometheus recording and alerting rules and Grafana dashboards

I've created some recording and alerting rules based on the metrics we get when monitoring a CockroachDB instance.
Going forward I want to add these as a mixin the project and then even utilize them in the generated YAML and Operator to even apply them as PrometheusRule resources to the cluster.
Dashboards need to be applied manually or imported via jsonnet.

arm64 images

Trying to use this on minikube on arm64 (m1 max) and it doesn't work as there are no arm64 images.

Add short name for CRD

It's rather tiresome to keep writing kubectl get cockroachdb, it would be neat to have a shortname in the CRD.

Maybe cdb? Or crdb?

Happy to add when agreed on a name.

@metalmatze

Add backups with Kubernetes CronJobs

On one of my projects I've created a Kubernetes CronJob to automatically backup databases to S3-compatible object storage (with minio).
Going forward this should become a part of kube-cockroachdb.

We need to parameterize a few things, like schedule and secrets, to make it really work for most people.

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: cockroachdb-backup
  namespace: app
spec:
  schedule: "0 */12 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: cockroachdb
            image: cockroachdb/cockroach:v20.1.0
            command:
            - /bin/bash
            - -ecx
            - exec /cockroach/cockroach dump --url $DSN app > /backups/app.sql
            env:
              - name: DSN
                valueFrom:
                  secretKeyRef:
                    key: DSN
                    name: app
            volumeMounts:
              - name: backups
                mountPath: /backups
          - name: minio
            image: minio/mc:RELEASE.2020-04-04T05-28-55Z
            command:
            - /bin/sh
            - -c
            - sleep 10 && mc cp /backups/app.sql app-$(date +%Y-%m-%d-%H-%M-%S).sql
            env:
              - name: MC_HOST_digitalocean
                value: 'https://[email protected]'
            volumeMounts:
              - name: backups
                mountPath: /backups
          volumes:
            - name: backups
              emptyDir: {}
          restartPolicy: OnFailure

Please add a reaction to indicate you want this feature and leave a comment for other requirements around this feature.

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.