第 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>

官方文档 中查找有关流程的更多信息。

其他资源

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部