MCPcopy Create free account
hub / github.com/eksctl-io/eksctl / getClusterStackFromList

Method getClusterStackFromList

pkg/cfn/manager/api.go:678–697  ·  view source on GitHub ↗
(ctx context.Context, clusterStackNames []string, clusterName string)

Source from the content-addressed store, hash-verified

676}
677
678func (c *StackCollection) getClusterStackFromList(ctx context.Context, clusterStackNames []string, clusterName string) (*Stack, error) {
679 clusterStackName := c.MakeClusterStackName()
680 if clusterName != "" {
681 clusterStackName = c.MakeClusterStackNameFromName(clusterName)
682 }
683
684 for _, stack := range clusterStackNames {
685 if stack == clusterStackName {
686 stack, err := c.DescribeStack(ctx, &types.Stack{StackName: &clusterStackName})
687 if err != nil {
688 return nil, err
689 }
690 if matchesCluster(clusterName, stack.Tags) {
691 return stack, nil
692
693 }
694 }
695 }
696 return nil, nil
697}
698
699// DescribeStackEvents describes the events that have occurred on the stack
700func (c *StackCollection) DescribeStackEvents(ctx context.Context, i *Stack) ([]types.StackEvent, error) {

Callers 2

Calls 4

MakeClusterStackNameMethod · 0.95
DescribeStackMethod · 0.95
matchesClusterFunction · 0.85

Tested by

no test coverage detected