挂载 configmap 创建以“..”开头的文件

Mount config map creates files starting with ".."

我有以下配置图:

apiVersion: v1
data:
  config.yaml: |-
    inputRepo: "dummy_input"
    params:
      - _:
          CPU: "0.5"
          SIDECAR_CPU: "0.5"
          MAX_MEM: "700Mi"
          MEM: "500Mi"
          FORCE_PULL_IMAGE: "true"
      - stage3:
          AFTER: "stage2"
          PARALLELISM:  "2"
  stage1.tpl.yml: |-
    stage: dummy_stage1

    image: registry.gitlab.com/uit-sfb/metakube/pipeline-example/mk-sleep:0.2.0-SNAPSHOT

    entryScript: |
      $$APP$$ --fail $FAIL --duration $SLEEP --in $input --out $OUT/out

    input:
      pfs:
        name: input
        repo: dummy_input
        glob: "/metadata.sh"
  stage2.tpl.yml: |-
    stage: dummy_stage2

    image: registry.gitlab.com/uit-sfb/metakube/pipeline-example/mk-sleep:0.2.0-SNAPSHOT

    entryScript: |
      $$APP$$ --fail $FAIL --duration $SLEEP --in $input --out $OUT/out

    input:
       pfs:
         name: input
         repo: dummy_stage1
         glob: "/data/out"
  stage3.tpl.yml: |-
    stage: dummy_stage3

    image: registry.gitlab.com/uit-sfb/metakube/pipeline-example/mk-sleep:0.2.0-SNAPSHOT

    entryScript: |
      $$APP$$ --fail $FAIL --duration $SLEEP --in $input --out $OUT/out

    input:
       pfs:
         name: input
         repo: dummy_stage1
         glob: "/data/out"

我将其安装到容器中。我希望获得在 CM 中定义的 4 个文件,但实际情况是除了以下内容我还获得了 4 个文件:

/home/sfb/pipeline/templates/..2020_02_25_18_48_05.754065631/stage1.tpl.yml
/home/sfb/pipeline/templates/..2020_02_25_18_48_05.754065631/config.yaml
/home/sfb/pipeline/templates/..2020_02_25_18_48_05.754065631/stage2.tpl.yml
/home/sfb/pipeline/templates/..2020_02_25_18_48_05.754065631/stage3.tpl.yml
/home/sfb/pipeline/templates/..data/stage1.tpl.yml
/home/sfb/pipeline/templates/..data/config.yaml
/home/sfb/pipeline/templates/..data/stage2.tpl.yml
/home/sfb/pipeline/templates/..data/stage3.tpl.yml

以'..'开头的实际上是符号链接,但它们从何而来??我注意到每次 pod 重新启动时,路径看起来就像日期发生了变化。有什么想法吗?

这是 pod 清单:

apiVersion: v1
kind: Pod
metadata:
  ...
  name: metakube-mkadm-u0-ttzsn
  namespace: mktest3
spec:
  containers:
    - command:
        - bash
        - '-c'
        - /opt/docker/bin/mkadm -- pipeline apply --pachd $MK_PACHYDERM_ENDPOINT
      image: 'mkadm:0.2.0-SNAPSHOT'
      name: deploy
      resources:
        limits:
          cpu: '2'
          memory: 1Gi
        requests:
          cpu: 100m
          memory: 1Gi
      volumeMounts:
        - mountPath: /home/sfb/pipeline/configOverride
          name: conf-override
        - mountPath: /home/sfb/pipeline/templates
          name: templates
        - mountPath: /home/sfb/mnt/packages/..
          name: packages
  volumes:
    - configMap:
        defaultMode: 420
        name: metakube-pipeline
      name: conf-override
    - configMap:
        defaultMode: 420
        name: pipeline-templates
      name: templates
    - name: packages
      persistentVolumeClaim:
        claimName: metakube-packages
status:
...

我认为以“..”开头的符号链接是由 OpenShift 创建的,作为其回滚机制实现的一部分。