Skip to content

Commit

Permalink
virt-controller: move flag defaults to const
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Polednik <[email protected]>
  • Loading branch information
mpolednik committed Nov 29, 2017
1 parent 5784775 commit 4570de7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pkg/virt-controller/watch/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ const (

// Default address that virt-manifest listens on.
defaultHost = "0.0.0.0"

launcherImage = "virt-launcher"

migratorImage = "virt-handler"

virtShareDir = "/var/run/kubevirt"

ephemeralDiskDir = "/var/run/libvirt/kubevirt-ephemeral-disk"
)

type VirtControllerApp struct {
Expand Down Expand Up @@ -232,16 +240,16 @@ func (vca *VirtControllerApp) AddFlags() {

vca.AddCommonFlags()

flag.StringVar(&vca.launcherImage, "launcher-image", "virt-launcher",
flag.StringVar(&vca.launcherImage, "launcher-image", launcherImage,
"Shim container for containerized VMs")

flag.StringVar(&vca.migratorImage, "migrator-image", "virt-handler",
flag.StringVar(&vca.migratorImage, "migrator-image", migratorImage,
"Container which orchestrates a VM migration")

flag.StringVar(&vca.virtShareDir, "kubevirt-share-dir", "/var/run/kubevirt",
flag.StringVar(&vca.virtShareDir, "kubevirt-share-dir", virtShareDir,
"Shared directory between virt-handler and virt-launcher")

flag.StringVar(&vca.ephemeralDiskDir, "ephemeral-disk-dir", "/var/run/libvirt/kubevirt-ephemeral-disk",
flag.StringVar(&vca.ephemeralDiskDir, "ephemeral-disk-dir", ephemeralDiskDir,
"Base directory for ephemeral disk data")

flag.Parse()
Expand Down

0 comments on commit 4570de7

Please sign in to comment.