Skip to content

Frontend: Add Server-Side Dry Run Option To YAML Editor` #5000

@Vikaspal8923

Description

@Vikaspal8923

Is your feature request related to a problem? Please describe the impact that the lack of the feature requested is creating.

I would like to suggest adding a Dry Run feature in Headlamp, similar to what is available in kubectl.

kubectl apply --dry-run=server -f <file>

Headlamp’s YAML editor currently only supports applying resources directly. There is no server-side dry-run option to validate a manifest before it is created or updated.

Because of this, users only discover Kubernetes-side validation errors when they attempt a real apply.

Describe the solution you'd like

Add a Dry Run option next to the apply button in the shared YAML editor.

It should:

  • Send the manifest to the Kubernetes API server using dry-run
  • Show validation errors in the editor
  • Avoid creating or updating the resource

What users will benefit from this feature?

This would benefit Kubernetes developers, cluster administrators, and other Headlamp users who work with YAML directly.

Are you able to implement this feature?

Yes (I will propose a PR).

Do you want to help implement this feature? Please see our contribution docs. For any non-trivial contributions, we advise you to join our our slack channel to discuss the implementation with Headlamp's core developers.

Additional context

  • Kubernetes already supports server-side dry-run via the dryRun request option, which ensures that requests go through full API validation.
kubectl apply --dry-run=server -f <file>

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions