Skip to content

Commit

Permalink
Merge pull request #231 from OrangeBao/main
Browse files Browse the repository at this point in the history
feat: allow some daemonset pod
  • Loading branch information
kosmos-robot authored Nov 12, 2023
2 parents fd8d5b3 + bafe53b commit 111d483
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ func (r *RootPodReconciler) SetupWithManager(mgr manager.Manager) error {
if p.OwnerReferences != nil && len(p.OwnerReferences) > 0 {
for _, or := range p.OwnerReferences {
if or.Kind == "DaemonSet" {
if p.Annotations != nil {
if _, ok := p.Annotations[utils.KosmosDaemonsetAllowAnnotations]; ok {
return true
}
}
return false
}
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/utils/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ const (
KosmosResourceOwnersAnnotations = "kosmos-io/cluster-owners"
KosmosNodeOwnedByClusterAnnotations = "kosmos-io/owned-by-cluster"

KosmosDaemonsetAllowAnnotations = "kosmos-io/daemonset-allow"

NodeRoleLabel = "kubernetes.io/role"
NodeRoleValue = "agent"
NodeOSLabelBeta = "beta.kubernetes.io/os"
Expand Down

0 comments on commit 111d483

Please sign in to comment.