Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add two feature gates : Image based deployment and additional runtimeClasses #394

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions controllers/openshift_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ func (r *KataConfigOpenShiftReconciler) Reconcile(ctx context.Context, req ctrl.
// Check for enabled FeatureGates by retrieving the FeatureGateStatus
r.FeatureGatesStatus = r.FeatureGates.GetFeatureGateStatus(ctx)

// If FeatureGateStatus is nil, we cannot proceed. Log the error and reconcile
// This ensures we don't take any action if we cannot determine the FeatureGateStatus
// Which could be due to an error in fetching the ConfigMap or the ConfigMap not being present
if r.FeatureGatesStatus == nil {
r.Log.Info("FeatureGateStatus is nil, cannot proceed. Check if the feature gate configmap is present")
return ctrl.Result{}, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was discussed elsewhere so here just briefly for public record: I believe that just continuing here as if a default-valued feature gate configmap was present would lead to both simpler implementation and better user experience.

}

return func() (ctrl.Result, error) {

// k8s resource correctness checking on creation/modification
Expand Down