Skip to content

Commit 8b6b614

Browse files
authored
chore: adding warning for alpha flags (#3764)
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
1 parent ec86197 commit 8b6b614

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

pkg/audit/manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ func (am *Manager) addAuditResponsesToUpdateLists(
909909
}
910910
}
911911
if *emitAuditEvents {
912+
log.Info("Warning: Alpha flag emit-audit-events is set to true. This flag may change in the future.")
912913
uid := r.obj.GetUID()
913914
rv := r.obj.GetResourceVersion()
914915
emitEvent(constraint, timestamp, ea, strings.Join(r.ScopedEnforcementActions, ","), gvk, namespace, name, rv, msg, am.gkNamespace, uid, am.eventRecorder)

pkg/controller/constraint/constraint_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ func shouldGenerateVAPB(defaultGenerateVAPB bool, enforcementAction util.Enforce
390390
VAPEnforcementActions, err = util.ScopedActionForEP(util.VAPEnforcementPoint, instance)
391391
default:
392392
if defaultGenerateVAPB {
393+
log.Info("Warning: Alpha flag default-create-vap-binding-for-constraints is set to true. This flag may change in the future.")
393394
VAPEnforcementActions = []string{string(enforcementAction)}
394395
}
395396
}
@@ -436,6 +437,9 @@ func ShouldGenerateVAP(ct *templates.ConstraintTemplate) (bool, error) {
436437
return false, err
437438
}
438439
if source.GenerateVAP == nil {
440+
if *DefaultGenerateVAP {
441+
log.Info("Warning: Alpha flag default-create-vap-for-templates is set to true. This flag may change in the future.")
442+
}
439443
return *DefaultGenerateVAP, nil
440444
}
441445
return *source.GenerateVAP, nil

pkg/controller/pubsub/pubsub_config_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ func (a *Adder) Add(mgr manager.Manager) error {
3838
if !*PubsubEnabled {
3939
return nil
4040
}
41+
log.Info("Warning: Alpha flag enable-pub-sub is set to true. This flag may change in the future.")
4142
r := newReconciler(mgr, a.PubsubSystem)
4243
return add(mgr, r)
4344
}

0 commit comments

Comments
 (0)