Open amyXia1994 opened 1 year ago
Due to configuration drift, only displaying the stack configuration diff through the kusion state file or the git state cannot reflect the real situation. Therefore, additional means are needed to configure the mapping of the stack configuration and the cluster's real k8s resources. This configuration can usually be obtained in YAML format or directly written in KCL code through the KCL API. The following describes the approximate format written in KCL configuration.
schema Resource:
@info(mapping_to = "spec.template.spec.containers[0].resources.requests.cpu")
cpu: int
schema Server:
@info(mapping_to = "spec.template.spec.containers[0].resources.requests")
resource: Resource
Reference:
support live diff preview at raw k8s level: #50 #52
Feature
provide live diff preview, so that users will see what changes will be made before actually applying. And the preview should be displayed at the level of model abstraction to avoid the cognitive burden to be aware of infra-oriented details.
Design
The live diff preview can be triggered by 2 entries:
Kusion: Preview Live Diff and Apply
Preview Live Diff and Apply
users can: