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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 pkg/reconciler/apis/apibinding: return error in case of conflicts #2645

Merged

Conversation

s-urbaniak
Copy link
Contributor

Summary

This fixes failed local sharded startup failures. The observed symptom was:

- apiVersion: apis.kcp.io/v1alpha1
  kind: APIBinding
  metadata:
    annotations:
      kcp.io/cluster: system:shard
    creationTimestamp: "2023-01-18T14:29:39Z"
    finalizers:
    - apis.kcp.io/apibinding-finalizer
    generation: 1
    labels:
      internal.apis.kcp.io/export: bmCdly9xXiUpEHe3ypvDwvXMTfoVZUE92mqAQf
    name: tenancy.kcp.io
    resourceVersion: "195"
    uid: 9cf38f12-663c-4673-84be-b5aae0cb4bdc
  spec:
    reference:
      export:
        name: tenancy.kcp.io
        path: root
  status:
    conditions:
    - lastTransitionTime: "2023-01-18T14:29:42Z"
      message: 'Unable to bind APIs: error checking for naming conflicts for APIBinding
        system:shard|tenancy.kcp.io: error getting CRDs: APIResourceSchema.apis.kcp.io
        "v220628-546034da.negotiatedapiresources.apiresource.kcp.io" not found'
      reason: NamingConflicts
      severity: Error
      status: "False"
      type: Ready
    - lastTransitionTime: "2023-01-18T14:29:41Z"
      message: Invalid APIExport. Please contact the APIExport owner to resolve
      reason: InternalError
      severity: Error
      status: "False"
      type: APIExportValid
    - lastTransitionTime: "2023-01-18T14:29:42Z"
      message: 'Unable to bind APIs: error checking for naming conflicts for APIBinding
        system:shard|tenancy.kcp.io: error getting CRDs: APIResourceSchema.apis.kcp.io
        "v220628-546034da.negotiatedapiresources.apiresource.kcp.io" not found'
      reason: NamingConflicts
      severity: Error
      status: "False"
      type: BindingUpToDate
    - lastTransitionTime: "2023-01-18T14:29:42Z"
      message: 'Unable to bind APIs: error checking for naming conflicts for APIBinding
        system:shard|tenancy.kcp.io: error getting CRDs: APIResourceSchema.apis.kcp.io
        "v220628-546034da.negotiatedapiresources.apiresource.kcp.io" not found'
      reason: NamingConflicts
      severity: Error
      status: "False"
      type: InitialBindingCompleted
    phase: Binding

In case of temporary failures the api binding controller didn't retry.

This fixes it.

Related issue(s)

N/A

@s-urbaniak s-urbaniak changed the title pkg/reconciler/apis/apibinding: return error in case of conflicts 馃悰 pkg/reconciler/apis/apibinding: return error in case of conflicts Jan 18, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 18, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 18, 2023
@p0lyn0mial
Copy link
Contributor

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2023
@p0lyn0mial
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2023
@openshift-merge-robot openshift-merge-robot merged commit 4c3fcbb into kcp-dev:main Jan 19, 2023
@s-urbaniak s-urbaniak deleted the fix-apibindig-reconcile branch January 19, 2023 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants