greptimedb-operator icon indicating copy to clipboard operation
greptimedb-operator copied to clipboard

incorrect name for etcd cluster endpoint in documentation

Open logwiser opened this issue 1 year ago • 1 comments

There seems to be an issue with the documentation

https://github.com/GreptimeTeam/greptimedb-operator/blob/main/examples/README.md says

The following examples suppose that you have installed the etcd cluster in the etcd namespace with the service endpoint etcd.etcd-cluster.svc.cluster.local:2379

If the namespace is etcd, the endpoint is expected to have a DNS suffix of etcd.svc.cluster.local instead

Thus by extension, the example in https://github.com/GreptimeTeam/greptimedb-operator/blob/main/examples/cluster/basic/cluster.yaml is a bit incorrect.

Here is an example that worked better for me

Step-1

Create an etcd cluster in namespace called meta

helm upgrade --install \
	etcd-greptime oci://registry-1.docker.io/bitnamicharts/etcd \
--set replicaCount=3 \
--set auth.rbac.create=false \
--set auth.token.enabled=false \
--set serviceAccount.create=true \
--set serviceAccount.name=demogdb \
-n meta

Note the etcd endpoint, which comes out to be etcd-greptime.meta.svc.cluster.local:2379 etcd-greptime comes from the helm name and meta comes from the specified namespace

Step-2

Deploy greptimeDB in the namespace called greptime-basic

---
apiVersion: v1
kind: Namespace
metadata:
  name: greptime-basic
  labels:
    mode: basic

---
apiVersion: greptime.io/v1alpha1
kind: GreptimeDBCluster
metadata:
  name: basic
  namespace: greptime-basic
spec:
  base:
    main:
      image: greptime/greptimedb:latest
  frontend:
    replicas: 1
  meta:
    replicas: 1
    etcdEndpoints:
      - "etcd-greptime.meta.svc.cluster.local:2379"
  datanode:
    replicas: 1

logwiser avatar Dec 29 '24 17:12 logwiser

@logwiser Thank you for your report 😊. It seems like an bug in the readme.

I think we should fix it like this:

The following examples suppose that you have installed the etcd cluster in the etcd-cluster namespace with the service endpoint etcd.etcd-cluster.svc.cluster.local:2379.

zyy17 avatar Jan 07 '25 16:01 zyy17