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

failed to restore resource status with a crd which has no subresource status #7993

Closed
nfyxhan opened this issue Jul 10, 2024 · 4 comments · May be fixed by #8008
Closed

failed to restore resource status with a crd which has no subresource status #7993

nfyxhan opened this issue Jul 10, 2024 · 4 comments · May be fixed by #8008

Comments

@nfyxhan
Copy link

nfyxhan commented Jul 10, 2024

What steps did you take and what happened:

defined a custom resource named Foo with no subresource

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.4.1
  creationTimestamp: null
  name: foo.sample.com
spec:
  group: sample.com
  names:
    kind: Foo
    listKind: FooList
    plural: foos
    singular: foo
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.sample
      name: sample
      type: string
    - jsonPath: .status.phase
      name: phase
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: age
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: Foo is the Schema for the foos API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: FooSpec defines the desired state of Foo
            properties:
              sample:
                type: string
            type: object
          status:
            description: FooFStatus defines the observed state of Foo
            properties:
              phase:
                type: string
            required:
            - health
            type: object
        type: object
    served: true
    storage: true
    subresources: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []

What did you expect to happen:

restore Foo with status

Environment:

Client:
Version: v1.13.2
Git commit: 4d961fb-dirty
Server:
Version: v1.13.2

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@Lyndon-Li
Copy link
Contributor

dup with #6016

@blackpiglet
Copy link
Contributor

I haven't figured out how to reset or delete the status section of the CR yet, but, IMO, even the CR without a status subresource can also status field.
The status is treated as part of the resource spec, so it's also possible to delete that status part from CR.
It's better that we can find a way not just to ignore the resource when it doesn't have a status subresource.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.

Copy link

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants