internal

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Copyright Contributors to the Open Cluster Management project

Copyright Contributors to the Open Cluster Management project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
	Kind       string `json:"kind,omitempty" yaml:"kind,omitempty"`
	Metadata   struct {
		Name string `json:"name,omitempty" yaml:"name,omitempty"`
	} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	PlacementBindingDefaults struct {
		Name string `json:"name,omitempty" yaml:"name,omitempty"`
	} `json:"placementBindingDefaults,omitempty" yaml:"placementBindingDefaults,omitempty"`
	PolicyDefaults    types.PolicyDefaults    `json:"policyDefaults,omitempty" yaml:"policyDefaults,omitempty"`
	PolicySetDefaults types.PolicySetDefaults `json:"policySetDefaults,omitempty" yaml:"policySetDefaults,omitempty"`
	Policies          []types.PolicyConfig    `json:"policies" yaml:"policies"`
	PolicySets        []types.PolicySetConfig `json:"policySets" yaml:"policySets"`
	// contains filtered or unexported fields
}

Plugin is used to store the PolicyGenerator configuration and the methods to generate the desired policies.

func (*Plugin) Config

func (p *Plugin) Config(config []byte, baseDirectory string) error

Config validates the input PolicyGenerator configuration, applies any missing defaults, and configures the Policy object.

func (*Plugin) Generate

func (p *Plugin) Generate() ([]byte, error)

Generate generates the policies, placements, and placement bindings and returns them as a single YAML file as a byte array. An error is returned if they cannot be created.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL