From b2797a914544afdfebdc2d6a0e4ee348cdd7a41f Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Wed, 26 Jun 2024 14:50:23 +0000 Subject: [PATCH] data injection docs --- examples/kiwix/manifests/deployment.yaml | 1 + site/src/content/docs/ref/components.mdx | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/kiwix/manifests/deployment.yaml b/examples/kiwix/manifests/deployment.yaml index 679d7a66d7..e187c684e6 100644 --- a/examples/kiwix/manifests/deployment.yaml +++ b/examples/kiwix/manifests/deployment.yaml @@ -15,6 +15,7 @@ spec: app: kiwix-serve spec: # Kiwix can hot-load files from the filesystem, but if your application cannot, this example shows how you can use an initContainer to bootstrap the injected files. + # It's necessary to include the ###ZARF_DATA_INJECTION_MARKER### somewhere in the podspec, otherwise data injections will not occur. initContainers: - name: data-loader image: alpine:3.18 diff --git a/site/src/content/docs/ref/components.mdx b/site/src/content/docs/ref/components.mdx index aff22ada6e..ed2e8c884e 100644 --- a/site/src/content/docs/ref/components.mdx +++ b/site/src/content/docs/ref/components.mdx @@ -14,7 +14,7 @@ These components define what dependencies they have along with a declarative def Each package can have as many components as the package creator wants but a package isn't anything without at least one component. -{/* +{/* ## What can be Packaged? The following types of software can be rolled into a Zarf Package: @@ -141,10 +141,10 @@ Images can either be discovered manually, or automatically by using [`zarf dev f ### Git Repositories -The [`podinfo-flux`](/ref/examples/podinfo-flux/) example showcases a simple GitOps workflow using Flux and Zarf. - +The [`podinfo-flux`](/ref/examples/podinfo-flux/) example showcases a simple GitOps workflow using Flux and Zarf. + @@ -208,6 +208,10 @@ Git repositories included in a package can be deployed with `zarf package deploy +During `zarf package create`, data injections pull files from the host at the path specified by the `source` key. During `zarf package deploy`, these files are injected into the container specified by the `target` key. The pod holding the targeted container must have the variable `###ZARF_DATA_INJECTION_MARKER###` within the pod spec otherwise the data injection will not occur. This variable gets templated at deploy time to become the name of the extra file Zarf injects into the pod to signify that the data injection is complete. + +The [`kiwix`](/ref/examples/kiwix/) example showcases a simple data injection use case. + ### Component Imports