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

[Bug]: MariaDB Server - skuName, version and sslEnforcementEnabled are required fields, but not documented as such #749

Open
1 task done
bipe opened this issue May 20, 2024 · 5 comments
Labels
bug Something isn't working is:blocked is:triaged

Comments

@bipe
Copy link

bipe commented May 20, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

  • dbformariadb.azure.upbound.io/v1beta1 - Server

Resource MRs required to reproduce the bug

For skuName field error:

apiVersion: dbformariadb.azure.upbound.io/v1beta1
kind: Server
metadata:
  labels:
    testing.upbound.io/example-name: example
  name: example-upbound-gp
spec:
  forProvider:
    administratorLogin: acctestun
    administratorLoginPasswordSecretRef:
      key: example-key
      name: example-secret
      namespace: namespace-test
    location: West Europe
    resourceGroupNameSelector:
      matchLabels:
        testing.upbound.io/example-name: example-dbformariadb
    sslEnforcementEnabled: true
    storageMb: 51200
    version: "10.2"

For version field error:

apiVersion: dbformariadb.azure.upbound.io/v1beta1
kind: Server
metadata:
  labels:
    testing.upbound.io/example-name: example
  name: example-upbound-gp
spec:
  forProvider:
    administratorLogin: acctestun
    administratorLoginPasswordSecretRef:
      key: example-key
      name: example-secret
      namespace: namespace-test
    location: West Europe
    resourceGroupNameSelector:
      matchLabels:
        testing.upbound.io/example-name: example-dbformariadb
    skuName: GP_Gen5_2
    sslEnforcementEnabled: true
    storageMb: 51200

For sslEnforcementEnabled field error:

apiVersion: dbformariadb.azure.upbound.io/v1beta1
kind: Server
metadata:
  labels:
    testing.upbound.io/example-name: example
  name: example-upbound-gp
spec:
  forProvider:
    administratorLogin: acctestun
    administratorLoginPasswordSecretRef:
      key: example-key
      name: example-secret
      namespace: namespace-test
    location: West Europe
    resourceGroupNameSelector:
      matchLabels:
        testing.upbound.io/example-name: example-dbformariadb
    skuName: GP_Gen5_2
    storageMb: 51200

Steps to Reproduce

Create a MariaDB Server using any of the provided manifests (or any manifest without the skuName, version or sslEnforcementEnabled fields).
Note that you will need a secret to reference on spec.forProvider.administratorLoginPasswordSecretRef

What happened?

Required fields not listed as required in the documentation

The documentation on version 1.0.1 doesn't show the fields spec.forProvider.skuName, spec.forProvider.version and spec.forProvider.sslEnforcementEnabled as a required field, altough they're required.
This is just a documentation bug.

skuName is required error on status

image

version is required error on status

image

sslEnforcementEnabled is required error on status

image

Upbound doc link:
https://marketplace.upbound.io/providers/upbound/provider-azure-dbformariadb/v1.0.1/resources/dbformariadb.azure.upbound.io/Server/v1beta1
image

I'm already working on it. Will attach the PR soon.

Relevant Error Output Snippet

status:
  conditions:
    - lastTransitionTime: '2024-05-20T13:11:16Z'
      message: >-
        cannot compose resources: cannot apply composed resource "mdbserver":
        Server.dbformariadb.azure.upbound.io
        "nbra-dv-sysdemo-usea-mdb-9bwx4-jcwrx" is invalid: spec: Invalid value:
        "object": spec.forProvider.skuName is a required parameter
      reason: ReconcileError
      status: 'False'
      type: Synced
    - lastTransitionTime: '2024-05-20T12:39:16Z'
      message: 'Unready resources: customsecret'
      reason: Creating
      status: 'False'
      type: Ready
  connectionDetails:
    lastPublishedTime: '2024-05-20T12:39:16Z'
status:
  conditions:
    - lastTransitionTime: '2024-05-20T16:09:51Z'
      message: >-
        cannot compose resources: cannot apply composed resource "mdbserver":
        Server.dbformariadb.azure.upbound.io
        "nbra-dv-sysdemo-usea-mdb-v6n86-4f9qs" is invalid: spec: Invalid value:
        "object": spec.forProvider.version is a required parameter
      reason: ReconcileError
      status: 'False'
      type: Synced
    - lastTransitionTime: '2024-05-20T16:09:28Z'
      message: 'Unready resources: customsecret'
      reason: Creating
      status: 'False'
      type: Ready
  connectionDetails:
    lastPublishedTime: '2024-05-20T16:09:28Z'
status:
  conditions:
    - lastTransitionTime: '2024-05-20T16:13:12Z'
      message: >-
        cannot compose resources: cannot apply composed resource "mdbserver":
        Server.dbformariadb.azure.upbound.io
        "nbra-dv-sysdemo-usea-mdb-xq5jr-rtg4n" is invalid: spec: Invalid value:
        "object": spec.forProvider.sslEnforcementEnabled is a required parameter
      reason: ReconcileError
      status: 'False'
      type: Synced
  connectionDetails:
    lastPublishedTime: '2024-05-20T16:12:53Z'

Crossplane Version

1.45.5

Provider Version

1.0.1

Kubernetes Version

1.27

Kubernetes Distribution

AKS

Additional Info

No response

@bipe
Copy link
Author

bipe commented May 20, 2024

Added PR #750 . Please let me know if I can help with anything else.

@turkenf
Copy link
Collaborator

turkenf commented May 27, 2024

Hi @bipe,

Thank you for raising this issue. The reason why these fields do not appear required in the marketplace is that we can pass these fields in both spec.forProvider and spec.initProvider.

There are CEL rules in the CRD file regarding the conditions under which these fields are required and we have an internal issue to enable the showing of these kinds of fields in the marketplace.

@turkenf
Copy link
Collaborator

turkenf commented May 27, 2024

Blocked by the internal issue.

@bipe
Copy link
Author

bipe commented Jun 11, 2024

Oh I see. Thank you @turkenf . Should I leave this one open until the internal issue resolves?

@turkenf
Copy link
Collaborator

turkenf commented Jun 12, 2024

Should I leave this one open until the internal issue resolves?

Yes, it would be better to keep it open so it can be followed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working is:blocked is:triaged
Projects
None yet
2 participants