github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/site/reference/schema/kptfile/kptfile.json (about)

     1  {
     2    "$schema": "http://json-schema.org/draft/2019-09/schema#",
     3    "type": "object",
     4    "anyOf": [
     5      "#/definitions/kptfile"
     6    ],
     7    "swagger": "2.0",
     8    "info": {
     9      "title": "Kptfile schema.",
    10      "version": "v1"
    11    },
    12    "paths": {},
    13    "definitions": {
    14      "Function": {
    15        "type": "object",
    16        "title": "Function specifies a KRM function.",
    17        "properties": {
    18          "configMap": {
    19            "description": "`ConfigMap` is a convenient way to specify a function config of kind ConfigMap.",
    20            "type": "object",
    21            "additionalProperties": {
    22              "type": "string"
    23            },
    24            "x-go-name": "ConfigMap"
    25          },
    26          "configPath": {
    27            "description": "`ConfigPath` specifies a slash-delimited relative path to a file in the current directory\ncontaining a KRM resource used as the function config. This resource is\nexcluded when resolving 'sources', and as a result cannot be operated on\nby the pipeline.",
    28            "type": "string",
    29            "x-go-name": "ConfigPath"
    30          },
    31          "image": {
    32            "description": "`Image` specifies the function container image.\nIt can either be fully qualified, e.g.:\n\nimage: gcr.io/kpt-fn/set-labels\n\nOptionally, kpt can be configured to use a image\nregistry host-path that will be used to resolve the image path in case\nthe image path is missing (Defaults to gcr.io/kpt-fn).\ne.g. The following resolves to gcr.io/kpt-fn/set-labels:\n\nimage: set-labels",
    33            "type": "string",
    34            "x-go-name": "Image"
    35          },
    36          "selectors": {
    37            "description": "`Selectors` are used to specify resources on which the function should be executed\nif not specified, all resources are selected",
    38            "type": "array",
    39            "items": {
    40              "$ref": "#/definitions/Selector"
    41            },
    42            "x-go-name": "Selectors"
    43          }
    44        },
    45        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
    46      },
    47      "Git": {
    48        "type": "object",
    49        "title": "Git is the user-specified locator for a package on Git.",
    50        "properties": {
    51          "directory": {
    52            "description": "Directory is the sub directory of the git repository.\ne.g. 'staging/cockroachdb'",
    53            "type": "string",
    54            "x-go-name": "Directory"
    55          },
    56          "ref": {
    57            "description": "Ref can be a Git branch, tag, or a commit SHA-1.",
    58            "type": "string",
    59            "x-go-name": "Ref"
    60          },
    61          "repo": {
    62            "description": "Repo is the git repository the package.\ne.g. 'https://github.com/kubernetes/examples.git'",
    63            "type": "string",
    64            "x-go-name": "Repo"
    65          }
    66        },
    67        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
    68      },
    69      "GitLock": {
    70        "type": "object",
    71        "title": "GitLock is the resolved locator for a package on Git.",
    72        "properties": {
    73          "commit": {
    74            "description": "Commit is the SHA-1 for the last fetch of the package.\nThis is set by kpt for bookkeeping purposes.",
    75            "type": "string",
    76            "x-go-name": "Commit"
    77          },
    78          "directory": {
    79            "description": "Directory is the sub directory of the git repository that was fetched.\ne.g. 'staging/cockroachdb'",
    80            "type": "string",
    81            "x-go-name": "Directory"
    82          },
    83          "ref": {
    84            "description": "Ref can be a Git branch, tag, or a commit SHA-1 that was fetched.\ne.g. 'master'",
    85            "type": "string",
    86            "x-go-name": "Ref"
    87          },
    88          "repo": {
    89            "description": "Repo is the git repository that was fetched.\ne.g. 'https://github.com/kubernetes/examples.git'",
    90            "type": "string",
    91            "x-go-name": "Repo"
    92          }
    93        },
    94        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
    95      },
    96      "Inventory": {
    97        "description": "All of the the parameters are required if any are set.",
    98        "type": "object",
    99        "title": "Inventory encapsulates the parameters for the inventory resource applied to a cluster.",
   100        "properties": {
   101          "annotations": {
   102            "type": "object",
   103            "additionalProperties": {
   104              "type": "string"
   105            },
   106            "x-go-name": "Annotations"
   107          },
   108          "inventoryID": {
   109            "description": "Unique label to identify inventory resource in cluster.",
   110            "type": "string",
   111            "x-go-name": "InventoryID"
   112          },
   113          "labels": {
   114            "type": "object",
   115            "additionalProperties": {
   116              "type": "string"
   117            },
   118            "x-go-name": "Labels"
   119          },
   120          "name": {
   121            "description": "Name of the inventory resource.",
   122            "type": "string",
   123            "x-go-name": "Name"
   124          },
   125          "namespace": {
   126            "description": "Namespace for the inventory resource.",
   127            "type": "string",
   128            "x-go-name": "Namespace"
   129          }
   130        },
   131        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   132      },
   133      "NameMeta": {
   134        "type": "object",
   135        "title": "NameMeta contains name information.",
   136        "properties": {
   137          "name": {
   138            "description": "Name is the metadata.name field of a Resource",
   139            "type": "string",
   140            "x-go-name": "Name"
   141          },
   142          "namespace": {
   143            "description": "Namespace is the metadata.namespace field of a Resource",
   144            "type": "string",
   145            "x-go-name": "Namespace"
   146          }
   147        },
   148        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   149      },
   150      "ObjectMeta": {
   151        "description": "ObjectMeta contains metadata about a Resource",
   152        "type": "object",
   153        "properties": {
   154          "annotations": {
   155            "description": "Annotations is the metadata.annotations field of a Resource.",
   156            "type": "object",
   157            "additionalProperties": {
   158              "type": "string"
   159            },
   160            "x-go-name": "Annotations"
   161          },
   162          "labels": {
   163            "description": "Labels is the metadata.labels field of a Resource",
   164            "type": "object",
   165            "additionalProperties": {
   166              "type": "string"
   167            },
   168            "x-go-name": "Labels"
   169          },
   170          "name": {
   171            "description": "Name is the metadata.name field of a Resource",
   172            "type": "string",
   173            "x-go-name": "Name"
   174          },
   175          "namespace": {
   176            "description": "Namespace is the metadata.namespace field of a Resource",
   177            "type": "string",
   178            "x-go-name": "Namespace"
   179          }
   180        },
   181        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   182      },
   183      "OriginType": {
   184        "type": "string",
   185        "title": "OriginType defines the type of origin for a package.",
   186        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   187      },
   188      "PackageInfo": {
   189        "description": "These fields are not consumed by any functionality in kpt and are simply passed through.\nNote that like any other KRM resource, humans and automation can also use `metadata.labels` and\n`metadata.annotations` as the extension mechanism.",
   190        "type": "object",
   191        "title": "PackageInfo contains optional information about the package such as license, documentation, etc.",
   192        "properties": {
   193          "description": {
   194            "description": "Description contains a short description of the package.",
   195            "type": "string",
   196            "x-go-name": "Description"
   197          },
   198          "emails": {
   199            "description": "Email is the list of emails for the package authors.",
   200            "type": "array",
   201            "items": {
   202              "type": "string"
   203            },
   204            "x-go-name": "Emails"
   205          },
   206          "keywords": {
   207            "description": "Keywords is a list of keywords for this package.",
   208            "type": "array",
   209            "items": {
   210              "type": "string"
   211            },
   212            "x-go-name": "Keywords"
   213          },
   214          "license": {
   215            "description": "SPDX license identifier (e.g. \"Apache-2.0\"). See: https://spdx.org/licenses/",
   216            "type": "string",
   217            "x-go-name": "License"
   218          },
   219          "licenseFile": {
   220            "description": "Relative slash-delimited path to the license file (e.g. LICENSE.txt)",
   221            "type": "string",
   222            "x-go-name": "LicenseFile"
   223          },
   224          "man": {
   225            "description": "Man is the path to documentation about the package",
   226            "type": "string",
   227            "x-go-name": "Man"
   228          },
   229          "site": {
   230            "description": "Site is the URL for package web page.",
   231            "type": "string",
   232            "x-go-name": "Site"
   233          }
   234        },
   235        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   236      },
   237      "Pipeline": {
   238        "type": "object",
   239        "title": "Pipeline declares a pipeline of functions used to mutate or validate resources.",
   240        "properties": {
   241          "mutators": {
   242            "description": "Mutators defines a list of of KRM functions that mutate resources.",
   243            "type": "array",
   244            "items": {
   245              "$ref": "#/definitions/Function"
   246            },
   247            "x-go-name": "Mutators"
   248          },
   249          "validators": {
   250            "description": "Validators defines a list of KRM functions that validate resources.\nValidators are not permitted to mutate resources.",
   251            "type": "array",
   252            "items": {
   253              "$ref": "#/definitions/Function"
   254            },
   255            "x-go-name": "Validators"
   256          }
   257        },
   258        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   259      },
   260      "ResourceMeta": {
   261        "type": "object",
   262        "title": "ResourceMeta contains the metadata for a both Resource Type and Resource.",
   263        "properties": {
   264          "annotations": {
   265            "description": "Annotations is the metadata.annotations field of a Resource.",
   266            "type": "object",
   267            "additionalProperties": {
   268              "type": "string"
   269            },
   270            "x-go-name": "Annotations"
   271          },
   272          "apiVersion": {
   273            "description": "APIVersion is the apiVersion field of a Resource",
   274            "type": "string",
   275            "x-go-name": "APIVersion"
   276          },
   277          "kind": {
   278            "description": "Kind is the kind field of a Resource",
   279            "type": "string",
   280            "x-go-name": "Kind"
   281          },
   282          "labels": {
   283            "description": "Labels is the metadata.labels field of a Resource",
   284            "type": "object",
   285            "additionalProperties": {
   286              "type": "string"
   287            },
   288            "x-go-name": "Labels"
   289          },
   290          "name": {
   291            "description": "Name is the metadata.name field of a Resource",
   292            "type": "string",
   293            "x-go-name": "Name"
   294          },
   295          "namespace": {
   296            "description": "Namespace is the metadata.namespace field of a Resource",
   297            "type": "string",
   298            "x-go-name": "Namespace"
   299          }
   300        },
   301        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   302      },
   303      "Selector": {
   304        "description": "Selector specifies the selection criteria\nplease update IsEmpty method if more properties are added",
   305        "type": "object",
   306        "properties": {
   307          "apiVersion": {
   308            "description": "APIVersion of the target resources",
   309            "type": "string",
   310            "x-go-name": "APIVersion"
   311          },
   312          "kind": {
   313            "description": "Kind of the target resources",
   314            "type": "string",
   315            "x-go-name": "Kind"
   316          },
   317          "name": {
   318            "description": "Name of the target resources",
   319            "type": "string",
   320            "x-go-name": "Name"
   321          },
   322          "namespace": {
   323            "description": "Namespace of the target resources",
   324            "type": "string",
   325            "x-go-name": "Namespace"
   326          }
   327        },
   328        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   329      },
   330      "TypeMeta": {
   331        "description": "TypeMeta partially copies apimachinery/pkg/apis/meta/v1.TypeMeta\nNo need for a direct dependence; the fields are stable.",
   332        "type": "object",
   333        "properties": {
   334          "apiVersion": {
   335            "description": "APIVersion is the apiVersion field of a Resource",
   336            "type": "string",
   337            "x-go-name": "APIVersion"
   338          },
   339          "kind": {
   340            "description": "Kind is the kind field of a Resource",
   341            "type": "string",
   342            "x-go-name": "Kind"
   343          }
   344        },
   345        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   346      },
   347      "UpdateStrategyType": {
   348        "type": "string",
   349        "title": "UpdateStrategyType defines the strategy for updating a package from upstream.",
   350        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   351      },
   352      "Upstream": {
   353        "type": "object",
   354        "title": "Upstream is a user-specified upstream locator for a package.",
   355        "properties": {
   356          "git": {
   357            "$ref": "#/definitions/Git"
   358          },
   359          "type": {
   360            "$ref": "#/definitions/OriginType"
   361          },
   362          "updateStrategy": {
   363            "$ref": "#/definitions/UpdateStrategyType"
   364          }
   365        },
   366        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   367      },
   368      "UpstreamLock": {
   369        "type": "object",
   370        "title": "UpstreamLock is a resolved locator for the last fetch of the package.",
   371        "properties": {
   372          "git": {
   373            "$ref": "#/definitions/GitLock"
   374          },
   375          "type": {
   376            "$ref": "#/definitions/OriginType"
   377          }
   378        },
   379        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   380      },
   381      "kptfile": {
   382        "type": "object",
   383        "title": "KptFile contains information about a package managed with kpt.",
   384        "properties": {
   385          "annotations": {
   386            "description": "Annotations is the metadata.annotations field of a Resource.",
   387            "type": "object",
   388            "additionalProperties": {
   389              "type": "string"
   390            },
   391            "x-go-name": "Annotations"
   392          },
   393          "apiVersion": {
   394            "description": "APIVersion is the apiVersion field of a Resource",
   395            "type": "string",
   396            "x-go-name": "APIVersion"
   397          },
   398          "info": {
   399            "$ref": "#/definitions/PackageInfo"
   400          },
   401          "inventory": {
   402            "$ref": "#/definitions/Inventory"
   403          },
   404          "kind": {
   405            "description": "Kind is the kind field of a Resource",
   406            "type": "string",
   407            "x-go-name": "Kind"
   408          },
   409          "labels": {
   410            "description": "Labels is the metadata.labels field of a Resource",
   411            "type": "object",
   412            "additionalProperties": {
   413              "type": "string"
   414            },
   415            "x-go-name": "Labels"
   416          },
   417          "name": {
   418            "description": "Name is the metadata.name field of a Resource",
   419            "type": "string",
   420            "x-go-name": "Name"
   421          },
   422          "namespace": {
   423            "description": "Namespace is the metadata.namespace field of a Resource",
   424            "type": "string",
   425            "x-go-name": "Namespace"
   426          },
   427          "pipeline": {
   428            "$ref": "#/definitions/Pipeline"
   429          },
   430          "upstream": {
   431            "$ref": "#/definitions/Upstream"
   432          },
   433          "upstreamLock": {
   434            "$ref": "#/definitions/UpstreamLock"
   435          }
   436        },
   437        "x-go-name": "KptFile",
   438        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   439      }
   440    }
   441  }