provider-template
provider-template copied to clipboard
Missing WithManagementPolicies in Reconciler Initialization
In the current code, the managed.WithManagementPolicies()
option is missing in the template within the Reconciler initialization:
https://github.com/crossplane/provider-template/blob/2e0b022c22eb50a8f32de2e09e832f17161d7596/hack/helpers/controller/KIND_LOWER/KIND_LOWER.go.tmpl#L65-L74
Due to this missing line, the ManagementPolicies feature is not activated, even if the environment variable is set to enable it.
Reproduce the issue
- Follow steps in the Readme to add a new type.
- Once ready, try to activate the ManagementPolicies feature: https://github.com/crossplane/provider-template/blob/2e0b022c22eb50a8f32de2e09e832f17161d7596/cmd/provider/main.go#L58
- Add a new resource with
managementPolicies
set to a non-default value.
Environment
Crossplane version: 1.16.0