Documentation ¶
Index ¶
- type Filter
- type IAMServiceAccountFilter
- func (f *IAMServiceAccountFilter) AppendGlobs(includeGlobExprs, excludeGlobExprs []string, ...) error
- func (f *IAMServiceAccountFilter) AppendIncludeGlobs(serviceAccounts []*api.ClusterIAMServiceAccount, globExprs ...string) error
- func (f *IAMServiceAccountFilter) FilterMatching(serviceAccounts []*api.ClusterIAMServiceAccount) []*api.ClusterIAMServiceAccount
- func (f *IAMServiceAccountFilter) ForEach(serviceAccounts []*api.ClusterIAMServiceAccount, ...) error
- func (f *IAMServiceAccountFilter) LogInfo(serviceAccounts []*api.ClusterIAMServiceAccount)
- func (f *IAMServiceAccountFilter) MatchAll(serviceAccounts []*api.ClusterIAMServiceAccount) (sets.String, sets.String)
- func (f *IAMServiceAccountFilter) SetDeleteFilter(ctx context.Context, lister serviceAccountLister, includeOnlyMissing bool, ...) error
- func (f *IAMServiceAccountFilter) SetExcludeExistingFilter(ctx context.Context, stackManager serviceAccountLister, ...) error
- type NodeGroupFilter
- func (f *NodeGroupFilter) AppendExcludeGlobs(globExprs ...string) error
- func (f *NodeGroupFilter) AppendGlobs(includeGlobExprs, excludeGlobExprs, ngNames []string) error
- func (f *NodeGroupFilter) AppendIncludeGlobs(ngNames []string, globExprs ...string) error
- func (f *NodeGroupFilter) AppendIncludeNames(names ...string)
- func (f *NodeGroupFilter) FilterMatching(nodeGroups []*api.NodeGroup) []*api.NodeGroup
- func (f *NodeGroupFilter) ForEach(nodeGroups []*api.NodeGroup, iterFn func(i int, ng *api.NodeGroup) error) error
- func (f *NodeGroupFilter) GetExcludeAll() bool
- func (f *NodeGroupFilter) LogInfo(cfg *api.ClusterConfig)
- func (f *NodeGroupFilter) Match(ngName string) bool
- func (f *NodeGroupFilter) SetExcludeAll(excludeAll bool)
- func (f *NodeGroupFilter) SetOnlyLocal(ctx context.Context, eksAPI awsapi.EKS, lister StackLister, ...) error
- func (f *NodeGroupFilter) SetOnlyRemote(ctx context.Context, eksAPI awsapi.EKS, lister StackLister, ...) error
- type NodegroupFilter
- type StackLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { ExcludeAll bool // highest priority // contains filtered or unexported fields }
Filter holds filter configuration
func (*Filter) AppendExcludeGlobs ¶
AppendExcludeGlobs sets globs for exclusion rules
func (*Filter) AppendExcludeNames ¶
AppendExcludeNames appends explicit names to the exclude filter
func (*Filter) AppendIncludeNames ¶
AppendIncludeNames appends explicit names to the include filter
type IAMServiceAccountFilter ¶
type IAMServiceAccountFilter struct {
*Filter
}
IAMServiceAccountFilter holds filter configuration
func NewIAMServiceAccountFilter ¶
func NewIAMServiceAccountFilter() *IAMServiceAccountFilter
NewIAMServiceAccountFilter create new ServiceAccountFilter instance
func (*IAMServiceAccountFilter) AppendGlobs ¶
func (f *IAMServiceAccountFilter) AppendGlobs(includeGlobExprs, excludeGlobExprs []string, serviceAccounts []*api.ClusterIAMServiceAccount) error
AppendGlobs appends globs for inclusion and exclusion rules
func (*IAMServiceAccountFilter) AppendIncludeGlobs ¶
func (f *IAMServiceAccountFilter) AppendIncludeGlobs(serviceAccounts []*api.ClusterIAMServiceAccount, globExprs ...string) error
AppendIncludeGlobs sets globs for inclusion rules
func (*IAMServiceAccountFilter) FilterMatching ¶
func (f *IAMServiceAccountFilter) FilterMatching(serviceAccounts []*api.ClusterIAMServiceAccount) []*api.ClusterIAMServiceAccount
FilterMatching matches names against the filter and returns all included service accounts
func (*IAMServiceAccountFilter) ForEach ¶
func (f *IAMServiceAccountFilter) ForEach(serviceAccounts []*api.ClusterIAMServiceAccount, iterFn func(i int, sa *api.ClusterIAMServiceAccount) error) error
ForEach iterates over each nodegroup that is included by the filter and calls iterFn
func (*IAMServiceAccountFilter) LogInfo ¶
func (f *IAMServiceAccountFilter) LogInfo(serviceAccounts []*api.ClusterIAMServiceAccount)
LogInfo prints out a user-friendly message about how filter was applied
func (*IAMServiceAccountFilter) MatchAll ¶
func (f *IAMServiceAccountFilter) MatchAll(serviceAccounts []*api.ClusterIAMServiceAccount) (sets.String, sets.String)
MatchAll all names against the filter and return two sets of names - included and excluded
func (*IAMServiceAccountFilter) SetDeleteFilter ¶
func (f *IAMServiceAccountFilter) SetDeleteFilter(ctx context.Context, lister serviceAccountLister, includeOnlyMissing bool, cfg *api.ClusterConfig) error
SetDeleteFilter uses stackManager to list existing iamserviceaccount stacks and configures the filter to either explictily exluce or include iamserviceaccounts that are missing from given serviceAccounts
func (*IAMServiceAccountFilter) SetExcludeExistingFilter ¶
func (f *IAMServiceAccountFilter) SetExcludeExistingFilter(ctx context.Context, stackManager serviceAccountLister, clientSet kubernetes.Interface, serviceAccounts []*api.ClusterIAMServiceAccount, overrideExistingServiceAccounts bool) error
SetExcludeExistingFilter uses stackManager to list existing nodegroup stacks and configures the filter accordingly
type NodeGroupFilter ¶
type NodeGroupFilter struct {
// contains filtered or unexported fields
}
NodeGroupFilter holds filter configuration
func NewNodeGroupFilter ¶
func NewNodeGroupFilter() *NodeGroupFilter
NewNodeGroupFilter creates a new NodeGroupFilter struct
func (*NodeGroupFilter) AppendExcludeGlobs ¶
func (f *NodeGroupFilter) AppendExcludeGlobs(globExprs ...string) error
AppendExcludeGlobs sets globs for inclusion rules
func (*NodeGroupFilter) AppendGlobs ¶
func (f *NodeGroupFilter) AppendGlobs(includeGlobExprs, excludeGlobExprs, ngNames []string) error
AppendGlobs appends globs for inclusion and exclusion rules
func (*NodeGroupFilter) AppendIncludeGlobs ¶
func (f *NodeGroupFilter) AppendIncludeGlobs(ngNames []string, globExprs ...string) error
AppendIncludeGlobs sets globs for inclusion rules
func (*NodeGroupFilter) AppendIncludeNames ¶
func (f *NodeGroupFilter) AppendIncludeNames(names ...string)
AppendIncludeNames sets globs for inclusion rules
func (*NodeGroupFilter) FilterMatching ¶
func (f *NodeGroupFilter) FilterMatching(nodeGroups []*api.NodeGroup) []*api.NodeGroup
FilterMatching matches names against the filter and returns all included node groups
func (*NodeGroupFilter) ForEach ¶
func (f *NodeGroupFilter) ForEach(nodeGroups []*api.NodeGroup, iterFn func(i int, ng *api.NodeGroup) error) error
ForEach iterates over each nodegroup that is included by the filter and calls iterFn
func (*NodeGroupFilter) GetExcludeAll ¶
func (f *NodeGroupFilter) GetExcludeAll() bool
GetExcludeAll returns whether all nodegroups will be excluded
func (*NodeGroupFilter) LogInfo ¶
func (f *NodeGroupFilter) LogInfo(cfg *api.ClusterConfig)
LogInfo prints out a user-friendly message about how filter was applied
func (*NodeGroupFilter) Match ¶
func (f *NodeGroupFilter) Match(ngName string) bool
Match decides whether the given nodegroup is considered included by this filter. It takes into account not only the inclusion and exclusion rules (globs) but also the modifiers onlyRemote and onlyLocal.
func (*NodeGroupFilter) SetExcludeAll ¶
func (f *NodeGroupFilter) SetExcludeAll(excludeAll bool)
SetExcludeAll sets the ExcludeAll flag in the filter so that no nodegroups are matched
func (*NodeGroupFilter) SetOnlyLocal ¶
func (f *NodeGroupFilter) SetOnlyLocal(ctx context.Context, eksAPI awsapi.EKS, lister StackLister, clusterConfig *api.ClusterConfig) error
SetOnlyLocal uses StackLister to list existing nodegroup stacks and configures the filter to only include the nodegroups that don't exist in the cluster already. Note: they are present in the config file but not in the cluster. This is used by the create nodegroup command
func (*NodeGroupFilter) SetOnlyRemote ¶
func (f *NodeGroupFilter) SetOnlyRemote(ctx context.Context, eksAPI awsapi.EKS, lister StackLister, clusterConfig *api.ClusterConfig) error
SetOnlyRemote uses StackLister to list existing nodegroup stacks and configures the filter to exclude nodegroups already defined in the config file. It will include the
nodegroups that exist in the cluster but not in the config
type NodegroupFilter ¶
type NodegroupFilter interface { SetOnlyLocal(ctx context.Context, eksAPI awsapi.EKS, lister StackLister, clusterConfig *api.ClusterConfig) error Match(ngName string) bool LogInfo(cfg *api.ClusterConfig) }
NodegroupFilter is an interface that holds filter configuration
type StackLister ¶
type StackLister interface {
ListNodeGroupStacksWithStatuses(ctx context.Context) ([]manager.NodeGroupStack, error)
}
StackLister lists nodegroup stacks
Directories ¶
Path | Synopsis |
---|---|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |