# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: dynamoworkermetadatas.nvidia.com
spec:
  group: nvidia.com
  names:
    kind: DynamoWorkerMetadata
    listKind: DynamoWorkerMetadataList
    plural: dynamoworkermetadatas
    singular: dynamoworkermetadata
    shortNames:
      - dwm
  scope: Namespaced
  versions:
    - name: v1alpha1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          description: DynamoWorkerMetadata stores discovery metadata for a Dynamo worker pod
          properties:
            apiVersion:
              type: string
              description: APIVersion defines the versioned schema of this representation
            kind:
              type: string
              description: Kind is a string value representing the REST resource
            metadata:
              type: object
            spec:
              type: object
              description: Spec contains the worker metadata
              required:
                - data
              properties:
                data:
                  type: object
                  description: Raw JSON blob containing DiscoveryMetadata
                  x-kubernetes-preserve-unknown-fields: true
      additionalPrinterColumns:
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp

