github.com/SamarSidharth/kpt@v0.0.0-20231122062228-c7d747ae3ace/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      "Condition": {
    15        "type": "object",
    16        "properties": {
    17          "message": {
    18            "type": "string",
    19            "x-go-name": "Message"
    20          },
    21          "reason": {
    22            "type": "string",
    23            "x-go-name": "Reason"
    24          },
    25          "status": {
    26            "$ref": "#/definitions/ConditionStatus"
    27          },
    28          "type": {
    29            "type": "string",
    30            "x-go-name": "Type"
    31          }
    32        },
    33        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
    34      },
    35      "ConditionStatus": {
    36        "type": "string",
    37        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
    38      },
    39      "Function": {
    40        "type": "object",
    41        "title": "Function specifies a KRM function.",
    42        "properties": {
    43          "configMap": {
    44            "description": "`ConfigMap` is a convenient way to specify a function config of kind ConfigMap.",
    45            "type": "object",
    46            "additionalProperties": {
    47              "type": "string"
    48            },
    49            "x-go-name": "ConfigMap"
    50          },
    51          "configPath": {
    52            "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.",
    53            "type": "string",
    54            "x-go-name": "ConfigPath"
    55          },
    56          "exclude": {
    57            "description": "`Exclude` are used to specify resources on which the function should NOT be executed.\nIf not specified, all resources selected by `Selectors` are selected.",
    58            "type": "array",
    59            "items": {
    60              "$ref": "#/definitions/Selector"
    61            },
    62            "x-go-name": "Exclusions"
    63          },
    64          "exec": {
    65            "description": "Exec specifies the function binary executable.\nThe executable can be fully qualified or it must exists in the $PATH e.g:\n\nexec: set-namespace\nexec: /usr/local/bin/my-custom-fn",
    66            "type": "string",
    67            "x-go-name": "Exec"
    68          },
    69          "image": {
    70            "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",
    71            "type": "string",
    72            "x-go-name": "Image"
    73          },
    74          "name": {
    75            "description": "`Name` is used to uniquely identify the function declaration\nthis is primarily used for merging function declaration with upstream counterparts",
    76            "type": "string",
    77            "x-go-name": "Name"
    78          },
    79          "selectors": {
    80            "description": "`Selectors` are used to specify resources on which the function should be executed\nif not specified, all resources are selected",
    81            "type": "array",
    82            "items": {
    83              "$ref": "#/definitions/Selector"
    84            },
    85            "x-go-name": "Selectors"
    86          }
    87        },
    88        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
    89      },
    90      "Git": {
    91        "type": "object",
    92        "title": "Git is the user-specified locator for a package on Git.",
    93        "properties": {
    94          "directory": {
    95            "description": "Directory is the sub directory of the git repository.\ne.g. 'staging/cockroachdb'",
    96            "type": "string",
    97            "x-go-name": "Directory"
    98          },
    99          "ref": {
   100            "description": "Ref can be a Git branch, tag, or a commit SHA-1.",
   101            "type": "string",
   102            "x-go-name": "Ref"
   103          },
   104          "repo": {
   105            "description": "Repo is the git repository the package.\ne.g. 'https://github.com/kubernetes/examples.git'",
   106            "type": "string",
   107            "x-go-name": "Repo"
   108          }
   109        },
   110        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   111      },
   112      "GitLock": {
   113        "type": "object",
   114        "title": "GitLock is the resolved locator for a package on Git.",
   115        "properties": {
   116          "commit": {
   117            "description": "Commit is the SHA-1 for the last fetch of the package.\nThis is set by kpt for bookkeeping purposes.",
   118            "type": "string",
   119            "x-go-name": "Commit"
   120          },
   121          "directory": {
   122            "description": "Directory is the sub directory of the git repository that was fetched.\ne.g. 'staging/cockroachdb'",
   123            "type": "string",
   124            "x-go-name": "Directory"
   125          },
   126          "ref": {
   127            "description": "Ref can be a Git branch, tag, or a commit SHA-1 that was fetched.\ne.g. 'master'",
   128            "type": "string",
   129            "x-go-name": "Ref"
   130          },
   131          "repo": {
   132            "description": "Repo is the git repository that was fetched.\ne.g. 'https://github.com/kubernetes/examples.git'",
   133            "type": "string",
   134            "x-go-name": "Repo"
   135          }
   136        },
   137        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   138      },
   139      "Inventory": {
   140        "description": "All of the the parameters are required if any are set.",
   141        "type": "object",
   142        "title": "Inventory encapsulates the parameters for the inventory resource applied to a cluster.",
   143        "properties": {
   144          "annotations": {
   145            "type": "object",
   146            "additionalProperties": {
   147              "type": "string"
   148            },
   149            "x-go-name": "Annotations"
   150          },
   151          "inventoryID": {
   152            "description": "Unique label to identify inventory resource in cluster.",
   153            "type": "string",
   154            "x-go-name": "InventoryID"
   155          },
   156          "labels": {
   157            "type": "object",
   158            "additionalProperties": {
   159              "type": "string"
   160            },
   161            "x-go-name": "Labels"
   162          },
   163          "name": {
   164            "description": "Name of the inventory resource.",
   165            "type": "string",
   166            "x-go-name": "Name"
   167          },
   168          "namespace": {
   169            "description": "Namespace for the inventory resource.",
   170            "type": "string",
   171            "x-go-name": "Namespace"
   172          }
   173        },
   174        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   175      },
   176      "NameMeta": {
   177        "type": "object",
   178        "title": "NameMeta contains name information.",
   179        "properties": {
   180          "name": {
   181            "description": "Name is the metadata.name field of a Resource",
   182            "type": "string",
   183            "x-go-name": "Name"
   184          },
   185          "namespace": {
   186            "description": "Namespace is the metadata.namespace field of a Resource",
   187            "type": "string",
   188            "x-go-name": "Namespace"
   189          }
   190        },
   191        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   192      },
   193      "ObjectMeta": {
   194        "description": "ObjectMeta contains metadata about a Resource",
   195        "type": "object",
   196        "properties": {
   197          "annotations": {
   198            "description": "Annotations is the metadata.annotations field of a Resource.",
   199            "type": "object",
   200            "additionalProperties": {
   201              "type": "string"
   202            },
   203            "x-go-name": "Annotations"
   204          },
   205          "labels": {
   206            "description": "Labels is the metadata.labels field of a Resource",
   207            "type": "object",
   208            "additionalProperties": {
   209              "type": "string"
   210            },
   211            "x-go-name": "Labels"
   212          },
   213          "name": {
   214            "description": "Name is the metadata.name field of a Resource",
   215            "type": "string",
   216            "x-go-name": "Name"
   217          },
   218          "namespace": {
   219            "description": "Namespace is the metadata.namespace field of a Resource",
   220            "type": "string",
   221            "x-go-name": "Namespace"
   222          }
   223        },
   224        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   225      },
   226      "OriginType": {
   227        "type": "string",
   228        "title": "OriginType defines the type of origin for a package.",
   229        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   230      },
   231      "PackageInfo": {
   232        "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.",
   233        "type": "object",
   234        "title": "PackageInfo contains optional information about the package such as license, documentation, etc.",
   235        "properties": {
   236          "description": {
   237            "description": "Description contains a short description of the package.",
   238            "type": "string",
   239            "x-go-name": "Description"
   240          },
   241          "emails": {
   242            "description": "Email is the list of emails for the package authors.",
   243            "type": "array",
   244            "items": {
   245              "type": "string"
   246            },
   247            "x-go-name": "Emails"
   248          },
   249          "keywords": {
   250            "description": "Keywords is a list of keywords for this package.",
   251            "type": "array",
   252            "items": {
   253              "type": "string"
   254            },
   255            "x-go-name": "Keywords"
   256          },
   257          "license": {
   258            "description": "SPDX license identifier (e.g. \"Apache-2.0\"). See: https://spdx.org/licenses/",
   259            "type": "string",
   260            "x-go-name": "License"
   261          },
   262          "licenseFile": {
   263            "description": "Relative slash-delimited path to the license file (e.g. LICENSE.txt)",
   264            "type": "string",
   265            "x-go-name": "LicenseFile"
   266          },
   267          "man": {
   268            "description": "Man is the path to documentation about the package",
   269            "type": "string",
   270            "x-go-name": "Man"
   271          },
   272          "readinessGates": {
   273            "type": "array",
   274            "items": {
   275              "$ref": "#/definitions/ReadinessGate"
   276            },
   277            "x-go-name": "ReadinessGates"
   278          },
   279          "site": {
   280            "description": "Site is the URL for package web page.",
   281            "type": "string",
   282            "x-go-name": "Site"
   283          }
   284        },
   285        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   286      },
   287      "Pipeline": {
   288        "type": "object",
   289        "title": "Pipeline declares a pipeline of functions used to mutate or validate resources.",
   290        "properties": {
   291          "mutators": {
   292            "description": "Mutators defines a list of of KRM functions that mutate resources.",
   293            "type": "array",
   294            "items": {
   295              "$ref": "#/definitions/Function"
   296            },
   297            "x-go-name": "Mutators"
   298          },
   299          "validators": {
   300            "description": "Validators defines a list of KRM functions that validate resources.\nValidators are not permitted to mutate resources.",
   301            "type": "array",
   302            "items": {
   303              "$ref": "#/definitions/Function"
   304            },
   305            "x-go-name": "Validators"
   306          }
   307        },
   308        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   309      },
   310      "ReadinessGate": {
   311        "type": "object",
   312        "properties": {
   313          "conditionType": {
   314            "type": "string",
   315            "x-go-name": "ConditionType"
   316          }
   317        },
   318        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   319      },
   320      "ResourceMeta": {
   321        "type": "object",
   322        "title": "ResourceMeta contains the metadata for a both Resource Type and Resource.",
   323        "properties": {
   324          "annotations": {
   325            "description": "Annotations is the metadata.annotations field of a Resource.",
   326            "type": "object",
   327            "additionalProperties": {
   328              "type": "string"
   329            },
   330            "x-go-name": "Annotations"
   331          },
   332          "apiVersion": {
   333            "description": "APIVersion is the apiVersion field of a Resource",
   334            "type": "string",
   335            "x-go-name": "APIVersion"
   336          },
   337          "kind": {
   338            "description": "Kind is the kind field of a Resource",
   339            "type": "string",
   340            "x-go-name": "Kind"
   341          },
   342          "labels": {
   343            "description": "Labels is the metadata.labels field of a Resource",
   344            "type": "object",
   345            "additionalProperties": {
   346              "type": "string"
   347            },
   348            "x-go-name": "Labels"
   349          },
   350          "name": {
   351            "description": "Name is the metadata.name field of a Resource",
   352            "type": "string",
   353            "x-go-name": "Name"
   354          },
   355          "namespace": {
   356            "description": "Namespace is the metadata.namespace field of a Resource",
   357            "type": "string",
   358            "x-go-name": "Namespace"
   359          }
   360        },
   361        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   362      },
   363      "Selector": {
   364        "description": "Selector specifies the selection criteria\nplease update IsEmpty method if more properties are added",
   365        "type": "object",
   366        "properties": {
   367          "annotations": {
   368            "description": "Annotations on the target resources",
   369            "type": "object",
   370            "additionalProperties": {
   371              "type": "string"
   372            },
   373            "x-go-name": "Annotations"
   374          },
   375          "apiVersion": {
   376            "description": "APIVersion of the target resources",
   377            "type": "string",
   378            "x-go-name": "APIVersion"
   379          },
   380          "kind": {
   381            "description": "Kind of the target resources",
   382            "type": "string",
   383            "x-go-name": "Kind"
   384          },
   385          "labels": {
   386            "description": "Labels on the target resources",
   387            "type": "object",
   388            "additionalProperties": {
   389              "type": "string"
   390            },
   391            "x-go-name": "Labels"
   392          },
   393          "name": {
   394            "description": "Name of the target resources",
   395            "type": "string",
   396            "x-go-name": "Name"
   397          },
   398          "namespace": {
   399            "description": "Namespace of the target resources",
   400            "type": "string",
   401            "x-go-name": "Namespace"
   402          }
   403        },
   404        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   405      },
   406      "Status": {
   407        "type": "object",
   408        "properties": {
   409          "conditions": {
   410            "type": "array",
   411            "items": {
   412              "$ref": "#/definitions/Condition"
   413            },
   414            "x-go-name": "Conditions"
   415          }
   416        },
   417        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   418      },
   419      "TypeMeta": {
   420        "description": "TypeMeta partially copies apimachinery/pkg/apis/meta/v1.TypeMeta\nNo need for a direct dependence; the fields are stable.",
   421        "type": "object",
   422        "properties": {
   423          "apiVersion": {
   424            "description": "APIVersion is the apiVersion field of a Resource",
   425            "type": "string",
   426            "x-go-name": "APIVersion"
   427          },
   428          "kind": {
   429            "description": "Kind is the kind field of a Resource",
   430            "type": "string",
   431            "x-go-name": "Kind"
   432          }
   433        },
   434        "x-go-package": "sigs.k8s.io/kustomize/kyaml/yaml"
   435      },
   436      "UpdateStrategyType": {
   437        "type": "string",
   438        "title": "UpdateStrategyType defines the strategy for updating a package from upstream.",
   439        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   440      },
   441      "Upstream": {
   442        "type": "object",
   443        "title": "Upstream is a user-specified upstream locator for a package.",
   444        "properties": {
   445          "git": {
   446            "$ref": "#/definitions/Git"
   447          },
   448          "type": {
   449            "$ref": "#/definitions/OriginType"
   450          },
   451          "updateStrategy": {
   452            "$ref": "#/definitions/UpdateStrategyType"
   453          }
   454        },
   455        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   456      },
   457      "UpstreamLock": {
   458        "type": "object",
   459        "title": "UpstreamLock is a resolved locator for the last fetch of the package.",
   460        "properties": {
   461          "git": {
   462            "$ref": "#/definitions/GitLock"
   463          },
   464          "type": {
   465            "$ref": "#/definitions/OriginType"
   466          }
   467        },
   468        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   469      },
   470      "kptfile": {
   471        "type": "object",
   472        "title": "KptFile contains information about a package managed with kpt.",
   473        "properties": {
   474          "annotations": {
   475            "description": "Annotations is the metadata.annotations field of a Resource.",
   476            "type": "object",
   477            "additionalProperties": {
   478              "type": "string"
   479            },
   480            "x-go-name": "Annotations"
   481          },
   482          "apiVersion": {
   483            "description": "APIVersion is the apiVersion field of a Resource",
   484            "type": "string",
   485            "x-go-name": "APIVersion"
   486          },
   487          "info": {
   488            "$ref": "#/definitions/PackageInfo"
   489          },
   490          "inventory": {
   491            "$ref": "#/definitions/Inventory"
   492          },
   493          "kind": {
   494            "description": "Kind is the kind field of a Resource",
   495            "type": "string",
   496            "x-go-name": "Kind"
   497          },
   498          "labels": {
   499            "description": "Labels is the metadata.labels field of a Resource",
   500            "type": "object",
   501            "additionalProperties": {
   502              "type": "string"
   503            },
   504            "x-go-name": "Labels"
   505          },
   506          "name": {
   507            "description": "Name is the metadata.name field of a Resource",
   508            "type": "string",
   509            "x-go-name": "Name"
   510          },
   511          "namespace": {
   512            "description": "Namespace is the metadata.namespace field of a Resource",
   513            "type": "string",
   514            "x-go-name": "Namespace"
   515          },
   516          "pipeline": {
   517            "$ref": "#/definitions/Pipeline"
   518          },
   519          "status": {
   520            "$ref": "#/definitions/Status"
   521          },
   522          "upstream": {
   523            "$ref": "#/definitions/Upstream"
   524          },
   525          "upstreamLock": {
   526            "$ref": "#/definitions/UpstreamLock"
   527          }
   528        },
   529        "x-go-name": "KptFile",
   530        "x-go-package": "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
   531      }
   532    }
   533  }