Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Commit

Permalink
add namespace to rollout status
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlacy committed Feb 12, 2021
1 parent 23287b9 commit d0b775e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkg/monokube/monokube.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,27 @@ type Package struct {
Path string
Manifests []Manifest
Env map[string]string
Namespace string
PackageConfig
}

// Manifest represents a k8s manifest config
type Manifest struct {
File string
RunCondition string
Kube KubeManifest // unused
Kube KubeManifest
}

// Metadata is the k8s metadata
type Metadata struct {
Namespace string `yaml:"namespace"`
Kind string `yaml:"kind"`
}

// KubeManifest represents the basic values needed from k8s
// unused
type KubeManifest struct {
Name string
Kind string
Name string `yaml:"name"`
Metadata
}

// LernaConfig is a basic representation of a lerna config file
Expand All @@ -57,6 +63,7 @@ type LernaConfig struct {
// PackageConfig is a basic representation of a lerna config file
type PackageConfig struct {
Version string `yaml:"version"`
Namespace string `yaml:"namespace"`
Clusters []string `yaml:"clusters"`
Watch bool `yaml:"watch"`
Kind string `yaml:"kind"`
Expand Down Expand Up @@ -328,7 +335,7 @@ func applyManifests(packages []Package, runCondition string) {
}

if !*flagDryRun {
runBackground(pkg, "kubectl", "rollout", "status", pkg.Kind+"/"+pkg.Name)
runBackground(pkg, "kubectl", "rollout", "status", pkg.Kind+"/"+pkg.Name, "-n", manifest.Kube.Namespace)
}
}
}
Expand Down

0 comments on commit d0b775e

Please sign in to comment.