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

managementPolicies is not supported #206

Open
n-029894 opened this issue Dec 27, 2024 · 1 comment · May be fixed by #215
Open

managementPolicies is not supported #206

n-029894 opened this issue Dec 27, 2024 · 1 comment · May be fixed by #215
Labels
bug Something isn't working

Comments

@n-029894
Copy link

What problem are you facing?

The marketplace API documentation lists managementPolicies as a valid option. This is not available in the CRDs though.

Marketplace link

$ k explain "roles.postgresql.sql.crossplane.io".spec
GROUP:      postgresql.sql.crossplane.io
KIND:       Role
VERSION:    v1alpha1

FIELD: spec <Object>


DESCRIPTION:
    A RoleSpec defines the desired state of a Role.

FIELDS:
  deletionPolicy        <string>
  enum: Orphan, Delete
    DeletionPolicy specifies what will happen to the underlying external when
    this managed resource is deleted - either "Delete" or "Orphan" the external
    resource.

  forProvider   <Object> -required-
    RoleParameters define the desired state of a PostgreSQL role instance.

  providerConfigRef     <Object>
    ProviderConfigReference specifies how the provider that will be used to
    create, observe, update, and delete this managed resource should be
    configured.

  providerRef   <Object>
    ProviderReference specifies the provider that will be used to create,
    observe, update, and delete this managed resource. Deprecated: Please use
    ProviderConfigReference, i.e. `providerConfigRef`

  publishConnectionDetailsTo    <Object>
    PublishConnectionDetailsTo specifies the connection secret config which
    contains a name, metadata and a reference to secret store config to which
    any connection details for this managed resource should be written.
    Connection details frequently include the endpoint, username, and password
    required to connect to the managed resource.

  writeConnectionSecretToRef    <Object>
    WriteConnectionSecretToReference specifies the namespace and name of a
    Secret to which any connection details for this managed resource should be
    written. Connection details frequently include the endpoint, username, and
    password required to connect to the managed resource. This field is planned
    to be replaced in a future release in favor of PublishConnectionDetailsTo.
    Currently, both could be set independently and connection details would be
    published to both without affecting each other.

How could Crossplane help solve your problem?

Adding managementPolicies to the provider would be the ideal path forward. Aligning the docs with the reality of the project would still be an improvement though.

@n-029894 n-029894 added the enhancement New feature or request label Dec 27, 2024
@Duologic Duologic moved this to Backlog in Provider SQL Jan 10, 2025
@Duologic Duologic added bug Something isn't working and removed enhancement New feature or request labels Jan 10, 2025
@fnicolelli-ls
Copy link

Hello team 👋
i'm using version 0.11.0 and if issue the command k explain "databases.postgresql.sql.crossplane.io".spec i can see that the management policies are available

GROUP:      postgresql.sql.crossplane.io
KIND:       Database
VERSION:    v1alpha1

FIELD: spec <Object>


DESCRIPTION:
    A DatabaseSpec defines the desired state of a Database.

FIELDS:
  deletionPolicy	<string>
  enum: Orphan, Delete
    DeletionPolicy specifies what will happen to the underlying external
    when this managed resource is deleted - either "Delete" or "Orphan" the
    external resource.
    This field is planned to be deprecated in favor of the ManagementPolicies
    field in a future release. Currently, both could be set independently and
    non-default values would be honored if the feature flag is enabled.
    See the design doc for more information:
    https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223

  forProvider	<Object> -required-
    DatabaseParameters are the configurable fields of a Database.

  managementPolicies	<[]string>
    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
    release. Currently, both could be set independently and non-default
    values would be honored if the feature flag is enabled. If both are
    custom, the DeletionPolicy field will be ignored.
    See the design doc for more information:
    https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223
    and this one:
    https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md

  providerConfigRef	<Object>
    ProviderConfigReference specifies how the provider that will be used to
    create, observe, update, and delete this managed resource should be
    configured.

  publishConnectionDetailsTo	<Object>
    PublishConnectionDetailsTo specifies the connection secret config which
    contains a name, metadata and a reference to secret store config to
    which any connection details for this managed resource should be written.
    Connection details frequently include the endpoint, username,
    and password required to connect to the managed resource.

  writeConnectionSecretToRef	<Object>
    WriteConnectionSecretToReference specifies the namespace and name of a
    Secret to which any connection details for this managed resource should
    be written. Connection details frequently include the endpoint, username,
    and password required to connect to the managed resource.
    This field is planned to be replaced in a future release in favor of
    PublishConnectionDetailsTo. Currently, both could be set independently
    and connection details would be published to both without affecting
    each other.

i should be on by default (being a beta feature), but if i try to use it i get this error:

`spec.managementPolicies` is set to a non-default value but the feature is not enabled: [Observe]

am i missing something?
Thanks a lot!

@fernandezcuesta fernandezcuesta linked a pull request Feb 16, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

3 participants