Skip to content

Commit

Permalink
chore: adding warning for alpha flags (#3764)
Browse files Browse the repository at this point in the history
Signed-off-by: Jaydip Gabani <[email protected]>
  • Loading branch information
JaydipGabani authored Jan 15, 2025
1 parent ec86197 commit 8b6b614
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/audit/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ func (am *Manager) addAuditResponsesToUpdateLists(
}
}
if *emitAuditEvents {
log.Info("Warning: Alpha flag emit-audit-events is set to true. This flag may change in the future.")
uid := r.obj.GetUID()
rv := r.obj.GetResourceVersion()
emitEvent(constraint, timestamp, ea, strings.Join(r.ScopedEnforcementActions, ","), gvk, namespace, name, rv, msg, am.gkNamespace, uid, am.eventRecorder)
Expand Down
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 8b6b614

Please sign in to comment.