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

GMP to beta #549

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions apis/common/v1/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,8 @@ type ResourceSpec struct {
// +kubebuilder:default={"name": "default"}
ProviderConfigReference *Reference `json:"providerConfigRef,omitempty"`

// THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
// unless the relevant Crossplane feature flag is enabled, and may be
// changed or removed without notice.
// THIS IS A BETA FIELD. It is on by default but can be opted out
// through a Crossplane feature flag.
// ManagementPolicies specify the array of actions Crossplane is allowed to
// take on the managed and external resources.
// This field is planned to replace the DeletionPolicy field in a future
Expand Down
4 changes: 2 additions & 2 deletions pkg/feature/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

package feature

// EnableAlphaManagementPolicies enables alpha support for
// EnableBetaManagementPolicies enables beta support for
// Management Policies. See the below design for more details.
// https://github.com/crossplane/crossplane/pull/3531
const EnableAlphaManagementPolicies Flag = "EnableAlphaManagementPolicies"
const EnableBetaManagementPolicies Flag = "EnableBetaManagementPolicies"
4 changes: 2 additions & 2 deletions pkg/reconciler/managed/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ func WithRecorder(er event.Recorder) ReconcilerOption {
// WithManagementPolicies enables support for management policies.
func WithManagementPolicies() ReconcilerOption {
return func(r *Reconciler) {
r.features.Enable(feature.EnableAlphaManagementPolicies)
r.features.Enable(feature.EnableBetaManagementPolicies)
}
}

Expand Down Expand Up @@ -752,7 +752,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (resu
"external-name", meta.GetExternalName(managed),
)

managementPoliciesEnabled := r.features.Enabled(feature.EnableAlphaManagementPolicies)
managementPoliciesEnabled := r.features.Enabled(feature.EnableBetaManagementPolicies)
if managementPoliciesEnabled {
log.WithValues("managementPolicies", managed.GetManagementPolicies())
}
Expand Down