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

Add dynamic environment variable substitution to subpaths #46

Merged
merged 1 commit into from
Jul 20, 2018

Conversation

fatsheep9146
Copy link

@fatsheep9146 fatsheep9146 commented Jul 19, 2018

在对接内部用户日志需求时,需要提供一种机制使同一个 deployment 里面的 pod 在共享某一块 volume 存储时(cephfs),能够让 k8s 帮助它在这个 volume 下面为每个 pod 单独创建一个目录,目录名称可以基于 downwardAPI 进行渲染,

 volumeMounts:
 - name: log
   mountPath: /var/log
   subPath: $(POD_NAME)
volumes:
- name: log
  persistentVolumeClaim:
      claimName: applog

相关 PR
kubernetes#49388
kubernetes/enhancements#559

@cofyc cofyc merged commit 7a77e7e into kpaas-io:ke-release-1.9 Jul 20, 2018
@zqzzq
Copy link

zqzzq commented Jan 31, 2019

您好,请问应该如何打开VolumeSubpathEnvExpansion特性开关,我是在kube-apiserver.manifest配置文件里加了- --feature-gates=VolumeSubpathEnvExpansion=true这么一条命令,结果尝试了一下不行,容器里没有subPath对应的目录

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants