The Hyper-V provider will need to write out state for hv_kvp_daemon.
Add a way for provider fetch functions to return []types.File which
will be saved in State and written out during files stage. Also add a
utility function a provider can use to create a types.File.
Since this functionality should not be used by most providers, avoid
adding an extra argument or return value to every fetch function. Instead,
define an alternative fetch function that will be used if declared in
the registration.
The cmdline and system providers shouldn't be registered with the registry
because we don't want to allow looking them up by name; they're
special-cased in Engine. However, we can still provide Config wrapper
structs for them to simplify their use in Engine.
Move provider registrations next to the code that implements the provider,
as we do with stages. This allows us to make the provider functions
private and only expose them through the registration.
To do this, we need to make the fields of the registration struct public,
which could allow the rest of Ignition to call directly through the
function pointers. To avoid this, we wrap the registration struct when
exposing it to the rest of Ignition, ensuring that accessors are used.
The platform Config.NewFetcherFunc() and Config.InitFunc() wrappers are
unnecessarily zero-argument accessors that return a function pointer.
Have them call the underlying function directly, like the newer methods.
Note that Config.FetchFunc() still needs to return a function pointer.
Configs might be in guestinfo properties or OVF metadata. Remove any
config in the OVF metadata, and replace any config in guestinfo (since
we can't delete properties entirely).
For now, deleting Ignition configs from the provider will be handled by
a separate program running in the real root. That allows a config with
any spec version to disable the deletion by masking the unit.
The KubeVirt platform provides config drive files compatible to the
openstack config drive like nutanix does. It provides a disk with a
`config-2` label (lower case).
Signed-off-by: Roman Mohr <rmohr@redhat.com>
Fetch the S3RegionHint on all stages rather than just after fetching the
config. Doing this allows for authenticated fetches to work when running
in any partition (when fetching objects from S3 in the same partition).
AzureStack is *like* but no quite the same as Azure. Rather than
conflating the two together, we should split them up.
Changes:
- azure.FetchConfig is a wrapper around FetchFromOvfDevice which takes
the an additional parameter of allowable filesystem types
- azurestack.FetchConfig calls azure.FetchFromOvfDevice with both UDF
and iso9660 filesystems
- azurestack is now a distinct platform target for ignition
These changes should give us run-way in case _other_ platform
differences are found, while minimizing copy/paste code duplication.
Signed-off-by: Ben Howard <ben.howard@redhat.com>
Add ibmcloud support. Right now this only supports vpc gen 2, but leaves
in place the mechanisms to add classic/gen 1 support which look like
openstack.
Bumps the import path to be `github.com/coreos/ignition/v2`, this is
required to be able to import the v2 of Ignition alongside v0 in other
repositories.
PXE is a boot mechanism, not a platform; for example, VMware instances
can be PXE-booted. We now have a "metal" platform ID which behaves the
same as PXE (i.e., it's a no-op) and should be used in the common case.
Consistently use the name of the cloud platform rather than of its
compute service.
Temporarily accept "ec2" as a compatibility alias for "aws" to ease
migration.
Not for backport to spec2x.