Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

can not update existing CRD azuresamples.azure.stacks.crossplane.io from job crossplane-system.stack-azure-sample: failed due to pending deletion of existing crd #33

Open
prasek opened this issue May 25, 2020 · 1 comment

Comments

@prasek
Copy link
Member

prasek commented May 25, 2020

Following the Wordpress CLI Guide I had a clean Wordpress deploy, but I messed up and uninstalled the stack-azure-sample ClusterPackageInstall before I deleted the AzureSample resource, and it gave the following error when I tried to reinstall the stack-azure-sample package:

message: 'can not update existing CRD azuresamples.azure.stacks.crossplane.io
          from job crossplane-system.stack-azure-sample: failed due to pending deletion
          of existing crd'

Repro

Following the Wordpress CLI Guide

But delete the stack package, before deleting the AzureSample CR:

kubectl crossplane package uninstall --cluster --namespace crossplane-system stack-azure-sample

kubectl crossplane package install --cluster --namespace crossplane-system crossplane/stack-azure-sample:v0.6.0 stack-azure-sample

The ClusterStackInstall is created, but is has the following error:

message: 'can not update existing CRD azuresamples.azure.stacks.crossplane.io
          from job crossplane-system.stack-azure-sample: failed due to pending deletion
          of existing crd'

Details

kubectl get clusterpackageinstall -A -o yaml
apiVersion: v1
items:
- apiVersion: packages.crossplane.io/v1alpha1
  kind: ClusterPackageInstall
  metadata:
    annotations:
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"packages.crossplane.io/v1alpha1","kind":"ClusterPackageInstall","metadata":{"annotations":{},"name":"provider-azure","namespace":"crossplane-system"},"spec":{"package":"crossplane/provider-azure:v0.10.0"}}
    creationTimestamp: "2020-05-25T20:17:55Z"
    finalizers:
    - finalizer.packageinstall.crossplane.io
    generation: 1
    name: provider-azure
    namespace: crossplane-system
    resourceVersion: "597237"
    selfLink: /apis/packages.crossplane.io/v1alpha1/namespaces/crossplane-system/clusterpackageinstalls/provider-azure
    uid: 5ecf4641-a16f-4b9a-8950-2193f757d3a1
  spec:
    package: crossplane/provider-azure:v0.10.0
  status:
    conditionedStatus:
      conditions:
      - lastTransitionTime: "2020-05-25T20:18:34Z"
        reason: Resource is available for use
        status: "True"
        type: Ready
      - lastTransitionTime: "2020-05-25T20:17:56Z"
        reason: Successfully reconciled resource
        status: "True"
        type: Synced
    installJob:
      apiVersion: batch/v1
      kind: Job
      name: crossplane-system.provider-azure
      namespace: cc-a1698ea7-d764-4ccf-b234-bd3b0135f3f6-controllers
      uid: cff107d6-0de6-4698-80b8-49adc81b0c06
    packageRecord:
      apiVersion: packages.crossplane.io/v1alpha1
      kind: Package
      name: provider-azure
      namespace: crossplane-system
      uid: f86cdc9f-666c-41c7-858c-f01e107e07c5
- apiVersion: packages.crossplane.io/v1alpha1
  kind: ClusterPackageInstall
  metadata:
    annotations:
      kubectl.kubernetes.io/last-applied-configuration: |
        {"apiVersion":"packages.crossplane.io/v1alpha1","kind":"ClusterPackageInstall","metadata":{"annotations":{},"name":"stack-azure-sample","namespace":"crossplane-system"},"spec":{"package":"crossplane/stack-azure-sample:v0.6.0"}}
    creationTimestamp: "2020-05-25T20:43:03Z"
    finalizers:
    - finalizer.packageinstall.crossplane.io
    generation: 1
    name: stack-azure-sample
    namespace: crossplane-system
    resourceVersion: "603044"
    selfLink: /apis/packages.crossplane.io/v1alpha1/namespaces/crossplane-system/clusterpackageinstalls/stack-azure-sample
    uid: ad11d76e-adae-4273-b313-c190fc68690a
  spec:
    package: crossplane/stack-azure-sample:v0.6.0
  status:
    conditionedStatus:
      conditions:
      - lastTransitionTime: "2020-05-25T20:43:03Z"
        reason: Resource is being created
        status: "False"
        type: Ready
      - lastTransitionTime: "2020-05-25T20:43:13Z"
        message: 'can not update existing CRD azuresamples.azure.stacks.crossplane.io
          from job crossplane-system.stack-azure-sample: failed due to pending deletion
          of existing crd'
        reason: Encountered an error during resource reconciliation
        status: "False"
        type: Synced
    installJob:
      apiVersion: batch/v1
      kind: Job
      name: crossplane-system.stack-azure-sample
      namespace: cc-a1698ea7-d764-4ccf-b234-bd3b0135f3f6-controllers
      uid: 733676a8-6397-42ed-81f9-7f98a5865f3a
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
@prasek
Copy link
Member Author

prasek commented May 25, 2020

Note: uninstalling the stack-azure-sample only deletes the AzureSample resource but leaves the others, so I'm able to delete them directly via Crossplane to clean up my environment.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant