Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into pkg-runtime, fix blank lines in all imports
Browse files Browse the repository at this point in the history
# Conflicts:
#	cmd/ignite/run/create.go
#	cmd/ignite/run/images.go
#	cmd/ignite/run/inspect.go
#	cmd/ignite/run/kernels.go
#	cmd/ignite/run/ps.go
#	pkg/metadata/imgmd/imgmd.go
#	pkg/metadata/kernmd/kernmd.go
#	pkg/metadata/metadata.go
#	pkg/operations/start.go
#	pkg/source/docker.go
  • Loading branch information
twelho committed Jul 18, 2019
2 parents 425e87b + b573a49 commit 6478c65
Show file tree
Hide file tree
Showing 64 changed files with 1,782 additions and 238 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ IS_DIRTY:=$(shell echo ${GIT_VERSION} | grep -o dirty | wc -l)
WHAT?=ignite
PROJECT = github.com/weaveworks/ignite
APIS_DIR = ${PROJECT}/pkg/apis
API_DIRS = ${APIS_DIR}/ignite/v1alpha1,${APIS_DIR}/meta/v1alpha1
API_DIRS = ${APIS_DIR}/ignite,${APIS_DIR}/ignite/v1alpha1,${APIS_DIR}/meta/v1alpha1
CACHE_DIR = $(shell pwd)/bin/cache
API_DOCS = api/ignite.md api/meta.md

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ See the [FAQ.md](FAQ.md) document.
Want to know how Ignite really works under the hood?
Check out this [TGIK](https://github.com/heptio/tgik) session from [Joe Beda](https://twitter.com/jbeda) about it:

[[![TGIK 082](https://img.youtube.com/vi/aq-wlslJ5MQ/0.jpg)]](https://youtu.be/aq-wlslJ5MQ)
[![TGIK 082](https://img.youtube.com/vi/aq-wlslJ5MQ/0.jpg)](https://youtu.be/aq-wlslJ5MQ)

### Base images and kernels

Expand Down
60 changes: 7 additions & 53 deletions api/ignite.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
+k8s:deepcopy-gen=package
+k8s:defaulter-gen=TypeMeta
+k8s:openapi-gen=true
+k8s:conversion-gen=github.com/weaveworks/ignite/pkg/apis/ignite



Expand All @@ -26,7 +27,6 @@
* [func SetDefaults_VMNetworkSpec(obj *VMNetworkSpec)](#SetDefaults_VMNetworkSpec)
* [func SetDefaults_VMSpec(obj *VMSpec)](#SetDefaults_VMSpec)
* [func SetDefaults_VMStatus(obj *VMStatus)](#SetDefaults_VMStatus)
* [func ValidateNetworkMode(mode NetworkMode) error](#ValidateNetworkMode)
* [type FileMapping](#FileMapping)
* [type Image](#Image)
* [type ImageSourceType](#ImageSourceType)
Expand All @@ -36,7 +36,6 @@
* [type KernelSpec](#KernelSpec)
* [type KernelStatus](#KernelStatus)
* [type NetworkMode](#NetworkMode)
* [func GetNetworkModes() []NetworkMode](#GetNetworkModes)
* [func (nm NetworkMode) String() string](#NetworkMode.String)
* [type OCIImageClaim](#OCIImageClaim)
* [type OCIImageSource](#OCIImageSource)
Expand All @@ -49,8 +48,6 @@
* [func (s *SSH) MarshalJSON() ([]byte, error)](#SSH.MarshalJSON)
* [func (s *SSH) UnmarshalJSON(b []byte) error](#SSH.UnmarshalJSON)
* [type VM](#VM)
* [func (vm *VM) SetImage(image *Image)](#VM.SetImage)
* [func (vm *VM) SetKernel(kernel *Kernel)](#VM.SetKernel)
* [type VMImageSpec](#VMImageSpec)
* [type VMKernelSpec](#VMKernelSpec)
* [type VMNetworkSpec](#VMNetworkSpec)
Expand All @@ -60,30 +57,21 @@


#### <a name="pkg-files">Package files</a>
[defaults.go](/pkg/apis/ignite/v1alpha1/defaults.go) [doc.go](/pkg/apis/ignite/v1alpha1/doc.go) [helpers.go](/pkg/apis/ignite/v1alpha1/helpers.go) [json.go](/pkg/apis/ignite/v1alpha1/json.go) [register.go](/pkg/apis/ignite/v1alpha1/register.go) [types.go](/pkg/apis/ignite/v1alpha1/types.go)
[defaults.go](/pkg/apis/ignite/v1alpha1/defaults.go) [doc.go](/pkg/apis/ignite/v1alpha1/doc.go) [json.go](/pkg/apis/ignite/v1alpha1/json.go) [register.go](/pkg/apis/ignite/v1alpha1/register.go) [types.go](/pkg/apis/ignite/v1alpha1/types.go)


## <a name="pkg-constants">Constants</a>
``` go
const (
// GroupName is the group name use in this package
GroupName = "ignite.weave.works"

// VMKind returns the kind for the VM API type
VMKind = "VM"
// KernelKind returns the kind for the Kernel API type
KernelKind = "Kernel"
// PoolKind returns the kind for the Pool API type
PoolKind = "Pool"
// ImageKind returns the kind for the Image API type
ImageKind = "Image"
KindImage meta.Kind = "Image"
KindKernel meta.Kind = "Kernel"
KindVM meta.Kind = "VM"
)
```
``` go
const (
KindImage meta.Kind = "Image"
KindKernel meta.Kind = "Kernel"
KindVM meta.Kind = "VM"
// GroupName is the group name use in this package
GroupName = "ignite.weave.works"
)
```

Expand Down Expand Up @@ -165,15 +153,6 @@ func SetDefaults_VMStatus(obj *VMStatus)
```


## <a name="ValidateNetworkMode">func</a> [ValidateNetworkMode](/pkg/apis/ignite/v1alpha1/helpers.go?s=317:365#L15)
``` go
func ValidateNetworkMode(mode NetworkMode) error
```
ValidateNetworkMode validates the network mode
TODO: This should move into a dedicated validation package




## <a name="FileMapping">type</a> [FileMapping](/pkg/apis/ignite/v1alpha1/types.go?s=7677:7772#L206)
``` go
Expand Down Expand Up @@ -364,13 +343,6 @@ const (



### <a name="GetNetworkModes">func</a> [GetNetworkModes](/pkg/apis/ignite/v1alpha1/helpers.go?s=92:128#L6)
``` go
func GetNetworkModes() []NetworkMode
```
GetNetworkModes gets the list of available network modes





Expand Down Expand Up @@ -615,24 +587,6 @@ These files are stored in /var/lib/firecracker/vm/{vm-id}/metadata.json



### <a name="VM.SetImage">func</a> (\*VM) [SetImage](/pkg/apis/ignite/v1alpha1/helpers.go?s=658:694#L30)
``` go
func (vm *VM) SetImage(image *Image)
```
SetImage populates relevant fields to an Image on the VM object




### <a name="VM.SetKernel">func</a> (\*VM) [SetKernel](/pkg/apis/ignite/v1alpha1/helpers.go?s=856:895#L36)
``` go
func (vm *VM) SetKernel(kernel *Kernel)
```
SetKernel populates relevant fields to a Kernel on the VM object




## <a name="VMImageSpec">type</a> [VMImageSpec](/pkg/apis/ignite/v1alpha1/types.go?s=7298:7367#L191)
``` go
type VMImageSpec struct {
Expand Down
8 changes: 3 additions & 5 deletions cmd/ignite-spawn/ignite-spawn.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import (
"os"
"path"

"github.com/weaveworks/ignite/pkg/providers"

"github.com/weaveworks/ignite/pkg/constants"

log "github.com/sirupsen/logrus"
api "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha1"
api "github.com/weaveworks/ignite/pkg/apis/ignite"
"github.com/weaveworks/ignite/pkg/constants"
"github.com/weaveworks/ignite/pkg/container"
"github.com/weaveworks/ignite/pkg/container/prometheus"
"github.com/weaveworks/ignite/pkg/logs"
"github.com/weaveworks/ignite/pkg/providers"
)

func main() {
Expand Down
8 changes: 2 additions & 6 deletions cmd/ignite/cmd/cmdutil/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
api "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha1"
api "github.com/weaveworks/ignite/pkg/apis/ignite"
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/util"
)
Expand Down Expand Up @@ -119,11 +119,7 @@ type NetworkModeFlag struct {
}

func (nf *NetworkModeFlag) Set(val string) error {
nm := api.NetworkMode(val)
if err := api.ValidateNetworkMode(nm); err != nil {
return err
}
*nf.value = nm
*nf.value = api.NetworkMode(val)
return nil
}

Expand Down
1 change: 0 additions & 1 deletion cmd/ignite/cmd/gitops.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"io"

"github.com/lithammer/dedent"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/weaveworks/ignite/pkg/errutils"
Expand Down
1 change: 0 additions & 1 deletion cmd/ignite/cmd/kerncmd/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"io"

"github.com/lithammer/dedent"

"github.com/spf13/cobra"
"github.com/weaveworks/ignite/cmd/ignite/run"
"github.com/weaveworks/ignite/pkg/errutils"
Expand Down
3 changes: 1 addition & 2 deletions cmd/ignite/cmd/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package cmd
import (
"io"

"github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd"

"github.com/spf13/cobra"
"github.com/weaveworks/ignite/cmd/ignite/cmd/vmcmd"
)

// NewCmdLogs is an alias for vmcmd.NewCmdLogs
Expand Down
3 changes: 1 addition & 2 deletions cmd/ignite/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package cmd
import (
"io"

"github.com/weaveworks/ignite/cmd/ignite/run"

"github.com/spf13/cobra"
"github.com/weaveworks/ignite/cmd/ignite/run"
"github.com/weaveworks/ignite/pkg/errutils"
)

Expand Down
3 changes: 1 addition & 2 deletions cmd/ignite/cmd/vmcmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import (
"fmt"
"io"

"github.com/weaveworks/ignite/pkg/constants"

"github.com/lithammer/dedent"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/weaveworks/ignite/cmd/ignite/cmd/cmdutil"
"github.com/weaveworks/ignite/cmd/ignite/run"
"github.com/weaveworks/ignite/pkg/constants"
"github.com/weaveworks/ignite/pkg/errutils"
)

Expand Down
3 changes: 1 addition & 2 deletions cmd/ignite/ignite.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
"fmt"
"os"

"github.com/weaveworks/ignite/pkg/providers"

"github.com/weaveworks/ignite/cmd/ignite/cmd"
"github.com/weaveworks/ignite/pkg/providers"
)

func main() {
Expand Down
9 changes: 4 additions & 5 deletions cmd/ignite/run/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ import (
"path"
"strings"

"github.com/weaveworks/ignite/pkg/providers"

api "github.com/weaveworks/ignite/pkg/apis/ignite"
"github.com/weaveworks/ignite/pkg/apis/ignite/scheme"
api "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha1"
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/metadata"
"github.com/weaveworks/ignite/pkg/metadata/imgmd"
"github.com/weaveworks/ignite/pkg/metadata/kernmd"
"github.com/weaveworks/ignite/pkg/metadata/vmmd"
"github.com/weaveworks/ignite/pkg/operations"
"github.com/weaveworks/ignite/pkg/providers"
)

func NewCreateFlags() *CreateFlags {
cf := &CreateFlags{
VM: &api.VM{},
}

scheme.Scheme.Default(cf.VM)
scheme.Serializer.DefaultInternal(cf.VM)

return cf
}
Expand Down Expand Up @@ -97,8 +96,8 @@ func (cf *CreateFlags) NewCreateOptions(args []string) (*createOptions, error) {

co := &createOptions{CreateFlags: cf}

var err error
// Get the image, or import it if it doesn't exist
var err error
co.image, err = operations.FindOrImportImage(providers.Client, cf.VM.Spec.Image.OCIClaim.Ref)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/ignite/run/images.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package run

import (
api "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha1"
api "github.com/weaveworks/ignite/pkg/apis/ignite"
"github.com/weaveworks/ignite/pkg/filter"
"github.com/weaveworks/ignite/pkg/providers"
"github.com/weaveworks/ignite/pkg/util"
Expand Down
5 changes: 2 additions & 3 deletions cmd/ignite/run/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import (
"fmt"
"strings"

"github.com/weaveworks/ignite/pkg/providers"

api "github.com/weaveworks/ignite/pkg/apis/ignite"
"github.com/weaveworks/ignite/pkg/apis/ignite/scheme"
api "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha1"
meta "github.com/weaveworks/ignite/pkg/apis/meta/v1alpha1"
"github.com/weaveworks/ignite/pkg/filter"
"github.com/weaveworks/ignite/pkg/providers"
)

type InspectFlags struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/ignite/run/kernels.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package run

import (
api "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha1"
api "github.com/weaveworks/ignite/pkg/apis/ignite"
"github.com/weaveworks/ignite/pkg/filter"
"github.com/weaveworks/ignite/pkg/providers"
"github.com/weaveworks/ignite/pkg/util"
Expand Down
3 changes: 1 addition & 2 deletions cmd/ignite/run/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
"fmt"
"io/ioutil"

"github.com/weaveworks/ignite/pkg/providers"

"github.com/weaveworks/ignite/pkg/metadata/vmmd"
"github.com/weaveworks/ignite/pkg/providers"
"github.com/weaveworks/ignite/pkg/util"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/ignite/run/ps.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package run

import (
api "github.com/weaveworks/ignite/pkg/apis/ignite/v1alpha1"
api "github.com/weaveworks/ignite/pkg/apis/ignite"
"github.com/weaveworks/ignite/pkg/filter"
"github.com/weaveworks/ignite/pkg/providers"
"github.com/weaveworks/ignite/pkg/util"
Expand Down
3 changes: 1 addition & 2 deletions cmd/ignite/run/rm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package run
import (
"fmt"

"github.com/weaveworks/ignite/pkg/providers"

"github.com/weaveworks/ignite/pkg/metadata/vmmd"
"github.com/weaveworks/ignite/pkg/operations"
"github.com/weaveworks/ignite/pkg/providers"
)

type RmFlags struct {
Expand Down
3 changes: 1 addition & 2 deletions cmd/ignite/run/rmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import (
"fmt"
"os"

"github.com/weaveworks/ignite/pkg/providers"

"github.com/weaveworks/ignite/pkg/filter"
"github.com/weaveworks/ignite/pkg/metadata/imgmd"
"github.com/weaveworks/ignite/pkg/metadata/vmmd"
"github.com/weaveworks/ignite/pkg/providers"
)

type RmiFlags struct {
Expand Down
4 changes: 1 addition & 3 deletions cmd/ignite/run/rmk.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import (
"fmt"
"os"

"github.com/weaveworks/ignite/pkg/providers"

"github.com/weaveworks/ignite/pkg/filter"

"github.com/weaveworks/ignite/pkg/metadata/kernmd"
"github.com/weaveworks/ignite/pkg/metadata/vmmd"
"github.com/weaveworks/ignite/pkg/providers"
)

type RmkFlags struct {
Expand Down
1 change: 0 additions & 1 deletion cmd/ignite/run/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"path"

log "github.com/sirupsen/logrus"

"github.com/weaveworks/ignite/pkg/constants"
"github.com/weaveworks/ignite/pkg/metadata/vmmd"
"github.com/weaveworks/ignite/pkg/util"
Expand Down
Loading

0 comments on commit 6478c65

Please sign in to comment.