Skip to content

Commit

Permalink
Merge pull request #87 from perftool-incubator/dev-kmr
Browse files Browse the repository at this point in the history
add support for using a registries.json to locate pull tokens for use…
  • Loading branch information
k-rister authored Nov 19, 2024
2 parents 732ca98 + b4afcdf commit bc2f660
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 15 deletions.
165 changes: 165 additions & 0 deletions registries-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"type": "object",
"properties": {
"controller": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 1
},
"tag": {
"type": "string",
"minLength": 1
},
"pull-token": {
"type": "string",
"minLength": 1
},
"tls-verify": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"url",
"tag"
]
},
"engines": {
"type": "object",
"properties": {
"public": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 1
},
"push-token": {
"type": "string",
"minLength": 1
},
"tls-verify": {
"type": "boolean"
},
"quay": {
"$ref": "#/definitions/quay"
}
},
"additionalProperties": false,
"required": [
"url"
]
},
"private": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 1
},
"tokens": {
"type": "object",
"properties": {
"push": {
"type": "string",
"minLength": 1
},
"pull": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"required": [
"push",
"pull"
]
},
"tls-verify": {
"type": "boolean"
},
"quay": {
"$ref": "#/definitions/quay"
}
},
"additionalProperties": false,
"required": [
"url",
"tokens"
]
}
},
"additionalProperties": false,
"required": [
"public"
]
},
"userenvs": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"minLength": 1
},
"pull-token": {
"type": "string",
"minLength": 1
},
"tls-verify": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"url",
"pull-token"
]
}
}
},
"additionalProperties": false,
"required": [
"controller",
"engines"
],
"definitions": {
"quay": {
"type": "object",
"properties": {
"expiration-length": {
"type": "string",
"minLength": 2,
"pattern": "^[1-9][0-9]*[wd]$"
},
"refresh-expiration": {
"type": "object",
"properties": {
"token-file": {
"type": "string",
"minLength": 1
},
"api-url": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"required": [
"token-file",
"api-url"
]
}
},
"additionalProperties": false,
"required": [
"expiration-length"
]
}
}
}
7 changes: 7 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@
"type": "string",
"minLength": 1
},
"requires-pull-token": {
"type": "string",
"enum": [
"false",
"true"
]
},
"build-policy": {
"type": "string",
"enum": [
Expand Down
Loading

0 comments on commit bc2f660

Please sign in to comment.