Skip to content

Commit

Permalink
GMP to beta
Browse files Browse the repository at this point in the history
Signed-off-by: lsviben <sviben.lovro@gmail.com>
  • Loading branch information
lsviben authored and turkenh committed Oct 11, 2023
1 parent 39e7b7e commit 1539782
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 32 deletions.
26 changes: 0 additions & 26 deletions pkg/migration/fake/mocks/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/pipeline/templates/controller.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error {
opts = append(opts, managed.WithPollJitterHook(o.PollJitter))
}
{{- if .FeaturesPackageAlias }}
if o.Features.Enabled({{ .FeaturesPackageAlias }}EnableAlphaManagementPolicies) {
if o.Features.Enabled({{ .FeaturesPackageAlias }}EnableBetaManagementPolicies) {
opts = append(opts, managed.WithManagementPolicies())
}
{{- end}}
Expand Down
5 changes: 2 additions & 3 deletions pkg/pipeline/templates/crd_types.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (
type {{ .CRD.Kind }}Spec struct {
{{ .XPCommonAPIsPackageAlias }}ResourceSpec `json:",inline"`
ForProvider {{ .CRD.ForProviderType }} `json:"forProvider"`
// 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 not honored
// unless the relevant Crossplane feature flag is enabled.
// InitProvider holds the same fields as ForProvider, with the exception
// of Identifier and other resource reference fields. The fields that are
// in InitProvider are merged into ForProvider when the resource is created.
Expand Down
2 changes: 1 addition & 1 deletion pkg/terraform/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func NewFileProducer(ctx context.Context, client resource.SecretClient, dir stri
// Note(lsviben):We need to check if the management policies feature is
// enabled before attempting to get the ignorable fields or merge them
// with the forProvider fields.
if fp.features.Enabled(feature.EnableAlphaManagementPolicies) {
if fp.features.Enabled(feature.EnableBetaManagementPolicies) {
initParams, err := tr.GetInitParameters()
if err != nil {
return nil, errors.Wrapf(err, "cannot get the init parameters for the resource %q", tr.GetName())
Expand Down
2 changes: 1 addition & 1 deletion pkg/terraform/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ func TestWriteMainTF(t *testing.T) {
},
f: func() *feature.Flags {
f := &feature.Flags{}
f.Enable(feature.EnableAlphaManagementPolicies)
f.Enable(feature.EnableBetaManagementPolicies)
return f
}(),
},
Expand Down

0 comments on commit 1539782

Please sign in to comment.