Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETCD Defrag Job TLS Flags & Endpoint URL Issue #31255

Open
sachinphogat opened this issue Jan 8, 2025 · 1 comment · May be fixed by #31270
Open

ETCD Defrag Job TLS Flags & Endpoint URL Issue #31255

sachinphogat opened this issue Jan 8, 2025 · 1 comment · May be fixed by #31270
Assignees
Labels
etcd tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@sachinphogat
Copy link

sachinphogat commented Jan 8, 2025

Name and Version

etcd/10.7.0

What steps will reproduce the bug?

Deploy ETCD Chart v10.7.0 with etcd defrag enabled and tls auth enabled.

Cronjob will be created with the below flags.

            env:
            - name: BITNAMI_DEBUG
              value: "false"
            - name: ETCDCTL_CA_FILE
              value: /opt/bitnami/etcd/certs/client/ca.crt
            - name: ETCDCTL_KEY_FILE
              value: /opt/bitnami/etcd/certs/client/tls.key
            - name: ETCDCTL_CERT_FILE
              value: /opt/bitnami/etcd/certs/client/tls.crt

Also Endpoint is created as below.

            - --endpoints=[http://etcd-etcd-0.etcd-etcd-headless.iks-6233d4e4-f051-4c0e-ac2a-fcbdf7278249.svc.cluster.local:2379,http://etcd-etcd-1.etcd-etcd-headless.iks-6233d4e4-f051-4c0e-ac2a-fcbdf7278249.svc.cluster.local:2379,http://etcd-etcd-2.etcd-etcd-headless.iks-6233d4e4-f051-4c0e-ac2a-fcbdf7278249.svc.cluster.local:2379]

Are you using any custom parameters or values?

    auth:
      client:
        caFilename: ca.crt
        certFilename: tls.crt
        certKeyFilename: tls.key
        enableAuthentication: true
        existingSecret: etcd-etcd-client-tls
        secureTransport: true
        useAutoTLS: false
      peer:
        caFilename: ca.crt
        certFilename: tls.crt
        certKeyFilename: tls.key
        enableAuthentication: true
        existingSecret: etcd-etcd-peer-tls
        secureTransport: true
        useAutoTLS: false
      rbac:
        create: false
    autoCompactionRetention: 3h
    customLivenessProbe:
      exec:
        command:
        - /opt/bitnami/scripts/etcd/healthcheck.sh
      failureThreshold: 5
      initialDelaySeconds: 60
      periodSeconds: 30
      successThreshold: 1
      timeoutSeconds: 5
    defrag:
      enabled: true
    replicaCount: 3

What is the expected behavior?

ETCD Degrag should get completed successfully.

What do you see instead?

{"level":"warn","ts":"2025-01-08T08:03:37.596559Z","caller":"flags/flag.go:93","msg":"unrecognized environment variable","environment-variable":"ETCDCTL_CA_FILE=/opt/bitnami/etcd/certs/client/ca.crt"}
{"level":"warn","ts":"2025-01-08T08:03:37.596746Z","caller":"flags/flag.go:93","msg":"unrecognized environment variable","environment-variable":"ETCDCTL_KEY_FILE=/opt/bitnami/etcd/certs/client/tls.key"}
{"level":"warn","ts":"2025-01-08T08:03:37.596757Z","caller":"flags/flag.go:93","msg":"unrecognized environment variable","environment-variable":"ETCDCTL_CERT_FILE=/opt/bitnami/etcd/certs/client/tls.crt"}
{"level":"warn","ts":"2025-01-08T08:03:48.198505Z","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:63","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0001741e0/etcd-etcd-0.etcd-etcd-headless.6233d4e4-f051-4c0e-ac2a-fcbdf7278249.svc.cluster.local:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing: dial tcp: address http://etcd-etcd-2.etcd-etcd-headless.6233d4e4-f051-4c0e-ac2a-fcbdf7278249.svc.cluster.local:2379]: too many colons in address\""}
Error: failed to fetch endpoints from etcd cluster member list: context deadline exceeded

Additional information

We need to change env variable based on etcdctl v3 as current ones are only v2 supported.
Also, we need to add endpoints as https instead of http.

@sachinphogat sachinphogat added the tech-issues The user has a technical issue about an application label Jan 8, 2025
@github-actions github-actions bot added the triage Triage is needed label Jan 8, 2025
@carrodher carrodher added the etcd label Jan 8, 2025
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
etcd tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
3 participants