Generate desired_config without secrets for shadow run

Issue: Shadow run: create kubernetes manifest in works... (#538163 - closed) • Ashvin Sharma • 18.2 • At risk

What does this MR do and why?

Generates desired_config without secrets for shadow run.

This commit introduces two new functions- generate_config_to_apply and generate.

generate— calls both generate_config_to_apply and generate_desired_config and logs the diff of the two return values if it is not empty. It returns the return value of generate_desired_config.

generate_config_to_apply— Creates the Kubernetes config that will be sent to agentk. It filters out redundant Kubernetes object based workspace's state and reconciliation type.

In summary, it runs generate_config_to_apply in shadow which is supposed to replace generate_desired_config by the end of this epic Simplify freezing of Kubernetes resources for w... (&17483).

Before After
image.png image.png

Screenshots or screen recordings

No UI changes

How to set up and validate locally

You can either run smoke test.

scripts/remote_development/run-smoke-test-suite.sh

Or you can create a workspace if it is set up on your local.

  1. Open gdk.test:3000
  2. Go to a project.
  3. Create a new workspace using- Edit > New Workspaces.
  4. Ensure that workspace is created.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ashvin Sharma

Merge request reports

Loading