Skip to content

Latest commit

 

History

History
35 lines (33 loc) · 1.06 KB

adding-new-extension-dynamic-plug-in.adoc

File metadata and controls

35 lines (33 loc) · 1.06 KB

Adding a new extension to your plug-in

  1. Edit the console-extensions.json file:

    [
     {
        "type": "console.flag", (1)
        "properties": {
          "handler": { "$codeRef": "barUtils.testHandler" } (2)
        }
      },
      {
        "type": "console.flag/model",
        "properties": {
          "flag": "EXAMPLE",
          "model": {
            "group": "kubevirt.io",
            "version": "v1alpha3",
            "kind": "ExampleModel"
          }
        }
      }
    ]
    1. Add the extension type(s) you want to include with this plug-in. You can include multiple extensions separated with a comma.

    2. The $codeRef value should be formatted as either moduleName.exportName for a named export or moduleName for the default export. Only the plug-in’s exported modules can be used in code references.