Skip to content

Commit

Permalink
Skip generating AWS IAM kubeconfig on cluster upgrade. (#8847)
Browse files Browse the repository at this point in the history
* Skip generating AWS IAM kubeconfig on cluster upgrade.

* Added comment
  • Loading branch information
jhaanvi5 authored Oct 16, 2024
1 parent c2f8677 commit 7bce123
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/workflows/workload/writeclusterconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func (s *writeClusterConfig) Run(ctx context.Context, commandContext *task.Comma

}

if commandContext.ClusterSpec.AWSIamConfig != nil {
// Generate AWS IAM kubeconfig only for cluster creation step
if commandContext.CurrentClusterSpec == nil && commandContext.ClusterSpec.AWSIamConfig != nil {
logger.Info("Generating the aws iam kubeconfig file")
err = commandContext.ClusterManager.GenerateAWSIAMKubeconfig(ctx, commandContext.ManagementCluster)
if err != nil {
Expand Down

0 comments on commit 7bce123

Please sign in to comment.