github.com/GoogleContainerTools/kpt@v1.0.0-beta.50.0.20240520170205-c25345ffcbee/pkg/live/example-resource-group-crd.yaml (about)

     1  # Copyright 2019 The kpt Authors
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #      http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  # Example ResourceGroup custom resource definition. This CRD is used
    16  # to keep track of the resources that are applied together by
    17  # storing references to the applied resources (aka inventory).
    18  apiVersion: apiextensions.k8s.io/v1beta1
    19  kind: CustomResourceDefinition
    20  metadata:
    21    annotations:
    22      controller-gen.kubebuilder.io/version: v0.2.5
    23    name: resourcegroups.kpt.dev
    24  spec:
    25    group: kpt.dev
    26    names:
    27      kind: ResourceGroup
    28      listKind: ResourceGroupList
    29      plural: resourcegroups
    30      singular: resourcegroup
    31    scope: Namespaced
    32    subresources:
    33      status: {}
    34    validation:
    35      openAPIV3Schema:
    36        description: ResourceGroup is the Schema for the resourcegroups API
    37        properties:
    38          apiVersion:
    39            description: 'APIVersion defines the versioned schema of this representation
    40              of an object. Servers should convert recognized schemas to the latest
    41              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
    42            type: string
    43          kind:
    44            description: 'Kind is a string value representing the REST resource this
    45              object represents. Servers may infer this from the endpoint the client
    46              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
    47            type: string
    48          metadata:
    49            type: object
    50          spec:
    51            description: ResourceGroupSpec defines the desired state of ResourceGroup
    52            properties:
    53              descriptor:
    54                description: Descriptor regroups the information and metadata about
    55                  a resource group
    56                properties:
    57                  description:
    58                    description: Description is a brief description of a group of resources
    59                    type: string
    60                  links:
    61                    description: Links are a list of descriptive URLs intended to be
    62                      used to surface additional information
    63                    items:
    64                      properties:
    65                        description:
    66                          description: Description explains the purpose of the link
    67                          type: string
    68                        url:
    69                          description: Url is the URL of the link
    70                          type: string
    71                      required:
    72                      - description
    73                      - url
    74                      type: object
    75                    type: array
    76                  revision:
    77                    description: Revision is an optional revision for a group of resources
    78                    type: string
    79                  type:
    80                    description: Type can contain prefix, such as Application/WordPress
    81                      or Service/Spanner
    82                    type: string
    83                type: object
    84              resources:
    85                description: Resources contains a list of resources that form the resource group
    86                items:
    87                  description: ObjMetadata organizes and stores the identifying information
    88                    for an object. This struct (as a string) is stored in a grouping
    89                    object to keep track of sets of applied objects.
    90                  properties:
    91                    group:
    92                      type: string
    93                    kind:
    94                      type: string
    95                    name:
    96                      type: string
    97                    namespace:
    98                      type: string
    99                  required:
   100                  - group
   101                  - kind
   102                  - name
   103                  - namespace
   104                  type: object
   105                type: array
   106            type: object
   107          status:
   108            description: ResourceGroupStatus defines the observed state of ResourceGroup
   109            properties:
   110              conditions:
   111                description: Conditions lists the conditions of the current status for
   112                  the group
   113                items:
   114                  properties:
   115                    lastTransitionTime:
   116                      description: last time the condition transit from one status to
   117                        another
   118                      format: date-time
   119                      type: string
   120                    message:
   121                      description: human-readable message indicating details about last
   122                        transition
   123                      type: string
   124                    reason:
   125                      description: one-word CamelCase reason for the condition's last
   126                        transition
   127                      type: string
   128                    status:
   129                      description: Status of the condition
   130                      type: string
   131                    type:
   132                      description: Type of the condition
   133                      type: string
   134                  required:
   135                  - status
   136                  - type
   137                  type: object
   138                type: array
   139              observedGeneration:
   140                description: ObservedGeneration is the most recent generation observed.
   141                  It corresponds to the Object's generation, which is updated on mutation
   142                  by the API Server. Everytime the controller does a successful reconcile,
   143                  it sets ObservedGeneration to match ResourceGroup.metadata.generation.
   144                format: int64
   145                type: integer
   146              resourceStatuses:
   147                description: ResourceStatuses lists the status for each resource in
   148                  the group
   149                items:
   150                  description: ResourceStatus contains the status of a given resource
   151                    uniquely identified by its group, kind, name and namespace.
   152                  properties:
   153                    actuation:
   154                      description: actuation indicates whether actuation has been
   155                        performed yet and how it went.
   156                      type: string
   157                    conditions:
   158                      items:
   159                        properties:
   160                          lastTransitionTime:
   161                            description: last time the condition transit from one status
   162                              to another
   163                            format: date-time
   164                            type: string
   165                          message:
   166                            description: human-readable message indicating details about
   167                              last transition
   168                            type: string
   169                          reason:
   170                            description: one-word CamelCase reason for the condition's
   171                              last transition
   172                            type: string
   173                          status:
   174                            description: Status of the condition
   175                            type: string
   176                          type:
   177                            description: Type of the condition
   178                            type: string
   179                        required:
   180                        - status
   181                        - type
   182                        type: object
   183                      type: array
   184                    group:
   185                      type: string
   186                    kind:
   187                      type: string
   188                    name:
   189                      type: string
   190                    namespace:
   191                      type: string
   192                    reconcile:
   193                      description: reconcile indicates whether reconciliation has
   194                        been performed yet and how it went.
   195                      type: string
   196                    sourceHash:
   197                      type: string
   198                    status:
   199                      description: Status describes the status of a resource
   200                      type: string
   201                    strategy:
   202                      description: strategy indicates the method of actuation (apply
   203                        or delete) used or planned to be used.
   204                      type: string
   205                  required:
   206                  - group
   207                  - kind
   208                  - name
   209                  - namespace
   210                  - status
   211                  type: object
   212                type: array
   213            required:
   214            - observedGeneration
   215            type: object
   216        type: object
   217    version: v1alpha1
   218    versions:
   219    - name: v1alpha1
   220      served: true
   221      storage: true
   222  status:
   223    acceptedNames:
   224      kind: ""
   225      plural: ""
   226    conditions: []
   227    storedVersions: []