From 4757f46bb9106016d0fa093bb9bc58359cea644f Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 19 Jun 2020 21:37:13 +0530 Subject: [PATCH] Update docs and tests to use ignite/v1alpha3 Docs generated using `make api-docs`. --- cmd/ignite/cmd/vmcmd/ps.go | 2 +- .../testdata/input/create-config-no-name.yaml | 2 +- .../run/testdata/input/rm-no-name-uid.yaml | 2 +- cmd/ignite/run/testdata/input/rm-vm1.yaml | 2 +- .../run/testdata/output/inspect-json.txt | 2 +- .../run/testdata/output/inspect-yaml.txt | 2 +- docs/api/ignite_v1alpha3.md | 492 ++++++++++++++++++ docs/api/index.md | 1 + docs/cli/ignite/ignite_ps.md | 2 +- docs/cli/ignite/ignite_vm_ps.md | 2 +- docs/declarative-config.md | 4 +- docs/gitops.md | 2 +- docs/installation.md | 18 +- docs/my-vm.yaml | 4 +- 14 files changed, 515 insertions(+), 22 deletions(-) create mode 100644 docs/api/ignite_v1alpha3.md diff --git a/cmd/ignite/cmd/vmcmd/ps.go b/cmd/ignite/cmd/vmcmd/ps.go index 98e3e536a..798cfb1b8 100644 --- a/cmd/ignite/cmd/vmcmd/ps.go +++ b/cmd/ignite/cmd/vmcmd/ps.go @@ -23,7 +23,7 @@ func NewCmdPs(out io.Writer) *cobra.Command { also list VMs that are not currently running. Using the -f (--filter) flag, you can give conditions VMs should fullfilled to be displayed. You can filter on all the underlying fields of the VM struct, see the documentation: - https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha2#VM. + https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha3#VM. Different operators can be used: - "=" and "==" for the equal diff --git a/cmd/ignite/run/testdata/input/create-config-no-name.yaml b/cmd/ignite/run/testdata/input/create-config-no-name.yaml index f73153be3..42185cc92 100644 --- a/cmd/ignite/run/testdata/input/create-config-no-name.yaml +++ b/cmd/ignite/run/testdata/input/create-config-no-name.yaml @@ -1,4 +1,4 @@ -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM spec: image: diff --git a/cmd/ignite/run/testdata/input/rm-no-name-uid.yaml b/cmd/ignite/run/testdata/input/rm-no-name-uid.yaml index f00436d09..6fb52b421 100644 --- a/cmd/ignite/run/testdata/input/rm-no-name-uid.yaml +++ b/cmd/ignite/run/testdata/input/rm-no-name-uid.yaml @@ -1,4 +1,4 @@ -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM metadata: name: "" diff --git a/cmd/ignite/run/testdata/input/rm-vm1.yaml b/cmd/ignite/run/testdata/input/rm-vm1.yaml index de37a2bbb..244809059 100644 --- a/cmd/ignite/run/testdata/input/rm-vm1.yaml +++ b/cmd/ignite/run/testdata/input/rm-vm1.yaml @@ -1,4 +1,4 @@ -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM metadata: name: myvm2 diff --git a/cmd/ignite/run/testdata/output/inspect-json.txt b/cmd/ignite/run/testdata/output/inspect-json.txt index c7cdf9e36..b76248ef0 100644 --- a/cmd/ignite/run/testdata/output/inspect-json.txt +++ b/cmd/ignite/run/testdata/output/inspect-json.txt @@ -1,6 +1,6 @@ { "kind": "VM", - "apiVersion": "ignite.weave.works/v1alpha2", + "apiVersion": "ignite.weave.works/v1alpha3", "metadata": { "name": "someVM", "uid": "1699b6ba255cde7f", diff --git a/cmd/ignite/run/testdata/output/inspect-yaml.txt b/cmd/ignite/run/testdata/output/inspect-yaml.txt index 7d4d72bb1..0eefa4596 100644 --- a/cmd/ignite/run/testdata/output/inspect-yaml.txt +++ b/cmd/ignite/run/testdata/output/inspect-yaml.txt @@ -1,4 +1,4 @@ -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM metadata: created: "2000-01-01T01:00:00Z" diff --git a/docs/api/ignite_v1alpha3.md b/docs/api/ignite_v1alpha3.md new file mode 100644 index 000000000..26435612f --- /dev/null +++ b/docs/api/ignite_v1alpha3.md @@ -0,0 +1,492 @@ +# v1alpha3 + +`import "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha3"` + + - [Overview](#pkg-overview) + - [Index](#pkg-index) + +## Overview + +\+k8s:deepcopy-gen=package +k8s:defaulter-gen=TypeMeta ++k8s:openapi-gen=true ++k8s:conversion-gen=github.com/weaveworks/ignite/pkg/apis/ignite + +## Index + + - [Constants](#pkg-constants) + - [Variables](#pkg-variables) + - [func SetDefaults\_PoolSpec(obj \*PoolSpec)](#SetDefaults_PoolSpec) + - [func SetDefaults\_VMKernelSpec(obj + \*VMKernelSpec)](#SetDefaults_VMKernelSpec) + - [func SetDefaults\_VMSandboxSpec(obj + \*VMSandboxSpec)](#SetDefaults_VMSandboxSpec) + - [func SetDefaults\_VMSpec(obj \*VMSpec)](#SetDefaults_VMSpec) + - [type BlockDeviceVolume](#BlockDeviceVolume) + - [type FileMapping](#FileMapping) + - [type Image](#Image) + - [type ImageSpec](#ImageSpec) + - [type ImageStatus](#ImageStatus) + - [type Kernel](#Kernel) + - [type KernelSpec](#KernelSpec) + - [type KernelStatus](#KernelStatus) + - [type OCIImageSource](#OCIImageSource) + - [type Pool](#Pool) + - [type PoolDevice](#PoolDevice) + - [type PoolDeviceType](#PoolDeviceType) + - [type PoolSpec](#PoolSpec) + - [type PoolStatus](#PoolStatus) + - [type Runtime](#Runtime) + - [type SSH](#SSH) + - [func (s \*SSH) MarshalJSON() (\[\]byte, + error)](#SSH.MarshalJSON) + - [func (s \*SSH) UnmarshalJSON(b \[\]byte) + error](#SSH.UnmarshalJSON) + - [type VM](#VM) + - [type VMImageSpec](#VMImageSpec) + - [type VMKernelSpec](#VMKernelSpec) + - [type VMNetworkSpec](#VMNetworkSpec) + - [type VMSandboxSpec](#VMSandboxSpec) + - [type VMSpec](#VMSpec) + - [type VMStatus](#VMStatus) + - [type VMStorageSpec](#VMStorageSpec) + - [type Volume](#Volume) + - [type VolumeMount](#VolumeMount) + +#### Package files + +[defaults.go](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/defaults.go) +[doc.go](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/doc.go) +[json.go](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/json.go) +[register.go](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/register.go) +[types.go](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go) + +## Constants + +``` go +const ( + KindImage runtime.Kind = "Image" + KindKernel runtime.Kind = "Kernel" + KindVM runtime.Kind = "VM" +) +``` + +``` go +const ( + // GroupName is the group name use in this package + GroupName = "ignite.weave.works" +) +``` + +## Variables + +``` go +var ( + // SchemeBuilder the schema builder + SchemeBuilder = runtime.NewSchemeBuilder( + addKnownTypes, + addDefaultingFuncs, + ) + + AddToScheme = localSchemeBuilder.AddToScheme +) +``` + +``` go +var SchemeGroupVersion = schema.GroupVersion{ + Group: GroupName, + Version: "v1alpha3", +} +``` + +SchemeGroupVersion is group version used to register these objects + +## func [SetDefaults\_PoolSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/defaults.go?s=308:348#L15) + +``` go +func SetDefaults_PoolSpec(obj *PoolSpec) +``` + +## func [SetDefaults\_VMKernelSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/defaults.go?s=1190:1238#L51) + +``` go +func SetDefaults_VMKernelSpec(obj *VMKernelSpec) +``` + +## func [SetDefaults\_VMSandboxSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/defaults.go?s=1468:1518#L62) + +``` go +func SetDefaults_VMSandboxSpec(obj *VMSandboxSpec) +``` + +## func [SetDefaults\_VMSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/defaults.go?s=874:910#L37) + +``` go +func SetDefaults_VMSpec(obj *VMSpec) +``` + +## type [BlockDeviceVolume](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=7601:7661#L201) + +``` go +type BlockDeviceVolume struct { + Path string `json:"path"` +} +``` + +BlockDeviceVolume defines a block device on the host + +## type [FileMapping](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=7896:7991#L212) + +``` go +type FileMapping struct { + HostPath string `json:"hostPath"` + VMPath string `json:"vmPath"` +} +``` + +FileMapping defines mappings between files on the host and VM + +## type [Image](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=390:863#L16) + +``` go +type Image struct { + runtime.TypeMeta `json:",inline"` + // runtime.ObjectMeta is also embedded into the struct, and defines the human-readable name, and the machine-readable ID + // Name is available at the .metadata.name JSON path + // ID is available at the .metadata.uid JSON path (the Go type is k8s.io/apimachinery/pkg/types.UID, which is only a typed string) + runtime.ObjectMeta `json:"metadata"` + + Spec ImageSpec `json:"spec"` + Status ImageStatus `json:"status"` +} +``` + +Image represents a cached OCI image ready to be used with Ignite ++k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +## type [ImageSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=911:971#L28) + +``` go +type ImageSpec struct { + OCI meta.OCIImageRef `json:"oci"` +} +``` + +ImageSpec declares what the image contains + +## type [ImageStatus](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=1359:1508#L42) + +``` go +type ImageStatus struct { + // OCISource contains the information about how this OCI image was imported + OCISource OCIImageSource `json:"ociSource"` +} +``` + +ImageStatus defines the status of the image + +## type [Kernel](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=3893:4369#L106) + +``` go +type Kernel struct { + runtime.TypeMeta `json:",inline"` + // runtime.ObjectMeta is also embedded into the struct, and defines the human-readable name, and the machine-readable ID + // Name is available at the .metadata.name JSON path + // ID is available at the .metadata.uid JSON path (the Go type is k8s.io/apimachinery/pkg/types.UID, which is only a typed string) + runtime.ObjectMeta `json:"metadata"` + + Spec KernelSpec `json:"spec"` + Status KernelStatus `json:"status"` +} +``` + +Kernel is a serializable object that caches information about imported +kernels This file is stored in +/var/lib/firecracker/kernels/{oci-image-digest}/metadata.json ++k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +## type [KernelSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=4422:4588#L118) + +``` go +type KernelSpec struct { + OCI meta.OCIImageRef `json:"oci"` +} +``` + +KernelSpec describes the properties of a kernel + +## type [KernelStatus](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=4639:4755#L125) + +``` go +type KernelStatus struct { + Version string `json:"version"` + OCISource OCIImageSource `json:"ociSource"` +} +``` + +KernelStatus describes the status of a kernel + +## type [OCIImageSource](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=1078:1310#L34) + +``` go +type OCIImageSource struct { + // ID defines the source's content ID (e.g. the canonical OCI path or Docker image ID) + ID *meta.OCIContentID `json:"id"` + // Size defines the size of the source in bytes + Size meta.Size `json:"size"` +} +``` + +OCIImageSource specifies how the OCI image was imported. It is the +status variant of OCIImageClaim + +## type [Pool](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=1783:1969#L51) + +``` go +type Pool struct { + runtime.TypeMeta `json:",inline"` + + Spec PoolSpec `json:"spec"` + Status PoolStatus `json:"status"` +} +``` + +Pool defines device mapper pool database This file is managed by the +snapshotter part of Ignite, and the file (existing as a singleton) is +present at /var/lib/firecracker/snapshotter/pool.json ++k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +## type [PoolDevice](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=3260:3650#L93) + +``` go +type PoolDevice struct { + Size meta.Size `json:"size"` + Parent meta.DMID `json:"parent"` + // Type specifies the type of the contents of the device + Type PoolDeviceType `json:"type"` + // MetadataPath points to the JSON/YAML file with metadata about this device + // This is most often of the format /var/lib/firecracker/{type}/{id}/metadata.json + MetadataPath string `json:"metadataPath"` +} +``` + +PoolDevice defines one device in the pool + +## type [PoolDeviceType](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=2989:3015#L83) + +``` go +type PoolDeviceType string +``` + +``` go +const ( + PoolDeviceTypeImage PoolDeviceType = "Image" + PoolDeviceTypeResize PoolDeviceType = "Resize" + PoolDeviceTypeKernel PoolDeviceType = "Kernel" + PoolDeviceTypeVM PoolDeviceType = "VM" +) +``` + +## type [PoolSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=2016:2729#L61) + +``` go +type PoolSpec struct { + // MetadataSize specifies the size of the pool's metadata + MetadataSize meta.Size `json:"metadataSize"` + // DataSize specifies the size of the pool's data + DataSize meta.Size `json:"dataSize"` + // AllocationSize specifies the smallest size that can be allocated at a time + AllocationSize meta.Size `json:"allocationSize"` + // MetadataPath points to the file where device mapper stores all metadata information + // Defaults to constants.SNAPSHOTTER_METADATA_PATH + MetadataPath string `json:"metadataPath"` + // DataPath points to the backing physical device or sparse file (to be loop mounted) for the pool + // Defaults to constants.SNAPSHOTTER_DATA_PATH + DataPath string `json:"dataPath"` +} +``` + +PoolSpec defines the Pool’s specification + +## type [PoolStatus](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=2779:2987#L77) + +``` go +type PoolStatus struct { + // The Devices array needs to contain pointers to accommodate "holes" in the mapping + // Where devices have been deleted, the pointer is nil + Devices []*PoolDevice `json:"devices"` +} +``` + +PoolStatus defines the Pool’s current status + +## type [Runtime](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=8340:8386#L227) + +``` go +type Runtime struct { + ID string `json:"id"` +} +``` + +Runtime specifies the VM’s runtime information + +## type [SSH](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=8211:8288#L221) + +``` go +type SSH struct { + Generate bool `json:"-"` + PublicKey string `json:"-"` +} +``` + +SSH specifies different ways to connect via SSH to the VM SSH uses a +custom marshaller/unmarshaller. If generate is true, it marshals to true +(a JSON bool). If PublicKey is set, it marshals to that string. + +### func (\*SSH) [MarshalJSON](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/json.go?s=117:160#L9) + +``` go +func (s *SSH) MarshalJSON() ([]byte, error) +``` + +### func (\*SSH) [UnmarshalJSON](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/json.go?s=308:351#L21) + +``` go +func (s *SSH) UnmarshalJSON(b []byte) error +``` + +## type [VM](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=4957:5421#L133) + +``` go +type VM struct { + runtime.TypeMeta `json:",inline"` + // runtime.ObjectMeta is also embedded into the struct, and defines the human-readable name, and the machine-readable ID + // Name is available at the .metadata.name JSON path + // ID is available at the .metadata.uid JSON path (the Go type is k8s.io/apimachinery/pkg/types.UID, which is only a typed string) + runtime.ObjectMeta `json:"metadata"` + + Spec VMSpec `json:"spec"` + Status VMStatus `json:"status"` +} +``` + +VM represents a virtual machine run by Firecracker These files are +stored in /var/lib/firecracker/vm/{vm-id}/metadata.json ++k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +## type [VMImageSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=6774:6836#L170) + +``` go +type VMImageSpec struct { + OCI meta.OCIImageRef `json:"oci"` +} +``` + +## type [VMKernelSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=6838:6958#L174) + +``` go +type VMKernelSpec struct { + OCI meta.OCIImageRef `json:"oci"` + CmdLine string `json:"cmdLine,omitempty"` +} +``` + +## type [VMNetworkSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=7087:7166#L184) + +``` go +type VMNetworkSpec struct { + Ports meta.PortMappings `json:"ports,omitempty"` +} +``` + +## type [VMSandboxSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=7021:7085#L180) + +``` go +type VMSandboxSpec struct { + OCI meta.OCIImageRef `json:"oci"` +} +``` + +VMSandboxSpec is the spec of the sandbox used for the VM. + +## type [VMSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=5469:6772#L145) + +``` go +type VMSpec struct { + Image VMImageSpec `json:"image"` + Sandbox VMSandboxSpec `json:"sandbox"` + Kernel VMKernelSpec `json:"kernel"` + CPUs uint64 `json:"cpus"` + Memory meta.Size `json:"memory"` + DiskSize meta.Size `json:"diskSize"` + // TODO: Implement working omitempty without pointers for the following entries + // Currently both will show in the JSON output as empty arrays. Making them + // pointers requires plenty of nil checks (as their contents are accessed directly) + // and is very risky for stability. APIMachinery potentially has a solution. + Network VMNetworkSpec `json:"network,omitempty"` + Storage VMStorageSpec `json:"storage,omitempty"` + // This will be done at either "ignite start" or "ignite create" time + // TODO: We might revisit this later + CopyFiles []FileMapping `json:"copyFiles,omitempty"` + // SSH specifies how the SSH setup should be done + // nil here means "don't do anything special" + // If SSH.Generate is set, Ignite will generate a new SSH key and copy it in to authorized_keys in the VM + // Specifying a path in SSH.Generate means "use this public key" + // If SSH.PublicKey is set, this struct will marshal as a string using that path + // If SSH.Generate is set, this struct will marshal as a bool => true + SSH *SSH `json:"ssh,omitempty"` +} +``` + +VMSpec describes the configuration of a VM + +## type [VMStatus](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=8427:8766#L232) + +``` go +type VMStatus struct { + Running bool `json:"running"` + Runtime *Runtime `json:"runtime,omitempty"` + StartTime *runtime.Time `json:"startTime,omitempty"` + IPAddresses meta.IPAddresses `json:"ipAddresses,omitempty"` + Image OCIImageSource `json:"image"` + Kernel OCIImageSource `json:"kernel"` +} +``` + +VMStatus defines the status of a VM + +## type [VMStorageSpec](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=7227:7371#L189) + +``` go +type VMStorageSpec struct { + Volumes []Volume `json:"volumes,omitempty"` + VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` +} +``` + +VMStorageSpec defines the VM’s Volumes and VolumeMounts + +## type [Volume](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=7412:7543#L195) + +``` go +type Volume struct { + Name string `json:"name"` + BlockDevice *BlockDeviceVolume `json:"blockDevice,omitempty"` +} +``` + +Volume defines named storage volume + +## type [VolumeMount](https://github.com/weaveworks/ignite/tree/master/pkg/apis/ignite/v1alpha3/types.go?s=7733:7829#L206) + +``` go +type VolumeMount struct { + Name string `json:"name"` + MountPath string `json:"mountPath"` +} +``` + +VolumeMount defines the mount point for a named volume inside a VM + +----- + +Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md) diff --git a/docs/api/index.md b/docs/api/index.md index f36a656b0..c03c82da1 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -13,4 +13,5 @@ Please refer to the (autogenerated) docs for the API types below: - [ignite/v1alpha1](ignite_v1alpha1.md) - [ignite/v1alpha2](ignite_v1alpha2.md) +- [ignite/v1alpha3](ignite_v1alpha3.md) - [meta/v1alpha1](meta_v1alpha1.md) diff --git a/docs/cli/ignite/ignite_ps.md b/docs/cli/ignite/ignite_ps.md index 46825b4d4..e5c63e1f6 100644 --- a/docs/cli/ignite/ignite_ps.md +++ b/docs/cli/ignite/ignite_ps.md @@ -9,7 +9,7 @@ List all running VMs. By specifying the all flag (-a, --all), also list VMs that are not currently running. Using the -f (--filter) flag, you can give conditions VMs should fullfilled to be displayed. You can filter on all the underlying fields of the VM struct, see the documentation: -https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha2#VM. +https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha3#VM. Different operators can be used: - "=" and "==" for the equal diff --git a/docs/cli/ignite/ignite_vm_ps.md b/docs/cli/ignite/ignite_vm_ps.md index 7db7bfd84..68396bd23 100644 --- a/docs/cli/ignite/ignite_vm_ps.md +++ b/docs/cli/ignite/ignite_vm_ps.md @@ -9,7 +9,7 @@ List all running VMs. By specifying the all flag (-a, --all), also list VMs that are not currently running. Using the -f (--filter) flag, you can give conditions VMs should fullfilled to be displayed. You can filter on all the underlying fields of the VM struct, see the documentation: -https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha2#VM. +https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha3#VM. Different operators can be used: - "=" and "==" for the equal diff --git a/docs/declarative-config.md b/docs/declarative-config.md index 5f0cd441b..1c2d68721 100644 --- a/docs/declarative-config.md +++ b/docs/declarative-config.md @@ -9,7 +9,7 @@ The first commands to support this feature are `ignite run` and `ignite create`. Here's an example API object file contents: ```yaml -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM metadata: name: my-vm @@ -35,7 +35,7 @@ INFO[0002] Started Firecracker VM "e04128e6f96176a8" in a container with ID "ign The full reference format for the `VM` kind is as follows: ```yaml -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM metadata: # Automatically set when the object is created diff --git a/docs/gitops.md b/docs/gitops.md index 1a0105d6f..24728c972 100644 --- a/docs/gitops.md +++ b/docs/gitops.md @@ -31,7 +31,7 @@ back to the repository using the default key for it. To edit your root's git con Here's a sample configuration you can push to it (my-vm.yaml): ```yaml -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM metadata: name: my-vm diff --git a/docs/installation.md b/docs/installation.md index 524941606..48db73f7b 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -139,7 +139,7 @@ for additional details): ```bash VMFILE=/etc/firecracker/manifests/smoke-test.yml tee "$VMFILE" > /dev/null < "/etc/firecracker/manifests/smoke-test.yml" DEBU[2552] FileWatcher: Dispatched events batch and reset the events cache DEBU[2552] GenericMappedRawStorage: AddMapping: "vm/d039cbcd-3606-462d-839e-25ac745cd7c5" -> "/etc/firecracker/manifests/smoke-test.yml" -DEBU[2552] SyncStorage: Received update {{CREATE &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} 0xc0004c7aa0} true -DEBU[2552] SyncStorage: Sent update: {CREATE &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} +DEBU[2552] SyncStorage: Received update {{CREATE &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} 0xc0004c7aa0} true +DEBU[2552] SyncStorage: Sent update: {CREATE &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} DEBU[2552] FileWatcher: Skipping suspended event MODIFY for path: "/etc/firecracker/manifests/smoke-test.yml" DEBU[2552] FileWatcher: Registered inotify events [notify.InCloseWrite: "/etc/firecracker/manifests/smoke-test.yml"] for path "/etc/firecracker/manifests/smoke-test.yml" DEBU[2553] FileWatcher: Sending update: MODIFY -> "/etc/firecracker/manifests/smoke-test.yml" DEBU[2553] FileWatcher: Dispatched events batch and reset the events cache -DEBU[2553] SyncStorage: Received update {{MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} 0xc0004c7aa0} true +DEBU[2553] SyncStorage: Received update {{MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} 0xc0004c7aa0} true DEBU[2553] FileWatcher: Skipping suspended event MODIFY for path: "/etc/firecracker/manifests/smoke-test.yml" -DEBU[2553] SyncStorage: Sent update: {MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} +DEBU[2553] SyncStorage: Sent update: {MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} DEBU[2553] FileWatcher: Registered inotify events [notify.InCloseWrite: "/etc/firecracker/manifests/smoke-test.yml"] for path "/etc/firecracker/manifests/smoke-test.yml" DEBU[2554] FileWatcher: Sending update: MODIFY -> "/etc/firecracker/manifests/smoke-test.yml" DEBU[2554] FileWatcher: Dispatched events batch and reset the events cache -DEBU[2554] SyncStorage: Received update {{MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} 0xc0004c7aa0} true +DEBU[2554] SyncStorage: Received update {{MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} 0xc0004c7aa0} true DEBU[2554] FileWatcher: Registered inotify events [notify.InCloseWrite: "/etc/firecracker/manifests/smoke-test.yml"] for path "/etc/firecracker/manifests/smoke-test.yml" -DEBU[2554] SyncStorage: Sent update: {MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} +DEBU[2554] SyncStorage: Sent update: {MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} DEBU[2554] FileWatcher: Skipping suspended event MODIFY for path: "/etc/firecracker/manifests/smoke-test.yml" DEBU[2555] FileWatcher: Sending update: MODIFY -> "/etc/firecracker/manifests/smoke-test.yml" DEBU[2555] FileWatcher: Dispatched events batch and reset the events cache -DEBU[2555] SyncStorage: Received update {{MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} 0xc0004c7aa0} true -DEBU[2555] SyncStorage: Sent update: {MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} +DEBU[2555] SyncStorage: Received update {{MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} 0xc0004c7aa0} true +DEBU[2555] SyncStorage: Sent update: {MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha3,}} DEBU[2555] FileWatcher: Skipping suspended event MODIFY for path: "/etc/firecracker/manifests/smoke-test.yml" DEBU[2556] FileWatcher: Registered inotify events [notify.InCloseWrite: "/etc/firecracker/manifests/smoke-test.yml"] for path "/etc/firecracker/manifests/smoke-test.yml" etc. diff --git a/docs/my-vm.yaml b/docs/my-vm.yaml index 4e4155663..8440b0844 100644 --- a/docs/my-vm.yaml +++ b/docs/my-vm.yaml @@ -1,4 +1,4 @@ -apiVersion: ignite.weave.works/v1alpha2 +apiVersion: ignite.weave.works/v1alpha3 kind: VM metadata: name: my-vm @@ -11,4 +11,4 @@ spec: memory: 800MB ssh: true status: - running: true \ No newline at end of file + running: true