Skip to content

Commit

Permalink
Merge pull request #113 from arehmandev/skip-healthcheck
Browse files Browse the repository at this point in the history
Skip healthcheck
  • Loading branch information
gambol99 authored Sep 19, 2019
2 parents 892d2cf + d089215 commit 7b72c46
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ var (
// dryRun Defaults to false
dryRun bool

// skipChecks Defaults to false
skipChecks bool

// deleteReources bool
deleteResources bool

Expand Down Expand Up @@ -120,6 +123,11 @@ func main() {
Usage: "if true, the server's certificate will not be checked for validity",
EnvVar: "INSECURE_SKIP_TLS_VERIFY,PLUGIN_INSECURE_SKIP_TLS_VERIFY",
},
cli.BoolFlag{
Name: "skip-checks",
Usage: "if true, the resources will be deployed without a subsequent healthcheck",
Destination: &skipChecks,
},
cli.StringFlag{
Name: FlagKubeConfigData,
Usage: "Kubernetes config file data",
Expand Down Expand Up @@ -641,7 +649,7 @@ func deploy(c *cli.Context, r *ObjectResource) error {
r.Name = strings.Split(resourceName, "/")[1]
}

if !c.Bool(FlagDelete) && isWatchableResouce(r) {
if !c.Bool(FlagDelete) && isWatchableResouce(r) && !skipChecks {
return watchResource(c, r)
}
return nil
Expand Down

0 comments on commit 7b72c46

Please sign in to comment.