Skip to content

Commit

Permalink
Merge pull request #160 from replicatedhq/kotsscheme
Browse files Browse the repository at this point in the history
Add kotsscheme in base
  • Loading branch information
marccampbell authored Nov 23, 2019
2 parents 470a60d + 80a80b7 commit cfe5697
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/base/base.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package base

import (
kotsscheme "github.com/replicatedhq/kots/kotskinds/client/kotsclientset/scheme"
"gopkg.in/yaml.v2"
"k8s.io/client-go/kubernetes/scheme"
)

type Base struct {
Expand All @@ -18,6 +20,10 @@ type OverlySimpleGVK struct {
Kind string `yaml:"kind"`
}

func init() {
kotsscheme.AddToScheme(scheme.Scheme)
}

// ShouldBeIncludedInBaseKustomization attempts to determine if this is a valid Kubernetes manifest.
// It accomplished this by trying to unmarshal the YAML and looking for a apiVersion and Kind
func (f BaseFile) ShouldBeIncludedInBaseKustomization(excludeKotsKinds bool) bool {
Expand Down

0 comments on commit cfe5697

Please sign in to comment.