Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

dfdaemon fails to set registry mirror with config yaml #1536

Open
yttan opened this issue Mar 29, 2021 · 0 comments
Open

dfdaemon fails to set registry mirror with config yaml #1536

yttan opened this issue Mar 29, 2021 · 0 comments

Comments

@yttan
Copy link

yttan commented Mar 29, 2021

Ⅰ. Issue Description

dfdaemon fails to read registry_mirror.remote from config

Ⅱ. Describe what happened

the dfdaemon config yaml in the container

bash-4.4# cat /etc/dragonfly/dfdaemon.yml

dfget_flags: ["--node","supernode:8002=1"]
proxies:
  - regx: blobs/sha256.*
  - regx: testrea
registry_mirror:
  remote: docker.abctest.com
  insecure: true

and what I saw in the dfdaemon log

2021-03-29 12:31:32.363 INFO sign:1 : using config: {"registry_mirror":{"remote":"https://index.docker.io","certs":null,"insecure":true,"direct":false},"proxies":[{"regx":"blobs/sha256.*","use_https":false,"direct":false,"redirect":""},{"regx":"testrea","use_https":false,"direct":false,"redirect":""}],"hijack_https":null,"port":65001,"hostIp":"127.0.0.1","certpem":"","keypem":"","verbose":false,"maxprocs":4,"dfget_flags":["--node","supernode:8002=1"],"supernodes":null,"ratelimit":"20MB","workHome":"/root/.small-dragonfly","localrepo":"/root/.small-dragonfly/dfdaemon/data","dfpath":"/opt/dragonfly/df-client/dfget","logConfig":{"maxSize":0,"maxBackups":0,"path":""},"localIP":"","peerPort":0,"streamMode":false}

All other fields are correct. Only registry_mirror.remote is not what I set in dfdaemon config

Ⅲ. Describe what you expected to happen

registry_mirror.remote field in the log should be docker.abctest.com as I set in the configuration file instead of https://index.docker.io

Ⅳ. How to reproduce it (as minimally and precisely as possible)

use the following yaml to create a daemonset, and see logs in container

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: dfclient
  namespace: kube-system
  labels:
    app: dfclient
spec:
  selector:
    matchLabels:
      app: dfclient
  template:
    metadata:
      labels:
        app: dfclient
    spec:
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      nodeSelector:
        dragonfly: "true"
      containers:
        - name: dfclient
          image: dragonflyoss/dfclient:1.0.2
          imagePullPolicy: IfNotPresent
          volumeMounts:
            - name: config
              mountPath: /etc/dragonfly
          env:
            - name: HOSTNAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
          ports:
            - containerPort: 65001
              name: http
      volumes:
        - name: config
          configMap:
            name: dfdaemon
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: dfdaemon
  namespace: kube-system
data:
  dfdaemon.yml: |
    dfget_flags: ["--node","supernode:8002=1"]
    proxies:
      - regx: blobs/sha256.*
    registry_mirror:
      remote: docker.testabc.com
      insecure: false

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • dragonfly version: 1.0.2
  • OS (e.g. from /etc/os-release): CentOS-7
  • Kernel (e.g. uname -a):
  • Install tools: k8s
  • Others:
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant