第 2 章 新功能及功能增强
在这个版本中,管理员可以配置要在所有用户命名空间中复制的 Secret、ConfigMap 和 PersistentVolumesClaims。因此,您可以在所有用户间共享证书、secret 和配置文件。
例如,创建以下 ConfigMap 使 Mavensettings.xml 文件在所有用户的 Container Development Environment (CDE)中提供:
kind: ConfigMap
apiVersion: v1
metadata:
name: user-settings-xml
namespace: {prod-namespace}
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: workspaces-config
annotations:
controller.devfile.io/mount-as: subpath
controller.devfile.io/mount-path: /home/user/.m2
data:
settings.xml: |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/home/user/.m2/repository</localRepository>
<interactiveMode>true</interactiveMode>
<offline>false</offline>
</settings>
在 官方文档 中查找有关流程的更多信息。
其他资源