Skip to content

Commit

Permalink
Update kubernetes schemas to latest (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
AtzeDeVries authored Jan 4, 2024
1 parent 1325c52 commit 4f197ef
Show file tree
Hide file tree
Showing 25 changed files with 8,941 additions and 8 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.9.7-alpine3.14
RUN apk --no-cache add bats
COPY requirements.txt /code/
RUN pip install -r /code/requirements.txt
COPY openapi2jsonschema.py /code/
WORKDIR /code
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,21 @@
Here we can host schemas of the api's in our kubernetes clusters. This is useful
for validating manifests.

> generation on the schemas is in the very early stages
>
To update the schema's, check if the schemas are defined in `fetch-schemas.sh`.
Then build the docker image:

```
docker build -t python-bats .
```

Then run

```
docker docker run -v $(pwd):/src -it python-bats bash
```

in the container run

```
./fetch-schemas.sh <dest>
```
266 changes: 266 additions & 0 deletions api-platform/authorizationpolicy-security-v1beta1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
{
"properties": {
"spec": {
"description": "Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html",
"oneOf": [
{
"not": {
"anyOf": [
{
"required": [
"provider"
]
}
]
}
},
{
"required": [
"provider"
]
}
],
"properties": {
"action": {
"description": "Optional.",
"enum": [
"ALLOW",
"DENY",
"AUDIT",
"CUSTOM"
],
"type": "string"
},
"provider": {
"description": "Specifies detailed configuration of the CUSTOM action.",
"properties": {
"name": {
"description": "Specifies the name of the extension provider.",
"type": "string"
}
},
"type": "object",
"additionalProperties": false
},
"rules": {
"description": "Optional.",
"items": {
"properties": {
"from": {
"description": "Optional.",
"items": {
"properties": {
"source": {
"description": "Source specifies the source of a request.",
"properties": {
"ipBlocks": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"namespaces": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notIpBlocks": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notNamespaces": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notPrincipals": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notRemoteIpBlocks": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notRequestPrincipals": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"principals": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"remoteIpBlocks": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"requestPrincipals": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"to": {
"description": "Optional.",
"items": {
"properties": {
"operation": {
"description": "Operation specifies the operation of a request.",
"properties": {
"hosts": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"methods": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notHosts": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notMethods": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notPaths": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"notPorts": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"paths": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"ports": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"when": {
"description": "Optional.",
"items": {
"properties": {
"key": {
"description": "The name of an Istio attribute.",
"type": "string"
},
"notValues": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
},
"values": {
"description": "Optional.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
}
},
"type": "object",
"additionalProperties": false
},
"type": "array"
},
"selector": {
"description": "Optional.",
"properties": {
"matchLabels": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object",
"additionalProperties": false
}
},
"type": "object",
"additionalProperties": false
},
"status": {
"type": "object",
"x-kubernetes-preserve-unknown-fields": true
}
},
"type": "object"
}
Loading

0 comments on commit 4f197ef

Please sign in to comment.