pega-helm-charts icon indicating copy to clipboard operation
pega-helm-charts copied to clipboard

Specifying additional context.xml resource attributes

Open dcasavant opened this issue 4 years ago • 5 comments

Is your feature request related to a problem? Please describe. Today the only way I can add custom attributes to the resource object in context.xml is to extend the Docker image or inject an entire context.xml.tmpl file. I would rather make a minimal modification to the pega.yaml file and inject the attributes without overriding any configuration files.

Describe the solution you'd like I would like the ability to add custom resource attributes in the context.xml file via injection. These could bee added via configuration in the pega.yaml file.

Example:

tier:
  name: "web"
  custom:
    resource-attribute:
      - name: "testOnBorrow"
        value: "true"

Describe alternatives you've considered

  • Extend the Docker image.
  • Override the context.xml.tmpl file.

dcasavant avatar Mar 26 '20 18:03 dcasavant

I think this is a great suggestion, but first we need a clear definition of what should be in the context.xml vs other available config files (e.g. prweb.xml, prconfig.xml, etc)

pega-embate avatar Mar 26 '20 18:03 pega-embate

@pega-embate Is there any way to add the equivalent of a custom resource attribute (not an environment value) in one of the other locations?

dcasavant avatar Mar 26 '20 20:03 dcasavant

@dcasavant I agree that this change only applies to context.xml today, but we should also consider how the helm copy of context.xml.tmpl (and any associated customizations) interacts with/overrides the docker version of context,xml. Do we plan to continue to deliver both?

pega-embate avatar Mar 26 '20 21:03 pega-embate

@dcasavant is this enhancement still needed? It's been open for quite a while, so there doesn't seem to be much urgency.

APegaDavis avatar Jun 05 '23 18:06 APegaDavis

@dcasavant is this enhancement still needed? It's been open for quite a while, so there doesn't seem to be much urgency.

This is already available, by setting custom.env.CONTEXT_XML_SNIPPET. It's very useful for defining JMS resources, for example.

However it isn't documented @taz-mon, we only began using it by inspecting the code in the templates

maracle6 avatar Jun 06 '23 16:06 maracle6

Per the recommendation from @maracle6 mentioned above, feature support can be enabled via the tier[].custom.env.CONTEXT_XML_SNIPPET configuration. Therefore, I am closing the issue.

kishorv10 avatar Apr 22 '24 11:04 kishorv10