Add support for disabling all staged content

This reduces the binary footprint for downstream users that won't use
these files anyway.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2020-09-11 14:51:45 -07:00 committed by Brad Davidson
parent edb3e5b7a7
commit fcaeebaa18
7 changed files with 24 additions and 0 deletions

View File

@ -44,6 +44,7 @@ func main() {
NoMetadata: true,
Prefix: "manifests/",
Output: "pkg/deploy/zz_generated_bindata.go",
Tags: "!no_stage",
}
if err := bindata.Translate(bc); err != nil {
logrus.Fatal(err)
@ -60,6 +61,7 @@ func main() {
NoMetadata: true,
Prefix: "build/static/",
Output: "pkg/static/zz_generated_bindata.go",
Tags: "!no_stage",
}
if err := bindata.Translate(bc); err != nil {
logrus.Fatal(err)

7
pkg/deploy/nostage.go Normal file
View File

@ -0,0 +1,7 @@
// +build no_stage
package deploy
func Stage(dataDir string, templateVars map[string]string, skips map[string]bool) error {
return nil
}

View File

@ -1,3 +1,5 @@
// +build !no_stage
package deploy
import (

View File

@ -12,6 +12,8 @@
// manifests/metrics-server/resource-reader.yaml
// manifests/rolebindings.yaml
// manifests/traefik.yaml
// +build !no_stage
package deploy
import (

7
pkg/static/nostage.go Normal file
View File

@ -0,0 +1,7 @@
// +build no_stage
package static
func Stage(dataDir string) error {
return nil
}

View File

@ -1,3 +1,5 @@
// +build !no_stage
package static
import (

View File

@ -1,6 +1,8 @@
// Code generated for package static by go-bindata DO NOT EDIT. (@generated)
// sources:
// build/static/charts/traefik-1.81.0.tgz
// +build !no_stage
package static
import (