Skip to content

Operator v1.2.50 ignores custom args and always injects default wrapper/flags #1945

@rahulduvedi

Description

@rahulduvedi

ArangoDB Kubernetes Operator Custom Args Issue

Problem Description

Running ArangoDB Kubernetes Operator v1.2.50 in namespace kube-arangodb in Single mode. Need to pass custom startup flags to the ArangoDB server, but the operator's built-in wrapper:

  • Injects its own arangod command and default args (including --log.file=/var/log/arangodb3/arangod.log)
  • Ignores or drops any overrides provided via spec.single.args or the v2alpha1 override.container.args fields

This results in ArangoDB crashing with:

cannot write to file '/var/log/arangodb3/arangod.log': Permission denied

The default file-logger is opened before custom flags take effect.

Attempted Solutions

1. spec.single.args (v1 API)

  • Result: Appends custom flags, but default --log.file is still present before mine
  • Outcome: PermissionDenied persists

2. v2alpha1 override.container.command/args

  • Result: CRD conversion to v1 silently drops these fields
  • Outcome: Operator never sees them

3. --log.output=- & --log.file=- flags

  • Result: ArangoDB still opens default arangod.log before CLI parsing
  • Outcome: No effect

4. Features: ephemeral-volumes: true + secured-containers: true

  • Result: Makes /var/log/arangodb3 writable by arangod user
  • Outcome: Wrapper still hard-codes and opens default log file

5. InitContainer chmod 777 /var/log/arangodb3

  • Result: Grants permissions
  • Outcome: No effect because wrapper's default args are still applied too early

Minimal Reproduction (Single-Server)

apiVersion: database.arangodb.com/v1
kind: ArangoDeployment
metadata:
  name: test-arangodb
  namespace: kube-arangodb
spec:
  mode: Single
  image: arangodb/arangodb:latest
  architecture: ["amd64"]
  auth:
    jwtSecretName: None
  features:
    ephemeral-volumes: true
    secured-containers: true
  single:
    args:
      - --log.output=-
      - --log.file=-
      - --temp.path=/data/tmp
      - --javascript.app-path=/data/apps
    volumeClaimTemplate:
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 1Gi
    volumes:
      - name: log-volume
        emptyDir: {}
    volumeMounts:
      - name: log-volume
        mountPath: /var/log/arangodb3

Actual Pod Command & Args

$ kubectl get pod -l arango_deployment=test-arangodb -n kube-arangodb \
    -o jsonpath='{.items[0].spec.containers[0].command}{"\n"}{.items[0].spec.containers[0].args}'

Output:

["/usr/sbin/arangod","--database.directory=/data","--log.output=+","--server.authentication=false","--server.endpoint=tcp://[::]:8529"]

Expected Behavior

  1. Operator should honor spec.single.args (and/or the v2alpha1 override API) by replacing or at least prepending its defaults
  2. --log.file=- and --log.output=- should disable the file logger entirely
  3. override.container.command/args fields in v2alpha1 should be respected without requiring a full API-version switch or operator upgrade

Required Custom Flags

  • --log.output=-
  • --javascript.app-path=/data/apps
  • --temp.path=/data/tmp
  • --log.file=-

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions