Giter Site home page Giter Site logo

luis-sousa-pinto / db-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kloeckner-i/db-operator

0.0 0.0 0.0 1.01 MB

The DB Operator creates databases and make them available in the cluster via Custom Resource.

License: Apache License 2.0

Shell 0.33% Go 97.87% Makefile 1.47% Dockerfile 0.33%

db-operator's Introduction

DB Operator

The DB Operator eases the pain of managing PostgreSQL and MySQL instances for applications running in Kubernetes. The Operator creates databases and make them available in the cluster via Custom Resource. It is designed to support the on demand creation of test environments in CI/CD pipelines.

Features

DB Operator provides following features:

  • Create/Delete databases on the database server running outside/inside Kubernetes by creating Database custom resource;
  • Create Google Cloud SQL instances by creating DbInstance custom resource;
  • Automatically create backup CronJob with defined schedule (limited feature);

Documentations

Helm Chart is migrated!

The repository contains helm charts for db-operator is moved to https://github.com/kloeckner-i/charts New chart after db-operator > 1.2.7, db-instances > 1.3.0 will be only available in new repository.

Downloading old charts

Installing older version of charts is still possible. Check available versions by following command.

$ helm repo add kloeckneri-old https://kloeckner-i.github.io/db-operator/
$ helm search repo kloeckneri-old/ --versions

Quickstart

To install DB Operator with helm:

$ helm repo add kloeckneri https://kloeckner-i.github.io/charts/
$ helm install --name my-release kloeckneri/db-operator

To see more options of helm values, see chart repo

To see which version is working together check out our version matrix.

Development

Prerequisites

  • go 1.15+
  • docker
  • make
  • kubectl v1.14+ (< v1.21)
  • helm v3.0.2+
  • k3d

To have kubernetes environment locally, you need to install k3d.

makefile help

addexamples           add examples via kubectl create -f examples/
build                 build db-operator docker image
controller-gen        Download controller-gen locally if necessary.
generate              generate supporting code for custom resource types
help                  show this help
k3d_image             rebuild the docker images and upload into your k3d cluster
k3d_install           install k3d cluster locally
k3d_setup             install k3d and import image to your k3d cluster
k3s_mac_deploy        build image and import image to local lima k8s
k3s_mac_image         import built image to local lima k8s
k3s_mac_lima_create   create local k8s using lima
k3s_mac_lima_start    start local lima k8s
lint                  lint go code
manifests             generate custom resource definitions
test                  run go unit test
vet                   go vet to find issues

Developing locally

After code changes

rebuild CRD manifests

$ make manifests

rebuild local docker image

$ make build

Run local kubernetes

$ make k3d_setup

or

$ make k3s_mac_lima_create

Import local docker image

$ make k3d_build

or

$ make k3s_mac_image

Deploy

helm repo add kloeckneri https://kloeckner-i.github.io/charts
helm repo update
helm upgrade my-release kloeckneri/db-operator --set image.repository=my-db-operator --set image.tag=1.0.0-dev --set image.pullPolicy=IfNotPresent --install

Run unit test locally

$ make test

db-operator's People

Contributors

hyunysmile avatar sookloeckner avatar dpeckett avatar dabde avatar allanger avatar efesto avatar vladimir22 avatar toabi avatar leeeboo avatar davidfluck-kong avatar dsalisbury avatar frizzr avatar dem0n3d 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.