github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/site/static/openapi/kptfile.yaml (about)

     1  # Copyright 2019 Google LLC
     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  swagger: "2.0"
    16  definitions:
    17    Kptfile:
    18      type: "object"
    19      description: "Kptfile configures a kpt package"
    20      "x-kubernetes-group-version-kind":
    21        "kind": "Kptfile"
    22      properties:
    23        apiVersion:
    24          description: "apiVersion of the Kptfile"
    25          type: string
    26        kind:
    27          description: "kind -- always Kptfile"
    28          type: string
    29        dependencies:
    30          description: "Package dependencies to sync with the `kpt pkg sync` command"
    31          type: "array"
    32          items:
    33            "$ref": "#/definitions/Dependency"
    34        openAPI:
    35          description: "Package specific OpenAPI definitions to be applied to the package contents."
    36          "$ref": "#/definitions/OpenAPI"
    37        upstream:
    38          description: "Metadata about the upstream source"
    39          "$ref": "#/definitions/Upstream"
    40  
    41    OpenAPI:
    42      type: "object"
    43      description: "OpenAPI schema definitions"
    44      properties:
    45        definitions:
    46          type: object
    47          additionalProperties:
    48            example: "io.k8s.cli.setters.replicas"
    49            description: "keys for setters and substitutions must be of the form io.k8s.cli.setters.NAME or io.k8s.cli.substitution.NAME"
    50            type: object
    51            properties:
    52              x-k8s-cli:
    53                description: "kubernetes configuration specific extensions"
    54                "$ref": "#/definitions/Extension"
    55  
    56    Extension:
    57      type: "object"
    58      properties:
    59        type:
    60          description: "field type the setter sets"
    61          type: string
    62          enum: ["array", "boolean", "integer", "string"]
    63          example: "string"
    64        setter:
    65          description: "definition of setter which may be invoked from the cli"
    66          type: object
    67          properties:
    68            name:
    69              description: "name of the setter, should match the name in the definition key"
    70              type: string
    71              example: "replicas"
    72            value:
    73              description: "current value of the setter, which should be applied to fields and substitutions"
    74              type: string
    75              example: "3"
    76            listValues:
    77              description: "list of string values to be used if the type is array"
    78              type: array
    79              example: ["a", "b", "c"]
    80        substitution:
    81          description: "definition of setter which may be invoked from the cli"
    82          type: object
    83          properties:
    84            name:
    85              description: "name of the setter, should match the name in the definition key"
    86              type: string
    87              example: "tag"
    88            pattern:
    89              description: "pattern to substitute one or more setters into"
    90              type: string
    91              example: "nginx:$(TAG_SETTER)"
    92            values:
    93              description: "setters to substitute into the pattern"
    94              type: array
    95              items:
    96                type: object
    97                properties:
    98                  marker:
    99                    description: "string marker in the pattern which will be replaced by the setter's value"
   100                    type: string
   101                    example: "$(TAG_SETTER)"
   102                  "$ref":
   103                    description: "reference to a setter OpenAPI definition to pull the value from"
   104                    type: string
   105                    example: "#/definitions/io.k8s.cli.setters.tag"
   106  
   107    Dependency:
   108      type: "object"
   109      properties:
   110        name:
   111          description: "Name of the dependency -- must be unique"
   112          type: "string"
   113        upstream:
   114          description: "Name of the dependency -- must be unique"
   115          "$ref": "#/definitions/Upstream"
   116        ensureNotExists:
   117          description: "Set to true to delete the dependency"
   118          type: "boolean"
   119        strategy:
   120          description: "Update merge strategy."
   121          type: "string"
   122        autoSet:
   123          description: "When syncing this dependency, automatically perform setters by pulling their values from environment variables."
   124          type: "boolean"
   125  
   126    Upstream:
   127      type: "object"
   128      properties:
   129        type:
   130          description: "Type of the upstream source -- always git"
   131          type: "string"
   132        git:
   133          description: "Metadata about the upstream git repo"
   134          properties:
   135            commit:
   136              description: "Upstream git commit the the package was last fetched at."
   137              type: "string"
   138            repo:
   139              description: "Upstream git repo."
   140              type: "string"
   141            directory:
   142              description: "Upstream git subdirectory."
   143              type: "string"
   144            ref:
   145              description: "Upstream git ref the the package was last fetched at."
   146              type: "string"