Skip to content

Commit

Permalink
adding warning for alpha flags
Browse files Browse the repository at this point in the history
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
  • Loading branch information
JaydipGabani committed Jan 8, 2025
1 parent a1b6e90 commit bba0a2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/constraint/constraint_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ func shouldGenerateVAPB(defaultGenerateVAPB bool, enforcementAction util.Enforce
VAPEnforcementActions, err = util.ScopedActionForEP(util.VAPEnforcementPoint, instance)
default:
if defaultGenerateVAPB {
log.Info("Warning: Alpha flag default-create-vap-binding-for-constraints is set to true. This flag may change in the future.")
VAPEnforcementActions = []string{string(enforcementAction)}
}
}
Expand Down Expand Up @@ -436,6 +437,9 @@ func ShouldGenerateVAP(ct *templates.ConstraintTemplate) (bool, error) {
return false, err
}
if source.GenerateVAP == nil {
if *DefaultGenerateVAP {
log.Info("Warning: Alpha flag default-create-vap-for-templates is set to true. This flag may change in the future.")
}
return *DefaultGenerateVAP, nil
}
return *source.GenerateVAP, nil
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/pubsub/pubsub_config_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (a *Adder) Add(mgr manager.Manager) error {
if !*PubsubEnabled {
return nil
}
log.Info("Warning: Alpha flag enable-pub-sub is set to true. This flag may change in the future.")
r := newReconciler(mgr, a.PubsubSystem)
return add(mgr, r)
}
Expand Down

0 comments on commit bba0a2d

Please sign in to comment.