【问题标题】:Use External standalone-full.xml by the RHPAM kie pod in Openshift通过 Openshift 中的 RHPAM kie pod 使用 External Standalone-full.xml
【发布时间】:2021-02-02 19:51:53
【问题描述】:

我只想在 Openshift 中运行的 RHPAM kie 服务器 pod 中使用自定义的standalone-full.xml。我已经从文件中创建了 configmap,但不知道如何设置它。

我像这样创建了配置映射

oc create configmap my-config --from-file=standalone-full.xml.

并编辑了rhpam kie服务器的deploymentconfig,

   volumeMounts:
      - name: config-volume
        mountPath: /opt/eap/standalone/configuration
  volumes:
    - name: config-volume
      configMap:
        name: my-config

它启动一个新容器,创建状态容器并失败并出现错误(从 1 降到 0)

我设置的 configmap 正确吗?

【问题讨论】:

    标签: openshift jbpm openshift-enterprise


    【解决方案1】:

    您可以将 configmap 作为卷挂载到 pod 中。 Here 是一个很好的例子:只需在 pod 的规范中添加 'volumes'(将 configmap 指定为卷)和 'volumeMounts'(指定挂载点)块:

    apiVersion: v1
    kind: Pod
    metadata:
      name: dapi-test-pod
    spec:
      containers:
        - name: test-container
          image: k8s.gcr.io/busybox
          command: [ "/bin/sh", "-c", "ls /etc/config/" ]
          volumeMounts:
          - name: config-volume
            mountPath: /etc/config
      volumes:
        - name: config-volume
          configMap:
            # Provide the name of the ConfigMap containing the files you want
            # to add to the container
            name: special-config
      restartPolicy: Never
    

    【讨论】:

      猜你喜欢
      • 2013-01-13
      • 1970-01-01
      • 1970-01-01
      • 2014-11-09
      • 2013-10-31
      • 1970-01-01
      • 2021-03-02
      • 1970-01-01
      • 2015-08-23
      相关资源
      最近更新 更多