Code Monkey home page Code Monkey logo

greptimedb-operator's People

Contributors

daviderli614 avatar dependabot[bot] avatar sunng87 avatar zyy17 avatar

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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

greptimedb-operator's Issues

implement controller of GreptimeDB CRD

Implement the key process of GreptimeDBCluster controller and bring the mock cluster up.

  • implement the basic process of controller and bootstrap the mock cluster;
  • add basic e2e test framework;
  • add basic deployments;
  • add install.sh to bootstrap the whole cluster;

Implement gtctl command

The gtctl command is the devops tool for managing greptimdb cluster:

  • gtctl create cluster
  • gtctl scale cluster datanode 10
  • ...

fix: failed to parse toml config

datanode container CrashLoopBackOff,logs is

ERROR greptime: Fatal error occurs! err.msg=Failed to parse config, source: missing field `metasrv_addrs` for key `meta_client_opts` at line 16 column 1 err.code=InvalidArguments err.source=missing field `metasrv_addrs` for key `meta_client_opts` at line 16 column 1 err.backtrace= 0 <snafu::backtrace_shim::Backtrace as snafu::GenerateImplicitData>::generate::hd7ab405b6b515007

int the https://github.com/GreptimeTeam/greptimedb/blob/develop/config/datanode.example.toml,`metasrv_addr` is update to metasrv_addrs

Support inject config file to greptimedb

Currently, GreptimeDB will use the following configurations:

  1. command line options;
  2. configuration file(toml format);
  3. (option) env;

I think 2 and 3 is now supported(maybe just need some small modifications). To support 1, maybe we need to add the new fields and use configmaps.

Check service readiness

The components of GreptimeDB should provide some kind of readiness probe and the operator should use the probe to check service readiness to update status.

Add `WalDir` and `CacheDir` field in Storage

Background

When deploying the greptimedb cluster, it's important to set WalDir and CacheDir:

  • The data in WalDir should be maintained in some distributed block storage(like aws EBS);
  • The data in CacheDir can be maintained in local disk storage to reach better performance;

implement GreptimeDBCluster CRD

GreptimeDBCluster is the Kubernetes CRD that describe the desired state of GreptimeDB cluster. For example, we can describe our own greptimedb cluster as the following YAML:

apiVersion: greptime.cloud/v1alpha1
kind: GreptimeDBCluster
metadata:
  name: basic-gt-cluster
  namespace: default
spec:
  httpServicePort: 8080
  grpcServicePort: 9090
  frontend:
    image: greptime/frontend:v0.1-alpha
    replicas: 1
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"
  meta:
    image: greptime/meta:v0.1-alpha
    replicas: 3
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"
  datanode:
    image: greptime/datanode:v0.1-alpha
    replicas: 1
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"
        cpu: "500m"

GreptimeDBCluster should describe the following state:

  • describe the component spec(frontend/meta/datanode), including their service and storage spec;
  • describe the specified cluster settings, like httpServicePort;
  • describe the current status of cluster;

Add the CRD of deploy standalone greptimedb

Background

In many scenarios, users prefer to use standalone greptimedb. We can design the new CRD to support standalone greptimedb, making the greptimedb management easier.

Datanode storage.storageClassName seems to be ignored

storageclass.storage.k8s.io "standard" not found

Cluster manifest
apiVersion: greptime.io/v1alpha1
kind: GreptimeDBCluster
metadata:
  annotations:
    meta.helm.sh/release-name: testdb
    meta.helm.sh/release-namespace: greptime
  creationTimestamp: "2023-03-06T17:51:30Z"
  finalizers:
  - greptimedbcluster.greptime.io/finalizer
  generation: 2
  labels:
    app.kubernetes.io/managed-by: Helm
  name: testdb
  namespace: greptime
  resourceVersion: "2154161"
  uid: ff459b09-ab25-4feb-bcae-a9e8d2bbd69d
spec:
  base:
    main:
      image: docker.io/greptime/greptimedb:0.1.0-alpha-20230220-weekly
      resources:
        limits:
          cpu: 500m
          memory: 128Mi
        requests:
          cpu: 250m
          memory: 64Mi
  datanode:
    replicas: 3
    storage:
      storageClassName: hostpath
      storageRetainPolicy: Retain
      storageSize: 10Gi
  frontend:
    replicas: 1
    service: {}
  grpcServicePort: 4001
  httpServicePort: 4000
  initializer:
    image: docker.io/greptime/greptimedb-initializer:0.1.0-alpha.9
  meta:
    etcdEndpoints:
    - etcd.greptime.svc.cluster.local:2379
    replicas: 1
  mysqlServicePort: 4002
  openTSDBServicePort: 4242
  postgresServicePort: 4003
status:
  clusterPhase: Starting
  datanode:
    readyReplicas: 0
    replicas: 3
  frontend:
    readyReplicas: 0
    replicas: 0
  meta:
    etcdEndpoints:
    - etcd.greptime.svc.cluster.local:2379
    readyReplicas: 1
    replicas: 1
Created PVC
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: "2023-03-06T17:37:55Z"
  finalizers:
  - kubernetes.io/pvc-protection
  labels:
    app.greptime.io/component: testdb-datanode
  name: datanode-testdb-datanode-0
  namespace: greptime
  resourceVersion: "2152548"
  uid: 4ad6c51d-9f5e-4678-9a3f-56fc05233cfc
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: standard
  volumeMode: Filesystem
status:
  phase: Pending

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.