composable-packages
This example imports the same Nginx component locally and from an OCI registry. The component provides a Helm chart with a Deployment, Service, and ConfigMap. The consuming package selects a separate namespace for each import and configures its connection name and greeting through values.yaml.
This is useful if you want to slightly tweak a given component while maintaining a common core.
To learn more, see Component Imports.
zarf.yaml
apiVersion: zarf.dev/v1beta1kind: ZarfPackageConfigmetadata: name: composable-packages description: Demo Zarf package composability
values: files: - values.yaml
components: - name: local-import description: Serve a page supplied by this package using a local web-server component import: local: - path: components/web-server.yaml charts: - name: web-server namespace: imports-local values: - sourcePath: .webServers.local targetPath: .
- name: remote-import description: Serve a different page using the same component imported from a registry import: remote: - url: oci://ghcr.io/zarf-dev/components/examples/compose/web-server:1.0.0 charts: - name: web-server namespace: imports-remote values: - sourcePath: .webServers.remote targetPath: .
attachments: readme: readme.md