Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

use data from ConfigMap with some hardcoded modifications #360

Description

@edmondsw

We have a ConfigMap with some data in it, and I want to pull that data into another ConfigMap but with a few changes to add or override some things.

I think we should be able to use overrideStrategy for this, but it currently seems to expect the override data to come from another ConfigMap, whereas I want to be able to hardcode the data I want to add/override into the mtp. To do this we would need to be able to specify a block of json or yaml instead of a configMapKeyRef

Here's an example of one of the things I tried that did not work:

apiVersion: deploy.razee.io/v1alpha2
kind: MustacheTemplate
metadata:
  name: test-mtp-template
  namespace: mynamespace
spec:
  templateEngine: handlebars
  env:
  - name: foo
    valueFrom:
      configMapKeyRef:
        name: common-config
        key: foo
        type: jsonString
  - name: foo
    overrideStrategy: merge
    value: '{"bar": "something"}'
  strTemplates:
  - |
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: foo-cm
      namespace: mynamespace
    data:
      foo: "{{{ foo }}}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions