arangodb / kube-arangodb

ArangoDB Kubernetes Operator - Start ArangoDB on Kubernetes in 5min
https://arangodb.github.io/kube-arangodb/
Apache License 2.0
229 stars 73 forks source link

Readiness probe error with typo on server port #1665

Open carlosrmendes opened 6 months ago

carlosrmendes commented 6 months ago

Something is not right, the ARANGODB_SERVER_PORT env var inside server pod is with proto + svc ip + port instead of just the port number:

$ env | grep ARANGODB_SERVER_PORT
ARANGODB_SERVER_PORT=tcp://10.152.183.220:8529

kube-arangodb version: 1.2.40 kubernetes version: v1.29.4 microk8s

yaml:

apiVersion: database.arangodb.com/v1
kind: ArangoDeployment
metadata:
  name: arangodb-server
spec:
  mode: ActiveFailover
  architecture: [ arm64 ]
  bootstrap:
    passwordSecretNames:
      root: arangodb-root-passwd
  externalAccess:
    type: None
  agents:
    nodeSelector: {}
    tolerations: []
    resources:
      requests:
        cpu: 100m
        memory: 256Mi
      limits:
        cpu: 100m
        memory: 256Mi
  dbservers:
    nodeSelector: {}
    tolerations: []
    resources:
      requests:
        cpu: 100m
        memory: 256Mi
        storage: 1Gi
      limits:
        cpu: 100m
        memory: 256Mi

pod events:

  Warning  Unhealthy  <invalid>  kubelet  (combined from similar events): Readiness probe failed: {"level":"info","path":"/secrets/cluster/jwt/token","time":"2024-05-10T22:19:20Z","message":"Try to use file"}
{"level":"info","token":"token","time":"2024-05-10T22:19:20Z","message":"Using JWT Token"}
{"level":"error","error":"Get \"https://127.0.0.1:tcp//10.152.183.220:8529/_admin/server/availability\": dial tcp: lookup 127.0.0.1:tcp: no such host","time":"2024-05-10T22:19:20Z","message":"Fatal"}
jwierzbo commented 6 months ago

ActiveFailover it is not supported anymore and has been removed in 3.12 ArangoDB. Please check Single or Cluster mode

ajanikow commented 6 months ago

Hello!

The issue is with the name of the ArangoDeployment, the name collides with the service and overrides the default env in the Pod spec.

Can you please change your ArangoDeployment name? We will fix port discovery.

Best Regards, Adam.