1

I just want to use customized standalone-full.xml in the RHPAM kie server pod which is running in Openshift. I have created the configmap from file and not sure how to set it.

I created the configmap like this

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

And edited the deploymentconfig of rhpam kie server,

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

It starts a new container,with sttaus container creating and fails with error(sclaing down 1 to 0)

Am i setting the configmap correct?

anil
  • 57
  • 2
  • 10

1 Answers1

0

You can mount the configmap in a pod as a volume. Here's a good example: just add 'volumes' (to specify configmap as a volume) and 'volumeMounts' (to specify mount point) blocks in the pod's spec:

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
Oligzeev
  • 511
  • 3
  • 7