Browse Source

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>
pull/2198/head
Brad Davidson 4 years ago committed by Brad Davidson
parent
commit
fcaeebaa18
  1. 2
      pkg/codegen/main.go
  2. 7
      pkg/deploy/nostage.go
  3. 2
      pkg/deploy/stage.go
  4. 2
      pkg/deploy/zz_generated_bindata.go
  5. 7
      pkg/static/nostage.go
  6. 2
      pkg/static/stage.go
  7. 2
      pkg/static/zz_generated_bindata.go

2
pkg/codegen/main.go

@ -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

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

2
pkg/deploy/stage.go

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

2
pkg/deploy/zz_generated_bindata.go

@ -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

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

2
pkg/static/stage.go

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

2
pkg/static/zz_generated_bindata.go

@ -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 (

Loading…
Cancel
Save