group

package
v0.0.0-...-5f5fad8 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OpenshiftPrivAdminsGroup defines the group that will be used for the openshift-priv namespace in the app.ci cluster.
	OpenshiftPrivAdminsGroup = "openshift-priv-admins"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ClusterGroups holds the mapping from cluster group name to the clusters in the group
	ClusterGroups map[string][]string `json:"cluster_groups,omitempty"`
	// Groups holds the mapping from group name to its target
	Groups map[string]Target `json:"groups,omitempty"`
}

Config represents the configuration file for the groups

func LoadConfig

func LoadConfig(file string) (*Config, error)

LoadConfig loads the config from a given file

type Target

type Target struct {
	// RenameTo is the new name of the group. If not set, the original name will be used.
	RenameTo string `json:"rename_to,omitempty"`
	// Clusters is the clusters where the group should exist.
	Clusters []string `json:"clusters,omitempty"`
	// ClusterGroups is the cluster groups where the group should exist.
	ClusterGroups []string `json:"cluster_groups,omitempty"`
}

Target represents the distribution of a group If neither Clusters and nor ClusterGroups is set, then the group is on all clusters.

func (Target) ResolveClusters

func (t Target) ResolveClusters(cg map[string][]string) sets.Set[string]

Jump to

Keyboard shortcuts

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