policymappings

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPolicyMappingsBranch

func AddPolicyMappingsBranch(tree treeprint.Tree, policyMappings []PolicyMapping) error

AddPolicyMappingsBranch builds a tree for policy-mapping

func PushPolicyMappings

func PushPolicyMappings(pushDir, org, insightsToken, host string, deleteMissing, dryRun bool) error

PushPolicyMappings pushes policy-mapping to insights

Types

type PolicyMapping

type PolicyMapping struct {
	Name string            `json:"name,omitempty" yaml:"name,omitempty"`
	Spec PolicyMappingSpec `json:"spec" yaml:"spec"`
	Type string            `json:"type,omitempty" yaml:"type,omitempty"`
}

func FetchPolicyMappings

func FetchPolicyMappings(org, token, hostName string) ([]PolicyMapping, error)

FetchPolicyMappings queries Fairwinds Insights to retrieve all of the policy-mappings for an organization

func (PolicyMapping) GetName

func (pm PolicyMapping) GetName() string

type PolicyMappingSpec

type PolicyMappingSpec struct {
	Enabled   *bool    `json:"enabled,omitempty" yaml:"enabled,omitempty"`
	AppGroups []string `json:"appGroups,omitempty" yaml:"appGroups,omitempty"`
	Contexts  []string `json:"contexts,omitempty" yaml:"contexts,omitempty"`
	Policies  []string `json:"policies,omitempty" yaml:"policies,omitempty"`
}

Jump to

Keyboard shortcuts

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