Skip to content

Commit

Permalink
Merge pull request #894 from spectrocloud/PCP-1561_43_v2
Browse files Browse the repository at this point in the history
handle nil annotation
  • Loading branch information
sadysnaat authored Mar 19, 2024
2 parents c850522 + 39233cd commit 28d7617
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cloud/services/eks/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func (s *Service) reconcileOIDCProvider(cluster *eks.Cluster) error {
}
s.scope.ControlPlane.Status.OIDCProvider.ARN = oidcProvider
anno := s.scope.ControlPlane.GetAnnotations()
if anno == nil {
anno = make(map[string]string)
}
anno["aws.spectrocloud.com/oidcProviderArn"] = oidcProvider
s.scope.ControlPlane.SetAnnotations(anno)
if err := s.scope.PatchObject(); err != nil {
Expand Down

0 comments on commit 28d7617

Please sign in to comment.