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

Mark status.endpoint as optional in AKSCluster #247

Merged
merged 1 commit into from
May 28, 2021

Conversation

turkenh
Copy link
Collaborator

@turkenh turkenh commented May 28, 2021

Description of your changes

While running crossplane conformance tests, I observed following failure:

=== RUN   TestPackage/DeploysConformantCRDs/AKSCluster
    provider_test.go:436: version "v1alpha3" OpenAPI schema: -want, +got:
          &v1.JSONSchemaProps{
            ... // 1 ignored and 25 identical fields
            AnyOf: nil,
            Not:   nil,
            Properties: map[string]v1.JSONSchemaProps{
                ... // 2 identical entries
                "metadata": {Type: "object"},
+ go-junit-report
                "spec":     {Type: "object", Properties: {"deletionPolicy": {Type: "string", Enum: {{Raw: {0x22, 0x4f, 0x72, 0x70, ...}}, {Raw: {0x22, 0x44, 0x65, 0x6c, ...}}}}, "providerConfigRef": {Type: "object", Required: {"name"}, Properties: {"name": {Type: "string"}}}, "writeConnectionSecretToRef": {Type: "object", Required: {"name", "namespace"}, Properties: {"name": {Type: "string"}, "namespace": {Type: "string"}}}, ...}},
                "status": {
                    ... // 1 ignored and 19 identical fields
                    MaxProperties: nil,
                    MinProperties: nil,
        -           Required:      nil,
        +           Required:      []string{"endpoint"},
                    Items:         nil,
                    AllOf:         nil,
                    ... // 18 identical fields
                },
            },
            AdditionalProperties: nil,
            PatternProperties:    nil,
            ... // 12 identical fields
          }

It does not make sense to have a field as "required" in the status of a custom resource since that is not set by the user rather managed by the provider controller.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

  • Deploy provider-azure
  • Create an AKSCluster resource
  • Verify it reports ready with valid status

It does not make sense to have a field as "required" in status of
a custom resource since that is not set by user rather managed by
provider controller.

Signed-off-by: Hasan Turken <turkenh@gmail.com>
@turkenh turkenh requested review from negz and hasheddan May 28, 2021 07:53
@negz negz merged commit dd8d907 into crossplane-contrib:master May 28, 2021
@turkenh turkenh deleted the no-required-status branch May 28, 2021 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants