ResourceYAMLEditor

A lazy loaded YAML editor for Kubernetes resources with hover help and completion. The component use the YAMLEditor and add on top of it more functionality such as resource update handling, alerts, save, cancel and reload buttons, accessibility and more. Unless onSave callback is provided, the resource update is automatically handled. It should be wrapped in a React.Suspense component.

Example
<React.Suspense fallback={<LoadingBox />}>
  <ResourceYAMLEditor
    initialResource={resource}
    header="Create resource"
    onSave={(content) => updateResource(content)}
  />
</React.Suspense>
Parameter Name Description

initialResource

YAML/Object representing a resource to be shown by the editor. This prop is used only during the initial render

header

Add a header on top of the YAML editor

onSave

Callback for the Save button. Passing it overrides the default update performed on the resource by the editor