github.com/GoogleContainerTools/kpt/porch/api@v0.0.0-20240427025202-5cbd3cbd9237/porchconfig/v1alpha1/config.porch.kpt.dev_repositories.yaml (about)

     1  # Copyright 2023 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  ---
    16  apiVersion: apiextensions.k8s.io/v1
    17  kind: CustomResourceDefinition
    18  metadata:
    19    annotations:
    20      controller-gen.kubebuilder.io/version: v0.8.0
    21    creationTimestamp: null
    22    name: repositories.config.porch.kpt.dev
    23  spec:
    24    group: config.porch.kpt.dev
    25    names:
    26      kind: Repository
    27      listKind: RepositoryList
    28      plural: repositories
    29      singular: repository
    30    scope: Namespaced
    31    versions:
    32    - additionalPrinterColumns:
    33      - jsonPath: .spec.type
    34        name: Type
    35        type: string
    36      - jsonPath: .spec.content
    37        name: Content
    38        type: string
    39      - jsonPath: .spec.deployment
    40        name: Deployment
    41        type: boolean
    42      - jsonPath: .status.conditions[?(@.type=='Ready')].status
    43        name: Ready
    44        type: string
    45      - jsonPath: .spec['git','oci']['repo','registry']
    46        name: Address
    47        type: string
    48      name: v1alpha1
    49      schema:
    50        openAPIV3Schema:
    51          description: Repository
    52          properties:
    53            apiVersion:
    54              description: 'APIVersion defines the versioned schema of this representation
    55                of an object. Servers should convert recognized schemas to the latest
    56                internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
    57              type: string
    58            kind:
    59              description: 'Kind is a string value representing the REST resource this
    60                object represents. Servers may infer this from the endpoint the client
    61                submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
    62              type: string
    63            metadata:
    64              type: object
    65            spec:
    66              description: "RepositorySpec defines the desired state of Repository \n
    67                Notes: - deployment repository - in KRM API ConfigSync would be configured
    68                directly? (or via this API)"
    69              properties:
    70                content:
    71                  description: 'Content stored in the repository (i.e. Function, Package
    72                    - the literal values correspond to the API resource names). TODO:
    73                    support repository with mixed content?'
    74                  type: string
    75                deployment:
    76                  description: The repository is a deployment repository; final packages
    77                    in this repository are deployment ready.
    78                  type: boolean
    79                description:
    80                  description: User-friendly description of the repository
    81                  type: string
    82                git:
    83                  description: Git repository details. Required if `type` is `git`.
    84                    Ignored if `type` is not `git`.
    85                  properties:
    86                    branch:
    87                      description: Name of the branch containing the packages. Finalized
    88                        packages will be committed to this branch (if the repository
    89                        allows write access). If unspecified, defaults to "main".
    90                      type: string
    91                    createBranch:
    92                      description: CreateBranch specifies if Porch should create the
    93                        package branch if it doesn't exist.
    94                      type: boolean
    95                    directory:
    96                      description: Directory within the Git repository where the packages
    97                        are stored. A subdirectory of this directory containing a Kptfile
    98                        is considered a package. If unspecified, defaults to root directory.
    99                      type: string
   100                    repo:
   101                      description: 'Address of the Git repository, for example: `https://github.com/GoogleCloudPlatform/blueprints.git`'
   102                      type: string
   103                    secretRef:
   104                      description: Reference to secret containing authentication credentials.
   105                      properties:
   106                        name:
   107                          description: Name of the secret. The secret is expected to
   108                            be located in the same namespace as the resource containing
   109                            the reference.
   110                          type: string
   111                      required:
   112                      - name
   113                      type: object
   114                  required:
   115                  - repo
   116                  type: object
   117                mutators:
   118                  description: '`Mutators` specifies list of functions to be added to
   119                    the list of package''s mutators on changes to the packages in the
   120                    repository to ensure the packages meet constraints enforced by the
   121                    mutators associated with the repository. Based on the Kubernetest
   122                    Admission Controllers (https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/).
   123                    The functions will be evaluated in the order specified in the list.'
   124                  items:
   125                    properties:
   126                      configMap:
   127                        additionalProperties:
   128                          type: string
   129                        description: '`ConfigMap` specifies the function config (https://kpt.dev/reference/cli/fn/eval/).'
   130                        type: object
   131                      functionRef:
   132                        description: '`FunctionRef` specifies the function by reference
   133                          to a Function resource. Mutually exclusive with `Image`.'
   134                        properties:
   135                          name:
   136                            description: '`Name` is the name of the `Function` resource
   137                              referenced. The resource is expected to be within the
   138                              same namespace.'
   139                            type: string
   140                        required:
   141                        - name
   142                        type: object
   143                      image:
   144                        description: '`Image` specifies the function image, such as
   145                          `gcr.io/kpt-fn/gatekeeper:v0.2`. Use of `Image` is mutually
   146                          exclusive with `FunctionRef`.'
   147                        type: string
   148                    type: object
   149                  type: array
   150                oci:
   151                  description: OCI repository details. Required if `type` is `oci`.
   152                    Ignored if `type` is not `oci`.
   153                  properties:
   154                    registry:
   155                      description: Registry is the address of the OCI registry
   156                      type: string
   157                    secretRef:
   158                      description: Reference to secret containing authentication credentials.
   159                      properties:
   160                        name:
   161                          description: Name of the secret. The secret is expected to
   162                            be located in the same namespace as the resource containing
   163                            the reference.
   164                          type: string
   165                      required:
   166                      - name
   167                      type: object
   168                  required:
   169                  - registry
   170                  type: object
   171                type:
   172                  description: Type of the repository (i.e. git, OCI)
   173                  type: string
   174                upstream:
   175                  description: Upstream is the default upstream repository for packages
   176                    in this repository. Specifying it per repository allows simpler
   177                    UX when creating packages.
   178                  properties:
   179                    git:
   180                      description: Git repository details. Required if `type` is `git`.
   181                        Must be unspecified if `type` is not `git`.
   182                      properties:
   183                        branch:
   184                          description: Name of the branch containing the packages. Finalized
   185                            packages will be committed to this branch (if the repository
   186                            allows write access). If unspecified, defaults to "main".
   187                          type: string
   188                        createBranch:
   189                          description: CreateBranch specifies if Porch should create
   190                            the package branch if it doesn't exist.
   191                          type: boolean
   192                        directory:
   193                          description: Directory within the Git repository where the
   194                            packages are stored. A subdirectory of this directory containing
   195                            a Kptfile is considered a package. If unspecified, defaults
   196                            to root directory.
   197                          type: string
   198                        repo:
   199                          description: 'Address of the Git repository, for example:
   200                            `https://github.com/GoogleCloudPlatform/blueprints.git`'
   201                          type: string
   202                        secretRef:
   203                          description: Reference to secret containing authentication
   204                            credentials.
   205                          properties:
   206                            name:
   207                              description: Name of the secret. The secret is expected
   208                                to be located in the same namespace as the resource
   209                                containing the reference.
   210                              type: string
   211                          required:
   212                          - name
   213                          type: object
   214                      required:
   215                      - repo
   216                      type: object
   217                    oci:
   218                      description: OCI repository details. Required if `type` is `oci`.
   219                        Must be unspecified if `type` is not `oci`.
   220                      properties:
   221                        registry:
   222                          description: Registry is the address of the OCI registry
   223                          type: string
   224                        secretRef:
   225                          description: Reference to secret containing authentication
   226                            credentials.
   227                          properties:
   228                            name:
   229                              description: Name of the secret. The secret is expected
   230                                to be located in the same namespace as the resource
   231                                containing the reference.
   232                              type: string
   233                          required:
   234                          - name
   235                          type: object
   236                      required:
   237                      - registry
   238                      type: object
   239                    repositoryRef:
   240                      description: RepositoryRef contains a reference to an existing
   241                        Repository resource to be used as the default upstream repository.
   242                      properties:
   243                        name:
   244                          description: Name of the Repository resource referenced.
   245                          type: string
   246                      required:
   247                      - name
   248                      type: object
   249                    type:
   250                      description: Type of the repository (i.e. git, OCI). If empty,
   251                        repositoryRef will be used.
   252                      type: string
   253                  type: object
   254                validators:
   255                  description: '`Validators` specifies list of functions to be added
   256                    to the list of package''s validators on changes to the packages
   257                    in the repository to ensure the packages meet constraints enforced
   258                    by the validators associated with the repository. Based on the Kubernetest
   259                    Admission Controllers (https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/).
   260                    The functions will be evaluated in the order specified in the list.'
   261                  items:
   262                    properties:
   263                      configMap:
   264                        additionalProperties:
   265                          type: string
   266                        description: '`ConfigMap` specifies the function config (https://kpt.dev/reference/cli/fn/eval/).'
   267                        type: object
   268                      functionRef:
   269                        description: '`FunctionRef` specifies the function by reference
   270                          to a Function resource. Mutually exclusive with `Image`.'
   271                        properties:
   272                          name:
   273                            description: '`Name` is the name of the `Function` resource
   274                              referenced. The resource is expected to be within the
   275                              same namespace.'
   276                            type: string
   277                        required:
   278                        - name
   279                        type: object
   280                      image:
   281                        description: '`Image` specifies the function image, such as
   282                          `gcr.io/kpt-fn/gatekeeper:v0.2`. Use of `Image` is mutually
   283                          exclusive with `FunctionRef`.'
   284                        type: string
   285                    type: object
   286                  type: array
   287              type: object
   288            status:
   289              description: RepositoryStatus defines the observed state of Repository
   290              properties:
   291                conditions:
   292                  description: Conditions describes the reconciliation state of the
   293                    object.
   294                  items:
   295                    description: "Condition contains details for one aspect of the current
   296                      state of this API Resource. --- This struct is intended for direct
   297                      use as an array at the field path .status.conditions.  For example,
   298                      type FooStatus struct{ // Represents the observations of a foo's
   299                      current state. // Known .status.conditions.type are: \"Available\",
   300                      \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
   301                      // +listType=map // +listMapKey=type Conditions []metav1.Condition
   302                      `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
   303                      protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
   304                    properties:
   305                      lastTransitionTime:
   306                        description: lastTransitionTime is the last time the condition
   307                          transitioned from one status to another. This should be when
   308                          the underlying condition changed.  If that is not known, then
   309                          using the time when the API field changed is acceptable.
   310                        format: date-time
   311                        type: string
   312                      message:
   313                        description: message is a human readable message indicating
   314                          details about the transition. This may be an empty string.
   315                        maxLength: 32768
   316                        type: string
   317                      observedGeneration:
   318                        description: observedGeneration represents the .metadata.generation
   319                          that the condition was set based upon. For instance, if .metadata.generation
   320                          is currently 12, but the .status.conditions[x].observedGeneration
   321                          is 9, the condition is out of date with respect to the current
   322                          state of the instance.
   323                        format: int64
   324                        minimum: 0
   325                        type: integer
   326                      reason:
   327                        description: reason contains a programmatic identifier indicating
   328                          the reason for the condition's last transition. Producers
   329                          of specific condition types may define expected values and
   330                          meanings for this field, and whether the values are considered
   331                          a guaranteed API. The value should be a CamelCase string.
   332                          This field may not be empty.
   333                        maxLength: 1024
   334                        minLength: 1
   335                        pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
   336                        type: string
   337                      status:
   338                        description: status of the condition, one of True, False, Unknown.
   339                        enum:
   340                        - "True"
   341                        - "False"
   342                        - Unknown
   343                        type: string
   344                      type:
   345                        description: type of condition in CamelCase or in foo.example.com/CamelCase.
   346                          --- Many .condition.type values are consistent across resources
   347                          like Available, but because arbitrary conditions can be useful
   348                          (see .node.status.conditions), the ability to deconflict is
   349                          important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
   350                        maxLength: 316
   351                        pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
   352                        type: string
   353                    required:
   354                    - lastTransitionTime
   355                    - message
   356                    - reason
   357                    - status
   358                    - type
   359                    type: object
   360                  type: array
   361              type: object
   362          type: object
   363      served: true
   364      storage: true
   365      subresources:
   366        status: {}
   367  status:
   368    acceptedNames:
   369      kind: ""
   370      plural: ""
   371    conditions: []
   372    storedVersions: []