From 7dacdffbe5f5c05eb0d56264eac390cd94504b7a Mon Sep 17 00:00:00 2001 From: Olivia Payne Date: Tue, 22 Aug 2023 16:09:19 -0400 Subject: [PATCH] OSDOCS-6661: Updates to MicroShift manifests --- .../microshift-applications.adoc | 2 + ...microshift-greenboot-workload-scripts.adoc | 2 +- .../microshift-operators.adoc | 6 +-- ...microshift-applying-manifests-example.adoc | 9 ++--- .../microshift-manifests-override-paths.adoc | 37 +++++++++++++++++++ modules/microshift-manifests-overview.adoc | 12 +++++- 6 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 modules/microshift-manifests-override-paths.adoc diff --git a/microshift_running_apps/microshift-applications.adoc b/microshift_running_apps/microshift-applications.adoc index 296745e2d3..85232ef7f9 100644 --- a/microshift_running_apps/microshift-applications.adoc +++ b/microshift_running_apps/microshift-applications.adoc @@ -10,4 +10,6 @@ You can use the `kustomize` configuration management tool to deploy applications include::modules/microshift-manifests-overview.adoc[leveloffset=+1] +include::modules/microshift-manifests-override-paths.adoc[leveloffset=+1] + include::modules/microshift-applying-manifests-example.adoc[leveloffset=+1] \ No newline at end of file diff --git a/microshift_running_apps/microshift-greenboot-workload-scripts.adoc b/microshift_running_apps/microshift-greenboot-workload-scripts.adoc index 776cacfe07..caad244f1a 100644 --- a/microshift_running_apps/microshift-greenboot-workload-scripts.adoc +++ b/microshift_running_apps/microshift-greenboot-workload-scripts.adoc @@ -22,4 +22,4 @@ include::modules/microshift-greenboot-testing-workload-script.adoc[leveloffset=+ [role="_additional-resources"] .Additional resources * xref:../microshift_install/microshift-greenboot.adoc#microshift-greenboot[The greenboot health check] -* xref:../microshift_running_apps/microshift-applications.adoc#microshift-manifests-example_applications-microshift[Auto applying manifests] +* xref:../microshift_running_apps/microshift-applications.adoc#microshift-applying-manifests-example_applications-microshift[Auto applying manifests] diff --git a/microshift_running_apps/microshift-operators.adoc b/microshift_running_apps/microshift-operators.adoc index bfee1f5a18..15ef7590e1 100644 --- a/microshift_running_apps/microshift-operators.adoc +++ b/microshift_running_apps/microshift-operators.adoc @@ -15,8 +15,4 @@ Operators offer a more localized configuration experience and integrate with Kub [id="how-to-install-operators_{context}"] == How to install Operators in {product-title} -To minimize the footprint of {product-title}, Operators are installed directly with manifests instead of using the Operator Lifecycle Manager (OLM). The following examples provide instructions on how you can use the `kustomize` configuration management tool with {product-title} to deploy an application. Use the same steps to install Operators with manifests. - -include::modules/microshift-manifests-overview.adoc[leveloffset=+2] - -include::modules/microshift-applying-manifests-example.adoc[leveloffset=+2] \ No newline at end of file +To minimize the footprint of {product-title}, Operators are installed directly with manifests instead of using the Operator Lifecycle Manager (OLM). You can use the `kustomize` configuration management tool with {product-title} to deploy an application. Use the same steps to install Operators with manifests. Read xref:../microshift_running_apps/microshift-applications.adoc#microshift-manifests-overview_applications-microshift[Application deployment with {product-title}] for more information about manifests. \ No newline at end of file diff --git a/modules/microshift-applying-manifests-example.adoc b/modules/microshift-applying-manifests-example.adoc index 428af1b94c..09d9f21588 100644 --- a/modules/microshift-applying-manifests-example.adoc +++ b/modules/microshift-applying-manifests-example.adoc @@ -1,9 +1,9 @@ // Module included in the following assemblies: // -// * microshift/running_applications/microshift-operators.adoc +// * microshift/running_applications/microshift-applications.adoc :_content-type: PROCEDURE -[id="microshift-manifests-example_{context}"] +[id="microshift-applying-manifests-example_{context}"] = Using manifests example This example demonstrates automatic deployment of a BusyBox container using `kustomize` manifests in the `/etc/microshift/manifests` directory. @@ -29,7 +29,6 @@ $ sudo mkdir -p ${MANIFEST_DIR} [source,terminal] ---- $ sudo tee ${MANIFEST_DIR}/busybox.yaml &>/dev/null </dev/null <` in the configuration file for a single path. + +.. Set `kustomizePaths` to `,++"++/opt/alternative/path.d/++*"++.` in the configuration file for a glob pattern. ++ +[source,terminal] +---- +manifests: + kustomizePaths: + - <1> +---- +<1> Set each location entry to an exact path by using `++"++/opt/alternate/path++"++` or a glob pattern by using `++"++/opt/alternative/path.d/++*"++`. + +. To disable loading manifests, set the configuration option to an empty list. ++ +[source,terminal] +---- +manifests: + kustomizePaths: [] +---- ++ +[NOTE] +==== +The configuration file overrides the defaults entirely. If the `kustomizePaths` value is set, only the values in the configuration file are used. Setting the value to an empty list disables manifest loading. +==== \ No newline at end of file diff --git a/modules/microshift-manifests-overview.adoc b/modules/microshift-manifests-overview.adoc index c9af8ad7f7..9d598f9c13 100644 --- a/modules/microshift-manifests-overview.adoc +++ b/modules/microshift-manifests-overview.adoc @@ -1,12 +1,14 @@ // Module included in the following assemblies: // -// * microshift/using-config-tools.adoc +// * microshift//running_applications/microshift-applications.adoc :_content-type: CONCEPT [id="microshift-manifests-overview_{context}"] = How manifests work with kustomize -The `kustomize` configuration management tool is integrated with {product-title}. At every start, {product-title} searches the `/etc/microshift/manifests` and `/usr/lib/microshift/` manifest directories for a `kustomization.yaml` file. If it finds one, {product-title} automatically runs the equivalent of the `kubectl apply -k` command to apply the identified manifests to the cluster. +The `kustomize` configuration management tool is integrated with {product-title}. At every start, {product-title} searches the `/etc/microshift/manifests`, `/etc/microshift/manifests.d/++*++`, `/usr/lib/microshift/`, and `/usr/lib/microshift/manifests.d/++*++` manifest directories for a `kustomization.yaml`, `kustomization.yml`, or `Kustomization` file. If it finds one, {product-title} automatically runs the equivalent of the `kubectl apply -k` command to apply the identified manifests to the cluster. + +Loading from multiple directories allows you to manage {product-title} workloads with more flexibility. Different workloads can be independent of each other. [cols="2",options="header"] |=== @@ -16,6 +18,12 @@ The `kustomize` configuration management tool is integrated with {product-title} |`/etc/microshift/manifests` |Read-write location for configuration management systems or development. +|`/etc/microshift/manifests.d/*` +|Read-write location for configuration management systems or development. + |`/usr/lib/microshift/manifests` |Read-only location for embedding configuration manifests on OSTree-based systems. + +|`/usr/lib/microshift/manifestsd./*` +|Read-only location for embedding configuration manifests on OSTree-based systems. |=== \ No newline at end of file