Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.4.1
type Config struct { // Label name that when applied to namespace with `true` will trigger application of manifests (e.g. enable-role). Label string `yaml:"label" json:"label"` // ConfigFile is the path to Kube config (e.g. ~/.kube/config). When left empty, it assumes in-cluster configuration. ConfigFile string `yaml:"configFile" json:"config-file"` // Manifests is the list of YAML snippets that will applied when matching namespace label is found. When nil, ManifestDir is used to read and populate the YAML manifests. Either Manifests or ManifestDir must be set. Manifests []string `yaml:"-" json:"-"` // ManifestDir is an optional path to directory with YAML documents. When set, it will append to the list of Manifests. Either Manifests or ManifestDir must be set. ManifestDir string `yaml:"manifestDir" json:"manifest-dir"` // Logger is an optional preconfigured logger. When nil, it will be configured for os.Stdout with logrus.InfoLevel. Logger *logrus.Logger `yaml:"-" json:"-"` }
Config defines NewNsWatch creation configuration.
type NsWatch ¶
type NsWatch struct {
// contains filtered or unexported fields
}
NsWatch creates a namespace watch and executes provided YAML in that namespace is labeled with a specific label=true.
func NewNsWatch ¶
NewNsWatch creates a new instance of NsWatch
func (*NsWatch) GetFileManager ¶ added in v0.4.9
GetFileManager returns the active file manager used by this watch. All objects created by NsWatch are associated with this file manager.
func (*NsWatch) GetLabel ¶ added in v0.4.11
GetLabel returns the configured label for which the watch is monitoring
Click to show internal directories.
Click to hide internal directories.