diff --git a/.github/workflows/build_images.yaml b/.github/workflows/build_images.yaml index 27da747c..a78a03c4 100644 --- a/.github/workflows/build_images.yaml +++ b/.github/workflows/build_images.yaml @@ -52,7 +52,7 @@ jobs: file: ./docker/Dockerfile.interlink platforms: linux/amd64, linux/arm64 - virtual-kubelet-refrest-token: + virtual-kubelet-refresh-token: runs-on: ubuntu-latest #env: # DOCKER_TARGET_PLATFORM: linux/arm64 diff --git a/.github/workflows/build_openapi.yaml b/.github/workflows/build_openapi.yaml new file mode 100644 index 00000000..bf59e55d --- /dev/null +++ b/.github/workflows/build_openapi.yaml @@ -0,0 +1,82 @@ +name: Update OpenAPI + +on: + push: + tags: + - '*' + +jobs: + update-openapi: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' # specify the Python version you need + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r example/requirements.txt # if you have a requirements file + + - name: Run script to generate OpenAPI JSON + run: python example/create_openapi.py + + - name: Create a new release + id: create_release + uses: softprops/action-gh-release@v2 + with: + files: docs/openapi/openapi.json + tag_name: ${{ github.ref_name }} + release_name: 'Release ${{ github.ref_name }}' + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload OpenAPI JSON as an artifact + uses: actions/upload-artifact@v4 + with: + name: openapi.json + path: ./docs/openapi/openapi.json + + update-doc: + needs: update-openapi + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + rm ./docs/openapi/openapi.json + + - name: Download artifact from the latest workflow run + uses: actions/download-artifact@v4 + with: + name: openapi.json # Name of the artifact you want to download + path: ./docs/openapi # Directory where the artifact will be downloaded + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '22' # Ensure this matches the Node.js version required by Docusaurus + + - name: Install dependencies + working-directory: ./docs # Change to the directory where package.json is located + run: npm install + + - name: Build Docusaurus site + working-directory: ./docs # Change to the directory where package.json is located + run: npm run build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build # Ensure this matches the build output directory of Docusaurus diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml deleted file mode 100644 index e55889d5..00000000 --- a/.github/workflows/pages.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: - - main - # Review gh actions docs if you want to further define triggers, paths, etc - # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on - -permissions: - contents: write - -jobs: - deploy: - name: Deploy to GitHub Pages - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - #cache: yarn - - - name: Install dependencies - run: cd docs && yarn install --frozen-lockfile - - name: Build website - run: cd docs && yarn build - - # Popular action to deploy to GitHub Pages: - # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - # Build output to publish to the `gh-pages` branch: - publish_dir: ./docs/build - # The following lines assign commit authorship to the official - # GH-Actions bot for deploys to `gh-pages` branch: - # https://github.com/actions/checkout/issues/13#issuecomment-724415212 - # The GH actions bot is used by default if you didn't specify the two fields. - # You can swap them out with your own user credentials. - user_name: github-actions[bot] - user_email: 41898282+github-actions[bot]@users.noreply.github.com diff --git a/docs/openapi/openapi.json b/docs/openapi/openapi.json index 4df5ccb9..577bf35a 100644 --- a/docs/openapi/openapi.json +++ b/docs/openapi/openapi.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "interLink sidecar", "description": "openapi spec for interLink apis <-> provider sidecar communication", "version": "v0.0.0"}, "paths": {"/create": {"post": {"summary": "Create Pod", "operationId": "create_pod_create_post", "requestBody": {"content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/Pod"}, "type": "array", "title": "Pod"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateStruct"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/delete": {"post": {"summary": "Delete Pod", "operationId": "delete_pod_delete_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PodRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "string", "title": "Response Delete Pod Delete Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/status": {"get": {"summary": "Status Pod", "operationId": "status_pod_status_get", "requestBody": {"content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PodRequest"}, "type": "array", "title": "Pods"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PodStatus"}, "type": "array", "title": "Response Status Pod Status Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/getLogs": {"get": {"summary": "Get Logs", "operationId": "get_logs_getLogs_get", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LogRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"text/plain": {"schema": {"type": "string"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"ConfigMap": {"properties": {"metadata": {"$ref": "#/components/schemas/Metadata"}, "data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Data"}, "binary_data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Binary Data"}, "type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type"}, "immutable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Immutable"}}, "type": "object", "required": ["metadata", "data"], "title": "ConfigMap"}, "ConfigMapKeySelector": {"properties": {"key": {"type": "string", "title": "Key"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}}, "type": "object", "required": ["key"], "title": "ConfigMapKeySelector"}, "ConfigMapVolumeSource": {"properties": {"name": {"type": "string", "title": "Name"}, "items": {"anyOf": [{"items": {"$ref": "#/components/schemas/KeyToPath"}, "type": "array"}, {"type": "null"}], "title": "Items", "default": []}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}, "default_mode": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Default Mode"}}, "type": "object", "required": ["name"], "title": "ConfigMapVolumeSource"}, "Container": {"properties": {"name": {"type": "string", "title": "Name"}, "image": {"type": "string", "title": "Image"}, "tag": {"type": "string", "title": "Tag", "default": "latest"}, "command": {"items": {"type": "string"}, "type": "array", "title": "Command"}, "args": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Args", "default": []}, "resources": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Resources", "default": {}}, "volume_mounts": {"anyOf": [{"items": {"$ref": "#/components/schemas/VolumeMount"}, "type": "array"}, {"type": "null"}], "title": "Volume Mounts", "default": []}, "env": {"anyOf": [{"items": {"$ref": "#/components/schemas/EnvVar"}, "type": "array"}, {"type": "null"}], "title": "Env"}, "security_context": {"anyOf": [{"$ref": "#/components/schemas/SecurityContext"}, {"type": "null"}]}}, "type": "object", "required": ["name", "image", "command"], "title": "Container"}, "ContainerStates": {"properties": {"terminated": {"anyOf": [{"$ref": "#/components/schemas/StateTerminated"}, {"type": "null"}]}, "running": {"anyOf": [{"$ref": "#/components/schemas/StateRunning"}, {"type": "null"}]}, "waiting": {"anyOf": [{"$ref": "#/components/schemas/StateWaiting"}, {"type": "null"}]}}, "type": "object", "title": "ContainerStates"}, "ContainerStatus": {"properties": {"name": {"type": "string", "title": "Name"}, "state": {"$ref": "#/components/schemas/ContainerStates"}}, "type": "object", "required": ["name", "state"], "title": "ContainerStatus"}, "CreateStruct": {"properties": {"pod_uid": {"type": "string", "title": "Pod Uid"}, "pod_jid": {"type": "string", "title": "Pod Jid"}}, "type": "object", "required": ["pod_uid", "pod_jid"], "title": "CreateStruct"}, "EnvVar": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value"}, "value_from": {"anyOf": [{"$ref": "#/components/schemas/EnvVarSource"}, {"type": "null"}]}}, "type": "object", "required": ["name"], "title": "EnvVar"}, "EnvVarSource": {"properties": {"config_map_key_ref": {"anyOf": [{"$ref": "#/components/schemas/ConfigMapKeySelector"}, {"type": "null"}]}, "secret_key_ref": {"anyOf": [{"$ref": "#/components/schemas/SecretKeySelector"}, {"type": "null"}]}}, "type": "object", "title": "EnvVarSource"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "KeyToPath": {"properties": {"key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key"}, "path": {"type": "string", "title": "Path"}, "mode": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Mode"}}, "type": "object", "required": ["key", "path"], "title": "KeyToPath"}, "LogOpts": {"properties": {"tail": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Tail"}, "limit_bytes": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit Bytes"}, "timestamps": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Timestamps"}, "previous": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Previous"}, "since_seconds": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Since Seconds"}, "since_time": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Since Time"}}, "type": "object", "title": "LogOpts"}, "LogRequest": {"properties": {"namespace": {"type": "string", "title": "Namespace"}, "pod_uid": {"type": "string", "title": "Pod Uid"}, "pod_name": {"type": "string", "title": "Pod Name"}, "container_name": {"type": "string", "title": "Container Name"}, "opts": {"$ref": "#/components/schemas/LogOpts"}}, "type": "object", "required": ["namespace", "pod_uid", "pod_name", "container_name", "opts"], "title": "LogRequest"}, "Metadata": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "namespace": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Namespace"}, "uid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Uid"}, "annotations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Annotations", "default": {}}, "labels": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Labels", "default": {}}, "generate_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Generate Name"}}, "type": "object", "title": "Metadata"}, "Pod": {"properties": {"pod": {"$ref": "#/components/schemas/PodRequest"}, "container": {"items": {"$ref": "#/components/schemas/Volume"}, "type": "array", "title": "Container"}}, "type": "object", "required": ["pod", "container"], "title": "Pod"}, "PodRequest": {"properties": {"metadata": {"$ref": "#/components/schemas/Metadata"}, "spec": {"$ref": "#/components/schemas/PodSpec"}}, "type": "object", "required": ["metadata", "spec"], "title": "PodRequest"}, "PodSpec": {"properties": {"containers": {"items": {"$ref": "#/components/schemas/Container"}, "type": "array", "title": "Containers"}, "init_containers": {"anyOf": [{"items": {"$ref": "#/components/schemas/Container"}, "type": "array"}, {"type": "null"}], "title": "Init Containers"}, "volumes": {"anyOf": [{"items": {"$ref": "#/components/schemas/PodVolume"}, "type": "array"}, {"type": "null"}], "title": "Volumes"}, "preemption_policy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preemption Policy"}, "priority_class_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Priority Class Name"}, "priority": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Priority"}, "restart_policy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Restart Policy"}, "termination_grace_period_seconds": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Termination Grace Period Seconds"}}, "type": "object", "required": ["containers"], "title": "PodSpec"}, "PodStatus": {"properties": {"name": {"type": "string", "title": "Name"}, "uid": {"type": "string", "title": "Uid"}, "namespace": {"type": "string", "title": "Namespace"}, "containers": {"items": {"$ref": "#/components/schemas/ContainerStatus"}, "type": "array", "title": "Containers"}}, "type": "object", "required": ["name", "uid", "namespace", "containers"], "title": "PodStatus"}, "PodVolume": {"properties": {"name": {"type": "string", "title": "Name"}, "empty_dir": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Empty Dir"}, "secret": {"anyOf": [{"$ref": "#/components/schemas/SecretVolumeSource"}, {"type": "null"}]}, "config_map": {"anyOf": [{"$ref": "#/components/schemas/ConfigMapVolumeSource"}, {"type": "null"}]}}, "type": "object", "required": ["name"], "title": "PodVolume"}, "Secret": {"properties": {"metadata": {"$ref": "#/components/schemas/Metadata"}, "data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Data"}, "string_data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "String Data"}, "type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type"}, "immutable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Immutable"}}, "type": "object", "required": ["metadata"], "title": "Secret"}, "SecretKeySelector": {"properties": {"key": {"type": "string", "title": "Key"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}}, "type": "object", "required": ["key"], "title": "SecretKeySelector"}, "SecretVolumeSource": {"properties": {"secret_name": {"type": "string", "title": "Secret Name"}, "items": {"anyOf": [{"items": {"$ref": "#/components/schemas/KeyToPath"}, "type": "array"}, {"type": "null"}], "title": "Items", "default": []}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}, "default_mode": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Default Mode"}}, "type": "object", "required": ["secret_name"], "title": "SecretVolumeSource"}, "SecurityContext": {"properties": {"allow_privilege_escalation": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Allow Privilege Escalation"}, "privileged": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Privileged"}, "proc_mount": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Proc Mount"}, "read_only_file_system": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Read Only File System"}, "run_as_group": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run As Group"}, "run_as_non_root": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Run As Non Root"}, "run_as_user": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run As User"}}, "type": "object", "title": "SecurityContext"}, "StateRunning": {"properties": {"started_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Started At"}}, "type": "object", "title": "StateRunning"}, "StateTerminated": {"properties": {"exit_code": {"type": "integer", "title": "Exit Code"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}}, "type": "object", "required": ["exit_code"], "title": "StateTerminated"}, "StateWaiting": {"properties": {"message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}}, "type": "object", "title": "StateWaiting"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "Volume": {"properties": {"name": {"type": "string", "title": "Name"}, "config_maps": {"anyOf": [{"items": {"$ref": "#/components/schemas/ConfigMap"}, "type": "array"}, {"type": "null"}], "title": "Config Maps"}, "secrets": {"anyOf": [{"items": {"$ref": "#/components/schemas/Secret"}, "type": "array"}, {"type": "null"}], "title": "Secrets"}, "empty_dirs": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Empty Dirs"}}, "type": "object", "required": ["name"], "title": "Volume"}, "VolumeMount": {"properties": {"name": {"type": "string", "title": "Name"}, "mount_path": {"type": "string", "title": "Mount Path"}, "sub_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Path"}, "read_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Read Only", "default": false}, "mount_propagation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mount Propagation"}}, "type": "object", "required": ["name", "mount_path"], "title": "VolumeMount"}}}} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "interLink sidecar", "description": "openapi spec for interLink apis <-> provider sidecar communication", "version": "v0.0.0"}, "paths": {"/create": {"post": {"summary": "Create Pod", "operationId": "create_pod_create_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Pod"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateStruct"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/delete": {"post": {"summary": "Delete Pod", "operationId": "delete_pod_delete_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PodRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "string", "title": "Response Delete Pod Delete Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/status": {"get": {"summary": "Status Pod", "operationId": "status_pod_status_get", "requestBody": {"content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PodRequest"}, "type": "array", "title": "Pods"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PodStatus"}, "type": "array", "title": "Response Status Pod Status Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/getLogs": {"get": {"summary": "Get Logs", "operationId": "get_logs_getLogs_get", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LogRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"text/plain": {"schema": {"type": "string"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"ConfigMap": {"properties": {"metadata": {"$ref": "#/components/schemas/Metadata"}, "data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Data"}, "binary_data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Binary Data"}, "type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type"}, "immutable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Immutable"}}, "type": "object", "required": ["metadata", "data"], "title": "ConfigMap"}, "ConfigMapKeySelector": {"properties": {"key": {"type": "string", "title": "Key"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}}, "type": "object", "required": ["key"], "title": "ConfigMapKeySelector"}, "ConfigMapVolumeSource": {"properties": {"name": {"type": "string", "title": "Name"}, "items": {"anyOf": [{"items": {"$ref": "#/components/schemas/KeyToPath"}, "type": "array"}, {"type": "null"}], "title": "Items", "default": []}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}, "default_mode": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Default Mode"}}, "type": "object", "required": ["name"], "title": "ConfigMapVolumeSource"}, "Container": {"properties": {"name": {"type": "string", "title": "Name"}, "image": {"type": "string", "title": "Image"}, "tag": {"type": "string", "title": "Tag", "default": "latest"}, "command": {"items": {"type": "string"}, "type": "array", "title": "Command"}, "args": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Args", "default": []}, "resources": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Resources", "default": {}}, "volume_mounts": {"anyOf": [{"items": {"$ref": "#/components/schemas/VolumeMount"}, "type": "array"}, {"type": "null"}], "title": "Volume Mounts", "default": []}, "env": {"anyOf": [{"items": {"$ref": "#/components/schemas/EnvVar"}, "type": "array"}, {"type": "null"}], "title": "Env"}, "security_context": {"anyOf": [{"$ref": "#/components/schemas/SecurityContext"}, {"type": "null"}]}}, "type": "object", "required": ["name", "image", "command"], "title": "Container"}, "ContainerStates": {"properties": {"terminated": {"anyOf": [{"$ref": "#/components/schemas/StateTerminated"}, {"type": "null"}]}, "running": {"anyOf": [{"$ref": "#/components/schemas/StateRunning"}, {"type": "null"}]}, "waiting": {"anyOf": [{"$ref": "#/components/schemas/StateWaiting"}, {"type": "null"}]}}, "type": "object", "title": "ContainerStates"}, "ContainerStatus": {"properties": {"name": {"type": "string", "title": "Name"}, "state": {"$ref": "#/components/schemas/ContainerStates"}}, "type": "object", "required": ["name", "state"], "title": "ContainerStatus"}, "CreateStruct": {"properties": {"pod_uid": {"type": "string", "title": "Pod Uid"}, "pod_jid": {"type": "string", "title": "Pod Jid"}}, "type": "object", "required": ["pod_uid", "pod_jid"], "title": "CreateStruct"}, "EnvVar": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value"}, "value_from": {"anyOf": [{"$ref": "#/components/schemas/EnvVarSource"}, {"type": "null"}]}}, "type": "object", "required": ["name"], "title": "EnvVar"}, "EnvVarSource": {"properties": {"config_map_key_ref": {"anyOf": [{"$ref": "#/components/schemas/ConfigMapKeySelector"}, {"type": "null"}]}, "secret_key_ref": {"anyOf": [{"$ref": "#/components/schemas/SecretKeySelector"}, {"type": "null"}]}}, "type": "object", "title": "EnvVarSource"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "KeyToPath": {"properties": {"key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Key"}, "path": {"type": "string", "title": "Path"}, "mode": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Mode"}}, "type": "object", "required": ["key", "path"], "title": "KeyToPath"}, "LogOpts": {"properties": {"tail": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Tail"}, "limit_bytes": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit Bytes"}, "timestamps": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Timestamps"}, "previous": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Previous"}, "since_seconds": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Since Seconds"}, "since_time": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Since Time"}}, "type": "object", "title": "LogOpts"}, "LogRequest": {"properties": {"namespace": {"type": "string", "title": "Namespace"}, "pod_uid": {"type": "string", "title": "Pod Uid"}, "pod_name": {"type": "string", "title": "Pod Name"}, "container_name": {"type": "string", "title": "Container Name"}, "opts": {"$ref": "#/components/schemas/LogOpts"}}, "type": "object", "required": ["namespace", "pod_uid", "pod_name", "container_name", "opts"], "title": "LogRequest"}, "Metadata": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "namespace": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Namespace"}, "uid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Uid"}, "annotations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Annotations", "default": {}}, "labels": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Labels", "default": {}}, "generate_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Generate Name"}}, "type": "object", "title": "Metadata"}, "Pod": {"properties": {"pod": {"$ref": "#/components/schemas/PodRequest"}, "container": {"items": {"$ref": "#/components/schemas/Volume"}, "type": "array", "title": "Container"}}, "type": "object", "required": ["pod", "container"], "title": "Pod"}, "PodRequest": {"properties": {"metadata": {"$ref": "#/components/schemas/Metadata"}, "spec": {"$ref": "#/components/schemas/PodSpec"}}, "type": "object", "required": ["metadata", "spec"], "title": "PodRequest"}, "PodSpec": {"properties": {"containers": {"items": {"$ref": "#/components/schemas/Container"}, "type": "array", "title": "Containers"}, "init_containers": {"anyOf": [{"items": {"$ref": "#/components/schemas/Container"}, "type": "array"}, {"type": "null"}], "title": "Init Containers"}, "volumes": {"anyOf": [{"items": {"$ref": "#/components/schemas/PodVolume"}, "type": "array"}, {"type": "null"}], "title": "Volumes"}, "preemption_policy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preemption Policy"}, "priority_class_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Priority Class Name"}, "priority": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Priority"}, "restart_policy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Restart Policy"}, "termination_grace_period_seconds": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Termination Grace Period Seconds"}}, "type": "object", "required": ["containers"], "title": "PodSpec"}, "PodStatus": {"properties": {"name": {"type": "string", "title": "Name"}, "uid": {"type": "string", "title": "Uid"}, "namespace": {"type": "string", "title": "Namespace"}, "containers": {"items": {"$ref": "#/components/schemas/ContainerStatus"}, "type": "array", "title": "Containers"}}, "type": "object", "required": ["name", "uid", "namespace", "containers"], "title": "PodStatus"}, "PodVolume": {"properties": {"name": {"type": "string", "title": "Name"}, "empty_dir": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Empty Dir"}, "secret": {"anyOf": [{"$ref": "#/components/schemas/SecretVolumeSource"}, {"type": "null"}]}, "config_map": {"anyOf": [{"$ref": "#/components/schemas/ConfigMapVolumeSource"}, {"type": "null"}]}}, "type": "object", "required": ["name"], "title": "PodVolume"}, "Secret": {"properties": {"metadata": {"$ref": "#/components/schemas/Metadata"}, "data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Data"}, "string_data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "String Data"}, "type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type"}, "immutable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Immutable"}}, "type": "object", "required": ["metadata"], "title": "Secret"}, "SecretKeySelector": {"properties": {"key": {"type": "string", "title": "Key"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}}, "type": "object", "required": ["key"], "title": "SecretKeySelector"}, "SecretVolumeSource": {"properties": {"secret_name": {"type": "string", "title": "Secret Name"}, "items": {"anyOf": [{"items": {"$ref": "#/components/schemas/KeyToPath"}, "type": "array"}, {"type": "null"}], "title": "Items", "default": []}, "optional": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optional"}, "default_mode": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Default Mode"}}, "type": "object", "required": ["secret_name"], "title": "SecretVolumeSource"}, "SecurityContext": {"properties": {"allow_privilege_escalation": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Allow Privilege Escalation"}, "privileged": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Privileged"}, "proc_mount": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Proc Mount"}, "read_only_file_system": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Read Only File System"}, "run_as_group": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run As Group"}, "run_as_non_root": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Run As Non Root"}, "run_as_user": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run As User"}}, "type": "object", "title": "SecurityContext"}, "StateRunning": {"properties": {"started_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Started At"}}, "type": "object", "title": "StateRunning"}, "StateTerminated": {"properties": {"exit_code": {"type": "integer", "title": "Exit Code"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}}, "type": "object", "required": ["exit_code"], "title": "StateTerminated"}, "StateWaiting": {"properties": {"message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}}, "type": "object", "title": "StateWaiting"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "Volume": {"properties": {"name": {"type": "string", "title": "Name"}, "config_maps": {"anyOf": [{"items": {"$ref": "#/components/schemas/ConfigMap"}, "type": "array"}, {"type": "null"}], "title": "Config Maps"}, "secrets": {"anyOf": [{"items": {"$ref": "#/components/schemas/Secret"}, "type": "array"}, {"type": "null"}], "title": "Secrets"}, "empty_dirs": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Empty Dirs"}}, "type": "object", "required": ["name"], "title": "Volume"}, "VolumeMount": {"properties": {"name": {"type": "string", "title": "Name"}, "mount_path": {"type": "string", "title": "Mount Path"}, "sub_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sub Path"}, "read_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Read Only", "default": false}, "mount_propagation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mount Propagation"}}, "type": "object", "required": ["name", "mount_path"], "title": "VolumeMount"}}}} \ No newline at end of file diff --git a/example/__pycache__/main.cpython-39.pyc b/example/__pycache__/main.cpython-39.pyc deleted file mode 100644 index b2cd2e50..00000000 Binary files a/example/__pycache__/main.cpython-39.pyc and /dev/null differ