Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tiers "mergeable" when providing multiple value.yaml at helm install #609

Open
micgoe opened this issue Aug 8, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@micgoe
Copy link

micgoe commented Aug 8, 2023

Problems / Request

My client runs multiple pega plattform installations in multiple environments. In order to maintain a clean deployment configuration for each plattform installation and environments we install the pega-helm-chart/pega by providing the helm install with multiple values.yaml. At least one dev-common.yaml and an pega-plattform specific yaml dev-pega-1.yaml. The one provided latest overwrites properties of the previous. The frustration lies in the nature on how lists are overwritten/merged. In this specific matter it applies to the tier list. When providing a common configuration for the web tier (common.yaml) which is refined by additional pega-plattform specific web tier configuration (dev-pega-1.yaml) the entire web node tier item is overwritten and not merged.

Example:

Input:

dev-common.yaml

...
tier:
- name: "web"
  nodeType: "WebUser"
  service:
    annotation:
      something: "some-common-annotation-for-all-web-nodes-in-dev"
    httpEnabled: false
    port: 80
    targetPort: 8080
...

dev-pega-1.yaml

...
tier:
- name: "web"
    ingress:
      domain: "dev-pega-1.example.com" # specific for each plattform
...

Output:

tier:
  name: "web"
    nodeType: "WebUser"
  
    requestor:
      passivationTimeSec: 900
  
    service:
      # annotation is missing
      httpEnabled: true
      port: 80
      targetPort: 8080
      ... # other defaults defined in charts values.yaml
    ingress:
      domain: "dev-pega-1.example.com" # specific for each plattform

Example for configuration which might be the same across pega-plattforms in the same environment:

  • custom proxy configuration (tier[web].custom.env)
  • custom logging configuration (tier[web].custom.XY.xml)
  • web nodes port (tier[web].service.port, tier[web].service.targetPort)

Solution:

Switch from using a list for tier to using key-value. This would allow helm to clearly identify objects and would result in merging them together.

Ex:

tier:
  web:
    nodeType: "WebUser"
  
    requestor:
      passivationTimeSec: 900
  
    service:
      annotation:
        something: "some-common-annotation-for-all-web-nodes-in-dev"
      httpEnabled: true
      port: 80
      targetPort: 8080
      ... # other defaults defined in charts values.yaml
    ingress:
      domain: "dev-pega-1.example.com" # specific for each plattform

Alternatives
Not following a clean common/specific value file separation model. Right now we define all the tiers in the pega plattform specific yaml (dev-pega-1.yaml) which is not a clean and error prone solution

Additional context
Add any other context or screenshots about the feature request here.

Debugging of the resulting values applied can be done by

@micgoe micgoe added the enhancement New feature or request label Aug 8, 2023
@kishorv10
Copy link
Contributor

@micgoe As you may be aware, this is the limitation with the Helm in using arrays. I will discuss internally the need to convert lists to maps, but I see fewer chances of it being implemented in the product.
The current version of charts is widely adopted, list to map change is a major refactoring, possibly breaking BW compatibility.

I also suggest trying out custom solutions tailored to your specific needs.

@petejo Can you provide your views on the ask?

@kishorv10
Copy link
Contributor

US-613089 (internal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants