【问题标题】:Mount config map creates files starting with ".."挂载配置映射创建以“..”开头的文件
【发布时间】:2020-03-03 23:43:02
【问题描述】:

我有以下配置图:

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:
...

【问题讨论】:

  • 请问你是如何安装它的?
  • volumeMounts: - name: templates mountPath: /home/sfb/pipeline/templates volumes: - name: conf-override configMap: name: templates-pipeline
  • 请问你能用清单更新你的问题吗?
  • 完成。但我认为它来自 OpenShift,这是他们回滚机制的一部分。不过,我不是 100% 确定。
  • 您是否尝试过使用不同的图片来隔离您的图片有问题的可能性?

标签: kubernetes configmap


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2019-09-11
    • 2019-12-04
    • 1970-01-01
    • 2017-09-29
    • 2017-01-08
    • 2012-03-07
    • 2019-03-01
    • 1970-01-01
    • 2021-09-08
    相关资源
    最近更新 更多