【发布时间】: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