Skip to content

Conversation

sohel-rp
Copy link
Contributor

@sohel-rp sohel-rp commented Jul 22, 2022

Description

Added a GUI configuration view for updating/configuring the app values through the GUI form. It's using the JSON schema to create a form that allows users to update different basic properties in values.yaml through GUI.

GUI form uses different widgets listed below,

  • Styled input & textarea
  • Slider
  • Styled dropdown
  • Checkbox with tippy
  • Form with box wrapper

Resolves devtron-labs/devtron#1868, resolves devtron-labs/devtron#1869, resolves devtron-labs/devtron#1886, resolves devtron-labs/devtron#1888

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

All tests have been performed manually. Updating the YAML will update the GUI if the field is present & vice versa. The following are a few cases,

Case # 1: Deploying a new chart - values JSON schema is present

  1. Go to chart store
  2. Select chart to deploy
  3. On the deploy chart, switch to the GUI tab
  4. Predefined values should populate. Change the desired values.
  5. [Optional] Switch to the values tab to confirm updates
  6. Deploy & Observe

Expected: It should deploy the chart with updated values YAML.

Case # 2: Deploying a new chart - values JSON schema is not present

  1. Go to chart store
  2. Select chart to deploy
  3. On the deploy chart, switch to the GUI tab
  4. Observe

Expected: It should display an empty state.

Case # 3: Updating deployed chart's values - values JSON schema is present

  1. Go to App Listing
  2. Select the deployed chart under the helm apps tab
  3. On the app details, switch to the values tab
  4. Switch to the GUI tab
  5. Predefined values should populate. Change the desired values.
  6. [Optional] Switch to the values tab to confirm updates
  7. Deploy & Observe

Expected: It should deploy the chart with updated values YAML.

Case # 4: Updating deployed chart's values - values JSON schema is not present

  1. Go to App Listing
  2. Select the deployed chart under the helm apps tab
  3. On the app details, switch to the values tab
  4. Switch to the GUI tab
  5. Observe

Expected: It should display an empty state.

Case # 5: Certain key/path is not present in YAML but present in values JSON schema (GUI form)

  1. Go to chart store
  2. Select chart to deploy
  3. On the deploy chart, switch to the GUI tab
  4. Predefined values should populate except for the field which doesn't have path/key in values.yaml (may populate the default value from JSON, if any)
  5. Update/set the value for the same field
  6. Switch to the values tab
  7. Observe

Expected: It should add the key/path in values.yaml and the updated value for the respective field.

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@sohel-rp sohel-rp merged commit e168294 into main Jul 22, 2022
@sohel-rp sohel-rp deleted the helm-values-gui branch July 22, 2022 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants