|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * cli_reference/cli_manager/cli-manager-using.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="cli-manager-upgrading-plugin-yamls_{context}"] |
| 7 | += Upgrading a plugin with the {cli-manager} |
| 8 | + |
| 9 | +You can upgrade a CLI plugin to a newer version with the {cli-manager}. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You are logged in to {product-title} as a user with the `cluster-admin` role. |
| 14 | +* The {cli-manager} is installed. |
| 15 | +* The plugin you are upgrading is installed. |
| 16 | +
|
| 17 | +.Procedure |
| 18 | + |
| 19 | +. Using the CLI, enter the following command: |
| 20 | + |
| 21 | +[source,terminal] |
| 22 | +---- |
| 23 | +oc edit plugin/<plugin_name> |
| 24 | +---- |
| 25 | + |
| 26 | +. Edit the YAML file to include the new specifications for your plugin. |
| 27 | + |
| 28 | +.Example YAML file to upgrade a plugin |
| 29 | + |
| 30 | +[source,yaml] |
| 31 | +---- |
| 32 | +apiVersion: config.openshift.io/v1alpha1 |
| 33 | +kind: Plugin |
| 34 | +metadata: |
| 35 | + name: <plugin_name> <1> |
| 36 | +spec: |
| 37 | + description: <description_of_plugin> |
| 38 | + homepage: <plugin_homepage> |
| 39 | + platforms: |
| 40 | + - bin: <2> |
| 41 | + files: |
| 42 | + - from: <plugin_file_path> |
| 43 | + to: . |
| 44 | + image: <plugin_image> |
| 45 | + imagePullSecret: <3> |
| 46 | + platform: <platform> <4> |
| 47 | + shortDescription: <short_description_of_plugin> |
| 48 | + version: <version> <5> |
| 49 | +---- |
| 50 | +<1> The name of the plugin you plan to use in commands. |
| 51 | +<2> `Bin` specifies the path to the plugin executable. |
| 52 | +<3> Optional: If the registry is not public, add a pull secret to access your plugin image. |
| 53 | +<4> Add the architecture for your system platform; for example, `linux/amd64`, `darwin/arm64`, `windows/amd64`, or another architecture. |
| 54 | +<5> Version of the plugin, in v0.0.0 format. |
| 55 | + |
| 56 | +. Save the file. |
0 commit comments