arangodb / kube-arangodb

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

Error: InvalidImageName #1682

Closed drago19sk closed 1 month ago

drago19sk commented 1 month ago

Hi,

I'm trying to install Arango Cluster via operator (version 1.2.41) but every time I get this error message:

Error: InvalidImageName

Failed to apply default image tag "550e8f2ea6e1752cacc937faa13cb01fd00601ebd56bde553094048d2df8afba": couldn't parse image name "550e8f2ea6e1752cacc937faa13cb01fd00601ebd56bde553094048d2df8afba": invalid repository name (550e8f2ea6e1752cacc937faa13cb01fd00601ebd56bde553094048d2df8afba), cannot specify 64-byte hexadecimal strings

I have tried a brand new cluster on Oracle Cloud both Kubernetes version 1.28.2 and 1.29.2. It always throws the same issue. It doesn't matter if I install the operator via Helm or Kubectl.

ajanikow commented 1 month ago

Ref: https://github.com/arangodb/kube-arangodb/issues/1509

ajanikow commented 1 month ago

Hello!

Please, take a look at the issue attached in the commend above - the issue is related to the CRI-O Version, which can be workaround using Operator args.

Best Regards, Adam.

drago19sk commented 1 month ago

Hello @ajanikow ,

thanks for your reply.

I downloaded arango-deployment.yaml from this URL: https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.41/manifests/arango-deployment.yaml and add args --image.discovery.status=false into operator container section:

  containers:
    - name: operator
      imagePullPolicy: Always
      image: arangodb/kube-arangodb:1.2.41
      args:
        - --scope=legacy
        - --operator.deployment
        - --mode.single
        - --chaos.allowed=false
        - --image.discovery.status=false

After deploying into Kubernetes and then trying to deploy the Arango cluster, I had the same issue with the image name. But it is not working. Please explain where or how I can add this flag (--image.discovery.status=false) to Operator Args.

Thank you very much.

ajanikow commented 1 month ago

@drago19sk Can you share your Pod yaml and ArangoDeployment?

drago19sk commented 1 month ago

@ajanikow ,

Thank you very much. Now it is working perfectly.

Just recap maybe for other people with the same issue:

  1. Download and edit this file https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.41/manifests/arango-deployment.yaml

In the container section for the operator add a new flag into args (--image.discovery.status=false):

containers:
    - name: operator
      imagePullPolicy: Always
      image: arangodb/kube-arangodb:1.2.41
      args:
        - --scope=legacy
        - --operator.deployment
        - --mode.single
        - --chaos.allowed=false
        - --image.discovery.status=false
  1. Download ArangoDeploymnet ( I used a production cluster example) and add imageDiscoveryMode: 'direct' like this:
apiVersion: "database.arangodb.com/v1"
kind: "ArangoDeployment"
metadata:
  name: "production-cluster"
spec:
  metrics:
    mode: sidecar
    enabled: true
    image: 'arangodb/arangodb-exporter:0.1.8'
    tls: false
  annotations:
    prometheus.io/scrape: 'true'
    prometheus.io/port: '9101'
    prometheus.io/scrape_interval: '5s'
  mode: Cluster
  image: 'arangodb/arangodb:3.12.0.2'
  imageDiscoveryMode: 'direct'
  environment: Production
ajanikow commented 1 month ago

Perfect! We will fix the issue's root-cause- to not accept discovery if the image ID is invalid.