-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5953dd9
commit 9acc4c1
Showing
8 changed files
with
357 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package reconciler | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/aws/eks-anywhere/pkg/api/v1alpha1" | ||
"github.com/aws/eks-anywhere/pkg/controller/clientutil" | ||
) | ||
|
||
// EKSACiliumInstalledAnnotation indicates a cluster has previously been observed to have | ||
// EKS-A Cilium installed irrespective of whether its still installed. | ||
const EKSACiliumInstalledAnnotation = "anywhere.eks.amazonaws.com/eksa-cilium" | ||
|
||
// ciliumWasInstalled checks cluster for the EKSACiliumInstalledAnnotation. | ||
func ciliumWasInstalled(ctx context.Context, cluster *v1alpha1.Cluster) bool { | ||
if cluster.Annotations == nil { | ||
return false | ||
} | ||
_, ok := cluster.Annotations[EKSACiliumInstalledAnnotation] | ||
return ok | ||
} | ||
|
||
// markCiliumInstalled populates the EKSACiliumInstalledAnnotation on cluster. It may trigger | ||
// anothe reconciliation event. | ||
func markCiliumInstalled(ctx context.Context, cluster *v1alpha1.Cluster) { | ||
clientutil.AddAnnotation(cluster, EKSACiliumInstalledAnnotation, "") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.