├── .gitignore ├── .pdm-python ├── LICENSE ├── README.md ├── invoke.yaml ├── pdm.lock ├── protos ├── LICENSE ├── api.descriptors ├── cluster │ └── cluster.proto ├── common │ └── common.proto ├── inspect │ └── inspect.proto ├── machine │ └── machine.proto ├── prototool.yaml ├── resource │ ├── config │ │ └── config.proto │ ├── definitions │ │ ├── cluster │ │ │ └── cluster.proto │ │ ├── cri │ │ │ └── cri.proto │ │ ├── enums │ │ │ └── enums.proto │ │ ├── etcd │ │ │ └── etcd.proto │ │ ├── extensions │ │ │ └── extensions.proto │ │ ├── files │ │ │ └── files.proto │ │ ├── hardware │ │ │ └── hardware.proto │ │ ├── k8s │ │ │ └── k8s.proto │ │ ├── kubeaccess │ │ │ └── kubeaccess.proto │ │ ├── kubespan │ │ │ └── kubespan.proto │ │ ├── network │ │ │ └── network.proto │ │ ├── perf │ │ │ └── perf.proto │ │ ├── proto │ │ │ └── proto.proto │ │ ├── runtime │ │ │ └── runtime.proto │ │ ├── secrets │ │ │ └── secrets.proto │ │ ├── siderolink │ │ │ └── siderolink.proto │ │ ├── time │ │ │ └── time.proto │ │ └── v1alpha1 │ │ │ └── v1alpha1.proto │ └── network │ │ └── device_config.proto ├── security │ └── security.proto ├── storage │ └── storage.proto ├── time │ └── time.proto └── vendor │ └── google │ └── rpc │ └── status.proto ├── pyproject.toml ├── src └── talos_linux_api │ └── v1_6_0 │ ├── __init__.py │ ├── cluster │ └── __init__.py │ ├── common │ └── __init__.py │ ├── google │ ├── __init__.py │ └── rpc │ │ └── __init__.py │ ├── inspect │ └── __init__.py │ ├── machine │ └── __init__.py │ ├── resource │ ├── __init__.py │ ├── config │ │ └── __init__.py │ └── network │ │ └── __init__.py │ ├── securityapi │ └── __init__.py │ ├── storage │ └── __init__.py │ ├── talos │ ├── __init__.py │ └── resource │ │ ├── __init__.py │ │ └── definitions │ │ ├── __init__.py │ │ ├── cluster │ │ └── __init__.py │ │ ├── cri │ │ └── __init__.py │ │ ├── enums │ │ └── __init__.py │ │ ├── etcd │ │ └── __init__.py │ │ ├── extensions │ │ └── __init__.py │ │ ├── files │ │ └── __init__.py │ │ ├── hardware │ │ └── __init__.py │ │ ├── k8s │ │ └── __init__.py │ │ ├── kubeaccess │ │ └── __init__.py │ │ ├── kubespan │ │ └── __init__.py │ │ ├── network │ │ └── __init__.py │ │ ├── perf │ │ └── __init__.py │ │ ├── proto │ │ └── __init__.py │ │ ├── runtime │ │ └── __init__.py │ │ ├── secrets │ │ └── __init__.py │ │ ├── siderolink │ │ └── __init__.py │ │ ├── time │ │ └── __init__.py │ │ └── v1alpha1 │ │ └── __init__.py │ └── time │ └── __init__.py ├── tasks.py └── tests ├── conftest.py └── test_imports.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/#use-with-ide 110 | .pdm.toml 111 | 112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 113 | __pypackages__/ 114 | 115 | # Celery stuff 116 | celerybeat-schedule 117 | celerybeat.pid 118 | 119 | # SageMath parsed files 120 | *.sage.py 121 | 122 | # Environments 123 | .env 124 | .venv 125 | env/ 126 | venv/ 127 | ENV/ 128 | env.bak/ 129 | venv.bak/ 130 | 131 | # Spyder project settings 132 | .spyderproject 133 | .spyproject 134 | 135 | # Rope project settings 136 | .ropeproject 137 | 138 | # mkdocs documentation 139 | /site 140 | 141 | # mypy 142 | .mypy_cache/ 143 | .dmypy.json 144 | dmypy.json 145 | 146 | # Pyre type checker 147 | .pyre/ 148 | 149 | # pytype static type analyzer 150 | .pytype/ 151 | 152 | # Cython debug symbols 153 | cython_debug/ 154 | 155 | # PyCharm 156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 | # and can be added to the global gitignore or merged into this file. For a more nuclear 159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 | #.idea/ 161 | -------------------------------------------------------------------------------- /.pdm-python: -------------------------------------------------------------------------------- 1 | /Users/saschadesch/Documents/repos/talos-linux-api/.venv/bin/python -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sascha Desch 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `talos-linux-api` - Python bindings for the Talos Linux gRPC API 2 | 3 | ## Installation 4 | Multiple API versions can be installed simultaneously and are made available 5 | at runtime under an *Implicit Namespace Package* named `talos_linux_api`. 6 | 7 | Currently available API versions: 8 | 9 | * `pip install talos-linux-api-v1.2.0` 10 | * `pip install talos-linux-api-v1.3.0` 11 | * `pip install talos-linux-api-v1.4.0` 12 | * `pip install talos-linux-api-v1.5.0` 13 | * `pip install talos-linux-api-v1.6.0` 14 | 15 | 16 | ## Usage example 17 | ```python 18 | import ssl 19 | from talos_linux_api.v1_6_0.machine import MachineServiceStub 20 | from grpclib.client import Channel 21 | from betterproto.lib.google.protobuf import Empty 22 | 23 | ssl_context = ssl.create_default_context() 24 | ssl_context.load_cert_chain('client.crt', 'client.key') 25 | ssl_context.load_verify_locations('ca.crt') 26 | 27 | async with Channel(host="example.com", port=50000, ssl=ssl_context) as channel: 28 | machine_service = MachineServiceStub(channel) 29 | response = await machine_service.cpu_info(Empty()) 30 | ``` 31 | 32 | > [!NOTE] 33 | > `openssl` which the `ssl` module relies upon does not like the format of the 34 | > private key that `talosctl` generates. 35 | > ``` 36 | > -----BEGIN ED25519 PRIVATE KEY----- 37 | > ... 38 | > -----END ED25519 PRIVATE KEY----- 39 | > ``` 40 | > To make `openssl` happy you have to fix the header and footer by removing the 41 | > `ED25519` part. 42 | > ``` 43 | > -----BEGIN PRIVATE KEY----- 44 | > ... 45 | > -----END PRIVATE KEY----- 46 | > ``` -------------------------------------------------------------------------------- /invoke.yaml: -------------------------------------------------------------------------------- 1 | api_version: v1.6.0 -------------------------------------------------------------------------------- /protos/LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /protos/api.descriptors: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereobutter/talos-linux-api/15419f20226abbcc256d2b68ea74b7ea85f64b34/protos/api.descriptors -------------------------------------------------------------------------------- /protos/cluster/cluster.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package cluster; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/cluster"; 6 | 7 | import "common/common.proto"; 8 | import "google/protobuf/duration.proto"; 9 | 10 | // The cluster service definition. 11 | service ClusterService { 12 | rpc HealthCheck(HealthCheckRequest) returns (stream HealthCheckProgress); 13 | } 14 | 15 | message HealthCheckRequest { 16 | google.protobuf.Duration wait_timeout = 1; 17 | ClusterInfo cluster_info = 2; 18 | } 19 | 20 | message ClusterInfo { 21 | repeated string control_plane_nodes = 1; 22 | repeated string worker_nodes = 2; 23 | string force_endpoint = 3; 24 | } 25 | 26 | message HealthCheckProgress { 27 | common.Metadata metadata = 1; 28 | string message = 2; 29 | } 30 | -------------------------------------------------------------------------------- /protos/common/common.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package common; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/common"; 6 | 7 | import "google/protobuf/any.proto"; 8 | import "google/protobuf/descriptor.proto"; 9 | import "google/rpc/status.proto"; 10 | 11 | // An alternative to using options could be extracting versions from comments. 12 | // Unfortunately, they are not available: https://github.com/golang/protobuf/issues/1134 13 | // Also, while option numbers can be the same, 14 | // names should be different: https://github.com/protocolbuffers/protobuf/issues/4861 15 | 16 | extend google.protobuf.MessageOptions { 17 | // Indicates the Talos version when this deprecated message will be removed from API. 18 | string remove_deprecated_message = 93117; 19 | } 20 | 21 | extend google.protobuf.FieldOptions { 22 | // Indicates the Talos version when this deprecated filed will be removed from API. 23 | string remove_deprecated_field = 93117; 24 | } 25 | 26 | extend google.protobuf.EnumOptions { 27 | // Indicates the Talos version when this deprecated enum will be removed from API. 28 | string remove_deprecated_enum = 93117; 29 | } 30 | 31 | extend google.protobuf.EnumValueOptions { 32 | // Indicates the Talos version when this deprecated enum value will be removed from API. 33 | string remove_deprecated_enum_value = 93117; 34 | } 35 | 36 | extend google.protobuf.MethodOptions { 37 | // Indicates the Talos version when this deprecated method will be removed from API. 38 | string remove_deprecated_method = 93117; 39 | } 40 | 41 | extend google.protobuf.ServiceOptions { 42 | // Indicates the Talos version when this deprecated service will be removed from API. 43 | string remove_deprecated_service = 93117; 44 | } 45 | 46 | enum Code { 47 | FATAL = 0; 48 | LOCKED = 1; 49 | CANCELED = 2; 50 | } 51 | 52 | message Error { 53 | Code code = 1; 54 | string message = 2; 55 | repeated google.protobuf.Any details = 3; 56 | } 57 | 58 | // Common metadata message nested in all reply message types 59 | message Metadata { 60 | // hostname of the server response comes from (injected by proxy) 61 | string hostname = 1; 62 | // error is set if request failed to the upstream (rest of response is 63 | // undefined) 64 | string error = 2; 65 | // error as gRPC Status 66 | google.rpc.Status status = 3; 67 | } 68 | 69 | message Data { 70 | Metadata metadata = 1; 71 | bytes bytes = 2; 72 | } 73 | 74 | message DataResponse { 75 | repeated Data messages = 1; 76 | } 77 | 78 | message Empty { 79 | Metadata metadata = 1; 80 | } 81 | 82 | message EmptyResponse { 83 | repeated Empty messages = 1; 84 | } 85 | 86 | enum ContainerDriver { 87 | CONTAINERD = 0; 88 | CRI = 1; 89 | } 90 | 91 | enum ContainerdNamespace { 92 | NS_UNKNOWN = 0; 93 | NS_SYSTEM = 1; 94 | NS_CRI = 2; 95 | } 96 | 97 | message URL { 98 | string full_path = 1; 99 | } 100 | 101 | message PEMEncodedCertificateAndKey { 102 | bytes crt = 1; 103 | bytes key = 2; 104 | } 105 | 106 | message PEMEncodedKey { 107 | bytes key = 1; 108 | } 109 | 110 | message NetIP { 111 | bytes ip = 1; 112 | } 113 | 114 | message NetIPPort { 115 | bytes ip = 1; 116 | int32 port = 2; 117 | } 118 | 119 | message NetIPPrefix { 120 | bytes ip = 1; 121 | int32 prefix_length = 2; 122 | } 123 | -------------------------------------------------------------------------------- /protos/inspect/inspect.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package inspect; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/inspect"; 6 | 7 | import "common/common.proto"; 8 | import "google/protobuf/empty.proto"; 9 | 10 | // The inspect service definition. 11 | // 12 | // InspectService provides auxiliary API to inspect OS internals. 13 | service InspectService { 14 | rpc ControllerRuntimeDependencies(google.protobuf.Empty) returns (ControllerRuntimeDependenciesResponse); 15 | } 16 | 17 | // The ControllerRuntimeDependency message contains the graph of controller-resource dependencies. 18 | message ControllerRuntimeDependency { 19 | common.Metadata metadata = 1; 20 | repeated ControllerDependencyEdge edges = 2; 21 | } 22 | 23 | message ControllerRuntimeDependenciesResponse { 24 | repeated ControllerRuntimeDependency messages = 1; 25 | } 26 | 27 | enum DependencyEdgeType { 28 | OUTPUT_EXCLUSIVE = 0; 29 | OUTPUT_SHARED = 3; 30 | INPUT_STRONG = 1; 31 | INPUT_WEAK = 2; 32 | INPUT_DESTROY_READY = 4; 33 | } 34 | 35 | message ControllerDependencyEdge { 36 | string controller_name = 1; 37 | DependencyEdgeType edge_type = 2; 38 | string resource_namespace = 3; 39 | string resource_type = 4; 40 | string resource_id = 5; 41 | } 42 | -------------------------------------------------------------------------------- /protos/prototool.yaml: -------------------------------------------------------------------------------- 1 | protoc: 2 | version: 3.19.1 3 | includes: 4 | - vendor/ 5 | 6 | lint: 7 | group: empty 8 | ignores: 9 | - id: FILE_OPTIONS_GO_PACKAGE_NOT_LONG_FORM 10 | files: 11 | - vendor/google/rpc/status.proto 12 | 13 | rules: 14 | # The specific linters to add. 15 | # TODO Enable more: https://github.com/siderolabs/talos/issues/2722. 16 | add: 17 | # All rules except language-specific (C#, Java, Obj-C, PHP, Ruby, but not Go). 18 | # prototool lint --list-all-linters | grep -vE '(CSHARP|JAVA|OBJC|PHP|RUBY)' 19 | - COMMENTS_NO_C_STYLE # Verifies that there are no /* c-style */ comments. 20 | - COMMENTS_NO_INLINE # Verifies that there are no inline comments. 21 | # - ENUMS_HAVE_COMMENTS # Verifies that all enums have a comment of the form "// EnumName ...". 22 | # - ENUMS_HAVE_SENTENCE_COMMENTS # Verifies that all enums have a comment that contains at least one complete sentence. 23 | # - ENUMS_NO_ALLOW_ALIAS # Verifies that no enums use the option "allow_alias". 24 | # - ENUM_FIELDS_HAVE_COMMENTS # Verifies that all enum fields have a comment of the form "// FIELD_NAME ...". 25 | # - ENUM_FIELDS_HAVE_SENTENCE_COMMENTS # Verifies that all enum fields have a comment that contains at least one complete sentence. 26 | - ENUM_FIELD_NAMES_UPPERCASE # Verifies that all enum field names are UPPERCASE. 27 | - ENUM_FIELD_NAMES_UPPER_SNAKE_CASE # Verifies that all enum field names are UPPER_SNAKE_CASE. 28 | # - ENUM_FIELD_PREFIXES # Verifies that all enum fields are prefixed with [NESTED_MESSAGE_NAME_]ENUM_NAME_. 29 | # - ENUM_FIELD_PREFIXES_EXCEPT_MESSAGE # Verifies that all enum fields are prefixed with ENUM_NAME_. 30 | - ENUM_NAMES_CAMEL_CASE # Verifies that all enum names are CamelCase. 31 | - ENUM_NAMES_CAPITALIZED # Verifies that all enum names are Capitalized. 32 | # - ENUM_ZERO_VALUES_INVALID # Verifies that all enum zero value names are [NESTED_MESSAGE_NAME_]ENUM_NAME_INVALID. 33 | # - ENUM_ZERO_VALUES_INVALID_EXCEPT_MESSAGE # Verifies that all enum zero value names are ENUM_NAME_INVALID. 34 | - FIELDS_NOT_RESERVED # Verifies that no message or enum has a reserved field. 35 | - FILE_HEADER # Verifies that the file header matches the expected file header if the file_header option is set in the configuration file. 36 | - FILE_NAMES_LOWER_SNAKE_CASE # Verifies that the file name is lower_snake_case.proto. 37 | # - FILE_OPTIONS_EQUAL_GO_PACKAGE_PB_SUFFIX # Verifies that the file option "go_package" is equal to $(basename PACKAGE)pb. 38 | # - FILE_OPTIONS_EQUAL_GO_PACKAGE_V2_SUFFIX # Verifies that the file option "go_package" is equal to the last two values of the package separated by "."s, or just the package name if there are no "."s. 39 | - FILE_OPTIONS_GO_PACKAGE_NOT_LONG_FORM # Verifies that the file option "go_package" is not of the form "go/import/path;package". 40 | - FILE_OPTIONS_GO_PACKAGE_SAME_IN_DIR # Verifies that the file option "go_package" of all files in a directory are the same. 41 | - FILE_OPTIONS_REQUIRE_GO_PACKAGE # Verifies that the file option "go_package" is set. 42 | - GOGO_NOT_IMPORTED # Verifies that the "gogo.proto" file from gogo/protobuf is not imported. 43 | - IMPORTS_NOT_PUBLIC # Verifies that there are no public imports. 44 | - IMPORTS_NOT_WEAK # Verifies that there are no weak imports. 45 | # - MESSAGES_HAVE_COMMENTS # Verifies that all non-extended messages have a comment of the form "// MessageName ...". 46 | # - MESSAGES_HAVE_COMMENTS_EXCEPT_REQUEST_RESPONSE_TYPES # Verifies that all non-extended messages except for request and response types have a comment of the form "// MessageName ...". 47 | # - MESSAGES_HAVE_SENTENCE_COMMENTS_EXCEPT_REQUEST_RESPONSE_TYPES # Verifies that all non-extended messages except for request and response types have a comment that contains at least one complete sentence. 48 | - MESSAGES_NOT_EMPTY_EXCEPT_REQUEST_RESPONSE_TYPES # Verifies that all messages except for request and response types are not empty. 49 | - MESSAGE_FIELDS_DURATION # Verifies that all non-map fields that contain "duration" in their name are google.protobuf.Durations. 50 | # - MESSAGE_FIELDS_HAVE_COMMENTS # Verifies that all message fields have a comment of the form "// field_name ...". 51 | # - MESSAGE_FIELDS_HAVE_SENTENCE_COMMENTS # Verifies that all message fields have a comment that contains at least one complete sentence. 52 | - MESSAGE_FIELDS_NOT_FLOATS # Verifies that all message fields are not floats. 53 | - MESSAGE_FIELDS_NO_JSON_NAME # Verifies that no message field has the "json_name" option set. 54 | # - MESSAGE_FIELDS_TIME # Verifies that all non-map fields that contain "time" in their name are google.protobuf.Timestamps. 55 | - MESSAGE_FIELD_NAMES_FILENAME # Verifies that all message field names do not contain "file_name" as "filename" should be used instead. 56 | - MESSAGE_FIELD_NAMES_FILEPATH # Verifies that all message field names do not contain "file_path" as "filepath" should be used instead. 57 | - MESSAGE_FIELD_NAMES_LOWERCASE # Verifies that all message field names are lowercase. 58 | - MESSAGE_FIELD_NAMES_LOWER_SNAKE_CASE # Verifies that all message field names are lower_snake_case. 59 | - MESSAGE_FIELD_NAMES_NO_DESCRIPTOR # Verifies that all message field names are not "descriptor", which results in a collision in Java-generated code. 60 | - MESSAGE_NAMES_CAMEL_CASE # Verifies that all non-extended message names are CamelCase. 61 | - MESSAGE_NAMES_CAPITALIZED # Verifies that all non-extended message names are Capitalized. 62 | # - NAMES_NO_COMMON # Verifies that no type name contains the word "common". 63 | # - NAMES_NO_DATA # Verifies that no type name contains the word "data". 64 | # - NAMES_NO_UUID # Verifies that no type name contains the word "uuid". 65 | - ONEOF_NAMES_LOWER_SNAKE_CASE # Verifies that all oneof names are lower_snake_case. 66 | - PACKAGES_SAME_IN_DIR # Verifies that the packages of all files in a directory are the same. 67 | - PACKAGE_IS_DECLARED # Verifies that there is a package declaration. 68 | - PACKAGE_LOWER_CASE # Verifies that the package name only contains characters in the range a-z0-9 and periods. 69 | - PACKAGE_LOWER_SNAKE_CASE # Verifies that the package is lower_snake.case. 70 | # - PACKAGE_MAJOR_BETA_VERSIONED # Verifies that the package is of the form "package.vMAJORVERSION" or "package.vMAJORVERSIONbetaBETAVERSION" with versions >=1. 71 | - PACKAGE_NO_KEYWORDS # Verifies that no packages contain one of the keywords "internal,public,private,protected,std" as part of the name when split on '.'. 72 | # - REQUEST_RESPONSE_NAMES_MATCH_RPC # Verifies that all request names are RpcNameRequest and all response names are RpcNameResponse. 73 | - REQUEST_RESPONSE_TYPES_AFTER_SERVICE # Verifies that request and response types are defined after any services and the response type is defined after the request type. 74 | # - REQUEST_RESPONSE_TYPES_IN_SAME_FILE # Verifies that all request and response types are in the same file as their corresponding service and are not nested messages. 75 | # - REQUEST_RESPONSE_TYPES_ONLY_IN_FILE # Verifies that only request and response types are the only types in the same file as their corresponding service. 76 | # - REQUEST_RESPONSE_TYPES_UNIQUE # Verifies that all request and response types are unique to each RPC. 77 | # - RPCS_HAVE_COMMENTS # Verifies that all rpcs have a comment of the form "// RPCName ...". 78 | # - RPCS_HAVE_SENTENCE_COMMENTS # Verifies that all rpcs have a comment that contains at least one complete sentence. 79 | # - RPCS_NO_STREAMING # Verifies that all rpcs are unary. 80 | - RPC_NAMES_CAMEL_CASE # Verifies that all RPC names are CamelCase. 81 | - RPC_NAMES_CAPITALIZED # Verifies that all RPC names are Capitalized. 82 | - RPC_OPTIONS_NO_GOOGLE_API_HTTP # Verifies that the RPC option "google.api.http" is not used. 83 | # - SERVICES_HAVE_COMMENTS # Verifies that all services have a comment of the form "// ServiceName ...". 84 | - SERVICES_HAVE_SENTENCE_COMMENTS # Verifies that all services have a comment that contains at least one complete sentence. 85 | # - SERVICE_NAMES_API_SUFFIX # Verifies that all service names end with "API". 86 | - SERVICE_NAMES_CAMEL_CASE # Verifies that all service names are CamelCase. 87 | - SERVICE_NAMES_CAPITALIZED # Verifies that all service names are Capitalized. 88 | # - SERVICE_NAMES_MATCH_FILE_NAME # Verifies that there is one service per file and the file name is service_name_lower_snake_case.proto. 89 | - SERVICE_NAMES_NO_PLURALS # Verifies that all CamelCase service names do not contain plural components. 90 | - SYNTAX_PROTO3 # Verifies that the syntax is proto3. 91 | - WKT_DIRECTLY_IMPORTED # Verifies that the Well-Known Types are directly imported using "google/protobuf/" as the base of the import. 92 | # - WKT_DURATION_SUFFIX # Verifies that all google.protobuf.Duration field names are "duration" or end in "_duration". 93 | # - WKT_TIMESTAMP_SUFFIX # Verifies that all google.protobuf.Timestamp field names are "time" or end in "_time". 94 | 95 | break: 96 | include_beta: false 97 | allow_beta_deps: false 98 | 99 | # We don't use prototool for code generation, so there are no settings for that. 100 | -------------------------------------------------------------------------------- /protos/resource/config/config.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package resource.config; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/config"; 6 | 7 | // MessageConfigSpec is the spec for the config.MachineConfig resource. 8 | message MachineConfigSpec { 9 | // Contains YAML marshalled machine configuration. 10 | // 11 | // Byte representation is preserved as the machine configuration was submitted to the node. 12 | bytes yaml_marshalled = 1; 13 | } 14 | 15 | // MachineType matches machine.Type constants. 16 | enum MachineType { 17 | UNKNOWN = 0; 18 | INIT = 1; 19 | CONTROL_PLANE = 2; 20 | WORKER = 3; 21 | } 22 | 23 | // MachineTypeSpec is the spec for the config.MachineType resource. 24 | message MachineTypeSpec { 25 | MachineType machine_type = 1; 26 | } 27 | -------------------------------------------------------------------------------- /protos/resource/definitions/cluster/cluster.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.cluster; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/cluster"; 6 | 7 | import "common/common.proto"; 8 | import "resource/definitions/enums/enums.proto"; 9 | 10 | // AffiliateSpec describes Affiliate state. 11 | message AffiliateSpec { 12 | string node_id = 1; 13 | repeated common.NetIP addresses = 2; 14 | string hostname = 3; 15 | string nodename = 4; 16 | string operating_system = 5; 17 | talos.resource.definitions.enums.MachineType machine_type = 6; 18 | KubeSpanAffiliateSpec kube_span = 7; 19 | ControlPlane control_plane = 8; 20 | } 21 | 22 | // ConfigSpec describes KubeSpan configuration. 23 | message ConfigSpec { 24 | bool discovery_enabled = 1; 25 | bool registry_kubernetes_enabled = 2; 26 | bool registry_service_enabled = 3; 27 | string service_endpoint = 4; 28 | bool service_endpoint_insecure = 5; 29 | bytes service_encryption_key = 6; 30 | string service_cluster_id = 7; 31 | } 32 | 33 | // ControlPlane describes ControlPlane data if any. 34 | message ControlPlane { 35 | int64 api_server_port = 1; 36 | } 37 | 38 | // IdentitySpec describes status of rendered secrets. 39 | // 40 | // Note: IdentitySpec is persisted on disk in the STATE partition, 41 | // so YAML serialization should be kept backwards compatible. 42 | message IdentitySpec { 43 | string node_id = 1; 44 | } 45 | 46 | // InfoSpec describes cluster information. 47 | message InfoSpec { 48 | string cluster_id = 1; 49 | string cluster_name = 2; 50 | } 51 | 52 | // KubeSpanAffiliateSpec describes additional information specific for the KubeSpan. 53 | message KubeSpanAffiliateSpec { 54 | string public_key = 1; 55 | common.NetIP address = 2; 56 | repeated common.NetIPPrefix additional_addresses = 3; 57 | repeated common.NetIPPort endpoints = 4; 58 | } 59 | 60 | // MemberSpec describes Member state. 61 | message MemberSpec { 62 | string node_id = 1; 63 | repeated common.NetIP addresses = 2; 64 | string hostname = 3; 65 | talos.resource.definitions.enums.MachineType machine_type = 4; 66 | string operating_system = 5; 67 | ControlPlane control_plane = 6; 68 | } 69 | 70 | -------------------------------------------------------------------------------- /protos/resource/definitions/cri/cri.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.cri; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/cri"; 6 | 7 | import "google/protobuf/struct.proto"; 8 | 9 | // SeccompProfileSpec represents the SeccompProfile. 10 | message SeccompProfileSpec { 11 | string name = 1; 12 | google.protobuf.Struct value = 2; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /protos/resource/definitions/enums/enums.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.enums; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/enums"; 6 | 7 | // MachineType represents a machine type. 8 | enum MachineType { 9 | // TypeUnknown represents undefined node type, when there is no machine configuration yet. 10 | TYPE_UNKNOWN = 0; 11 | // TypeInit type designates the first control plane node to come up. You can think of it like a bootstrap node. 12 | // This node will perform the initial steps to bootstrap the cluster -- generation of TLS assets, starting of the control plane, etc. 13 | TYPE_INIT = 1; 14 | // TypeControlPlane designates the node as a control plane member. 15 | // This means it will host etcd along with the Kubernetes controlplane components such as API Server, Controller Manager, Scheduler. 16 | TYPE_CONTROL_PLANE = 2; 17 | // TypeWorker designates the node as a worker node. 18 | // This means it will be an available compute node for scheduling workloads. 19 | TYPE_WORKER = 3; 20 | } 21 | 22 | // NethelpersAddressFlag wraps IFF_* constants. 23 | enum NethelpersAddressFlag { 24 | NETHELPERS_ADDRESSFLAG_UNSPECIFIED = 0; 25 | ADDRESS_TEMPORARY = 1; 26 | ADDRESS_NO_DAD = 2; 27 | ADDRESS_OPTIMISTIC = 4; 28 | ADDRESS_DAD_FAILED = 8; 29 | ADDRESS_HOME = 16; 30 | ADDRESS_DEPRECATED = 32; 31 | ADDRESS_TENTATIVE = 64; 32 | ADDRESS_PERMANENT = 128; 33 | ADDRESS_MANAGEMENT_TEMP = 256; 34 | ADDRESS_NO_PREFIX_ROUTE = 512; 35 | ADDRESS_MC_AUTO_JOIN = 1024; 36 | ADDRESS_STABLE_PRIVACY = 2048; 37 | } 38 | 39 | // NethelpersADSelect is ADSelect. 40 | enum NethelpersADSelect { 41 | AD_SELECT_STABLE = 0; 42 | AD_SELECT_BANDWIDTH = 1; 43 | AD_SELECT_COUNT = 2; 44 | } 45 | 46 | // NethelpersARPAllTargets is an ARP targets mode. 47 | enum NethelpersARPAllTargets { 48 | ARP_ALL_TARGETS_ANY = 0; 49 | ARP_ALL_TARGETS_ALL = 1; 50 | } 51 | 52 | // NethelpersARPValidate is an ARP Validation mode. 53 | enum NethelpersARPValidate { 54 | ARP_VALIDATE_NONE = 0; 55 | ARP_VALIDATE_ACTIVE = 1; 56 | ARP_VALIDATE_BACKUP = 2; 57 | ARP_VALIDATE_ALL = 3; 58 | } 59 | 60 | // NethelpersBondMode is a bond mode. 61 | enum NethelpersBondMode { 62 | BOND_MODE_ROUNDROBIN = 0; 63 | BOND_MODE_ACTIVE_BACKUP = 1; 64 | BOND_MODE_XOR = 2; 65 | BOND_MODE_BROADCAST = 3; 66 | BOND_MODE8023_AD = 4; 67 | BOND_MODE_TLB = 5; 68 | BOND_MODE_ALB = 6; 69 | } 70 | 71 | // NethelpersBondXmitHashPolicy is a bond hash policy. 72 | enum NethelpersBondXmitHashPolicy { 73 | BOND_XMIT_POLICY_LAYER2 = 0; 74 | BOND_XMIT_POLICY_LAYER34 = 1; 75 | BOND_XMIT_POLICY_LAYER23 = 2; 76 | BOND_XMIT_POLICY_ENCAP23 = 3; 77 | BOND_XMIT_POLICY_ENCAP34 = 4; 78 | } 79 | 80 | // NethelpersConntrackState is a conntrack state. 81 | enum NethelpersConntrackState { 82 | NETHELPERS_CONNTRACKSTATE_UNSPECIFIED = 0; 83 | CONNTRACK_STATE_NEW = 8; 84 | CONNTRACK_STATE_RELATED = 4; 85 | CONNTRACK_STATE_ESTABLISHED = 2; 86 | CONNTRACK_STATE_INVALID = 1; 87 | } 88 | 89 | // NethelpersDuplex wraps ethtool.Duplex for YAML marshaling. 90 | enum NethelpersDuplex { 91 | HALF = 0; 92 | FULL = 1; 93 | UNKNOWN = 255; 94 | } 95 | 96 | // NethelpersFailOverMAC is a MAC failover mode. 97 | enum NethelpersFailOverMAC { 98 | FAIL_OVER_MAC_NONE = 0; 99 | FAIL_OVER_MAC_ACTIVE = 1; 100 | FAIL_OVER_MAC_FOLLOW = 2; 101 | } 102 | 103 | // NethelpersFamily is a network family. 104 | enum NethelpersFamily { 105 | NETHELPERS_FAMILY_UNSPECIFIED = 0; 106 | FAMILY_INET4 = 2; 107 | FAMILY_INET6 = 10; 108 | } 109 | 110 | // NethelpersLACPRate is a LACP rate. 111 | enum NethelpersLACPRate { 112 | LACP_RATE_SLOW = 0; 113 | LACP_RATE_FAST = 1; 114 | } 115 | 116 | // NethelpersLinkType is a link type. 117 | enum NethelpersLinkType { 118 | option allow_alias = true; 119 | LINK_NETROM = 0; 120 | LINK_ETHER = 1; 121 | LINK_EETHER = 2; 122 | LINK_AX25 = 3; 123 | LINK_PRONET = 4; 124 | LINK_CHAOS = 5; 125 | LINK_IEE802 = 6; 126 | LINK_ARCNET = 7; 127 | LINK_ATALK = 8; 128 | LINK_DLCI = 15; 129 | LINK_ATM = 19; 130 | LINK_METRICOM = 23; 131 | LINK_IEEE1394 = 24; 132 | LINK_EUI64 = 27; 133 | LINK_INFINIBAND = 32; 134 | LINK_SLIP = 256; 135 | LINK_CSLIP = 257; 136 | LINK_SLIP6 = 258; 137 | LINK_CSLIP6 = 259; 138 | LINK_RSRVD = 260; 139 | LINK_ADAPT = 264; 140 | LINK_ROSE = 270; 141 | LINK_X25 = 271; 142 | LINK_HWX25 = 272; 143 | LINK_CAN = 280; 144 | LINK_PPP = 512; 145 | LINK_CISCO = 513; 146 | LINK_HDLC = 513; 147 | LINK_LAPB = 516; 148 | LINK_DDCMP = 517; 149 | LINK_RAWHDLC = 518; 150 | LINK_TUNNEL = 768; 151 | LINK_TUNNEL6 = 769; 152 | LINK_FRAD = 770; 153 | LINK_SKIP = 771; 154 | LINK_LOOPBCK = 772; 155 | LINK_LOCALTLK = 773; 156 | LINK_FDDI = 774; 157 | LINK_BIF = 775; 158 | LINK_SIT = 776; 159 | LINK_IPDDP = 777; 160 | LINK_IPGRE = 778; 161 | LINK_PIMREG = 779; 162 | LINK_HIPPI = 780; 163 | LINK_ASH = 781; 164 | LINK_ECONET = 782; 165 | LINK_IRDA = 783; 166 | LINK_FCPP = 784; 167 | LINK_FCAL = 785; 168 | LINK_FCPL = 786; 169 | LINK_FCFABRIC = 787; 170 | LINK_FCFABRIC1 = 788; 171 | LINK_FCFABRIC2 = 789; 172 | LINK_FCFABRIC3 = 790; 173 | LINK_FCFABRIC4 = 791; 174 | LINK_FCFABRIC5 = 792; 175 | LINK_FCFABRIC6 = 793; 176 | LINK_FCFABRIC7 = 794; 177 | LINK_FCFABRIC8 = 795; 178 | LINK_FCFABRIC9 = 796; 179 | LINK_FCFABRIC10 = 797; 180 | LINK_FCFABRIC11 = 798; 181 | LINK_FCFABRIC12 = 799; 182 | LINK_IEE802TR = 800; 183 | LINK_IEE80211 = 801; 184 | LINK_IEE80211PRISM = 802; 185 | LINK_IEE80211_RADIOTAP = 803; 186 | LINK_IEE8021154 = 804; 187 | LINK_IEE8021154MONITOR = 805; 188 | LINK_PHONET = 820; 189 | LINK_PHONETPIPE = 821; 190 | LINK_CAIF = 822; 191 | LINK_IP6GRE = 823; 192 | LINK_NETLINK = 824; 193 | LINK6_LOWPAN = 825; 194 | LINK_VOID = 65535; 195 | LINK_NONE = 65534; 196 | } 197 | 198 | // NethelpersMatchOperator is a netfilter match operator. 199 | enum NethelpersMatchOperator { 200 | OPERATOR_EQUAL = 0; 201 | OPERATOR_NOT_EQUAL = 1; 202 | } 203 | 204 | // NethelpersNfTablesChainHook wraps nftables.ChainHook for YAML marshaling. 205 | enum NethelpersNfTablesChainHook { 206 | CHAIN_HOOK_PREROUTING = 0; 207 | CHAIN_HOOK_INPUT = 1; 208 | CHAIN_HOOK_FORWARD = 2; 209 | CHAIN_HOOK_OUTPUT = 3; 210 | CHAIN_HOOK_POSTROUTING = 4; 211 | } 212 | 213 | // NethelpersNfTablesChainPriority wraps nftables.ChainPriority for YAML marshaling. 214 | enum NethelpersNfTablesChainPriority { 215 | option allow_alias = true; 216 | NETHELPERS_NFTABLESCHAINPRIORITY_UNSPECIFIED = 0; 217 | CHAIN_PRIORITY_FIRST = -2147483648; 218 | CHAIN_PRIORITY_CONNTRACK_DEFRAG = -400; 219 | CHAIN_PRIORITY_RAW = -300; 220 | CHAIN_PRIORITY_SE_LINUX_FIRST = -225; 221 | CHAIN_PRIORITY_CONNTRACK = -200; 222 | CHAIN_PRIORITY_MANGLE = -150; 223 | CHAIN_PRIORITY_NAT_DEST = -100; 224 | CHAIN_PRIORITY_FILTER = 0; 225 | CHAIN_PRIORITY_SECURITY = 50; 226 | CHAIN_PRIORITY_NAT_SOURCE = 100; 227 | CHAIN_PRIORITY_SE_LINUX_LAST = 225; 228 | CHAIN_PRIORITY_CONNTRACK_HELPER = 300; 229 | CHAIN_PRIORITY_LAST = 2147483647; 230 | } 231 | 232 | // NethelpersNfTablesVerdict wraps nftables.Verdict for YAML marshaling. 233 | enum NethelpersNfTablesVerdict { 234 | VERDICT_DROP = 0; 235 | VERDICT_ACCEPT = 1; 236 | } 237 | 238 | // NethelpersOperationalState wraps rtnetlink.OperationalState for YAML marshaling. 239 | enum NethelpersOperationalState { 240 | OPER_STATE_UNKNOWN = 0; 241 | OPER_STATE_NOT_PRESENT = 1; 242 | OPER_STATE_DOWN = 2; 243 | OPER_STATE_LOWER_LAYER_DOWN = 3; 244 | OPER_STATE_TESTING = 4; 245 | OPER_STATE_DORMANT = 5; 246 | OPER_STATE_UP = 6; 247 | } 248 | 249 | // NethelpersPort wraps ethtool.Port for YAML marshaling. 250 | enum NethelpersPort { 251 | TWISTED_PAIR = 0; 252 | AUI = 1; 253 | MII = 2; 254 | FIBRE = 3; 255 | BNC = 4; 256 | DIRECT_ATTACH = 5; 257 | NONE = 239; 258 | OTHER = 255; 259 | } 260 | 261 | // NethelpersPrimaryReselect is an ARP targets mode. 262 | enum NethelpersPrimaryReselect { 263 | PRIMARY_RESELECT_ALWAYS = 0; 264 | PRIMARY_RESELECT_BETTER = 1; 265 | PRIMARY_RESELECT_FAILURE = 2; 266 | } 267 | 268 | // NethelpersProtocol is a inet protocol. 269 | enum NethelpersProtocol { 270 | NETHELPERS_PROTOCOL_UNSPECIFIED = 0; 271 | PROTOCOL_ICMP = 1; 272 | PROTOCOL_TCP = 6; 273 | PROTOCOL_UDP = 17; 274 | PROTOCOL_ICM_PV6 = 58; 275 | } 276 | 277 | // NethelpersRouteFlag wraps RTM_F_* constants. 278 | enum NethelpersRouteFlag { 279 | NETHELPERS_ROUTEFLAG_UNSPECIFIED = 0; 280 | ROUTE_NOTIFY = 256; 281 | ROUTE_CLONED = 512; 282 | ROUTE_EQUALIZE = 1024; 283 | ROUTE_PREFIX = 2048; 284 | ROUTE_LOOKUP_TABLE = 4096; 285 | ROUTE_FIB_MATCH = 8192; 286 | ROUTE_OFFLOAD = 16384; 287 | ROUTE_TRAP = 32768; 288 | } 289 | 290 | // NethelpersRouteProtocol is a routing protocol. 291 | enum NethelpersRouteProtocol { 292 | PROTOCOL_UNSPEC = 0; 293 | PROTOCOL_REDIRECT = 1; 294 | PROTOCOL_KERNEL = 2; 295 | PROTOCOL_BOOT = 3; 296 | PROTOCOL_STATIC = 4; 297 | PROTOCOL_RA = 9; 298 | PROTOCOL_MRT = 10; 299 | PROTOCOL_ZEBRA = 11; 300 | PROTOCOL_BIRD = 12; 301 | PROTOCOL_DNROUTED = 13; 302 | PROTOCOL_XORP = 14; 303 | PROTOCOL_NTK = 15; 304 | PROTOCOL_DHCP = 16; 305 | PROTOCOL_MRTD = 17; 306 | PROTOCOL_KEEPALIVED = 18; 307 | PROTOCOL_BABEL = 42; 308 | PROTOCOL_OPENR = 99; 309 | PROTOCOL_BGP = 186; 310 | PROTOCOL_ISIS = 187; 311 | PROTOCOL_OSPF = 188; 312 | PROTOCOL_RIP = 189; 313 | PROTOCOL_EIGRP = 192; 314 | } 315 | 316 | // NethelpersRouteType is a route type. 317 | enum NethelpersRouteType { 318 | TYPE_UNSPEC = 0; 319 | TYPE_UNICAST = 1; 320 | TYPE_LOCAL = 2; 321 | TYPE_BROADCAST = 3; 322 | TYPE_ANYCAST = 4; 323 | TYPE_MULTICAST = 5; 324 | TYPE_BLACKHOLE = 6; 325 | TYPE_UNREACHABLE = 7; 326 | TYPE_PROHIBIT = 8; 327 | TYPE_THROW = 9; 328 | TYPE_NAT = 10; 329 | TYPE_X_RESOLVE = 11; 330 | } 331 | 332 | // NethelpersRoutingTable is a routing table ID. 333 | enum NethelpersRoutingTable { 334 | TABLE_UNSPEC = 0; 335 | TABLE_DEFAULT = 253; 336 | TABLE_MAIN = 254; 337 | TABLE_LOCAL = 255; 338 | } 339 | 340 | // NethelpersScope is an address scope. 341 | enum NethelpersScope { 342 | SCOPE_GLOBAL = 0; 343 | SCOPE_SITE = 200; 344 | SCOPE_LINK = 253; 345 | SCOPE_HOST = 254; 346 | SCOPE_NOWHERE = 255; 347 | } 348 | 349 | // NethelpersVLANProtocol is a VLAN protocol. 350 | enum NethelpersVLANProtocol { 351 | NETHELPERS_VLANPROTOCOL_UNSPECIFIED = 0; 352 | VLAN_PROTOCOL8021_Q = 33024; 353 | VLAN_PROTOCOL8021_AD = 34984; 354 | } 355 | 356 | // KubespanPeerState is KubeSpan peer current state. 357 | enum KubespanPeerState { 358 | PEER_STATE_UNKNOWN = 0; 359 | PEER_STATE_UP = 1; 360 | PEER_STATE_DOWN = 2; 361 | } 362 | 363 | // NetworkConfigLayer describes network configuration layers, with lowest priority first. 364 | enum NetworkConfigLayer { 365 | CONFIG_DEFAULT = 0; 366 | CONFIG_CMDLINE = 1; 367 | CONFIG_PLATFORM = 2; 368 | CONFIG_OPERATOR = 3; 369 | CONFIG_MACHINE_CONFIGURATION = 4; 370 | } 371 | 372 | // NetworkOperator enumerates Talos network operators. 373 | enum NetworkOperator { 374 | OPERATOR_DHCP4 = 0; 375 | OPERATOR_DHCP6 = 1; 376 | OPERATOR_VIP = 2; 377 | } 378 | 379 | // RuntimeMachineStage describes the stage of the machine boot/run process. 380 | enum RuntimeMachineStage { 381 | MACHINE_STAGE_UNKNOWN = 0; 382 | MACHINE_STAGE_BOOTING = 1; 383 | MACHINE_STAGE_INSTALLING = 2; 384 | MACHINE_STAGE_MAINTENANCE = 3; 385 | MACHINE_STAGE_RUNNING = 4; 386 | MACHINE_STAGE_REBOOTING = 5; 387 | MACHINE_STAGE_SHUTTING_DOWN = 6; 388 | MACHINE_STAGE_RESETTING = 7; 389 | MACHINE_STAGE_UPGRADING = 8; 390 | } 391 | 392 | -------------------------------------------------------------------------------- /protos/resource/definitions/etcd/etcd.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.etcd; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/etcd"; 6 | 7 | import "common/common.proto"; 8 | 9 | // ConfigSpec describes (some) configuration settings of etcd. 10 | message ConfigSpec { 11 | repeated string advertise_valid_subnets = 1; 12 | repeated string advertise_exclude_subnets = 2; 13 | string image = 3; 14 | map extra_args = 4; 15 | repeated string listen_valid_subnets = 5; 16 | repeated string listen_exclude_subnets = 6; 17 | } 18 | 19 | // MemberSpec holds information about an etcd member. 20 | message MemberSpec { 21 | string member_id = 1; 22 | } 23 | 24 | // PKIStatusSpec describes status of rendered secrets. 25 | message PKIStatusSpec { 26 | bool ready = 1; 27 | string version = 2; 28 | } 29 | 30 | // SpecSpec describes (some) Specuration settings of etcd. 31 | message SpecSpec { 32 | string name = 1; 33 | repeated common.NetIP advertised_addresses = 2; 34 | string image = 3; 35 | map extra_args = 4; 36 | repeated common.NetIP listen_peer_addresses = 5; 37 | repeated common.NetIP listen_client_addresses = 6; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /protos/resource/definitions/extensions/extensions.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.extensions; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/extensions"; 6 | 7 | // Compatibility describes extension compatibility. 8 | message Compatibility { 9 | Constraint talos = 1; 10 | } 11 | 12 | // Constraint describes compatibility constraint. 13 | message Constraint { 14 | string version = 1; 15 | } 16 | 17 | // Layer defines overlay mount layer. 18 | message Layer { 19 | string image = 1; 20 | Metadata metadata = 2; 21 | } 22 | 23 | // Metadata describes base extension metadata. 24 | message Metadata { 25 | string name = 1; 26 | string version = 2; 27 | string author = 3; 28 | string description = 4; 29 | Compatibility compatibility = 5; 30 | } 31 | 32 | -------------------------------------------------------------------------------- /protos/resource/definitions/files/files.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.files; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/files"; 6 | 7 | // EtcFileSpecSpec describes status of rendered secrets. 8 | message EtcFileSpecSpec { 9 | bytes contents = 1; 10 | uint32 mode = 2; 11 | } 12 | 13 | // EtcFileStatusSpec describes status of rendered secrets. 14 | message EtcFileStatusSpec { 15 | string spec_version = 1; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /protos/resource/definitions/hardware/hardware.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.hardware; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/hardware"; 6 | 7 | // MemoryModuleSpec represents a single Memory. 8 | message MemoryModuleSpec { 9 | uint32 size = 1; 10 | string device_locator = 2; 11 | string bank_locator = 3; 12 | uint32 speed = 4; 13 | string manufacturer = 5; 14 | string serial_number = 6; 15 | string asset_tag = 7; 16 | string product_name = 8; 17 | } 18 | 19 | // ProcessorSpec represents a single processor. 20 | message ProcessorSpec { 21 | string socket = 1; 22 | string manufacturer = 2; 23 | string product_name = 3; 24 | uint32 max_speed = 4; 25 | uint32 boot_speed = 5; 26 | uint32 status = 6; 27 | string serial_number = 7; 28 | string asset_tag = 8; 29 | string part_number = 9; 30 | uint32 core_count = 10; 31 | uint32 core_enabled = 11; 32 | uint32 thread_count = 12; 33 | } 34 | 35 | // SystemInformationSpec represents the system information obtained from smbios. 36 | message SystemInformationSpec { 37 | string manufacturer = 1; 38 | string product_name = 2; 39 | string version = 3; 40 | string serial_number = 4; 41 | string uuid = 5; 42 | string wake_up_type = 6; 43 | string sku_number = 7; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /protos/resource/definitions/k8s/k8s.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.k8s; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/k8s"; 6 | 7 | import "common/common.proto"; 8 | import "google/protobuf/struct.proto"; 9 | import "resource/definitions/proto/proto.proto"; 10 | 11 | // APIServerConfigSpec is configuration for kube-apiserver. 12 | message APIServerConfigSpec { 13 | string image = 1; 14 | string cloud_provider = 2; 15 | string control_plane_endpoint = 3; 16 | repeated string etcd_servers = 4; 17 | int64 local_port = 5; 18 | repeated string service_cid_rs = 6; 19 | map extra_args = 7; 20 | repeated ExtraVolume extra_volumes = 8; 21 | map environment_variables = 9; 22 | bool pod_security_policy_enabled = 10; 23 | string advertised_address = 11; 24 | Resources resources = 12; 25 | } 26 | 27 | // AdmissionControlConfigSpec is configuration for kube-apiserver. 28 | message AdmissionControlConfigSpec { 29 | repeated AdmissionPluginSpec config = 1; 30 | } 31 | 32 | // AdmissionPluginSpec is a single admission plugin configuration Admission Control plugins. 33 | message AdmissionPluginSpec { 34 | string name = 1; 35 | google.protobuf.Struct configuration = 2; 36 | } 37 | 38 | // AuditPolicyConfigSpec is audit policy configuration for kube-apiserver. 39 | message AuditPolicyConfigSpec { 40 | google.protobuf.Struct config = 1; 41 | } 42 | 43 | // BootstrapManifestsConfigSpec is configuration for bootstrap manifests. 44 | message BootstrapManifestsConfigSpec { 45 | string server = 1; 46 | string cluster_domain = 2; 47 | repeated string pod_cid_rs = 3; 48 | bool proxy_enabled = 4; 49 | string proxy_image = 5; 50 | repeated string proxy_args = 6; 51 | bool core_dns_enabled = 7; 52 | string core_dns_image = 8; 53 | string dns_service_ip = 9; 54 | string dns_service_i_pv6 = 10; 55 | bool flannel_enabled = 11; 56 | string flannel_image = 12; 57 | string flannel_cni_image = 13; 58 | bool pod_security_policy_enabled = 14; 59 | bool talos_api_service_enabled = 15; 60 | repeated string flannel_extra_args = 16; 61 | } 62 | 63 | // ConfigStatusSpec describes status of rendered secrets. 64 | message ConfigStatusSpec { 65 | bool ready = 1; 66 | string version = 2; 67 | } 68 | 69 | // ControllerManagerConfigSpec is configuration for kube-controller-manager. 70 | message ControllerManagerConfigSpec { 71 | bool enabled = 1; 72 | string image = 2; 73 | string cloud_provider = 3; 74 | repeated string pod_cid_rs = 4; 75 | repeated string service_cid_rs = 5; 76 | map extra_args = 6; 77 | repeated ExtraVolume extra_volumes = 7; 78 | map environment_variables = 8; 79 | Resources resources = 9; 80 | } 81 | 82 | // EndpointSpec describes status of rendered secrets. 83 | message EndpointSpec { 84 | repeated common.NetIP addresses = 1; 85 | } 86 | 87 | // ExtraManifest defines a single extra manifest to download. 88 | message ExtraManifest { 89 | string name = 1; 90 | string url = 2; 91 | string priority = 3; 92 | map extra_headers = 4; 93 | string inline_manifest = 5; 94 | } 95 | 96 | // ExtraManifestsConfigSpec is configuration for extra bootstrap manifests. 97 | message ExtraManifestsConfigSpec { 98 | repeated ExtraManifest extra_manifests = 1; 99 | } 100 | 101 | // ExtraVolume is a configuration of extra volume. 102 | message ExtraVolume { 103 | string name = 1; 104 | string host_path = 2; 105 | string mount_path = 3; 106 | bool read_only = 4; 107 | } 108 | 109 | // KubePrismConfigSpec describes KubePrismConfig data. 110 | message KubePrismConfigSpec { 111 | string host = 1; 112 | int64 port = 2; 113 | repeated KubePrismEndpoint endpoints = 3; 114 | } 115 | 116 | // KubePrismEndpoint holds data for control plane endpoint. 117 | message KubePrismEndpoint { 118 | string host = 1; 119 | uint32 port = 2; 120 | } 121 | 122 | // KubePrismEndpointsSpec describes KubePrismEndpoints configuration. 123 | message KubePrismEndpointsSpec { 124 | repeated KubePrismEndpoint endpoints = 1; 125 | } 126 | 127 | // KubePrismStatusesSpec describes KubePrismStatuses data. 128 | message KubePrismStatusesSpec { 129 | string host = 1; 130 | bool healthy = 2; 131 | } 132 | 133 | // KubeletConfigSpec holds the source of kubelet configuration. 134 | message KubeletConfigSpec { 135 | string image = 1; 136 | repeated string cluster_dns = 2; 137 | string cluster_domain = 3; 138 | map extra_args = 4; 139 | repeated talos.resource.definitions.proto.Mount extra_mounts = 5; 140 | google.protobuf.Struct extra_config = 6; 141 | bool cloud_provider_external = 7; 142 | bool default_runtime_seccomp_enabled = 8; 143 | bool skip_node_registration = 9; 144 | string static_pod_list_url = 10; 145 | bool disable_manifests_directory = 11; 146 | bool enable_fs_quota_monitoring = 12; 147 | google.protobuf.Struct credential_provider_config = 13; 148 | } 149 | 150 | // KubeletSpecSpec holds the source of kubelet configuration. 151 | message KubeletSpecSpec { 152 | string image = 1; 153 | repeated string args = 2; 154 | repeated talos.resource.definitions.proto.Mount extra_mounts = 3; 155 | string expected_nodename = 4; 156 | google.protobuf.Struct config = 5; 157 | google.protobuf.Struct credential_provider_config = 6; 158 | } 159 | 160 | // ManifestSpec holds the Kubernetes resources spec. 161 | message ManifestSpec { 162 | repeated SingleManifest items = 1; 163 | } 164 | 165 | // ManifestStatusSpec describes manifest application status. 166 | message ManifestStatusSpec { 167 | repeated string manifests_applied = 1; 168 | } 169 | 170 | // NodeIPConfigSpec holds the Node IP specification. 171 | message NodeIPConfigSpec { 172 | repeated string valid_subnets = 1; 173 | repeated string exclude_subnets = 2; 174 | } 175 | 176 | // NodeIPSpec holds the Node IP specification. 177 | message NodeIPSpec { 178 | repeated common.NetIP addresses = 1; 179 | } 180 | 181 | // NodeLabelSpecSpec represents a label that's attached to a Talos node. 182 | message NodeLabelSpecSpec { 183 | string key = 1; 184 | string value = 2; 185 | } 186 | 187 | // NodeStatusSpec describes Kubernetes NodeStatus. 188 | message NodeStatusSpec { 189 | string nodename = 1; 190 | bool node_ready = 2; 191 | bool unschedulable = 3; 192 | map labels = 4; 193 | map annotations = 5; 194 | } 195 | 196 | // NodeTaintSpecSpec represents a label that's attached to a Talos node. 197 | message NodeTaintSpecSpec { 198 | string key = 1; 199 | string effect = 2; 200 | string value = 3; 201 | } 202 | 203 | // NodenameSpec describes Kubernetes nodename. 204 | message NodenameSpec { 205 | string nodename = 1; 206 | string hostname_version = 2; 207 | bool skip_node_registration = 3; 208 | } 209 | 210 | // Resources is a configuration of cpu and memory resources. 211 | message Resources { 212 | map requests = 1; 213 | map limits = 2; 214 | } 215 | 216 | // SchedulerConfigSpec is configuration for kube-scheduler. 217 | message SchedulerConfigSpec { 218 | bool enabled = 1; 219 | string image = 2; 220 | map extra_args = 3; 221 | repeated ExtraVolume extra_volumes = 4; 222 | map environment_variables = 5; 223 | Resources resources = 6; 224 | google.protobuf.Struct config = 7; 225 | } 226 | 227 | // SecretsStatusSpec describes status of rendered secrets. 228 | message SecretsStatusSpec { 229 | bool ready = 1; 230 | string version = 2; 231 | } 232 | 233 | // SingleManifest is a single manifest. 234 | message SingleManifest { 235 | google.protobuf.Struct object = 1; 236 | } 237 | 238 | // StaticPodServerStatusSpec describes static pod spec, it contains marshaled *v1.Pod spec. 239 | message StaticPodServerStatusSpec { 240 | string url = 1; 241 | } 242 | 243 | // StaticPodSpec describes static pod spec, it contains marshaled *v1.Pod spec. 244 | message StaticPodSpec { 245 | google.protobuf.Struct pod = 1; 246 | } 247 | 248 | // StaticPodStatusSpec describes kubelet static pod status. 249 | message StaticPodStatusSpec { 250 | google.protobuf.Struct pod_status = 1; 251 | } 252 | 253 | -------------------------------------------------------------------------------- /protos/resource/definitions/kubeaccess/kubeaccess.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.kubeaccess; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/kubeaccess"; 6 | 7 | // ConfigSpec describes KubeSpan configuration.. 8 | message ConfigSpec { 9 | bool enabled = 1; 10 | repeated string allowed_api_roles = 2; 11 | repeated string allowed_kubernetes_namespaces = 3; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /protos/resource/definitions/kubespan/kubespan.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.kubespan; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/kubespan"; 6 | 7 | import "common/common.proto"; 8 | import "google/protobuf/timestamp.proto"; 9 | import "resource/definitions/enums/enums.proto"; 10 | 11 | // ConfigSpec describes KubeSpan configuration.. 12 | message ConfigSpec { 13 | bool enabled = 1; 14 | string cluster_id = 2; 15 | string shared_secret = 3; 16 | bool force_routing = 4; 17 | bool advertise_kubernetes_networks = 5; 18 | uint32 mtu = 6; 19 | repeated string endpoint_filters = 7; 20 | bool harvest_extra_endpoints = 8; 21 | } 22 | 23 | // EndpointSpec describes Endpoint state. 24 | message EndpointSpec { 25 | string affiliate_id = 1; 26 | common.NetIPPort endpoint = 2; 27 | } 28 | 29 | // IdentitySpec describes KubeSpan keys and address. 30 | // 31 | // Note: IdentitySpec is persisted on disk in the STATE partition, 32 | // so YAML serialization should be kept backwards compatible. 33 | message IdentitySpec { 34 | common.NetIPPrefix address = 1; 35 | common.NetIPPrefix subnet = 2; 36 | string private_key = 3; 37 | string public_key = 4; 38 | } 39 | 40 | // PeerSpecSpec describes PeerSpec state. 41 | message PeerSpecSpec { 42 | common.NetIP address = 1; 43 | repeated common.NetIPPrefix allowed_ips = 2; 44 | repeated common.NetIPPort endpoints = 3; 45 | string label = 4; 46 | } 47 | 48 | // PeerStatusSpec describes PeerStatus state. 49 | message PeerStatusSpec { 50 | common.NetIPPort endpoint = 1; 51 | string label = 2; 52 | talos.resource.definitions.enums.KubespanPeerState state = 3; 53 | int64 receive_bytes = 4; 54 | int64 transmit_bytes = 5; 55 | google.protobuf.Timestamp last_handshake_time = 6; 56 | common.NetIPPort last_used_endpoint = 7; 57 | google.protobuf.Timestamp last_endpoint_change = 8; 58 | } 59 | 60 | -------------------------------------------------------------------------------- /protos/resource/definitions/network/network.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.network; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/network"; 6 | 7 | import "common/common.proto"; 8 | import "google/protobuf/duration.proto"; 9 | import "resource/definitions/enums/enums.proto"; 10 | 11 | // AddressSpecSpec describes status of rendered secrets. 12 | message AddressSpecSpec { 13 | common.NetIPPrefix address = 1; 14 | string link_name = 2; 15 | talos.resource.definitions.enums.NethelpersFamily family = 3; 16 | talos.resource.definitions.enums.NethelpersScope scope = 4; 17 | uint32 flags = 5; 18 | bool announce_with_arp = 6; 19 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 7; 20 | } 21 | 22 | // AddressStatusSpec describes status of rendered secrets. 23 | message AddressStatusSpec { 24 | common.NetIPPrefix address = 1; 25 | common.NetIP local = 2; 26 | common.NetIP broadcast = 3; 27 | common.NetIP anycast = 4; 28 | common.NetIP multicast = 5; 29 | uint32 link_index = 6; 30 | string link_name = 7; 31 | talos.resource.definitions.enums.NethelpersFamily family = 8; 32 | talos.resource.definitions.enums.NethelpersScope scope = 9; 33 | uint32 flags = 10; 34 | } 35 | 36 | // BondMasterSpec describes bond settings if Kind == "bond". 37 | message BondMasterSpec { 38 | talos.resource.definitions.enums.NethelpersBondMode mode = 1; 39 | talos.resource.definitions.enums.NethelpersBondXmitHashPolicy hash_policy = 2; 40 | talos.resource.definitions.enums.NethelpersLACPRate lacp_rate = 3; 41 | talos.resource.definitions.enums.NethelpersARPValidate arp_validate = 4; 42 | talos.resource.definitions.enums.NethelpersARPAllTargets arp_all_targets = 5; 43 | uint32 primary_index = 6; 44 | talos.resource.definitions.enums.NethelpersPrimaryReselect primary_reselect = 7; 45 | talos.resource.definitions.enums.NethelpersFailOverMAC fail_over_mac = 8; 46 | talos.resource.definitions.enums.NethelpersADSelect ad_select = 9; 47 | uint32 mii_mon = 10; 48 | uint32 up_delay = 11; 49 | uint32 down_delay = 12; 50 | uint32 arp_interval = 13; 51 | uint32 resend_igmp = 14; 52 | uint32 min_links = 15; 53 | uint32 lp_interval = 16; 54 | uint32 packets_per_slave = 17; 55 | fixed32 num_peer_notif = 18; 56 | fixed32 tlb_dynamic_lb = 19; 57 | fixed32 all_slaves_active = 20; 58 | bool use_carrier = 21; 59 | fixed32 ad_actor_sys_prio = 22; 60 | fixed32 ad_user_port_key = 23; 61 | uint32 peer_notify_delay = 24; 62 | } 63 | 64 | // BondSlave contains a bond's master name and slave index. 65 | message BondSlave { 66 | string master_name = 1; 67 | int64 slave_index = 2; 68 | } 69 | 70 | // BridgeMasterSpec describes bridge settings if Kind == "bridge". 71 | message BridgeMasterSpec { 72 | STPSpec stp = 1; 73 | } 74 | 75 | // BridgeSlave contains a bond's master name and slave index. 76 | message BridgeSlave { 77 | string master_name = 1; 78 | } 79 | 80 | // DHCP4OperatorSpec describes DHCP4 operator options. 81 | message DHCP4OperatorSpec { 82 | uint32 route_metric = 1; 83 | bool skip_hostname_request = 2; 84 | } 85 | 86 | // DHCP6OperatorSpec describes DHCP6 operator options. 87 | message DHCP6OperatorSpec { 88 | string duid = 1; 89 | uint32 route_metric = 2; 90 | bool skip_hostname_request = 3; 91 | } 92 | 93 | // HardwareAddrSpec describes spec for the link. 94 | message HardwareAddrSpec { 95 | string name = 1; 96 | bytes hardware_addr = 2; 97 | } 98 | 99 | // HostnameSpecSpec describes node hostname. 100 | message HostnameSpecSpec { 101 | string hostname = 1; 102 | string domainname = 2; 103 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 3; 104 | } 105 | 106 | // HostnameStatusSpec describes node hostname. 107 | message HostnameStatusSpec { 108 | string hostname = 1; 109 | string domainname = 2; 110 | } 111 | 112 | // LinkRefreshSpec describes status of rendered secrets. 113 | message LinkRefreshSpec { 114 | int64 generation = 1; 115 | } 116 | 117 | // LinkSpecSpec describes spec for the link. 118 | message LinkSpecSpec { 119 | string name = 1; 120 | bool logical = 2; 121 | bool up = 3; 122 | uint32 mtu = 4; 123 | string kind = 5; 124 | talos.resource.definitions.enums.NethelpersLinkType type = 6; 125 | string parent_name = 7; 126 | BondSlave bond_slave = 8; 127 | BridgeSlave bridge_slave = 9; 128 | VLANSpec vlan = 10; 129 | BondMasterSpec bond_master = 11; 130 | BridgeMasterSpec bridge_master = 12; 131 | WireguardSpec wireguard = 13; 132 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 14; 133 | } 134 | 135 | // LinkStatusSpec describes status of rendered secrets. 136 | message LinkStatusSpec { 137 | uint32 index = 1; 138 | talos.resource.definitions.enums.NethelpersLinkType type = 2; 139 | uint32 link_index = 3; 140 | uint32 flags = 4; 141 | bytes hardware_addr = 5; 142 | bytes broadcast_addr = 6; 143 | uint32 mtu = 7; 144 | string queue_disc = 8; 145 | uint32 master_index = 9; 146 | talos.resource.definitions.enums.NethelpersOperationalState operational_state = 10; 147 | string kind = 11; 148 | string slave_kind = 12; 149 | string bus_path = 13; 150 | string pciid = 14; 151 | string driver = 15; 152 | string driver_version = 16; 153 | string firmware_version = 17; 154 | string product_id = 18; 155 | string vendor_id = 19; 156 | string product = 20; 157 | string vendor = 21; 158 | bool link_state = 22; 159 | int64 speed_megabits = 23; 160 | talos.resource.definitions.enums.NethelpersPort port = 24; 161 | talos.resource.definitions.enums.NethelpersDuplex duplex = 25; 162 | VLANSpec vlan = 26; 163 | BridgeMasterSpec bridge_master = 27; 164 | BondMasterSpec bond_master = 28; 165 | WireguardSpec wireguard = 29; 166 | bytes permanent_addr = 30; 167 | } 168 | 169 | // NfTablesAddressMatch describes the match on the IP address. 170 | message NfTablesAddressMatch { 171 | repeated common.NetIPPrefix include_subnets = 1; 172 | repeated common.NetIPPrefix exclude_subnets = 2; 173 | bool invert = 3; 174 | } 175 | 176 | // NfTablesChainSpec describes status of rendered secrets. 177 | message NfTablesChainSpec { 178 | string type = 1; 179 | talos.resource.definitions.enums.NethelpersNfTablesChainHook hook = 2; 180 | talos.resource.definitions.enums.NethelpersNfTablesChainPriority priority = 3; 181 | repeated NfTablesRule rules = 4; 182 | talos.resource.definitions.enums.NethelpersNfTablesVerdict policy = 5; 183 | } 184 | 185 | // NfTablesClampMSS describes the TCP MSS clamping operation. 186 | // 187 | // MSS is limited by the `MaxMTU` so that: 188 | // - IPv4: MSS = MaxMTU - 40 189 | // - IPv6: MSS = MaxMTU - 60. 190 | message NfTablesClampMSS { 191 | fixed32 mtu = 1; 192 | } 193 | 194 | // NfTablesConntrackStateMatch describes the match on the connection tracking state. 195 | message NfTablesConntrackStateMatch { 196 | repeated talos.resource.definitions.enums.NethelpersConntrackState states = 1; 197 | } 198 | 199 | // NfTablesIfNameMatch describes the match on the interface name. 200 | message NfTablesIfNameMatch { 201 | talos.resource.definitions.enums.NethelpersMatchOperator operator = 2; 202 | repeated string interface_names = 3; 203 | } 204 | 205 | // NfTablesLayer4Match describes the match on the transport layer protocol. 206 | message NfTablesLayer4Match { 207 | talos.resource.definitions.enums.NethelpersProtocol protocol = 1; 208 | NfTablesPortMatch match_source_port = 2; 209 | NfTablesPortMatch match_destination_port = 3; 210 | } 211 | 212 | // NfTablesLimitMatch describes the match on the packet rate. 213 | message NfTablesLimitMatch { 214 | uint64 packet_rate_per_second = 1; 215 | } 216 | 217 | // NfTablesMark encodes packet mark match/update operation. 218 | // 219 | // When used as a match computes the following condition: 220 | // (mark & mask) ^ xor == value 221 | // 222 | // When used as an update computes the following operation: 223 | // mark = (mark & mask) ^ xor. 224 | message NfTablesMark { 225 | uint32 mask = 1; 226 | uint32 xor = 2; 227 | uint32 value = 3; 228 | } 229 | 230 | // NfTablesPortMatch describes the match on the transport layer port. 231 | message NfTablesPortMatch { 232 | repeated PortRange ranges = 1; 233 | } 234 | 235 | // NfTablesRule describes a single rule in the nftables chain. 236 | message NfTablesRule { 237 | NfTablesIfNameMatch match_o_if_name = 1; 238 | talos.resource.definitions.enums.NethelpersNfTablesVerdict verdict = 2; 239 | NfTablesMark match_mark = 3; 240 | NfTablesMark set_mark = 4; 241 | NfTablesAddressMatch match_source_address = 5; 242 | NfTablesAddressMatch match_destination_address = 6; 243 | NfTablesLayer4Match match_layer4 = 7; 244 | NfTablesIfNameMatch match_i_if_name = 8; 245 | NfTablesClampMSS clamp_mss = 9; 246 | NfTablesLimitMatch match_limit = 10; 247 | NfTablesConntrackStateMatch match_conntrack_state = 11; 248 | bool anon_counter = 12; 249 | } 250 | 251 | // NodeAddressFilterSpec describes a filter for NodeAddresses. 252 | message NodeAddressFilterSpec { 253 | repeated common.NetIPPrefix include_subnets = 1; 254 | repeated common.NetIPPrefix exclude_subnets = 2; 255 | } 256 | 257 | // NodeAddressSpec describes a set of node addresses. 258 | message NodeAddressSpec { 259 | repeated common.NetIPPrefix addresses = 1; 260 | } 261 | 262 | // OperatorSpecSpec describes DNS resolvers. 263 | message OperatorSpecSpec { 264 | talos.resource.definitions.enums.NetworkOperator operator = 1; 265 | string link_name = 2; 266 | bool require_up = 3; 267 | DHCP4OperatorSpec dhcp4 = 4; 268 | DHCP6OperatorSpec dhcp6 = 5; 269 | VIPOperatorSpec vip = 6; 270 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 7; 271 | } 272 | 273 | // PortRange describes a range of ports. 274 | // 275 | // Range is [lo, hi]. 276 | message PortRange { 277 | fixed32 lo = 1; 278 | fixed32 hi = 2; 279 | } 280 | 281 | // ProbeSpecSpec describes the Probe. 282 | message ProbeSpecSpec { 283 | google.protobuf.Duration interval = 1; 284 | int64 failure_threshold = 2; 285 | TCPProbeSpec tcp = 3; 286 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 4; 287 | } 288 | 289 | // ProbeStatusSpec describes the Probe. 290 | message ProbeStatusSpec { 291 | bool success = 1; 292 | string last_error = 2; 293 | } 294 | 295 | // ResolverSpecSpec describes DNS resolvers. 296 | message ResolverSpecSpec { 297 | repeated common.NetIP dns_servers = 1; 298 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 2; 299 | } 300 | 301 | // ResolverStatusSpec describes DNS resolvers. 302 | message ResolverStatusSpec { 303 | repeated common.NetIP dns_servers = 1; 304 | } 305 | 306 | // RouteSpecSpec describes the route. 307 | message RouteSpecSpec { 308 | talos.resource.definitions.enums.NethelpersFamily family = 1; 309 | common.NetIPPrefix destination = 2; 310 | common.NetIP source = 3; 311 | common.NetIP gateway = 4; 312 | string out_link_name = 5; 313 | talos.resource.definitions.enums.NethelpersRoutingTable table = 6; 314 | uint32 priority = 7; 315 | talos.resource.definitions.enums.NethelpersScope scope = 8; 316 | talos.resource.definitions.enums.NethelpersRouteType type = 9; 317 | uint32 flags = 10; 318 | talos.resource.definitions.enums.NethelpersRouteProtocol protocol = 11; 319 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 12; 320 | uint32 mtu = 13; 321 | } 322 | 323 | // RouteStatusSpec describes status of rendered secrets. 324 | message RouteStatusSpec { 325 | talos.resource.definitions.enums.NethelpersFamily family = 1; 326 | common.NetIPPrefix destination = 2; 327 | common.NetIP source = 3; 328 | common.NetIP gateway = 4; 329 | uint32 out_link_index = 5; 330 | string out_link_name = 6; 331 | talos.resource.definitions.enums.NethelpersRoutingTable table = 7; 332 | uint32 priority = 8; 333 | talos.resource.definitions.enums.NethelpersScope scope = 9; 334 | talos.resource.definitions.enums.NethelpersRouteType type = 10; 335 | uint32 flags = 11; 336 | talos.resource.definitions.enums.NethelpersRouteProtocol protocol = 12; 337 | uint32 mtu = 13; 338 | } 339 | 340 | // STPSpec describes Spanning Tree Protocol (STP) settings of a bridge. 341 | message STPSpec { 342 | bool enabled = 1; 343 | } 344 | 345 | // StatusSpec describes network state. 346 | message StatusSpec { 347 | bool address_ready = 1; 348 | bool connectivity_ready = 2; 349 | bool hostname_ready = 3; 350 | bool etc_files_ready = 4; 351 | } 352 | 353 | // TCPProbeSpec describes the TCP Probe. 354 | message TCPProbeSpec { 355 | string endpoint = 1; 356 | google.protobuf.Duration timeout = 2; 357 | } 358 | 359 | // TimeServerSpecSpec describes NTP servers. 360 | message TimeServerSpecSpec { 361 | repeated string ntp_servers = 1; 362 | talos.resource.definitions.enums.NetworkConfigLayer config_layer = 2; 363 | } 364 | 365 | // TimeServerStatusSpec describes NTP servers. 366 | message TimeServerStatusSpec { 367 | repeated string ntp_servers = 1; 368 | } 369 | 370 | // VIPEquinixMetalSpec describes virtual (elastic) IP settings for Equinix Metal. 371 | message VIPEquinixMetalSpec { 372 | string project_id = 1; 373 | string device_id = 2; 374 | string api_token = 3; 375 | } 376 | 377 | // VIPHCloudSpec describes virtual (elastic) IP settings for Hetzner Cloud. 378 | message VIPHCloudSpec { 379 | int64 device_id = 1; 380 | int64 network_id = 2; 381 | string api_token = 3; 382 | } 383 | 384 | // VIPOperatorSpec describes virtual IP operator options. 385 | message VIPOperatorSpec { 386 | common.NetIP ip = 1; 387 | bool gratuitous_arp = 2; 388 | VIPEquinixMetalSpec equinix_metal = 3; 389 | VIPHCloudSpec h_cloud = 4; 390 | } 391 | 392 | // VLANSpec describes VLAN settings if Kind == "vlan". 393 | message VLANSpec { 394 | fixed32 vid = 1; 395 | talos.resource.definitions.enums.NethelpersVLANProtocol protocol = 2; 396 | } 397 | 398 | // WireguardPeer describes a single peer. 399 | message WireguardPeer { 400 | string public_key = 1; 401 | string preshared_key = 2; 402 | string endpoint = 3; 403 | google.protobuf.Duration persistent_keepalive_interval = 4; 404 | repeated common.NetIPPrefix allowed_ips = 5; 405 | } 406 | 407 | // WireguardSpec describes Wireguard settings if Kind == "wireguard". 408 | message WireguardSpec { 409 | string private_key = 1; 410 | string public_key = 2; 411 | int64 listen_port = 3; 412 | int64 firewall_mark = 4; 413 | repeated WireguardPeer peers = 5; 414 | } 415 | 416 | -------------------------------------------------------------------------------- /protos/resource/definitions/perf/perf.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.perf; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/perf"; 6 | 7 | // CPUSpec represents the last CPU stats snapshot. 8 | message CPUSpec { 9 | repeated CPUStat cpu = 1; 10 | CPUStat cpu_total = 2; 11 | uint64 irq_total = 3; 12 | uint64 context_switches = 4; 13 | uint64 process_created = 5; 14 | uint64 process_running = 6; 15 | uint64 process_blocked = 7; 16 | uint64 soft_irq_total = 8; 17 | } 18 | 19 | // CPUStat represents a single cpu stat. 20 | message CPUStat { 21 | double user = 1; 22 | double nice = 2; 23 | double system = 3; 24 | double idle = 4; 25 | double iowait = 5; 26 | double irq = 6; 27 | double soft_irq = 7; 28 | double steal = 8; 29 | double guest = 9; 30 | double guest_nice = 10; 31 | } 32 | 33 | // MemorySpec represents the last Memory stats snapshot. 34 | message MemorySpec { 35 | uint64 mem_total = 1; 36 | uint64 mem_used = 2; 37 | uint64 mem_available = 3; 38 | uint64 buffers = 4; 39 | uint64 cached = 5; 40 | uint64 swap_cached = 6; 41 | uint64 active = 7; 42 | uint64 inactive = 8; 43 | uint64 active_anon = 9; 44 | uint64 inactive_anon = 10; 45 | uint64 active_file = 11; 46 | uint64 inactive_file = 12; 47 | uint64 unevictable = 13; 48 | uint64 mlocked = 14; 49 | uint64 swap_total = 15; 50 | uint64 swap_free = 16; 51 | uint64 dirty = 17; 52 | uint64 writeback = 18; 53 | uint64 anon_pages = 19; 54 | uint64 mapped = 20; 55 | uint64 shmem = 21; 56 | uint64 slab = 22; 57 | uint64 s_reclaimable = 23; 58 | uint64 s_unreclaim = 24; 59 | uint64 kernel_stack = 25; 60 | uint64 page_tables = 26; 61 | uint64 nf_sunstable = 27; 62 | uint64 bounce = 28; 63 | uint64 writeback_tmp = 29; 64 | uint64 commit_limit = 30; 65 | uint64 committed_as = 31; 66 | uint64 vmalloc_total = 32; 67 | uint64 vmalloc_used = 33; 68 | uint64 vmalloc_chunk = 34; 69 | uint64 hardware_corrupted = 35; 70 | uint64 anon_huge_pages = 36; 71 | uint64 shmem_huge_pages = 37; 72 | uint64 shmem_pmd_mapped = 38; 73 | uint64 cma_total = 39; 74 | uint64 cma_free = 40; 75 | uint64 huge_pages_total = 41; 76 | uint64 huge_pages_free = 42; 77 | uint64 huge_pages_rsvd = 43; 78 | uint64 huge_pages_surp = 44; 79 | uint64 hugepagesize = 45; 80 | uint64 direct_map4k = 46; 81 | uint64 direct_map2m = 47; 82 | uint64 direct_map1g = 48; 83 | } 84 | 85 | -------------------------------------------------------------------------------- /protos/resource/definitions/proto/proto.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.proto; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/proto"; 6 | 7 | // LinuxIDMapping specifies UID/GID mappings. 8 | message LinuxIDMapping { 9 | uint32 container_id = 1; 10 | uint32 host_id = 2; 11 | uint32 size = 3; 12 | } 13 | 14 | // Mount specifies a mount for a container. 15 | message Mount { 16 | string destination = 1; 17 | string type = 2; 18 | string source = 3; 19 | repeated string options = 4; 20 | repeated LinuxIDMapping uid_mappings = 5; 21 | repeated LinuxIDMapping gid_mappings = 6; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /protos/resource/definitions/runtime/runtime.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.runtime; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/runtime"; 6 | 7 | import "common/common.proto"; 8 | import "resource/definitions/enums/enums.proto"; 9 | 10 | // DevicesStatusSpec is the spec for devices status. 11 | message DevicesStatusSpec { 12 | bool ready = 1; 13 | } 14 | 15 | // EventSinkConfigSpec describes configuration of Talos event log streaming. 16 | message EventSinkConfigSpec { 17 | string endpoint = 1; 18 | } 19 | 20 | // KernelModuleSpecSpec describes Linux kernel module to load. 21 | message KernelModuleSpecSpec { 22 | string name = 1; 23 | repeated string parameters = 2; 24 | } 25 | 26 | // KernelParamSpecSpec describes status of the defined sysctls. 27 | message KernelParamSpecSpec { 28 | string value = 1; 29 | bool ignore_errors = 2; 30 | } 31 | 32 | // KernelParamStatusSpec describes status of the defined sysctls. 33 | message KernelParamStatusSpec { 34 | string current = 1; 35 | string default = 2; 36 | bool unsupported = 3; 37 | } 38 | 39 | // KmsgLogConfigSpec describes configuration for kmsg log streaming. 40 | message KmsgLogConfigSpec { 41 | repeated common.URL destinations = 1; 42 | } 43 | 44 | // MachineStatusSpec describes status of the defined sysctls. 45 | message MachineStatusSpec { 46 | talos.resource.definitions.enums.RuntimeMachineStage stage = 1; 47 | MachineStatusStatus status = 2; 48 | } 49 | 50 | // MachineStatusStatus describes machine current status at the stage. 51 | message MachineStatusStatus { 52 | bool ready = 1; 53 | repeated UnmetCondition unmet_conditions = 2; 54 | } 55 | 56 | // MaintenanceServiceConfigSpec describes configuration for maintenance service API. 57 | message MaintenanceServiceConfigSpec { 58 | string listen_address = 1; 59 | repeated common.NetIP reachable_addresses = 2; 60 | } 61 | 62 | // MetaKeySpec describes status of the defined sysctls. 63 | message MetaKeySpec { 64 | string value = 1; 65 | } 66 | 67 | // MetaLoadedSpec is the spec for meta loaded. The Done field is always true when resource exists. 68 | message MetaLoadedSpec { 69 | bool done = 1; 70 | } 71 | 72 | // MountStatusSpec describes status of the defined sysctls. 73 | message MountStatusSpec { 74 | string source = 1; 75 | string target = 2; 76 | string filesystem_type = 3; 77 | repeated string options = 4; 78 | bool encrypted = 5; 79 | repeated string encryption_providers = 6; 80 | } 81 | 82 | // PlatformMetadataSpec describes platform metadata properties. 83 | message PlatformMetadataSpec { 84 | string platform = 1; 85 | string hostname = 2; 86 | string region = 3; 87 | string zone = 4; 88 | string instance_type = 5; 89 | string instance_id = 6; 90 | string provider_id = 7; 91 | bool spot = 8; 92 | } 93 | 94 | // SecurityStateSpec describes the security state resource properties. 95 | message SecurityStateSpec { 96 | bool secure_boot = 1; 97 | string uki_signing_key_fingerprint = 2; 98 | string pcr_signing_key_fingerprint = 3; 99 | } 100 | 101 | // UniqueMachineTokenSpec is the spec for the machine unique token. Token can be empty if machine wasn't assigned any. 102 | message UniqueMachineTokenSpec { 103 | string token = 1; 104 | } 105 | 106 | // UnmetCondition is a failure which prevents machine from being ready at the stage. 107 | message UnmetCondition { 108 | string name = 1; 109 | string reason = 2; 110 | } 111 | 112 | -------------------------------------------------------------------------------- /protos/resource/definitions/secrets/secrets.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.secrets; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/secrets"; 6 | 7 | import "common/common.proto"; 8 | 9 | // APICertsSpec describes etcd certs secrets. 10 | message APICertsSpec { 11 | common.PEMEncodedCertificateAndKey ca = 1; 12 | common.PEMEncodedCertificateAndKey client = 2; 13 | common.PEMEncodedCertificateAndKey server = 3; 14 | } 15 | 16 | // CertSANSpec describes fields of the cert SANs. 17 | message CertSANSpec { 18 | repeated common.NetIP i_ps = 1; 19 | repeated string dns_names = 2; 20 | string fqdn = 3; 21 | } 22 | 23 | // EtcdCertsSpec describes etcd certs secrets. 24 | message EtcdCertsSpec { 25 | common.PEMEncodedCertificateAndKey etcd = 1; 26 | common.PEMEncodedCertificateAndKey etcd_peer = 2; 27 | common.PEMEncodedCertificateAndKey etcd_admin = 3; 28 | common.PEMEncodedCertificateAndKey etcd_api_server = 4; 29 | } 30 | 31 | // EtcdRootSpec describes etcd CA secrets. 32 | message EtcdRootSpec { 33 | common.PEMEncodedCertificateAndKey etcd_ca = 1; 34 | } 35 | 36 | // KubeletSpec describes root Kubernetes secrets. 37 | message KubeletSpec { 38 | common.URL endpoint = 1; 39 | common.PEMEncodedCertificateAndKey ca = 2; 40 | string bootstrap_token_id = 3; 41 | string bootstrap_token_secret = 4; 42 | } 43 | 44 | // KubernetesCertsSpec describes generated Kubernetes certificates. 45 | message KubernetesCertsSpec { 46 | string scheduler_kubeconfig = 4; 47 | string controller_manager_kubeconfig = 5; 48 | string localhost_admin_kubeconfig = 6; 49 | string admin_kubeconfig = 7; 50 | } 51 | 52 | // KubernetesDynamicCertsSpec describes generated KubernetesCerts certificates. 53 | message KubernetesDynamicCertsSpec { 54 | common.PEMEncodedCertificateAndKey api_server = 1; 55 | common.PEMEncodedCertificateAndKey api_server_kubelet_client = 2; 56 | common.PEMEncodedCertificateAndKey front_proxy = 3; 57 | } 58 | 59 | // KubernetesRootSpec describes root Kubernetes secrets. 60 | message KubernetesRootSpec { 61 | string name = 1; 62 | common.URL endpoint = 2; 63 | common.URL local_endpoint = 3; 64 | repeated string cert_sa_ns = 4; 65 | string dns_domain = 6; 66 | common.PEMEncodedCertificateAndKey ca = 7; 67 | common.PEMEncodedKey service_account = 8; 68 | common.PEMEncodedCertificateAndKey aggregator_ca = 9; 69 | string aescbc_encryption_secret = 10; 70 | string bootstrap_token_id = 11; 71 | string bootstrap_token_secret = 12; 72 | string secretbox_encryption_secret = 13; 73 | repeated common.NetIP api_server_ips = 14; 74 | } 75 | 76 | // MaintenanceRootSpec describes maintenance service CA. 77 | message MaintenanceRootSpec { 78 | common.PEMEncodedCertificateAndKey ca = 1; 79 | } 80 | 81 | // MaintenanceServiceCertsSpec describes maintenance service certs secrets. 82 | message MaintenanceServiceCertsSpec { 83 | common.PEMEncodedCertificateAndKey ca = 1; 84 | common.PEMEncodedCertificateAndKey server = 2; 85 | } 86 | 87 | // OSRootSpec describes operating system CA. 88 | message OSRootSpec { 89 | common.PEMEncodedCertificateAndKey ca = 1; 90 | repeated common.NetIP cert_sani_ps = 2; 91 | repeated string cert_sandns_names = 3; 92 | string token = 4; 93 | } 94 | 95 | // TrustdCertsSpec describes etcd certs secrets. 96 | message TrustdCertsSpec { 97 | common.PEMEncodedCertificateAndKey ca = 1; 98 | common.PEMEncodedCertificateAndKey server = 2; 99 | } 100 | 101 | -------------------------------------------------------------------------------- /protos/resource/definitions/siderolink/siderolink.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.siderolink; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/siderolink"; 6 | 7 | // ConfigSpec describes KubeSpan configuration.. 8 | message ConfigSpec { 9 | string api_endpoint = 1; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /protos/resource/definitions/time/time.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.time; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/time"; 6 | 7 | import "google/protobuf/duration.proto"; 8 | 9 | // AdjtimeStatusSpec describes Linux internal adjtime state. 10 | message AdjtimeStatusSpec { 11 | google.protobuf.Duration offset = 1; 12 | double frequency_adjustment_ratio = 2; 13 | google.protobuf.Duration max_error = 3; 14 | google.protobuf.Duration est_error = 4; 15 | string status = 5; 16 | int64 constant = 6; 17 | bool sync_status = 7; 18 | string state = 8; 19 | } 20 | 21 | // StatusSpec describes time sync state. 22 | message StatusSpec { 23 | bool synced = 1; 24 | int64 epoch = 2; 25 | bool sync_disabled = 3; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /protos/resource/definitions/v1alpha1/v1alpha1.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package talos.resource.definitions.v1alpha1; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/definitions/v1alpha1"; 6 | 7 | // ServiceSpec describe service state. 8 | message ServiceSpec { 9 | bool running = 1; 10 | bool healthy = 2; 11 | bool unknown = 3; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /protos/resource/network/device_config.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package resource.network; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/network"; 6 | 7 | // DeviceConfigSpecSpec is the spec for the network.DeviceConfigSpec resource. 8 | message DeviceConfigSpecSpec { 9 | // Contains YAML marshalled device config (as part of the machine config). 10 | bytes yaml_marshalled = 1; 11 | } 12 | -------------------------------------------------------------------------------- /protos/security/security.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package securityapi; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/security"; 6 | 7 | // The security service definition. 8 | service SecurityService { 9 | rpc Certificate(CertificateRequest) returns (CertificateResponse); 10 | } 11 | 12 | // The request message containing the certificate signing request. 13 | message CertificateRequest { 14 | // Certificate Signing Request in PEM format. 15 | bytes csr = 1; 16 | } 17 | 18 | // The response message containing signed certificate. 19 | message CertificateResponse { 20 | // Certificate of the CA that signed the requested certificate in PEM format. 21 | bytes ca = 1; 22 | // Signed X.509 requested certificate in PEM format. 23 | bytes crt = 2; 24 | } 25 | -------------------------------------------------------------------------------- /protos/storage/storage.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package storage; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/storage"; 6 | 7 | import "common/common.proto"; 8 | import "google/protobuf/empty.proto"; 9 | 10 | // StorageService represents the storage service. 11 | service StorageService { 12 | rpc Disks(google.protobuf.Empty) returns (DisksResponse); 13 | } 14 | 15 | // Disk represents a disk. 16 | message Disk { 17 | // Size indicates the disk size in bytes. 18 | uint64 size = 1; 19 | // Model idicates the disk model. 20 | string model = 2; 21 | // DeviceName indicates the disk name (e.g. `sda`). 22 | string device_name = 3; 23 | // Name as in `/sys/block//device/name`. 24 | string name = 4; 25 | // Serial as in `/sys/block//device/serial`. 26 | string serial = 5; 27 | // Modalias as in `/sys/block//device/modalias`. 28 | string modalias = 6; 29 | // Uuid as in `/sys/block//device/uuid`. 30 | string uuid = 7; 31 | // Wwid as in `/sys/block//device/wwid`. 32 | string wwid = 8; 33 | enum DiskType { 34 | UNKNOWN = 0; 35 | SSD = 1; 36 | HDD = 2; 37 | NVME = 3; 38 | SD = 4; 39 | } 40 | // Type is a type of the disk: nvme, ssd, hdd, sd card. 41 | DiskType type = 9; 42 | // BusPath is the bus path of the disk. 43 | string bus_path = 10; 44 | // SystemDisk indicates that the disk is used as Talos system disk. 45 | bool system_disk = 11; 46 | // Subsystem is the symlink path in the `/sys/block//subsystem`. 47 | string subsystem = 12; 48 | // Readonly specifies if the disk is read only. 49 | bool readonly = 13; 50 | } 51 | 52 | // DisksResponse represents the response of the `Disks` RPC. 53 | message Disks { 54 | common.Metadata metadata = 1; 55 | repeated Disk disks = 2; 56 | } 57 | 58 | message DisksResponse { 59 | repeated Disks messages = 1; 60 | } 61 | -------------------------------------------------------------------------------- /protos/time/time.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package time; 4 | 5 | option go_package = "github.com/siderolabs/talos/pkg/machinery/api/time"; 6 | 7 | import "common/common.proto"; 8 | import "google/protobuf/empty.proto"; 9 | import "google/protobuf/timestamp.proto"; 10 | 11 | // The time service definition. 12 | service TimeService { 13 | rpc Time(google.protobuf.Empty) returns (TimeResponse); 14 | rpc TimeCheck(TimeRequest) returns (TimeResponse); 15 | } 16 | 17 | // The response message containing the ntp server 18 | message TimeRequest { 19 | string server = 1; 20 | } 21 | 22 | message Time { 23 | common.Metadata metadata = 1; 24 | string server = 2; 25 | google.protobuf.Timestamp localtime = 3; 26 | google.protobuf.Timestamp remotetime = 4; 27 | } 28 | 29 | // The response message containing the ntp server, time, and offset 30 | message TimeResponse { 31 | repeated Time messages = 1; 32 | } 33 | -------------------------------------------------------------------------------- /protos/vendor/google/rpc/status.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.rpc; 18 | 19 | option cc_enable_arenas = true; 20 | option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "StatusProto"; 23 | option java_package = "com.google.rpc"; 24 | option objc_class_prefix = "RPC"; 25 | 26 | import "google/protobuf/any.proto"; 27 | 28 | // The `Status` type defines a logical error model that is suitable for 29 | // different programming environments, including REST APIs and RPC APIs. It is 30 | // used by [gRPC](https://github.com/grpc). Each `Status` message contains 31 | // three pieces of data: error code, error message, and error details. 32 | // 33 | // You can find out more about this error model and how to work with it in the 34 | // [API Design Guide](https://cloud.google.com/apis/design/errors). 35 | message Status { 36 | // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. 37 | int32 code = 1; 38 | // A developer-facing error message, which should be in English. Any 39 | // user-facing error message should be localized and sent in the 40 | // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. 41 | string message = 2; 42 | // A list of messages that carry the error details. There is a common set of 43 | // message types for APIs to use. 44 | repeated google.protobuf.Any details = 3; 45 | } 46 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "talos-linux-api-v1.6.0" 3 | version = "0.1.0" 4 | description = "Python bindings for the Talos Linux gRPC API (v1.6.0)" 5 | authors = [ 6 | {name = "Sascha Desch", email = "sascha.desch@hotmail.com"}, 7 | ] 8 | dependencies = [ 9 | "betterproto>=2.0.0b5", 10 | ] 11 | requires-python = ">=3.7" 12 | readme = "README.md" 13 | license = {text = "MIT"} 14 | 15 | [project.urls] 16 | Repository = "https://github.com/stereobutter/talos-linux-api" 17 | 18 | [tool.pdm] 19 | [tool.pdm.dev-dependencies] 20 | dev = [ 21 | "betterproto[compiler]>=2.0.0b5", 22 | "invoke>=2.0.0", 23 | "fsspec[github]>=2023.1.0", 24 | "tomlkit>=0.11.6", 25 | "setuptools>=67.4.0", 26 | "pytest>=7.2.1", 27 | ] 28 | 29 | [tool.pdm.build] 30 | package-dir = "src" 31 | includes=["src/talos_linux_api"] 32 | 33 | [build-system] 34 | requires = ["pdm-pep517>=1.0"] 35 | build-backend = "pdm.pep517.api" 36 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereobutter/talos-linux-api/15419f20226abbcc256d2b68ea74b7ea85f64b34/src/talos_linux_api/v1_6_0/__init__.py -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/cluster/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: cluster/cluster.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from datetime import timedelta 6 | from typing import ( 7 | TYPE_CHECKING, 8 | AsyncIterator, 9 | Dict, 10 | List, 11 | Optional, 12 | ) 13 | 14 | import betterproto 15 | import grpclib 16 | from betterproto.grpc.grpclib_server import ServiceBase 17 | 18 | from .. import common as _common__ 19 | 20 | 21 | if TYPE_CHECKING: 22 | import grpclib.server 23 | from betterproto.grpc.grpclib_client import MetadataLike 24 | from grpclib.metadata import Deadline 25 | 26 | 27 | @dataclass(eq=False, repr=False) 28 | class HealthCheckRequest(betterproto.Message): 29 | wait_timeout: timedelta = betterproto.message_field(1) 30 | cluster_info: "ClusterInfo" = betterproto.message_field(2) 31 | 32 | 33 | @dataclass(eq=False, repr=False) 34 | class ClusterInfo(betterproto.Message): 35 | control_plane_nodes: List[str] = betterproto.string_field(1) 36 | worker_nodes: List[str] = betterproto.string_field(2) 37 | force_endpoint: str = betterproto.string_field(3) 38 | 39 | 40 | @dataclass(eq=False, repr=False) 41 | class HealthCheckProgress(betterproto.Message): 42 | metadata: "_common__.Metadata" = betterproto.message_field(1) 43 | message: str = betterproto.string_field(2) 44 | 45 | 46 | class ClusterServiceStub(betterproto.ServiceStub): 47 | async def health_check( 48 | self, 49 | health_check_request: "HealthCheckRequest", 50 | *, 51 | timeout: Optional[float] = None, 52 | deadline: Optional["Deadline"] = None, 53 | metadata: Optional["MetadataLike"] = None 54 | ) -> AsyncIterator["HealthCheckProgress"]: 55 | async for response in self._unary_stream( 56 | "/cluster.ClusterService/HealthCheck", 57 | health_check_request, 58 | HealthCheckProgress, 59 | timeout=timeout, 60 | deadline=deadline, 61 | metadata=metadata, 62 | ): 63 | yield response 64 | 65 | 66 | class ClusterServiceBase(ServiceBase): 67 | async def health_check( 68 | self, health_check_request: "HealthCheckRequest" 69 | ) -> AsyncIterator["HealthCheckProgress"]: 70 | raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) 71 | 72 | async def __rpc_health_check( 73 | self, stream: "grpclib.server.Stream[HealthCheckRequest, HealthCheckProgress]" 74 | ) -> None: 75 | request = await stream.recv_message() 76 | await self._call_rpc_handler_server_stream( 77 | self.health_check, 78 | stream, 79 | request, 80 | ) 81 | 82 | def __mapping__(self) -> Dict[str, grpclib.const.Handler]: 83 | return { 84 | "/cluster.ClusterService/HealthCheck": grpclib.const.Handler( 85 | self.__rpc_health_check, 86 | grpclib.const.Cardinality.UNARY_STREAM, 87 | HealthCheckRequest, 88 | HealthCheckProgress, 89 | ), 90 | } 91 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/common/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: common/common.proto 3 | # plugin: python-betterproto 4 | import builtins 5 | from dataclasses import dataclass 6 | from typing import List 7 | 8 | import betterproto 9 | import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf 10 | 11 | from ..google import rpc as _google_rpc__ 12 | 13 | 14 | class Code(betterproto.Enum): 15 | FATAL = 0 16 | LOCKED = 1 17 | CANCELED = 2 18 | 19 | 20 | class ContainerDriver(betterproto.Enum): 21 | CONTAINERD = 0 22 | CRI = 1 23 | 24 | 25 | class ContainerdNamespace(betterproto.Enum): 26 | NS_UNKNOWN = 0 27 | NS_SYSTEM = 1 28 | NS_CRI = 2 29 | 30 | 31 | @dataclass(eq=False, repr=False) 32 | class Error(betterproto.Message): 33 | code: "Code" = betterproto.enum_field(1) 34 | message: str = betterproto.string_field(2) 35 | details: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(3) 36 | 37 | 38 | @dataclass(eq=False, repr=False) 39 | class Metadata(betterproto.Message): 40 | """Common metadata message nested in all reply message types""" 41 | 42 | hostname: str = betterproto.string_field(1) 43 | """hostname of the server response comes from (injected by proxy)""" 44 | 45 | error: str = betterproto.string_field(2) 46 | """ 47 | error is set if request failed to the upstream (rest of response is 48 | undefined) 49 | """ 50 | 51 | status: "_google_rpc__.Status" = betterproto.message_field(3) 52 | """error as gRPC Status""" 53 | 54 | 55 | @dataclass(eq=False, repr=False) 56 | class Data(betterproto.Message): 57 | metadata: "Metadata" = betterproto.message_field(1) 58 | bytes: builtins.bytes = betterproto.bytes_field(2) 59 | 60 | 61 | @dataclass(eq=False, repr=False) 62 | class DataResponse(betterproto.Message): 63 | messages: List["Data"] = betterproto.message_field(1) 64 | 65 | 66 | @dataclass(eq=False, repr=False) 67 | class Empty(betterproto.Message): 68 | metadata: "Metadata" = betterproto.message_field(1) 69 | 70 | 71 | @dataclass(eq=False, repr=False) 72 | class EmptyResponse(betterproto.Message): 73 | messages: List["Empty"] = betterproto.message_field(1) 74 | 75 | 76 | @dataclass(eq=False, repr=False) 77 | class Url(betterproto.Message): 78 | full_path: str = betterproto.string_field(1) 79 | 80 | 81 | @dataclass(eq=False, repr=False) 82 | class PemEncodedCertificateAndKey(betterproto.Message): 83 | crt: bytes = betterproto.bytes_field(1) 84 | key: bytes = betterproto.bytes_field(2) 85 | 86 | 87 | @dataclass(eq=False, repr=False) 88 | class PemEncodedKey(betterproto.Message): 89 | key: bytes = betterproto.bytes_field(1) 90 | 91 | 92 | @dataclass(eq=False, repr=False) 93 | class NetIp(betterproto.Message): 94 | ip: bytes = betterproto.bytes_field(1) 95 | 96 | 97 | @dataclass(eq=False, repr=False) 98 | class NetIpPort(betterproto.Message): 99 | ip: bytes = betterproto.bytes_field(1) 100 | port: int = betterproto.int32_field(2) 101 | 102 | 103 | @dataclass(eq=False, repr=False) 104 | class NetIpPrefix(betterproto.Message): 105 | ip: bytes = betterproto.bytes_field(1) 106 | prefix_length: int = betterproto.int32_field(2) 107 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/google/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereobutter/talos-linux-api/15419f20226abbcc256d2b68ea74b7ea85f64b34/src/talos_linux_api/v1_6_0/google/__init__.py -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/google/rpc/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: google/rpc/status.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf 9 | 10 | 11 | @dataclass(eq=False, repr=False) 12 | class Status(betterproto.Message): 13 | """ 14 | The `Status` type defines a logical error model that is suitable for 15 | different programming environments, including REST APIs and RPC APIs. It is 16 | used by [gRPC](https://github.com/grpc). Each `Status` message contains 17 | three pieces of data: error code, error message, and error details. You can 18 | find out more about this error model and how to work with it in the [API 19 | Design Guide](https://cloud.google.com/apis/design/errors). 20 | """ 21 | 22 | code: int = betterproto.int32_field(1) 23 | """ 24 | The status code, which should be an enum value of 25 | [google.rpc.Code][google.rpc.Code]. 26 | """ 27 | 28 | message: str = betterproto.string_field(2) 29 | """ 30 | A developer-facing error message, which should be in English. Any user- 31 | facing error message should be localized and sent in the 32 | [google.rpc.Status.details][google.rpc.Status.details] field, or localized 33 | by the client. 34 | """ 35 | 36 | details: List["betterproto_lib_google_protobuf.Any"] = betterproto.message_field(3) 37 | """ 38 | A list of messages that carry the error details. There is a common set of 39 | message types for APIs to use. 40 | """ 41 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/inspect/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: inspect/inspect.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import ( 6 | TYPE_CHECKING, 7 | Dict, 8 | List, 9 | Optional, 10 | ) 11 | 12 | import betterproto 13 | import grpclib 14 | from betterproto.grpc.grpclib_server import ServiceBase 15 | 16 | from .. import common as _common__ 17 | 18 | 19 | if TYPE_CHECKING: 20 | import grpclib.server 21 | from betterproto.grpc.grpclib_client import MetadataLike 22 | from grpclib.metadata import Deadline 23 | 24 | 25 | class DependencyEdgeType(betterproto.Enum): 26 | OUTPUT_EXCLUSIVE = 0 27 | OUTPUT_SHARED = 3 28 | INPUT_STRONG = 1 29 | INPUT_WEAK = 2 30 | INPUT_DESTROY_READY = 4 31 | 32 | 33 | @dataclass(eq=False, repr=False) 34 | class ControllerRuntimeDependency(betterproto.Message): 35 | """ 36 | The ControllerRuntimeDependency message contains the graph of controller- 37 | resource dependencies. 38 | """ 39 | 40 | metadata: "_common__.Metadata" = betterproto.message_field(1) 41 | edges: List["ControllerDependencyEdge"] = betterproto.message_field(2) 42 | 43 | 44 | @dataclass(eq=False, repr=False) 45 | class ControllerRuntimeDependenciesResponse(betterproto.Message): 46 | messages: List["ControllerRuntimeDependency"] = betterproto.message_field(1) 47 | 48 | 49 | @dataclass(eq=False, repr=False) 50 | class ControllerDependencyEdge(betterproto.Message): 51 | controller_name: str = betterproto.string_field(1) 52 | edge_type: "DependencyEdgeType" = betterproto.enum_field(2) 53 | resource_namespace: str = betterproto.string_field(3) 54 | resource_type: str = betterproto.string_field(4) 55 | resource_id: str = betterproto.string_field(5) 56 | 57 | 58 | class InspectServiceStub(betterproto.ServiceStub): 59 | async def controller_runtime_dependencies( 60 | self, 61 | betterproto_lib_google_protobuf_empty: "betterproto_lib_google_protobuf.Empty", 62 | *, 63 | timeout: Optional[float] = None, 64 | deadline: Optional["Deadline"] = None, 65 | metadata: Optional["MetadataLike"] = None 66 | ) -> "ControllerRuntimeDependenciesResponse": 67 | return await self._unary_unary( 68 | "/inspect.InspectService/ControllerRuntimeDependencies", 69 | betterproto_lib_google_protobuf_empty, 70 | ControllerRuntimeDependenciesResponse, 71 | timeout=timeout, 72 | deadline=deadline, 73 | metadata=metadata, 74 | ) 75 | 76 | 77 | class InspectServiceBase(ServiceBase): 78 | async def controller_runtime_dependencies( 79 | self, 80 | betterproto_lib_google_protobuf_empty: "betterproto_lib_google_protobuf.Empty", 81 | ) -> "ControllerRuntimeDependenciesResponse": 82 | raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) 83 | 84 | async def __rpc_controller_runtime_dependencies( 85 | self, 86 | stream: "grpclib.server.Stream[betterproto_lib_google_protobuf.Empty, ControllerRuntimeDependenciesResponse]", 87 | ) -> None: 88 | request = await stream.recv_message() 89 | response = await self.controller_runtime_dependencies(request) 90 | await stream.send_message(response) 91 | 92 | def __mapping__(self) -> Dict[str, grpclib.const.Handler]: 93 | return { 94 | "/inspect.InspectService/ControllerRuntimeDependencies": grpclib.const.Handler( 95 | self.__rpc_controller_runtime_dependencies, 96 | grpclib.const.Cardinality.UNARY_UNARY, 97 | betterproto_lib_google_protobuf.Empty, 98 | ControllerRuntimeDependenciesResponse, 99 | ), 100 | } 101 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/resource/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereobutter/talos-linux-api/15419f20226abbcc256d2b68ea74b7ea85f64b34/src/talos_linux_api/v1_6_0/resource/__init__.py -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/resource/config/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/config/config.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | class MachineType(betterproto.Enum): 10 | """MachineType matches machine.Type constants.""" 11 | 12 | UNKNOWN = 0 13 | INIT = 1 14 | CONTROL_PLANE = 2 15 | WORKER = 3 16 | 17 | 18 | @dataclass(eq=False, repr=False) 19 | class MachineConfigSpec(betterproto.Message): 20 | """MessageConfigSpec is the spec for the config.MachineConfig resource.""" 21 | 22 | yaml_marshalled: bytes = betterproto.bytes_field(1) 23 | """ 24 | Contains YAML marshalled machine configuration. Byte representation is 25 | preserved as the machine configuration was submitted to the node. 26 | """ 27 | 28 | 29 | @dataclass(eq=False, repr=False) 30 | class MachineTypeSpec(betterproto.Message): 31 | """MachineTypeSpec is the spec for the config.MachineType resource.""" 32 | 33 | machine_type: "MachineType" = betterproto.enum_field(1) 34 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/resource/network/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/network/device_config.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | @dataclass(eq=False, repr=False) 10 | class DeviceConfigSpecSpec(betterproto.Message): 11 | """ 12 | DeviceConfigSpecSpec is the spec for the network.DeviceConfigSpec resource. 13 | """ 14 | 15 | yaml_marshalled: bytes = betterproto.bytes_field(1) 16 | """ 17 | Contains YAML marshalled device config (as part of the machine config). 18 | """ 19 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/securityapi/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: security/security.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import ( 6 | TYPE_CHECKING, 7 | Dict, 8 | Optional, 9 | ) 10 | 11 | import betterproto 12 | import grpclib 13 | from betterproto.grpc.grpclib_server import ServiceBase 14 | 15 | 16 | if TYPE_CHECKING: 17 | import grpclib.server 18 | from betterproto.grpc.grpclib_client import MetadataLike 19 | from grpclib.metadata import Deadline 20 | 21 | 22 | @dataclass(eq=False, repr=False) 23 | class CertificateRequest(betterproto.Message): 24 | """The request message containing the certificate signing request.""" 25 | 26 | csr: bytes = betterproto.bytes_field(1) 27 | """Certificate Signing Request in PEM format.""" 28 | 29 | 30 | @dataclass(eq=False, repr=False) 31 | class CertificateResponse(betterproto.Message): 32 | """The response message containing signed certificate.""" 33 | 34 | ca: bytes = betterproto.bytes_field(1) 35 | """ 36 | Certificate of the CA that signed the requested certificate in PEM format. 37 | """ 38 | 39 | crt: bytes = betterproto.bytes_field(2) 40 | """Signed X.509 requested certificate in PEM format.""" 41 | 42 | 43 | class SecurityServiceStub(betterproto.ServiceStub): 44 | async def certificate( 45 | self, 46 | certificate_request: "CertificateRequest", 47 | *, 48 | timeout: Optional[float] = None, 49 | deadline: Optional["Deadline"] = None, 50 | metadata: Optional["MetadataLike"] = None 51 | ) -> "CertificateResponse": 52 | return await self._unary_unary( 53 | "/securityapi.SecurityService/Certificate", 54 | certificate_request, 55 | CertificateResponse, 56 | timeout=timeout, 57 | deadline=deadline, 58 | metadata=metadata, 59 | ) 60 | 61 | 62 | class SecurityServiceBase(ServiceBase): 63 | async def certificate( 64 | self, certificate_request: "CertificateRequest" 65 | ) -> "CertificateResponse": 66 | raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) 67 | 68 | async def __rpc_certificate( 69 | self, stream: "grpclib.server.Stream[CertificateRequest, CertificateResponse]" 70 | ) -> None: 71 | request = await stream.recv_message() 72 | response = await self.certificate(request) 73 | await stream.send_message(response) 74 | 75 | def __mapping__(self) -> Dict[str, grpclib.const.Handler]: 76 | return { 77 | "/securityapi.SecurityService/Certificate": grpclib.const.Handler( 78 | self.__rpc_certificate, 79 | grpclib.const.Cardinality.UNARY_UNARY, 80 | CertificateRequest, 81 | CertificateResponse, 82 | ), 83 | } 84 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/storage/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: storage/storage.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import ( 6 | TYPE_CHECKING, 7 | Dict, 8 | List, 9 | Optional, 10 | ) 11 | 12 | import betterproto 13 | import grpclib 14 | from betterproto.grpc.grpclib_server import ServiceBase 15 | 16 | from .. import common as _common__ 17 | 18 | 19 | if TYPE_CHECKING: 20 | import grpclib.server 21 | from betterproto.grpc.grpclib_client import MetadataLike 22 | from grpclib.metadata import Deadline 23 | 24 | 25 | class DiskDiskType(betterproto.Enum): 26 | UNKNOWN = 0 27 | SSD = 1 28 | HDD = 2 29 | NVME = 3 30 | SD = 4 31 | 32 | 33 | @dataclass(eq=False, repr=False) 34 | class Disk(betterproto.Message): 35 | """Disk represents a disk.""" 36 | 37 | size: int = betterproto.uint64_field(1) 38 | """Size indicates the disk size in bytes.""" 39 | 40 | model: str = betterproto.string_field(2) 41 | """Model idicates the disk model.""" 42 | 43 | device_name: str = betterproto.string_field(3) 44 | """DeviceName indicates the disk name (e.g. `sda`).""" 45 | 46 | name: str = betterproto.string_field(4) 47 | """Name as in `/sys/block//device/name`.""" 48 | 49 | serial: str = betterproto.string_field(5) 50 | """Serial as in `/sys/block//device/serial`.""" 51 | 52 | modalias: str = betterproto.string_field(6) 53 | """Modalias as in `/sys/block//device/modalias`.""" 54 | 55 | uuid: str = betterproto.string_field(7) 56 | """Uuid as in `/sys/block//device/uuid`.""" 57 | 58 | wwid: str = betterproto.string_field(8) 59 | """Wwid as in `/sys/block//device/wwid`.""" 60 | 61 | type: "DiskDiskType" = betterproto.enum_field(9) 62 | """Type is a type of the disk: nvme, ssd, hdd, sd card.""" 63 | 64 | bus_path: str = betterproto.string_field(10) 65 | """BusPath is the bus path of the disk.""" 66 | 67 | system_disk: bool = betterproto.bool_field(11) 68 | """SystemDisk indicates that the disk is used as Talos system disk.""" 69 | 70 | subsystem: str = betterproto.string_field(12) 71 | """Subsystem is the symlink path in the `/sys/block//subsystem`.""" 72 | 73 | readonly: bool = betterproto.bool_field(13) 74 | """Readonly specifies if the disk is read only.""" 75 | 76 | 77 | @dataclass(eq=False, repr=False) 78 | class Disks(betterproto.Message): 79 | """DisksResponse represents the response of the `Disks` RPC.""" 80 | 81 | metadata: "_common__.Metadata" = betterproto.message_field(1) 82 | disks: List["Disk"] = betterproto.message_field(2) 83 | 84 | 85 | @dataclass(eq=False, repr=False) 86 | class DisksResponse(betterproto.Message): 87 | messages: List["Disks"] = betterproto.message_field(1) 88 | 89 | 90 | class StorageServiceStub(betterproto.ServiceStub): 91 | async def disks( 92 | self, 93 | betterproto_lib_google_protobuf_empty: "betterproto_lib_google_protobuf.Empty", 94 | *, 95 | timeout: Optional[float] = None, 96 | deadline: Optional["Deadline"] = None, 97 | metadata: Optional["MetadataLike"] = None 98 | ) -> "DisksResponse": 99 | return await self._unary_unary( 100 | "/storage.StorageService/Disks", 101 | betterproto_lib_google_protobuf_empty, 102 | DisksResponse, 103 | timeout=timeout, 104 | deadline=deadline, 105 | metadata=metadata, 106 | ) 107 | 108 | 109 | class StorageServiceBase(ServiceBase): 110 | async def disks( 111 | self, 112 | betterproto_lib_google_protobuf_empty: "betterproto_lib_google_protobuf.Empty", 113 | ) -> "DisksResponse": 114 | raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) 115 | 116 | async def __rpc_disks( 117 | self, 118 | stream: "grpclib.server.Stream[betterproto_lib_google_protobuf.Empty, DisksResponse]", 119 | ) -> None: 120 | request = await stream.recv_message() 121 | response = await self.disks(request) 122 | await stream.send_message(response) 123 | 124 | def __mapping__(self) -> Dict[str, grpclib.const.Handler]: 125 | return { 126 | "/storage.StorageService/Disks": grpclib.const.Handler( 127 | self.__rpc_disks, 128 | grpclib.const.Cardinality.UNARY_UNARY, 129 | betterproto_lib_google_protobuf.Empty, 130 | DisksResponse, 131 | ), 132 | } 133 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereobutter/talos-linux-api/15419f20226abbcc256d2b68ea74b7ea85f64b34/src/talos_linux_api/v1_6_0/talos/__init__.py -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereobutter/talos-linux-api/15419f20226abbcc256d2b68ea74b7ea85f64b34/src/talos_linux_api/v1_6_0/talos/resource/__init__.py -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stereobutter/talos-linux-api/15419f20226abbcc256d2b68ea74b7ea85f64b34/src/talos_linux_api/v1_6_0/talos/resource/definitions/__init__.py -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/cluster/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/cluster/cluster.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | 9 | from ..... import common as ____common__ 10 | from .. import enums as _enums__ 11 | 12 | 13 | @dataclass(eq=False, repr=False) 14 | class AffiliateSpec(betterproto.Message): 15 | """AffiliateSpec describes Affiliate state.""" 16 | 17 | node_id: str = betterproto.string_field(1) 18 | addresses: List["____common__.NetIp"] = betterproto.message_field(2) 19 | hostname: str = betterproto.string_field(3) 20 | nodename: str = betterproto.string_field(4) 21 | operating_system: str = betterproto.string_field(5) 22 | machine_type: "_enums__.MachineType" = betterproto.enum_field(6) 23 | kube_span: "KubeSpanAffiliateSpec" = betterproto.message_field(7) 24 | control_plane: "ControlPlane" = betterproto.message_field(8) 25 | 26 | 27 | @dataclass(eq=False, repr=False) 28 | class ConfigSpec(betterproto.Message): 29 | """ConfigSpec describes KubeSpan configuration.""" 30 | 31 | discovery_enabled: bool = betterproto.bool_field(1) 32 | registry_kubernetes_enabled: bool = betterproto.bool_field(2) 33 | registry_service_enabled: bool = betterproto.bool_field(3) 34 | service_endpoint: str = betterproto.string_field(4) 35 | service_endpoint_insecure: bool = betterproto.bool_field(5) 36 | service_encryption_key: bytes = betterproto.bytes_field(6) 37 | service_cluster_id: str = betterproto.string_field(7) 38 | 39 | 40 | @dataclass(eq=False, repr=False) 41 | class ControlPlane(betterproto.Message): 42 | """ControlPlane describes ControlPlane data if any.""" 43 | 44 | api_server_port: int = betterproto.int64_field(1) 45 | 46 | 47 | @dataclass(eq=False, repr=False) 48 | class IdentitySpec(betterproto.Message): 49 | """ 50 | IdentitySpec describes status of rendered secrets. Note: IdentitySpec is 51 | persisted on disk in the STATE partition, so YAML serialization should be 52 | kept backwards compatible. 53 | """ 54 | 55 | node_id: str = betterproto.string_field(1) 56 | 57 | 58 | @dataclass(eq=False, repr=False) 59 | class InfoSpec(betterproto.Message): 60 | """InfoSpec describes cluster information.""" 61 | 62 | cluster_id: str = betterproto.string_field(1) 63 | cluster_name: str = betterproto.string_field(2) 64 | 65 | 66 | @dataclass(eq=False, repr=False) 67 | class KubeSpanAffiliateSpec(betterproto.Message): 68 | """ 69 | KubeSpanAffiliateSpec describes additional information specific for the 70 | KubeSpan. 71 | """ 72 | 73 | public_key: str = betterproto.string_field(1) 74 | address: "____common__.NetIp" = betterproto.message_field(2) 75 | additional_addresses: List["____common__.NetIpPrefix"] = betterproto.message_field( 76 | 3 77 | ) 78 | endpoints: List["____common__.NetIpPort"] = betterproto.message_field(4) 79 | 80 | 81 | @dataclass(eq=False, repr=False) 82 | class MemberSpec(betterproto.Message): 83 | """MemberSpec describes Member state.""" 84 | 85 | node_id: str = betterproto.string_field(1) 86 | addresses: List["____common__.NetIp"] = betterproto.message_field(2) 87 | hostname: str = betterproto.string_field(3) 88 | machine_type: "_enums__.MachineType" = betterproto.enum_field(4) 89 | operating_system: str = betterproto.string_field(5) 90 | control_plane: "ControlPlane" = betterproto.message_field(6) 91 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/cri/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/cri/cri.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class SeccompProfileSpec(betterproto.Message): 12 | """SeccompProfileSpec represents the SeccompProfile.""" 13 | 14 | name: str = betterproto.string_field(1) 15 | value: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field(2) 16 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/enums/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/enums/enums.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | class MachineType(betterproto.Enum): 10 | """MachineType represents a machine type.""" 11 | 12 | TYPE_UNKNOWN = 0 13 | """ 14 | TypeUnknown represents undefined node type, when there is no machine 15 | configuration yet. 16 | """ 17 | 18 | TYPE_INIT = 1 19 | """ 20 | TypeInit type designates the first control plane node to come up. You can 21 | think of it like a bootstrap node. This node will perform the initial steps 22 | to bootstrap the cluster -- generation of TLS assets, starting of the 23 | control plane, etc. 24 | """ 25 | 26 | TYPE_CONTROL_PLANE = 2 27 | """ 28 | TypeControlPlane designates the node as a control plane member. This means 29 | it will host etcd along with the Kubernetes controlplane components such as 30 | API Server, Controller Manager, Scheduler. 31 | """ 32 | 33 | TYPE_WORKER = 3 34 | """ 35 | TypeWorker designates the node as a worker node. This means it will be an 36 | available compute node for scheduling workloads. 37 | """ 38 | 39 | 40 | class NethelpersAddressFlag(betterproto.Enum): 41 | """NethelpersAddressFlag wraps IFF_* constants.""" 42 | 43 | NETHELPERS_ADDRESSFLAG_UNSPECIFIED = 0 44 | ADDRESS_TEMPORARY = 1 45 | ADDRESS_NO_DAD = 2 46 | ADDRESS_OPTIMISTIC = 4 47 | ADDRESS_DAD_FAILED = 8 48 | ADDRESS_HOME = 16 49 | ADDRESS_DEPRECATED = 32 50 | ADDRESS_TENTATIVE = 64 51 | ADDRESS_PERMANENT = 128 52 | ADDRESS_MANAGEMENT_TEMP = 256 53 | ADDRESS_NO_PREFIX_ROUTE = 512 54 | ADDRESS_MC_AUTO_JOIN = 1024 55 | ADDRESS_STABLE_PRIVACY = 2048 56 | 57 | 58 | class NethelpersAdSelect(betterproto.Enum): 59 | """NethelpersADSelect is ADSelect.""" 60 | 61 | AD_SELECT_STABLE = 0 62 | AD_SELECT_BANDWIDTH = 1 63 | AD_SELECT_COUNT = 2 64 | 65 | 66 | class NethelpersArpAllTargets(betterproto.Enum): 67 | """NethelpersARPAllTargets is an ARP targets mode.""" 68 | 69 | ARP_ALL_TARGETS_ANY = 0 70 | ARP_ALL_TARGETS_ALL = 1 71 | 72 | 73 | class NethelpersArpValidate(betterproto.Enum): 74 | """NethelpersARPValidate is an ARP Validation mode.""" 75 | 76 | ARP_VALIDATE_NONE = 0 77 | ARP_VALIDATE_ACTIVE = 1 78 | ARP_VALIDATE_BACKUP = 2 79 | ARP_VALIDATE_ALL = 3 80 | 81 | 82 | class NethelpersBondMode(betterproto.Enum): 83 | """NethelpersBondMode is a bond mode.""" 84 | 85 | BOND_MODE_ROUNDROBIN = 0 86 | BOND_MODE_ACTIVE_BACKUP = 1 87 | BOND_MODE_XOR = 2 88 | BOND_MODE_BROADCAST = 3 89 | BOND_MODE8023_AD = 4 90 | BOND_MODE_TLB = 5 91 | BOND_MODE_ALB = 6 92 | 93 | 94 | class NethelpersBondXmitHashPolicy(betterproto.Enum): 95 | """NethelpersBondXmitHashPolicy is a bond hash policy.""" 96 | 97 | BOND_XMIT_POLICY_LAYER2 = 0 98 | BOND_XMIT_POLICY_LAYER34 = 1 99 | BOND_XMIT_POLICY_LAYER23 = 2 100 | BOND_XMIT_POLICY_ENCAP23 = 3 101 | BOND_XMIT_POLICY_ENCAP34 = 4 102 | 103 | 104 | class NethelpersConntrackState(betterproto.Enum): 105 | """NethelpersConntrackState is a conntrack state.""" 106 | 107 | NETHELPERS_CONNTRACKSTATE_UNSPECIFIED = 0 108 | CONNTRACK_STATE_NEW = 8 109 | CONNTRACK_STATE_RELATED = 4 110 | CONNTRACK_STATE_ESTABLISHED = 2 111 | CONNTRACK_STATE_INVALID = 1 112 | 113 | 114 | class NethelpersDuplex(betterproto.Enum): 115 | """NethelpersDuplex wraps ethtool.Duplex for YAML marshaling.""" 116 | 117 | HALF = 0 118 | FULL = 1 119 | UNKNOWN = 255 120 | 121 | 122 | class NethelpersFailOverMac(betterproto.Enum): 123 | """NethelpersFailOverMAC is a MAC failover mode.""" 124 | 125 | FAIL_OVER_MAC_NONE = 0 126 | FAIL_OVER_MAC_ACTIVE = 1 127 | FAIL_OVER_MAC_FOLLOW = 2 128 | 129 | 130 | class NethelpersFamily(betterproto.Enum): 131 | """NethelpersFamily is a network family.""" 132 | 133 | NETHELPERS_FAMILY_UNSPECIFIED = 0 134 | FAMILY_INET4 = 2 135 | FAMILY_INET6 = 10 136 | 137 | 138 | class NethelpersLacpRate(betterproto.Enum): 139 | """NethelpersLACPRate is a LACP rate.""" 140 | 141 | LACP_RATE_SLOW = 0 142 | LACP_RATE_FAST = 1 143 | 144 | 145 | class NethelpersLinkType(betterproto.Enum): 146 | """NethelpersLinkType is a link type.""" 147 | 148 | LINK_NETROM = 0 149 | LINK_ETHER = 1 150 | LINK_EETHER = 2 151 | LINK_AX25 = 3 152 | LINK_PRONET = 4 153 | LINK_CHAOS = 5 154 | LINK_IEE802 = 6 155 | LINK_ARCNET = 7 156 | LINK_ATALK = 8 157 | LINK_DLCI = 15 158 | LINK_ATM = 19 159 | LINK_METRICOM = 23 160 | LINK_IEEE1394 = 24 161 | LINK_EUI64 = 27 162 | LINK_INFINIBAND = 32 163 | LINK_SLIP = 256 164 | LINK_CSLIP = 257 165 | LINK_SLIP6 = 258 166 | LINK_CSLIP6 = 259 167 | LINK_RSRVD = 260 168 | LINK_ADAPT = 264 169 | LINK_ROSE = 270 170 | LINK_X25 = 271 171 | LINK_HWX25 = 272 172 | LINK_CAN = 280 173 | LINK_PPP = 512 174 | LINK_CISCO = 513 175 | LINK_HDLC = 513 176 | LINK_LAPB = 516 177 | LINK_DDCMP = 517 178 | LINK_RAWHDLC = 518 179 | LINK_TUNNEL = 768 180 | LINK_TUNNEL6 = 769 181 | LINK_FRAD = 770 182 | LINK_SKIP = 771 183 | LINK_LOOPBCK = 772 184 | LINK_LOCALTLK = 773 185 | LINK_FDDI = 774 186 | LINK_BIF = 775 187 | LINK_SIT = 776 188 | LINK_IPDDP = 777 189 | LINK_IPGRE = 778 190 | LINK_PIMREG = 779 191 | LINK_HIPPI = 780 192 | LINK_ASH = 781 193 | LINK_ECONET = 782 194 | LINK_IRDA = 783 195 | LINK_FCPP = 784 196 | LINK_FCAL = 785 197 | LINK_FCPL = 786 198 | LINK_FCFABRIC = 787 199 | LINK_FCFABRIC1 = 788 200 | LINK_FCFABRIC2 = 789 201 | LINK_FCFABRIC3 = 790 202 | LINK_FCFABRIC4 = 791 203 | LINK_FCFABRIC5 = 792 204 | LINK_FCFABRIC6 = 793 205 | LINK_FCFABRIC7 = 794 206 | LINK_FCFABRIC8 = 795 207 | LINK_FCFABRIC9 = 796 208 | LINK_FCFABRIC10 = 797 209 | LINK_FCFABRIC11 = 798 210 | LINK_FCFABRIC12 = 799 211 | LINK_IEE802TR = 800 212 | LINK_IEE80211 = 801 213 | LINK_IEE80211PRISM = 802 214 | LINK_IEE80211_RADIOTAP = 803 215 | LINK_IEE8021154 = 804 216 | LINK_IEE8021154MONITOR = 805 217 | LINK_PHONET = 820 218 | LINK_PHONETPIPE = 821 219 | LINK_CAIF = 822 220 | LINK_IP6GRE = 823 221 | LINK_NETLINK = 824 222 | LINK6_LOWPAN = 825 223 | LINK_VOID = 65535 224 | LINK_NONE = 65534 225 | 226 | 227 | class NethelpersMatchOperator(betterproto.Enum): 228 | """NethelpersMatchOperator is a netfilter match operator.""" 229 | 230 | OPERATOR_EQUAL = 0 231 | OPERATOR_NOT_EQUAL = 1 232 | 233 | 234 | class NethelpersNfTablesChainHook(betterproto.Enum): 235 | """ 236 | NethelpersNfTablesChainHook wraps nftables.ChainHook for YAML marshaling. 237 | """ 238 | 239 | CHAIN_HOOK_PREROUTING = 0 240 | CHAIN_HOOK_INPUT = 1 241 | CHAIN_HOOK_FORWARD = 2 242 | CHAIN_HOOK_OUTPUT = 3 243 | CHAIN_HOOK_POSTROUTING = 4 244 | 245 | 246 | class NethelpersNfTablesChainPriority(betterproto.Enum): 247 | """ 248 | NethelpersNfTablesChainPriority wraps nftables.ChainPriority for YAML 249 | marshaling. 250 | """ 251 | 252 | NETHELPERS_NFTABLESCHAINPRIORITY_UNSPECIFIED = 0 253 | CHAIN_PRIORITY_FIRST = -2147483648 254 | CHAIN_PRIORITY_CONNTRACK_DEFRAG = -400 255 | CHAIN_PRIORITY_RAW = -300 256 | CHAIN_PRIORITY_SE_LINUX_FIRST = -225 257 | CHAIN_PRIORITY_CONNTRACK = -200 258 | CHAIN_PRIORITY_MANGLE = -150 259 | CHAIN_PRIORITY_NAT_DEST = -100 260 | CHAIN_PRIORITY_FILTER = 0 261 | CHAIN_PRIORITY_SECURITY = 50 262 | CHAIN_PRIORITY_NAT_SOURCE = 100 263 | CHAIN_PRIORITY_SE_LINUX_LAST = 225 264 | CHAIN_PRIORITY_CONNTRACK_HELPER = 300 265 | CHAIN_PRIORITY_LAST = 2147483647 266 | 267 | 268 | class NethelpersNfTablesVerdict(betterproto.Enum): 269 | """ 270 | NethelpersNfTablesVerdict wraps nftables.Verdict for YAML marshaling. 271 | """ 272 | 273 | VERDICT_DROP = 0 274 | VERDICT_ACCEPT = 1 275 | 276 | 277 | class NethelpersOperationalState(betterproto.Enum): 278 | """ 279 | NethelpersOperationalState wraps rtnetlink.OperationalState for YAML 280 | marshaling. 281 | """ 282 | 283 | OPER_STATE_UNKNOWN = 0 284 | OPER_STATE_NOT_PRESENT = 1 285 | OPER_STATE_DOWN = 2 286 | OPER_STATE_LOWER_LAYER_DOWN = 3 287 | OPER_STATE_TESTING = 4 288 | OPER_STATE_DORMANT = 5 289 | OPER_STATE_UP = 6 290 | 291 | 292 | class NethelpersPort(betterproto.Enum): 293 | """NethelpersPort wraps ethtool.Port for YAML marshaling.""" 294 | 295 | TWISTED_PAIR = 0 296 | AUI = 1 297 | MII = 2 298 | FIBRE = 3 299 | BNC = 4 300 | DIRECT_ATTACH = 5 301 | NONE = 239 302 | OTHER = 255 303 | 304 | 305 | class NethelpersPrimaryReselect(betterproto.Enum): 306 | """NethelpersPrimaryReselect is an ARP targets mode.""" 307 | 308 | PRIMARY_RESELECT_ALWAYS = 0 309 | PRIMARY_RESELECT_BETTER = 1 310 | PRIMARY_RESELECT_FAILURE = 2 311 | 312 | 313 | class NethelpersProtocol(betterproto.Enum): 314 | """NethelpersProtocol is a inet protocol.""" 315 | 316 | NETHELPERS_PROTOCOL_UNSPECIFIED = 0 317 | PROTOCOL_ICMP = 1 318 | PROTOCOL_TCP = 6 319 | PROTOCOL_UDP = 17 320 | PROTOCOL_ICM_PV6 = 58 321 | 322 | 323 | class NethelpersRouteFlag(betterproto.Enum): 324 | """NethelpersRouteFlag wraps RTM_F_* constants.""" 325 | 326 | NETHELPERS_ROUTEFLAG_UNSPECIFIED = 0 327 | ROUTE_NOTIFY = 256 328 | ROUTE_CLONED = 512 329 | ROUTE_EQUALIZE = 1024 330 | ROUTE_PREFIX = 2048 331 | ROUTE_LOOKUP_TABLE = 4096 332 | ROUTE_FIB_MATCH = 8192 333 | ROUTE_OFFLOAD = 16384 334 | ROUTE_TRAP = 32768 335 | 336 | 337 | class NethelpersRouteProtocol(betterproto.Enum): 338 | """NethelpersRouteProtocol is a routing protocol.""" 339 | 340 | PROTOCOL_UNSPEC = 0 341 | PROTOCOL_REDIRECT = 1 342 | PROTOCOL_KERNEL = 2 343 | PROTOCOL_BOOT = 3 344 | PROTOCOL_STATIC = 4 345 | PROTOCOL_RA = 9 346 | PROTOCOL_MRT = 10 347 | PROTOCOL_ZEBRA = 11 348 | PROTOCOL_BIRD = 12 349 | PROTOCOL_DNROUTED = 13 350 | PROTOCOL_XORP = 14 351 | PROTOCOL_NTK = 15 352 | PROTOCOL_DHCP = 16 353 | PROTOCOL_MRTD = 17 354 | PROTOCOL_KEEPALIVED = 18 355 | PROTOCOL_BABEL = 42 356 | PROTOCOL_OPENR = 99 357 | PROTOCOL_BGP = 186 358 | PROTOCOL_ISIS = 187 359 | PROTOCOL_OSPF = 188 360 | PROTOCOL_RIP = 189 361 | PROTOCOL_EIGRP = 192 362 | 363 | 364 | class NethelpersRouteType(betterproto.Enum): 365 | """NethelpersRouteType is a route type.""" 366 | 367 | TYPE_UNSPEC = 0 368 | TYPE_UNICAST = 1 369 | TYPE_LOCAL = 2 370 | TYPE_BROADCAST = 3 371 | TYPE_ANYCAST = 4 372 | TYPE_MULTICAST = 5 373 | TYPE_BLACKHOLE = 6 374 | TYPE_UNREACHABLE = 7 375 | TYPE_PROHIBIT = 8 376 | TYPE_THROW = 9 377 | TYPE_NAT = 10 378 | TYPE_X_RESOLVE = 11 379 | 380 | 381 | class NethelpersRoutingTable(betterproto.Enum): 382 | """NethelpersRoutingTable is a routing table ID.""" 383 | 384 | TABLE_UNSPEC = 0 385 | TABLE_DEFAULT = 253 386 | TABLE_MAIN = 254 387 | TABLE_LOCAL = 255 388 | 389 | 390 | class NethelpersScope(betterproto.Enum): 391 | """NethelpersScope is an address scope.""" 392 | 393 | SCOPE_GLOBAL = 0 394 | SCOPE_SITE = 200 395 | SCOPE_LINK = 253 396 | SCOPE_HOST = 254 397 | SCOPE_NOWHERE = 255 398 | 399 | 400 | class NethelpersVlanProtocol(betterproto.Enum): 401 | """NethelpersVLANProtocol is a VLAN protocol.""" 402 | 403 | NETHELPERS_VLANPROTOCOL_UNSPECIFIED = 0 404 | VLAN_PROTOCOL8021_Q = 33024 405 | VLAN_PROTOCOL8021_AD = 34984 406 | 407 | 408 | class KubespanPeerState(betterproto.Enum): 409 | """KubespanPeerState is KubeSpan peer current state.""" 410 | 411 | PEER_STATE_UNKNOWN = 0 412 | PEER_STATE_UP = 1 413 | PEER_STATE_DOWN = 2 414 | 415 | 416 | class NetworkConfigLayer(betterproto.Enum): 417 | """ 418 | NetworkConfigLayer describes network configuration layers, with lowest 419 | priority first. 420 | """ 421 | 422 | CONFIG_DEFAULT = 0 423 | CONFIG_CMDLINE = 1 424 | CONFIG_PLATFORM = 2 425 | CONFIG_OPERATOR = 3 426 | CONFIG_MACHINE_CONFIGURATION = 4 427 | 428 | 429 | class NetworkOperator(betterproto.Enum): 430 | """NetworkOperator enumerates Talos network operators.""" 431 | 432 | OPERATOR_DHCP4 = 0 433 | OPERATOR_DHCP6 = 1 434 | OPERATOR_VIP = 2 435 | 436 | 437 | class RuntimeMachineStage(betterproto.Enum): 438 | """ 439 | RuntimeMachineStage describes the stage of the machine boot/run process. 440 | """ 441 | 442 | MACHINE_STAGE_UNKNOWN = 0 443 | MACHINE_STAGE_BOOTING = 1 444 | MACHINE_STAGE_INSTALLING = 2 445 | MACHINE_STAGE_MAINTENANCE = 3 446 | MACHINE_STAGE_RUNNING = 4 447 | MACHINE_STAGE_REBOOTING = 5 448 | MACHINE_STAGE_SHUTTING_DOWN = 6 449 | MACHINE_STAGE_RESETTING = 7 450 | MACHINE_STAGE_UPGRADING = 8 451 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/etcd/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/etcd/etcd.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import ( 6 | Dict, 7 | List, 8 | ) 9 | 10 | import betterproto 11 | 12 | from ..... import common as ____common__ 13 | 14 | 15 | @dataclass(eq=False, repr=False) 16 | class ConfigSpec(betterproto.Message): 17 | """ConfigSpec describes (some) configuration settings of etcd.""" 18 | 19 | advertise_valid_subnets: List[str] = betterproto.string_field(1) 20 | advertise_exclude_subnets: List[str] = betterproto.string_field(2) 21 | image: str = betterproto.string_field(3) 22 | extra_args: Dict[str, str] = betterproto.map_field( 23 | 4, betterproto.TYPE_STRING, betterproto.TYPE_STRING 24 | ) 25 | listen_valid_subnets: List[str] = betterproto.string_field(5) 26 | listen_exclude_subnets: List[str] = betterproto.string_field(6) 27 | 28 | 29 | @dataclass(eq=False, repr=False) 30 | class MemberSpec(betterproto.Message): 31 | """MemberSpec holds information about an etcd member.""" 32 | 33 | member_id: str = betterproto.string_field(1) 34 | 35 | 36 | @dataclass(eq=False, repr=False) 37 | class PkiStatusSpec(betterproto.Message): 38 | """PKIStatusSpec describes status of rendered secrets.""" 39 | 40 | ready: bool = betterproto.bool_field(1) 41 | version: str = betterproto.string_field(2) 42 | 43 | 44 | @dataclass(eq=False, repr=False) 45 | class SpecSpec(betterproto.Message): 46 | """SpecSpec describes (some) Specuration settings of etcd.""" 47 | 48 | name: str = betterproto.string_field(1) 49 | advertised_addresses: List["____common__.NetIp"] = betterproto.message_field(2) 50 | image: str = betterproto.string_field(3) 51 | extra_args: Dict[str, str] = betterproto.map_field( 52 | 4, betterproto.TYPE_STRING, betterproto.TYPE_STRING 53 | ) 54 | listen_peer_addresses: List["____common__.NetIp"] = betterproto.message_field(5) 55 | listen_client_addresses: List["____common__.NetIp"] = betterproto.message_field(6) 56 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/extensions/extensions.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | @dataclass(eq=False, repr=False) 10 | class Compatibility(betterproto.Message): 11 | """Compatibility describes extension compatibility.""" 12 | 13 | talos: "Constraint" = betterproto.message_field(1) 14 | 15 | 16 | @dataclass(eq=False, repr=False) 17 | class Constraint(betterproto.Message): 18 | """Constraint describes compatibility constraint.""" 19 | 20 | version: str = betterproto.string_field(1) 21 | 22 | 23 | @dataclass(eq=False, repr=False) 24 | class Layer(betterproto.Message): 25 | """Layer defines overlay mount layer.""" 26 | 27 | image: str = betterproto.string_field(1) 28 | metadata: "Metadata" = betterproto.message_field(2) 29 | 30 | 31 | @dataclass(eq=False, repr=False) 32 | class Metadata(betterproto.Message): 33 | """Metadata describes base extension metadata.""" 34 | 35 | name: str = betterproto.string_field(1) 36 | version: str = betterproto.string_field(2) 37 | author: str = betterproto.string_field(3) 38 | description: str = betterproto.string_field(4) 39 | compatibility: "Compatibility" = betterproto.message_field(5) 40 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/files/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/files/files.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | @dataclass(eq=False, repr=False) 10 | class EtcFileSpecSpec(betterproto.Message): 11 | """EtcFileSpecSpec describes status of rendered secrets.""" 12 | 13 | contents: bytes = betterproto.bytes_field(1) 14 | mode: int = betterproto.uint32_field(2) 15 | 16 | 17 | @dataclass(eq=False, repr=False) 18 | class EtcFileStatusSpec(betterproto.Message): 19 | """EtcFileStatusSpec describes status of rendered secrets.""" 20 | 21 | spec_version: str = betterproto.string_field(1) 22 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/hardware/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/hardware/hardware.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | @dataclass(eq=False, repr=False) 10 | class MemoryModuleSpec(betterproto.Message): 11 | """MemoryModuleSpec represents a single Memory.""" 12 | 13 | size: int = betterproto.uint32_field(1) 14 | device_locator: str = betterproto.string_field(2) 15 | bank_locator: str = betterproto.string_field(3) 16 | speed: int = betterproto.uint32_field(4) 17 | manufacturer: str = betterproto.string_field(5) 18 | serial_number: str = betterproto.string_field(6) 19 | asset_tag: str = betterproto.string_field(7) 20 | product_name: str = betterproto.string_field(8) 21 | 22 | 23 | @dataclass(eq=False, repr=False) 24 | class ProcessorSpec(betterproto.Message): 25 | """ProcessorSpec represents a single processor.""" 26 | 27 | socket: str = betterproto.string_field(1) 28 | manufacturer: str = betterproto.string_field(2) 29 | product_name: str = betterproto.string_field(3) 30 | max_speed: int = betterproto.uint32_field(4) 31 | boot_speed: int = betterproto.uint32_field(5) 32 | status: int = betterproto.uint32_field(6) 33 | serial_number: str = betterproto.string_field(7) 34 | asset_tag: str = betterproto.string_field(8) 35 | part_number: str = betterproto.string_field(9) 36 | core_count: int = betterproto.uint32_field(10) 37 | core_enabled: int = betterproto.uint32_field(11) 38 | thread_count: int = betterproto.uint32_field(12) 39 | 40 | 41 | @dataclass(eq=False, repr=False) 42 | class SystemInformationSpec(betterproto.Message): 43 | """ 44 | SystemInformationSpec represents the system information obtained from 45 | smbios. 46 | """ 47 | 48 | manufacturer: str = betterproto.string_field(1) 49 | product_name: str = betterproto.string_field(2) 50 | version: str = betterproto.string_field(3) 51 | serial_number: str = betterproto.string_field(4) 52 | uuid: str = betterproto.string_field(5) 53 | wake_up_type: str = betterproto.string_field(6) 54 | sku_number: str = betterproto.string_field(7) 55 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/k8s/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/k8s/k8s.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import ( 6 | Dict, 7 | List, 8 | ) 9 | 10 | import betterproto 11 | import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf 12 | 13 | from ..... import common as ____common__ 14 | from .. import proto as _proto__ 15 | 16 | 17 | @dataclass(eq=False, repr=False) 18 | class ApiServerConfigSpec(betterproto.Message): 19 | """APIServerConfigSpec is configuration for kube-apiserver.""" 20 | 21 | image: str = betterproto.string_field(1) 22 | cloud_provider: str = betterproto.string_field(2) 23 | control_plane_endpoint: str = betterproto.string_field(3) 24 | etcd_servers: List[str] = betterproto.string_field(4) 25 | local_port: int = betterproto.int64_field(5) 26 | service_cid_rs: List[str] = betterproto.string_field(6) 27 | extra_args: Dict[str, str] = betterproto.map_field( 28 | 7, betterproto.TYPE_STRING, betterproto.TYPE_STRING 29 | ) 30 | extra_volumes: List["ExtraVolume"] = betterproto.message_field(8) 31 | environment_variables: Dict[str, str] = betterproto.map_field( 32 | 9, betterproto.TYPE_STRING, betterproto.TYPE_STRING 33 | ) 34 | pod_security_policy_enabled: bool = betterproto.bool_field(10) 35 | advertised_address: str = betterproto.string_field(11) 36 | resources: "Resources" = betterproto.message_field(12) 37 | 38 | 39 | @dataclass(eq=False, repr=False) 40 | class AdmissionControlConfigSpec(betterproto.Message): 41 | """AdmissionControlConfigSpec is configuration for kube-apiserver.""" 42 | 43 | config: List["AdmissionPluginSpec"] = betterproto.message_field(1) 44 | 45 | 46 | @dataclass(eq=False, repr=False) 47 | class AdmissionPluginSpec(betterproto.Message): 48 | """ 49 | AdmissionPluginSpec is a single admission plugin configuration Admission 50 | Control plugins. 51 | """ 52 | 53 | name: str = betterproto.string_field(1) 54 | configuration: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field( 55 | 2 56 | ) 57 | 58 | 59 | @dataclass(eq=False, repr=False) 60 | class AuditPolicyConfigSpec(betterproto.Message): 61 | """ 62 | AuditPolicyConfigSpec is audit policy configuration for kube-apiserver. 63 | """ 64 | 65 | config: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field(1) 66 | 67 | 68 | @dataclass(eq=False, repr=False) 69 | class BootstrapManifestsConfigSpec(betterproto.Message): 70 | """ 71 | BootstrapManifestsConfigSpec is configuration for bootstrap manifests. 72 | """ 73 | 74 | server: str = betterproto.string_field(1) 75 | cluster_domain: str = betterproto.string_field(2) 76 | pod_cid_rs: List[str] = betterproto.string_field(3) 77 | proxy_enabled: bool = betterproto.bool_field(4) 78 | proxy_image: str = betterproto.string_field(5) 79 | proxy_args: List[str] = betterproto.string_field(6) 80 | core_dns_enabled: bool = betterproto.bool_field(7) 81 | core_dns_image: str = betterproto.string_field(8) 82 | dns_service_ip: str = betterproto.string_field(9) 83 | dns_service_i_pv6: str = betterproto.string_field(10) 84 | flannel_enabled: bool = betterproto.bool_field(11) 85 | flannel_image: str = betterproto.string_field(12) 86 | flannel_cni_image: str = betterproto.string_field(13) 87 | pod_security_policy_enabled: bool = betterproto.bool_field(14) 88 | talos_api_service_enabled: bool = betterproto.bool_field(15) 89 | flannel_extra_args: List[str] = betterproto.string_field(16) 90 | 91 | 92 | @dataclass(eq=False, repr=False) 93 | class ConfigStatusSpec(betterproto.Message): 94 | """ConfigStatusSpec describes status of rendered secrets.""" 95 | 96 | ready: bool = betterproto.bool_field(1) 97 | version: str = betterproto.string_field(2) 98 | 99 | 100 | @dataclass(eq=False, repr=False) 101 | class ControllerManagerConfigSpec(betterproto.Message): 102 | """ 103 | ControllerManagerConfigSpec is configuration for kube-controller-manager. 104 | """ 105 | 106 | enabled: bool = betterproto.bool_field(1) 107 | image: str = betterproto.string_field(2) 108 | cloud_provider: str = betterproto.string_field(3) 109 | pod_cid_rs: List[str] = betterproto.string_field(4) 110 | service_cid_rs: List[str] = betterproto.string_field(5) 111 | extra_args: Dict[str, str] = betterproto.map_field( 112 | 6, betterproto.TYPE_STRING, betterproto.TYPE_STRING 113 | ) 114 | extra_volumes: List["ExtraVolume"] = betterproto.message_field(7) 115 | environment_variables: Dict[str, str] = betterproto.map_field( 116 | 8, betterproto.TYPE_STRING, betterproto.TYPE_STRING 117 | ) 118 | resources: "Resources" = betterproto.message_field(9) 119 | 120 | 121 | @dataclass(eq=False, repr=False) 122 | class EndpointSpec(betterproto.Message): 123 | """EndpointSpec describes status of rendered secrets.""" 124 | 125 | addresses: List["____common__.NetIp"] = betterproto.message_field(1) 126 | 127 | 128 | @dataclass(eq=False, repr=False) 129 | class ExtraManifest(betterproto.Message): 130 | """ExtraManifest defines a single extra manifest to download.""" 131 | 132 | name: str = betterproto.string_field(1) 133 | url: str = betterproto.string_field(2) 134 | priority: str = betterproto.string_field(3) 135 | extra_headers: Dict[str, str] = betterproto.map_field( 136 | 4, betterproto.TYPE_STRING, betterproto.TYPE_STRING 137 | ) 138 | inline_manifest: str = betterproto.string_field(5) 139 | 140 | 141 | @dataclass(eq=False, repr=False) 142 | class ExtraManifestsConfigSpec(betterproto.Message): 143 | """ 144 | ExtraManifestsConfigSpec is configuration for extra bootstrap manifests. 145 | """ 146 | 147 | extra_manifests: List["ExtraManifest"] = betterproto.message_field(1) 148 | 149 | 150 | @dataclass(eq=False, repr=False) 151 | class ExtraVolume(betterproto.Message): 152 | """ExtraVolume is a configuration of extra volume.""" 153 | 154 | name: str = betterproto.string_field(1) 155 | host_path: str = betterproto.string_field(2) 156 | mount_path: str = betterproto.string_field(3) 157 | read_only: bool = betterproto.bool_field(4) 158 | 159 | 160 | @dataclass(eq=False, repr=False) 161 | class KubePrismConfigSpec(betterproto.Message): 162 | """KubePrismConfigSpec describes KubePrismConfig data.""" 163 | 164 | host: str = betterproto.string_field(1) 165 | port: int = betterproto.int64_field(2) 166 | endpoints: List["KubePrismEndpoint"] = betterproto.message_field(3) 167 | 168 | 169 | @dataclass(eq=False, repr=False) 170 | class KubePrismEndpoint(betterproto.Message): 171 | """KubePrismEndpoint holds data for control plane endpoint.""" 172 | 173 | host: str = betterproto.string_field(1) 174 | port: int = betterproto.uint32_field(2) 175 | 176 | 177 | @dataclass(eq=False, repr=False) 178 | class KubePrismEndpointsSpec(betterproto.Message): 179 | """KubePrismEndpointsSpec describes KubePrismEndpoints configuration.""" 180 | 181 | endpoints: List["KubePrismEndpoint"] = betterproto.message_field(1) 182 | 183 | 184 | @dataclass(eq=False, repr=False) 185 | class KubePrismStatusesSpec(betterproto.Message): 186 | """KubePrismStatusesSpec describes KubePrismStatuses data.""" 187 | 188 | host: str = betterproto.string_field(1) 189 | healthy: bool = betterproto.bool_field(2) 190 | 191 | 192 | @dataclass(eq=False, repr=False) 193 | class KubeletConfigSpec(betterproto.Message): 194 | """KubeletConfigSpec holds the source of kubelet configuration.""" 195 | 196 | image: str = betterproto.string_field(1) 197 | cluster_dns: List[str] = betterproto.string_field(2) 198 | cluster_domain: str = betterproto.string_field(3) 199 | extra_args: Dict[str, str] = betterproto.map_field( 200 | 4, betterproto.TYPE_STRING, betterproto.TYPE_STRING 201 | ) 202 | extra_mounts: List["_proto__.Mount"] = betterproto.message_field(5) 203 | extra_config: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field( 204 | 6 205 | ) 206 | cloud_provider_external: bool = betterproto.bool_field(7) 207 | default_runtime_seccomp_enabled: bool = betterproto.bool_field(8) 208 | skip_node_registration: bool = betterproto.bool_field(9) 209 | static_pod_list_url: str = betterproto.string_field(10) 210 | disable_manifests_directory: bool = betterproto.bool_field(11) 211 | enable_fs_quota_monitoring: bool = betterproto.bool_field(12) 212 | credential_provider_config: "betterproto_lib_google_protobuf.Struct" = ( 213 | betterproto.message_field(13) 214 | ) 215 | 216 | 217 | @dataclass(eq=False, repr=False) 218 | class KubeletSpecSpec(betterproto.Message): 219 | """KubeletSpecSpec holds the source of kubelet configuration.""" 220 | 221 | image: str = betterproto.string_field(1) 222 | args: List[str] = betterproto.string_field(2) 223 | extra_mounts: List["_proto__.Mount"] = betterproto.message_field(3) 224 | expected_nodename: str = betterproto.string_field(4) 225 | config: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field(5) 226 | credential_provider_config: "betterproto_lib_google_protobuf.Struct" = ( 227 | betterproto.message_field(6) 228 | ) 229 | 230 | 231 | @dataclass(eq=False, repr=False) 232 | class ManifestSpec(betterproto.Message): 233 | """ManifestSpec holds the Kubernetes resources spec.""" 234 | 235 | items: List["SingleManifest"] = betterproto.message_field(1) 236 | 237 | 238 | @dataclass(eq=False, repr=False) 239 | class ManifestStatusSpec(betterproto.Message): 240 | """ManifestStatusSpec describes manifest application status.""" 241 | 242 | manifests_applied: List[str] = betterproto.string_field(1) 243 | 244 | 245 | @dataclass(eq=False, repr=False) 246 | class NodeIpConfigSpec(betterproto.Message): 247 | """NodeIPConfigSpec holds the Node IP specification.""" 248 | 249 | valid_subnets: List[str] = betterproto.string_field(1) 250 | exclude_subnets: List[str] = betterproto.string_field(2) 251 | 252 | 253 | @dataclass(eq=False, repr=False) 254 | class NodeIpSpec(betterproto.Message): 255 | """NodeIPSpec holds the Node IP specification.""" 256 | 257 | addresses: List["____common__.NetIp"] = betterproto.message_field(1) 258 | 259 | 260 | @dataclass(eq=False, repr=False) 261 | class NodeLabelSpecSpec(betterproto.Message): 262 | """ 263 | NodeLabelSpecSpec represents a label that's attached to a Talos node. 264 | """ 265 | 266 | key: str = betterproto.string_field(1) 267 | value: str = betterproto.string_field(2) 268 | 269 | 270 | @dataclass(eq=False, repr=False) 271 | class NodeStatusSpec(betterproto.Message): 272 | """NodeStatusSpec describes Kubernetes NodeStatus.""" 273 | 274 | nodename: str = betterproto.string_field(1) 275 | node_ready: bool = betterproto.bool_field(2) 276 | unschedulable: bool = betterproto.bool_field(3) 277 | labels: Dict[str, str] = betterproto.map_field( 278 | 4, betterproto.TYPE_STRING, betterproto.TYPE_STRING 279 | ) 280 | annotations: Dict[str, str] = betterproto.map_field( 281 | 5, betterproto.TYPE_STRING, betterproto.TYPE_STRING 282 | ) 283 | 284 | 285 | @dataclass(eq=False, repr=False) 286 | class NodeTaintSpecSpec(betterproto.Message): 287 | """ 288 | NodeTaintSpecSpec represents a label that's attached to a Talos node. 289 | """ 290 | 291 | key: str = betterproto.string_field(1) 292 | effect: str = betterproto.string_field(2) 293 | value: str = betterproto.string_field(3) 294 | 295 | 296 | @dataclass(eq=False, repr=False) 297 | class NodenameSpec(betterproto.Message): 298 | """NodenameSpec describes Kubernetes nodename.""" 299 | 300 | nodename: str = betterproto.string_field(1) 301 | hostname_version: str = betterproto.string_field(2) 302 | skip_node_registration: bool = betterproto.bool_field(3) 303 | 304 | 305 | @dataclass(eq=False, repr=False) 306 | class Resources(betterproto.Message): 307 | """Resources is a configuration of cpu and memory resources.""" 308 | 309 | requests: Dict[str, str] = betterproto.map_field( 310 | 1, betterproto.TYPE_STRING, betterproto.TYPE_STRING 311 | ) 312 | limits: Dict[str, str] = betterproto.map_field( 313 | 2, betterproto.TYPE_STRING, betterproto.TYPE_STRING 314 | ) 315 | 316 | 317 | @dataclass(eq=False, repr=False) 318 | class SchedulerConfigSpec(betterproto.Message): 319 | """SchedulerConfigSpec is configuration for kube-scheduler.""" 320 | 321 | enabled: bool = betterproto.bool_field(1) 322 | image: str = betterproto.string_field(2) 323 | extra_args: Dict[str, str] = betterproto.map_field( 324 | 3, betterproto.TYPE_STRING, betterproto.TYPE_STRING 325 | ) 326 | extra_volumes: List["ExtraVolume"] = betterproto.message_field(4) 327 | environment_variables: Dict[str, str] = betterproto.map_field( 328 | 5, betterproto.TYPE_STRING, betterproto.TYPE_STRING 329 | ) 330 | resources: "Resources" = betterproto.message_field(6) 331 | config: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field(7) 332 | 333 | 334 | @dataclass(eq=False, repr=False) 335 | class SecretsStatusSpec(betterproto.Message): 336 | """SecretsStatusSpec describes status of rendered secrets.""" 337 | 338 | ready: bool = betterproto.bool_field(1) 339 | version: str = betterproto.string_field(2) 340 | 341 | 342 | @dataclass(eq=False, repr=False) 343 | class SingleManifest(betterproto.Message): 344 | """SingleManifest is a single manifest.""" 345 | 346 | object: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field(1) 347 | 348 | 349 | @dataclass(eq=False, repr=False) 350 | class StaticPodServerStatusSpec(betterproto.Message): 351 | """ 352 | StaticPodServerStatusSpec describes static pod spec, it contains marshaled 353 | *v1.Pod spec. 354 | """ 355 | 356 | url: str = betterproto.string_field(1) 357 | 358 | 359 | @dataclass(eq=False, repr=False) 360 | class StaticPodSpec(betterproto.Message): 361 | """ 362 | StaticPodSpec describes static pod spec, it contains marshaled *v1.Pod 363 | spec. 364 | """ 365 | 366 | pod: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field(1) 367 | 368 | 369 | @dataclass(eq=False, repr=False) 370 | class StaticPodStatusSpec(betterproto.Message): 371 | """StaticPodStatusSpec describes kubelet static pod status.""" 372 | 373 | pod_status: "betterproto_lib_google_protobuf.Struct" = betterproto.message_field(1) 374 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/kubeaccess/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/kubeaccess/kubeaccess.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class ConfigSpec(betterproto.Message): 12 | """ConfigSpec describes KubeSpan configuration..""" 13 | 14 | enabled: bool = betterproto.bool_field(1) 15 | allowed_api_roles: List[str] = betterproto.string_field(2) 16 | allowed_kubernetes_namespaces: List[str] = betterproto.string_field(3) 17 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/kubespan/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/kubespan/kubespan.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from datetime import datetime 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | from ..... import common as ____common__ 11 | from .. import enums as _enums__ 12 | 13 | 14 | @dataclass(eq=False, repr=False) 15 | class ConfigSpec(betterproto.Message): 16 | """ConfigSpec describes KubeSpan configuration..""" 17 | 18 | enabled: bool = betterproto.bool_field(1) 19 | cluster_id: str = betterproto.string_field(2) 20 | shared_secret: str = betterproto.string_field(3) 21 | force_routing: bool = betterproto.bool_field(4) 22 | advertise_kubernetes_networks: bool = betterproto.bool_field(5) 23 | mtu: int = betterproto.uint32_field(6) 24 | endpoint_filters: List[str] = betterproto.string_field(7) 25 | harvest_extra_endpoints: bool = betterproto.bool_field(8) 26 | 27 | 28 | @dataclass(eq=False, repr=False) 29 | class EndpointSpec(betterproto.Message): 30 | """EndpointSpec describes Endpoint state.""" 31 | 32 | affiliate_id: str = betterproto.string_field(1) 33 | endpoint: "____common__.NetIpPort" = betterproto.message_field(2) 34 | 35 | 36 | @dataclass(eq=False, repr=False) 37 | class IdentitySpec(betterproto.Message): 38 | """ 39 | IdentitySpec describes KubeSpan keys and address. Note: IdentitySpec is 40 | persisted on disk in the STATE partition, so YAML serialization should be 41 | kept backwards compatible. 42 | """ 43 | 44 | address: "____common__.NetIpPrefix" = betterproto.message_field(1) 45 | subnet: "____common__.NetIpPrefix" = betterproto.message_field(2) 46 | private_key: str = betterproto.string_field(3) 47 | public_key: str = betterproto.string_field(4) 48 | 49 | 50 | @dataclass(eq=False, repr=False) 51 | class PeerSpecSpec(betterproto.Message): 52 | """PeerSpecSpec describes PeerSpec state.""" 53 | 54 | address: "____common__.NetIp" = betterproto.message_field(1) 55 | allowed_ips: List["____common__.NetIpPrefix"] = betterproto.message_field(2) 56 | endpoints: List["____common__.NetIpPort"] = betterproto.message_field(3) 57 | label: str = betterproto.string_field(4) 58 | 59 | 60 | @dataclass(eq=False, repr=False) 61 | class PeerStatusSpec(betterproto.Message): 62 | """PeerStatusSpec describes PeerStatus state.""" 63 | 64 | endpoint: "____common__.NetIpPort" = betterproto.message_field(1) 65 | label: str = betterproto.string_field(2) 66 | state: "_enums__.KubespanPeerState" = betterproto.enum_field(3) 67 | receive_bytes: int = betterproto.int64_field(4) 68 | transmit_bytes: int = betterproto.int64_field(5) 69 | last_handshake_time: datetime = betterproto.message_field(6) 70 | last_used_endpoint: "____common__.NetIpPort" = betterproto.message_field(7) 71 | last_endpoint_change: datetime = betterproto.message_field(8) 72 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/network/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/network/network.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from datetime import timedelta 6 | from typing import List 7 | 8 | import betterproto 9 | 10 | from ..... import common as ____common__ 11 | from .. import enums as _enums__ 12 | 13 | 14 | @dataclass(eq=False, repr=False) 15 | class AddressSpecSpec(betterproto.Message): 16 | """AddressSpecSpec describes status of rendered secrets.""" 17 | 18 | address: "____common__.NetIpPrefix" = betterproto.message_field(1) 19 | link_name: str = betterproto.string_field(2) 20 | family: "_enums__.NethelpersFamily" = betterproto.enum_field(3) 21 | scope: "_enums__.NethelpersScope" = betterproto.enum_field(4) 22 | flags: int = betterproto.uint32_field(5) 23 | announce_with_arp: bool = betterproto.bool_field(6) 24 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(7) 25 | 26 | 27 | @dataclass(eq=False, repr=False) 28 | class AddressStatusSpec(betterproto.Message): 29 | """AddressStatusSpec describes status of rendered secrets.""" 30 | 31 | address: "____common__.NetIpPrefix" = betterproto.message_field(1) 32 | local: "____common__.NetIp" = betterproto.message_field(2) 33 | broadcast: "____common__.NetIp" = betterproto.message_field(3) 34 | anycast: "____common__.NetIp" = betterproto.message_field(4) 35 | multicast: "____common__.NetIp" = betterproto.message_field(5) 36 | link_index: int = betterproto.uint32_field(6) 37 | link_name: str = betterproto.string_field(7) 38 | family: "_enums__.NethelpersFamily" = betterproto.enum_field(8) 39 | scope: "_enums__.NethelpersScope" = betterproto.enum_field(9) 40 | flags: int = betterproto.uint32_field(10) 41 | 42 | 43 | @dataclass(eq=False, repr=False) 44 | class BondMasterSpec(betterproto.Message): 45 | """BondMasterSpec describes bond settings if Kind == "bond".""" 46 | 47 | mode: "_enums__.NethelpersBondMode" = betterproto.enum_field(1) 48 | hash_policy: "_enums__.NethelpersBondXmitHashPolicy" = betterproto.enum_field(2) 49 | lacp_rate: "_enums__.NethelpersLacpRate" = betterproto.enum_field(3) 50 | arp_validate: "_enums__.NethelpersArpValidate" = betterproto.enum_field(4) 51 | arp_all_targets: "_enums__.NethelpersArpAllTargets" = betterproto.enum_field(5) 52 | primary_index: int = betterproto.uint32_field(6) 53 | primary_reselect: "_enums__.NethelpersPrimaryReselect" = betterproto.enum_field(7) 54 | fail_over_mac: "_enums__.NethelpersFailOverMac" = betterproto.enum_field(8) 55 | ad_select: "_enums__.NethelpersAdSelect" = betterproto.enum_field(9) 56 | mii_mon: int = betterproto.uint32_field(10) 57 | up_delay: int = betterproto.uint32_field(11) 58 | down_delay: int = betterproto.uint32_field(12) 59 | arp_interval: int = betterproto.uint32_field(13) 60 | resend_igmp: int = betterproto.uint32_field(14) 61 | min_links: int = betterproto.uint32_field(15) 62 | lp_interval: int = betterproto.uint32_field(16) 63 | packets_per_slave: int = betterproto.uint32_field(17) 64 | num_peer_notif: int = betterproto.fixed32_field(18) 65 | tlb_dynamic_lb: int = betterproto.fixed32_field(19) 66 | all_slaves_active: int = betterproto.fixed32_field(20) 67 | use_carrier: bool = betterproto.bool_field(21) 68 | ad_actor_sys_prio: int = betterproto.fixed32_field(22) 69 | ad_user_port_key: int = betterproto.fixed32_field(23) 70 | peer_notify_delay: int = betterproto.uint32_field(24) 71 | 72 | 73 | @dataclass(eq=False, repr=False) 74 | class BondSlave(betterproto.Message): 75 | """BondSlave contains a bond's master name and slave index.""" 76 | 77 | master_name: str = betterproto.string_field(1) 78 | slave_index: int = betterproto.int64_field(2) 79 | 80 | 81 | @dataclass(eq=False, repr=False) 82 | class BridgeMasterSpec(betterproto.Message): 83 | """BridgeMasterSpec describes bridge settings if Kind == "bridge".""" 84 | 85 | stp: "StpSpec" = betterproto.message_field(1) 86 | 87 | 88 | @dataclass(eq=False, repr=False) 89 | class BridgeSlave(betterproto.Message): 90 | """BridgeSlave contains a bond's master name and slave index.""" 91 | 92 | master_name: str = betterproto.string_field(1) 93 | 94 | 95 | @dataclass(eq=False, repr=False) 96 | class Dhcp4OperatorSpec(betterproto.Message): 97 | """DHCP4OperatorSpec describes DHCP4 operator options.""" 98 | 99 | route_metric: int = betterproto.uint32_field(1) 100 | skip_hostname_request: bool = betterproto.bool_field(2) 101 | 102 | 103 | @dataclass(eq=False, repr=False) 104 | class Dhcp6OperatorSpec(betterproto.Message): 105 | """DHCP6OperatorSpec describes DHCP6 operator options.""" 106 | 107 | duid: str = betterproto.string_field(1) 108 | route_metric: int = betterproto.uint32_field(2) 109 | skip_hostname_request: bool = betterproto.bool_field(3) 110 | 111 | 112 | @dataclass(eq=False, repr=False) 113 | class HardwareAddrSpec(betterproto.Message): 114 | """HardwareAddrSpec describes spec for the link.""" 115 | 116 | name: str = betterproto.string_field(1) 117 | hardware_addr: bytes = betterproto.bytes_field(2) 118 | 119 | 120 | @dataclass(eq=False, repr=False) 121 | class HostnameSpecSpec(betterproto.Message): 122 | """HostnameSpecSpec describes node hostname.""" 123 | 124 | hostname: str = betterproto.string_field(1) 125 | domainname: str = betterproto.string_field(2) 126 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(3) 127 | 128 | 129 | @dataclass(eq=False, repr=False) 130 | class HostnameStatusSpec(betterproto.Message): 131 | """HostnameStatusSpec describes node hostname.""" 132 | 133 | hostname: str = betterproto.string_field(1) 134 | domainname: str = betterproto.string_field(2) 135 | 136 | 137 | @dataclass(eq=False, repr=False) 138 | class LinkRefreshSpec(betterproto.Message): 139 | """LinkRefreshSpec describes status of rendered secrets.""" 140 | 141 | generation: int = betterproto.int64_field(1) 142 | 143 | 144 | @dataclass(eq=False, repr=False) 145 | class LinkSpecSpec(betterproto.Message): 146 | """LinkSpecSpec describes spec for the link.""" 147 | 148 | name: str = betterproto.string_field(1) 149 | logical: bool = betterproto.bool_field(2) 150 | up: bool = betterproto.bool_field(3) 151 | mtu: int = betterproto.uint32_field(4) 152 | kind: str = betterproto.string_field(5) 153 | type: "_enums__.NethelpersLinkType" = betterproto.enum_field(6) 154 | parent_name: str = betterproto.string_field(7) 155 | bond_slave: "BondSlave" = betterproto.message_field(8) 156 | bridge_slave: "BridgeSlave" = betterproto.message_field(9) 157 | vlan: "VlanSpec" = betterproto.message_field(10) 158 | bond_master: "BondMasterSpec" = betterproto.message_field(11) 159 | bridge_master: "BridgeMasterSpec" = betterproto.message_field(12) 160 | wireguard: "WireguardSpec" = betterproto.message_field(13) 161 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(14) 162 | 163 | 164 | @dataclass(eq=False, repr=False) 165 | class LinkStatusSpec(betterproto.Message): 166 | """LinkStatusSpec describes status of rendered secrets.""" 167 | 168 | index: int = betterproto.uint32_field(1) 169 | type: "_enums__.NethelpersLinkType" = betterproto.enum_field(2) 170 | link_index: int = betterproto.uint32_field(3) 171 | flags: int = betterproto.uint32_field(4) 172 | hardware_addr: bytes = betterproto.bytes_field(5) 173 | broadcast_addr: bytes = betterproto.bytes_field(6) 174 | mtu: int = betterproto.uint32_field(7) 175 | queue_disc: str = betterproto.string_field(8) 176 | master_index: int = betterproto.uint32_field(9) 177 | operational_state: "_enums__.NethelpersOperationalState" = betterproto.enum_field( 178 | 10 179 | ) 180 | kind: str = betterproto.string_field(11) 181 | slave_kind: str = betterproto.string_field(12) 182 | bus_path: str = betterproto.string_field(13) 183 | pciid: str = betterproto.string_field(14) 184 | driver: str = betterproto.string_field(15) 185 | driver_version: str = betterproto.string_field(16) 186 | firmware_version: str = betterproto.string_field(17) 187 | product_id: str = betterproto.string_field(18) 188 | vendor_id: str = betterproto.string_field(19) 189 | product: str = betterproto.string_field(20) 190 | vendor: str = betterproto.string_field(21) 191 | link_state: bool = betterproto.bool_field(22) 192 | speed_megabits: int = betterproto.int64_field(23) 193 | port: "_enums__.NethelpersPort" = betterproto.enum_field(24) 194 | duplex: "_enums__.NethelpersDuplex" = betterproto.enum_field(25) 195 | vlan: "VlanSpec" = betterproto.message_field(26) 196 | bridge_master: "BridgeMasterSpec" = betterproto.message_field(27) 197 | bond_master: "BondMasterSpec" = betterproto.message_field(28) 198 | wireguard: "WireguardSpec" = betterproto.message_field(29) 199 | permanent_addr: bytes = betterproto.bytes_field(30) 200 | 201 | 202 | @dataclass(eq=False, repr=False) 203 | class NfTablesAddressMatch(betterproto.Message): 204 | """NfTablesAddressMatch describes the match on the IP address.""" 205 | 206 | include_subnets: List["____common__.NetIpPrefix"] = betterproto.message_field(1) 207 | exclude_subnets: List["____common__.NetIpPrefix"] = betterproto.message_field(2) 208 | invert: bool = betterproto.bool_field(3) 209 | 210 | 211 | @dataclass(eq=False, repr=False) 212 | class NfTablesChainSpec(betterproto.Message): 213 | """NfTablesChainSpec describes status of rendered secrets.""" 214 | 215 | type: str = betterproto.string_field(1) 216 | hook: "_enums__.NethelpersNfTablesChainHook" = betterproto.enum_field(2) 217 | priority: "_enums__.NethelpersNfTablesChainPriority" = betterproto.enum_field(3) 218 | rules: List["NfTablesRule"] = betterproto.message_field(4) 219 | policy: "_enums__.NethelpersNfTablesVerdict" = betterproto.enum_field(5) 220 | 221 | 222 | @dataclass(eq=False, repr=False) 223 | class NfTablesClampMss(betterproto.Message): 224 | """ 225 | NfTablesClampMSS describes the TCP MSS clamping operation. MSS is limited 226 | by the `MaxMTU` so that: - IPv4: MSS = MaxMTU - 40 - IPv6: MSS = MaxMTU - 227 | 60. 228 | """ 229 | 230 | mtu: int = betterproto.fixed32_field(1) 231 | 232 | 233 | @dataclass(eq=False, repr=False) 234 | class NfTablesConntrackStateMatch(betterproto.Message): 235 | """ 236 | NfTablesConntrackStateMatch describes the match on the connection tracking 237 | state. 238 | """ 239 | 240 | states: List["_enums__.NethelpersConntrackState"] = betterproto.enum_field(1) 241 | 242 | 243 | @dataclass(eq=False, repr=False) 244 | class NfTablesIfNameMatch(betterproto.Message): 245 | """NfTablesIfNameMatch describes the match on the interface name.""" 246 | 247 | operator: "_enums__.NethelpersMatchOperator" = betterproto.enum_field(2) 248 | interface_names: List[str] = betterproto.string_field(3) 249 | 250 | 251 | @dataclass(eq=False, repr=False) 252 | class NfTablesLayer4Match(betterproto.Message): 253 | """ 254 | NfTablesLayer4Match describes the match on the transport layer protocol. 255 | """ 256 | 257 | protocol: "_enums__.NethelpersProtocol" = betterproto.enum_field(1) 258 | match_source_port: "NfTablesPortMatch" = betterproto.message_field(2) 259 | match_destination_port: "NfTablesPortMatch" = betterproto.message_field(3) 260 | 261 | 262 | @dataclass(eq=False, repr=False) 263 | class NfTablesLimitMatch(betterproto.Message): 264 | """NfTablesLimitMatch describes the match on the packet rate.""" 265 | 266 | packet_rate_per_second: int = betterproto.uint64_field(1) 267 | 268 | 269 | @dataclass(eq=False, repr=False) 270 | class NfTablesMark(betterproto.Message): 271 | """ 272 | NfTablesMark encodes packet mark match/update operation. When used as a 273 | match computes the following condition: (mark & mask) ^ xor == value When 274 | used as an update computes the following operation: mark = (mark & mask) ^ 275 | xor. 276 | """ 277 | 278 | mask: int = betterproto.uint32_field(1) 279 | xor: int = betterproto.uint32_field(2) 280 | value: int = betterproto.uint32_field(3) 281 | 282 | 283 | @dataclass(eq=False, repr=False) 284 | class NfTablesPortMatch(betterproto.Message): 285 | """NfTablesPortMatch describes the match on the transport layer port.""" 286 | 287 | ranges: List["PortRange"] = betterproto.message_field(1) 288 | 289 | 290 | @dataclass(eq=False, repr=False) 291 | class NfTablesRule(betterproto.Message): 292 | """NfTablesRule describes a single rule in the nftables chain.""" 293 | 294 | match_o_if_name: "NfTablesIfNameMatch" = betterproto.message_field(1) 295 | verdict: "_enums__.NethelpersNfTablesVerdict" = betterproto.enum_field(2) 296 | match_mark: "NfTablesMark" = betterproto.message_field(3) 297 | set_mark: "NfTablesMark" = betterproto.message_field(4) 298 | match_source_address: "NfTablesAddressMatch" = betterproto.message_field(5) 299 | match_destination_address: "NfTablesAddressMatch" = betterproto.message_field(6) 300 | match_layer4: "NfTablesLayer4Match" = betterproto.message_field(7) 301 | match_i_if_name: "NfTablesIfNameMatch" = betterproto.message_field(8) 302 | clamp_mss: "NfTablesClampMss" = betterproto.message_field(9) 303 | match_limit: "NfTablesLimitMatch" = betterproto.message_field(10) 304 | match_conntrack_state: "NfTablesConntrackStateMatch" = betterproto.message_field(11) 305 | anon_counter: bool = betterproto.bool_field(12) 306 | 307 | 308 | @dataclass(eq=False, repr=False) 309 | class NodeAddressFilterSpec(betterproto.Message): 310 | """NodeAddressFilterSpec describes a filter for NodeAddresses.""" 311 | 312 | include_subnets: List["____common__.NetIpPrefix"] = betterproto.message_field(1) 313 | exclude_subnets: List["____common__.NetIpPrefix"] = betterproto.message_field(2) 314 | 315 | 316 | @dataclass(eq=False, repr=False) 317 | class NodeAddressSpec(betterproto.Message): 318 | """NodeAddressSpec describes a set of node addresses.""" 319 | 320 | addresses: List["____common__.NetIpPrefix"] = betterproto.message_field(1) 321 | 322 | 323 | @dataclass(eq=False, repr=False) 324 | class OperatorSpecSpec(betterproto.Message): 325 | """OperatorSpecSpec describes DNS resolvers.""" 326 | 327 | operator: "_enums__.NetworkOperator" = betterproto.enum_field(1) 328 | link_name: str = betterproto.string_field(2) 329 | require_up: bool = betterproto.bool_field(3) 330 | dhcp4: "Dhcp4OperatorSpec" = betterproto.message_field(4) 331 | dhcp6: "Dhcp6OperatorSpec" = betterproto.message_field(5) 332 | vip: "VipOperatorSpec" = betterproto.message_field(6) 333 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(7) 334 | 335 | 336 | @dataclass(eq=False, repr=False) 337 | class PortRange(betterproto.Message): 338 | """PortRange describes a range of ports. Range is [lo, hi].""" 339 | 340 | lo: int = betterproto.fixed32_field(1) 341 | hi: int = betterproto.fixed32_field(2) 342 | 343 | 344 | @dataclass(eq=False, repr=False) 345 | class ProbeSpecSpec(betterproto.Message): 346 | """ProbeSpecSpec describes the Probe.""" 347 | 348 | interval: timedelta = betterproto.message_field(1) 349 | failure_threshold: int = betterproto.int64_field(2) 350 | tcp: "TcpProbeSpec" = betterproto.message_field(3) 351 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(4) 352 | 353 | 354 | @dataclass(eq=False, repr=False) 355 | class ProbeStatusSpec(betterproto.Message): 356 | """ProbeStatusSpec describes the Probe.""" 357 | 358 | success: bool = betterproto.bool_field(1) 359 | last_error: str = betterproto.string_field(2) 360 | 361 | 362 | @dataclass(eq=False, repr=False) 363 | class ResolverSpecSpec(betterproto.Message): 364 | """ResolverSpecSpec describes DNS resolvers.""" 365 | 366 | dns_servers: List["____common__.NetIp"] = betterproto.message_field(1) 367 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(2) 368 | 369 | 370 | @dataclass(eq=False, repr=False) 371 | class ResolverStatusSpec(betterproto.Message): 372 | """ResolverStatusSpec describes DNS resolvers.""" 373 | 374 | dns_servers: List["____common__.NetIp"] = betterproto.message_field(1) 375 | 376 | 377 | @dataclass(eq=False, repr=False) 378 | class RouteSpecSpec(betterproto.Message): 379 | """RouteSpecSpec describes the route.""" 380 | 381 | family: "_enums__.NethelpersFamily" = betterproto.enum_field(1) 382 | destination: "____common__.NetIpPrefix" = betterproto.message_field(2) 383 | source: "____common__.NetIp" = betterproto.message_field(3) 384 | gateway: "____common__.NetIp" = betterproto.message_field(4) 385 | out_link_name: str = betterproto.string_field(5) 386 | table: "_enums__.NethelpersRoutingTable" = betterproto.enum_field(6) 387 | priority: int = betterproto.uint32_field(7) 388 | scope: "_enums__.NethelpersScope" = betterproto.enum_field(8) 389 | type: "_enums__.NethelpersRouteType" = betterproto.enum_field(9) 390 | flags: int = betterproto.uint32_field(10) 391 | protocol: "_enums__.NethelpersRouteProtocol" = betterproto.enum_field(11) 392 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(12) 393 | mtu: int = betterproto.uint32_field(13) 394 | 395 | 396 | @dataclass(eq=False, repr=False) 397 | class RouteStatusSpec(betterproto.Message): 398 | """RouteStatusSpec describes status of rendered secrets.""" 399 | 400 | family: "_enums__.NethelpersFamily" = betterproto.enum_field(1) 401 | destination: "____common__.NetIpPrefix" = betterproto.message_field(2) 402 | source: "____common__.NetIp" = betterproto.message_field(3) 403 | gateway: "____common__.NetIp" = betterproto.message_field(4) 404 | out_link_index: int = betterproto.uint32_field(5) 405 | out_link_name: str = betterproto.string_field(6) 406 | table: "_enums__.NethelpersRoutingTable" = betterproto.enum_field(7) 407 | priority: int = betterproto.uint32_field(8) 408 | scope: "_enums__.NethelpersScope" = betterproto.enum_field(9) 409 | type: "_enums__.NethelpersRouteType" = betterproto.enum_field(10) 410 | flags: int = betterproto.uint32_field(11) 411 | protocol: "_enums__.NethelpersRouteProtocol" = betterproto.enum_field(12) 412 | mtu: int = betterproto.uint32_field(13) 413 | 414 | 415 | @dataclass(eq=False, repr=False) 416 | class StpSpec(betterproto.Message): 417 | """STPSpec describes Spanning Tree Protocol (STP) settings of a bridge.""" 418 | 419 | enabled: bool = betterproto.bool_field(1) 420 | 421 | 422 | @dataclass(eq=False, repr=False) 423 | class StatusSpec(betterproto.Message): 424 | """StatusSpec describes network state.""" 425 | 426 | address_ready: bool = betterproto.bool_field(1) 427 | connectivity_ready: bool = betterproto.bool_field(2) 428 | hostname_ready: bool = betterproto.bool_field(3) 429 | etc_files_ready: bool = betterproto.bool_field(4) 430 | 431 | 432 | @dataclass(eq=False, repr=False) 433 | class TcpProbeSpec(betterproto.Message): 434 | """TCPProbeSpec describes the TCP Probe.""" 435 | 436 | endpoint: str = betterproto.string_field(1) 437 | timeout: timedelta = betterproto.message_field(2) 438 | 439 | 440 | @dataclass(eq=False, repr=False) 441 | class TimeServerSpecSpec(betterproto.Message): 442 | """TimeServerSpecSpec describes NTP servers.""" 443 | 444 | ntp_servers: List[str] = betterproto.string_field(1) 445 | config_layer: "_enums__.NetworkConfigLayer" = betterproto.enum_field(2) 446 | 447 | 448 | @dataclass(eq=False, repr=False) 449 | class TimeServerStatusSpec(betterproto.Message): 450 | """TimeServerStatusSpec describes NTP servers.""" 451 | 452 | ntp_servers: List[str] = betterproto.string_field(1) 453 | 454 | 455 | @dataclass(eq=False, repr=False) 456 | class VipEquinixMetalSpec(betterproto.Message): 457 | """ 458 | VIPEquinixMetalSpec describes virtual (elastic) IP settings for Equinix 459 | Metal. 460 | """ 461 | 462 | project_id: str = betterproto.string_field(1) 463 | device_id: str = betterproto.string_field(2) 464 | api_token: str = betterproto.string_field(3) 465 | 466 | 467 | @dataclass(eq=False, repr=False) 468 | class ViphCloudSpec(betterproto.Message): 469 | """ 470 | VIPHCloudSpec describes virtual (elastic) IP settings for Hetzner Cloud. 471 | """ 472 | 473 | device_id: int = betterproto.int64_field(1) 474 | network_id: int = betterproto.int64_field(2) 475 | api_token: str = betterproto.string_field(3) 476 | 477 | 478 | @dataclass(eq=False, repr=False) 479 | class VipOperatorSpec(betterproto.Message): 480 | """VIPOperatorSpec describes virtual IP operator options.""" 481 | 482 | ip: "____common__.NetIp" = betterproto.message_field(1) 483 | gratuitous_arp: bool = betterproto.bool_field(2) 484 | equinix_metal: "VipEquinixMetalSpec" = betterproto.message_field(3) 485 | h_cloud: "ViphCloudSpec" = betterproto.message_field(4) 486 | 487 | 488 | @dataclass(eq=False, repr=False) 489 | class VlanSpec(betterproto.Message): 490 | """VLANSpec describes VLAN settings if Kind == "vlan".""" 491 | 492 | vid: int = betterproto.fixed32_field(1) 493 | protocol: "_enums__.NethelpersVlanProtocol" = betterproto.enum_field(2) 494 | 495 | 496 | @dataclass(eq=False, repr=False) 497 | class WireguardPeer(betterproto.Message): 498 | """WireguardPeer describes a single peer.""" 499 | 500 | public_key: str = betterproto.string_field(1) 501 | preshared_key: str = betterproto.string_field(2) 502 | endpoint: str = betterproto.string_field(3) 503 | persistent_keepalive_interval: timedelta = betterproto.message_field(4) 504 | allowed_ips: List["____common__.NetIpPrefix"] = betterproto.message_field(5) 505 | 506 | 507 | @dataclass(eq=False, repr=False) 508 | class WireguardSpec(betterproto.Message): 509 | """WireguardSpec describes Wireguard settings if Kind == "wireguard".""" 510 | 511 | private_key: str = betterproto.string_field(1) 512 | public_key: str = betterproto.string_field(2) 513 | listen_port: int = betterproto.int64_field(3) 514 | firewall_mark: int = betterproto.int64_field(4) 515 | peers: List["WireguardPeer"] = betterproto.message_field(5) 516 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/perf/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/perf/perf.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class CpuSpec(betterproto.Message): 12 | """CPUSpec represents the last CPU stats snapshot.""" 13 | 14 | cpu: List["CpuStat"] = betterproto.message_field(1) 15 | cpu_total: "CpuStat" = betterproto.message_field(2) 16 | irq_total: int = betterproto.uint64_field(3) 17 | context_switches: int = betterproto.uint64_field(4) 18 | process_created: int = betterproto.uint64_field(5) 19 | process_running: int = betterproto.uint64_field(6) 20 | process_blocked: int = betterproto.uint64_field(7) 21 | soft_irq_total: int = betterproto.uint64_field(8) 22 | 23 | 24 | @dataclass(eq=False, repr=False) 25 | class CpuStat(betterproto.Message): 26 | """CPUStat represents a single cpu stat.""" 27 | 28 | user: float = betterproto.double_field(1) 29 | nice: float = betterproto.double_field(2) 30 | system: float = betterproto.double_field(3) 31 | idle: float = betterproto.double_field(4) 32 | iowait: float = betterproto.double_field(5) 33 | irq: float = betterproto.double_field(6) 34 | soft_irq: float = betterproto.double_field(7) 35 | steal: float = betterproto.double_field(8) 36 | guest: float = betterproto.double_field(9) 37 | guest_nice: float = betterproto.double_field(10) 38 | 39 | 40 | @dataclass(eq=False, repr=False) 41 | class MemorySpec(betterproto.Message): 42 | """MemorySpec represents the last Memory stats snapshot.""" 43 | 44 | mem_total: int = betterproto.uint64_field(1) 45 | mem_used: int = betterproto.uint64_field(2) 46 | mem_available: int = betterproto.uint64_field(3) 47 | buffers: int = betterproto.uint64_field(4) 48 | cached: int = betterproto.uint64_field(5) 49 | swap_cached: int = betterproto.uint64_field(6) 50 | active: int = betterproto.uint64_field(7) 51 | inactive: int = betterproto.uint64_field(8) 52 | active_anon: int = betterproto.uint64_field(9) 53 | inactive_anon: int = betterproto.uint64_field(10) 54 | active_file: int = betterproto.uint64_field(11) 55 | inactive_file: int = betterproto.uint64_field(12) 56 | unevictable: int = betterproto.uint64_field(13) 57 | mlocked: int = betterproto.uint64_field(14) 58 | swap_total: int = betterproto.uint64_field(15) 59 | swap_free: int = betterproto.uint64_field(16) 60 | dirty: int = betterproto.uint64_field(17) 61 | writeback: int = betterproto.uint64_field(18) 62 | anon_pages: int = betterproto.uint64_field(19) 63 | mapped: int = betterproto.uint64_field(20) 64 | shmem: int = betterproto.uint64_field(21) 65 | slab: int = betterproto.uint64_field(22) 66 | s_reclaimable: int = betterproto.uint64_field(23) 67 | s_unreclaim: int = betterproto.uint64_field(24) 68 | kernel_stack: int = betterproto.uint64_field(25) 69 | page_tables: int = betterproto.uint64_field(26) 70 | nf_sunstable: int = betterproto.uint64_field(27) 71 | bounce: int = betterproto.uint64_field(28) 72 | writeback_tmp: int = betterproto.uint64_field(29) 73 | commit_limit: int = betterproto.uint64_field(30) 74 | committed_as: int = betterproto.uint64_field(31) 75 | vmalloc_total: int = betterproto.uint64_field(32) 76 | vmalloc_used: int = betterproto.uint64_field(33) 77 | vmalloc_chunk: int = betterproto.uint64_field(34) 78 | hardware_corrupted: int = betterproto.uint64_field(35) 79 | anon_huge_pages: int = betterproto.uint64_field(36) 80 | shmem_huge_pages: int = betterproto.uint64_field(37) 81 | shmem_pmd_mapped: int = betterproto.uint64_field(38) 82 | cma_total: int = betterproto.uint64_field(39) 83 | cma_free: int = betterproto.uint64_field(40) 84 | huge_pages_total: int = betterproto.uint64_field(41) 85 | huge_pages_free: int = betterproto.uint64_field(42) 86 | huge_pages_rsvd: int = betterproto.uint64_field(43) 87 | huge_pages_surp: int = betterproto.uint64_field(44) 88 | hugepagesize: int = betterproto.uint64_field(45) 89 | direct_map4_k: int = betterproto.uint64_field(46) 90 | direct_map2_m: int = betterproto.uint64_field(47) 91 | direct_map1_g: int = betterproto.uint64_field(48) 92 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/proto/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/proto/proto.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class LinuxIdMapping(betterproto.Message): 12 | """LinuxIDMapping specifies UID/GID mappings.""" 13 | 14 | container_id: int = betterproto.uint32_field(1) 15 | host_id: int = betterproto.uint32_field(2) 16 | size: int = betterproto.uint32_field(3) 17 | 18 | 19 | @dataclass(eq=False, repr=False) 20 | class Mount(betterproto.Message): 21 | """Mount specifies a mount for a container.""" 22 | 23 | destination: str = betterproto.string_field(1) 24 | type: str = betterproto.string_field(2) 25 | source: str = betterproto.string_field(3) 26 | options: List[str] = betterproto.string_field(4) 27 | uid_mappings: List["LinuxIdMapping"] = betterproto.message_field(5) 28 | gid_mappings: List["LinuxIdMapping"] = betterproto.message_field(6) 29 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/runtime/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/runtime/runtime.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | 9 | from ..... import common as ____common__ 10 | from .. import enums as _enums__ 11 | 12 | 13 | @dataclass(eq=False, repr=False) 14 | class DevicesStatusSpec(betterproto.Message): 15 | """DevicesStatusSpec is the spec for devices status.""" 16 | 17 | ready: bool = betterproto.bool_field(1) 18 | 19 | 20 | @dataclass(eq=False, repr=False) 21 | class EventSinkConfigSpec(betterproto.Message): 22 | """ 23 | EventSinkConfigSpec describes configuration of Talos event log streaming. 24 | """ 25 | 26 | endpoint: str = betterproto.string_field(1) 27 | 28 | 29 | @dataclass(eq=False, repr=False) 30 | class KernelModuleSpecSpec(betterproto.Message): 31 | """KernelModuleSpecSpec describes Linux kernel module to load.""" 32 | 33 | name: str = betterproto.string_field(1) 34 | parameters: List[str] = betterproto.string_field(2) 35 | 36 | 37 | @dataclass(eq=False, repr=False) 38 | class KernelParamSpecSpec(betterproto.Message): 39 | """KernelParamSpecSpec describes status of the defined sysctls.""" 40 | 41 | value: str = betterproto.string_field(1) 42 | ignore_errors: bool = betterproto.bool_field(2) 43 | 44 | 45 | @dataclass(eq=False, repr=False) 46 | class KernelParamStatusSpec(betterproto.Message): 47 | """KernelParamStatusSpec describes status of the defined sysctls.""" 48 | 49 | current: str = betterproto.string_field(1) 50 | default: str = betterproto.string_field(2) 51 | unsupported: bool = betterproto.bool_field(3) 52 | 53 | 54 | @dataclass(eq=False, repr=False) 55 | class KmsgLogConfigSpec(betterproto.Message): 56 | """KmsgLogConfigSpec describes configuration for kmsg log streaming.""" 57 | 58 | destinations: List["____common__.Url"] = betterproto.message_field(1) 59 | 60 | 61 | @dataclass(eq=False, repr=False) 62 | class MachineStatusSpec(betterproto.Message): 63 | """MachineStatusSpec describes status of the defined sysctls.""" 64 | 65 | stage: "_enums__.RuntimeMachineStage" = betterproto.enum_field(1) 66 | status: "MachineStatusStatus" = betterproto.message_field(2) 67 | 68 | 69 | @dataclass(eq=False, repr=False) 70 | class MachineStatusStatus(betterproto.Message): 71 | """MachineStatusStatus describes machine current status at the stage.""" 72 | 73 | ready: bool = betterproto.bool_field(1) 74 | unmet_conditions: List["UnmetCondition"] = betterproto.message_field(2) 75 | 76 | 77 | @dataclass(eq=False, repr=False) 78 | class MaintenanceServiceConfigSpec(betterproto.Message): 79 | """ 80 | MaintenanceServiceConfigSpec describes configuration for maintenance 81 | service API. 82 | """ 83 | 84 | listen_address: str = betterproto.string_field(1) 85 | reachable_addresses: List["____common__.NetIp"] = betterproto.message_field(2) 86 | 87 | 88 | @dataclass(eq=False, repr=False) 89 | class MetaKeySpec(betterproto.Message): 90 | """MetaKeySpec describes status of the defined sysctls.""" 91 | 92 | value: str = betterproto.string_field(1) 93 | 94 | 95 | @dataclass(eq=False, repr=False) 96 | class MetaLoadedSpec(betterproto.Message): 97 | """ 98 | MetaLoadedSpec is the spec for meta loaded. The Done field is always true 99 | when resource exists. 100 | """ 101 | 102 | done: bool = betterproto.bool_field(1) 103 | 104 | 105 | @dataclass(eq=False, repr=False) 106 | class MountStatusSpec(betterproto.Message): 107 | """MountStatusSpec describes status of the defined sysctls.""" 108 | 109 | source: str = betterproto.string_field(1) 110 | target: str = betterproto.string_field(2) 111 | filesystem_type: str = betterproto.string_field(3) 112 | options: List[str] = betterproto.string_field(4) 113 | encrypted: bool = betterproto.bool_field(5) 114 | encryption_providers: List[str] = betterproto.string_field(6) 115 | 116 | 117 | @dataclass(eq=False, repr=False) 118 | class PlatformMetadataSpec(betterproto.Message): 119 | """PlatformMetadataSpec describes platform metadata properties.""" 120 | 121 | platform: str = betterproto.string_field(1) 122 | hostname: str = betterproto.string_field(2) 123 | region: str = betterproto.string_field(3) 124 | zone: str = betterproto.string_field(4) 125 | instance_type: str = betterproto.string_field(5) 126 | instance_id: str = betterproto.string_field(6) 127 | provider_id: str = betterproto.string_field(7) 128 | spot: bool = betterproto.bool_field(8) 129 | 130 | 131 | @dataclass(eq=False, repr=False) 132 | class SecurityStateSpec(betterproto.Message): 133 | """SecurityStateSpec describes the security state resource properties.""" 134 | 135 | secure_boot: bool = betterproto.bool_field(1) 136 | uki_signing_key_fingerprint: str = betterproto.string_field(2) 137 | pcr_signing_key_fingerprint: str = betterproto.string_field(3) 138 | 139 | 140 | @dataclass(eq=False, repr=False) 141 | class UniqueMachineTokenSpec(betterproto.Message): 142 | """ 143 | UniqueMachineTokenSpec is the spec for the machine unique token. Token can 144 | be empty if machine wasn't assigned any. 145 | """ 146 | 147 | token: str = betterproto.string_field(1) 148 | 149 | 150 | @dataclass(eq=False, repr=False) 151 | class UnmetCondition(betterproto.Message): 152 | """ 153 | UnmetCondition is a failure which prevents machine from being ready at the 154 | stage. 155 | """ 156 | 157 | name: str = betterproto.string_field(1) 158 | reason: str = betterproto.string_field(2) 159 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/secrets/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/secrets/secrets.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from typing import List 6 | 7 | import betterproto 8 | 9 | from ..... import common as ____common__ 10 | 11 | 12 | @dataclass(eq=False, repr=False) 13 | class ApiCertsSpec(betterproto.Message): 14 | """APICertsSpec describes etcd certs secrets.""" 15 | 16 | ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(1) 17 | client: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(2) 18 | server: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(3) 19 | 20 | 21 | @dataclass(eq=False, repr=False) 22 | class CertSanSpec(betterproto.Message): 23 | """CertSANSpec describes fields of the cert SANs.""" 24 | 25 | i_ps: List["____common__.NetIp"] = betterproto.message_field(1) 26 | dns_names: List[str] = betterproto.string_field(2) 27 | fqdn: str = betterproto.string_field(3) 28 | 29 | 30 | @dataclass(eq=False, repr=False) 31 | class EtcdCertsSpec(betterproto.Message): 32 | """EtcdCertsSpec describes etcd certs secrets.""" 33 | 34 | etcd: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(1) 35 | etcd_peer: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(2) 36 | etcd_admin: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field( 37 | 3 38 | ) 39 | etcd_api_server: "____common__.PemEncodedCertificateAndKey" = ( 40 | betterproto.message_field(4) 41 | ) 42 | 43 | 44 | @dataclass(eq=False, repr=False) 45 | class EtcdRootSpec(betterproto.Message): 46 | """EtcdRootSpec describes etcd CA secrets.""" 47 | 48 | etcd_ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(1) 49 | 50 | 51 | @dataclass(eq=False, repr=False) 52 | class KubeletSpec(betterproto.Message): 53 | """KubeletSpec describes root Kubernetes secrets.""" 54 | 55 | endpoint: "____common__.Url" = betterproto.message_field(1) 56 | ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(2) 57 | bootstrap_token_id: str = betterproto.string_field(3) 58 | bootstrap_token_secret: str = betterproto.string_field(4) 59 | 60 | 61 | @dataclass(eq=False, repr=False) 62 | class KubernetesCertsSpec(betterproto.Message): 63 | """KubernetesCertsSpec describes generated Kubernetes certificates.""" 64 | 65 | scheduler_kubeconfig: str = betterproto.string_field(4) 66 | controller_manager_kubeconfig: str = betterproto.string_field(5) 67 | localhost_admin_kubeconfig: str = betterproto.string_field(6) 68 | admin_kubeconfig: str = betterproto.string_field(7) 69 | 70 | 71 | @dataclass(eq=False, repr=False) 72 | class KubernetesDynamicCertsSpec(betterproto.Message): 73 | """ 74 | KubernetesDynamicCertsSpec describes generated KubernetesCerts 75 | certificates. 76 | """ 77 | 78 | api_server: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field( 79 | 1 80 | ) 81 | api_server_kubelet_client: "____common__.PemEncodedCertificateAndKey" = ( 82 | betterproto.message_field(2) 83 | ) 84 | front_proxy: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field( 85 | 3 86 | ) 87 | 88 | 89 | @dataclass(eq=False, repr=False) 90 | class KubernetesRootSpec(betterproto.Message): 91 | """KubernetesRootSpec describes root Kubernetes secrets.""" 92 | 93 | name: str = betterproto.string_field(1) 94 | endpoint: "____common__.Url" = betterproto.message_field(2) 95 | local_endpoint: "____common__.Url" = betterproto.message_field(3) 96 | cert_sa_ns: List[str] = betterproto.string_field(4) 97 | dns_domain: str = betterproto.string_field(6) 98 | ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(7) 99 | service_account: "____common__.PemEncodedKey" = betterproto.message_field(8) 100 | aggregator_ca: "____common__.PemEncodedCertificateAndKey" = ( 101 | betterproto.message_field(9) 102 | ) 103 | aescbc_encryption_secret: str = betterproto.string_field(10) 104 | bootstrap_token_id: str = betterproto.string_field(11) 105 | bootstrap_token_secret: str = betterproto.string_field(12) 106 | secretbox_encryption_secret: str = betterproto.string_field(13) 107 | api_server_ips: List["____common__.NetIp"] = betterproto.message_field(14) 108 | 109 | 110 | @dataclass(eq=False, repr=False) 111 | class MaintenanceRootSpec(betterproto.Message): 112 | """MaintenanceRootSpec describes maintenance service CA.""" 113 | 114 | ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(1) 115 | 116 | 117 | @dataclass(eq=False, repr=False) 118 | class MaintenanceServiceCertsSpec(betterproto.Message): 119 | """ 120 | MaintenanceServiceCertsSpec describes maintenance service certs secrets. 121 | """ 122 | 123 | ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(1) 124 | server: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(2) 125 | 126 | 127 | @dataclass(eq=False, repr=False) 128 | class OsRootSpec(betterproto.Message): 129 | """OSRootSpec describes operating system CA.""" 130 | 131 | ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(1) 132 | cert_sani_ps: List["____common__.NetIp"] = betterproto.message_field(2) 133 | cert_sandns_names: List[str] = betterproto.string_field(3) 134 | token: str = betterproto.string_field(4) 135 | 136 | 137 | @dataclass(eq=False, repr=False) 138 | class TrustdCertsSpec(betterproto.Message): 139 | """TrustdCertsSpec describes etcd certs secrets.""" 140 | 141 | ca: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(1) 142 | server: "____common__.PemEncodedCertificateAndKey" = betterproto.message_field(2) 143 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/siderolink/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/siderolink/siderolink.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | @dataclass(eq=False, repr=False) 10 | class ConfigSpec(betterproto.Message): 11 | """ConfigSpec describes KubeSpan configuration..""" 12 | 13 | api_endpoint: str = betterproto.string_field(1) 14 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/time/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/time/time.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from datetime import timedelta 6 | 7 | import betterproto 8 | 9 | 10 | @dataclass(eq=False, repr=False) 11 | class AdjtimeStatusSpec(betterproto.Message): 12 | """AdjtimeStatusSpec describes Linux internal adjtime state.""" 13 | 14 | offset: timedelta = betterproto.message_field(1) 15 | frequency_adjustment_ratio: float = betterproto.double_field(2) 16 | max_error: timedelta = betterproto.message_field(3) 17 | est_error: timedelta = betterproto.message_field(4) 18 | status: str = betterproto.string_field(5) 19 | constant: int = betterproto.int64_field(6) 20 | sync_status: bool = betterproto.bool_field(7) 21 | state: str = betterproto.string_field(8) 22 | 23 | 24 | @dataclass(eq=False, repr=False) 25 | class StatusSpec(betterproto.Message): 26 | """StatusSpec describes time sync state.""" 27 | 28 | synced: bool = betterproto.bool_field(1) 29 | epoch: int = betterproto.int64_field(2) 30 | sync_disabled: bool = betterproto.bool_field(3) 31 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/talos/resource/definitions/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: resource/definitions/v1alpha1/v1alpha1.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | 6 | import betterproto 7 | 8 | 9 | @dataclass(eq=False, repr=False) 10 | class ServiceSpec(betterproto.Message): 11 | """ServiceSpec describe service state.""" 12 | 13 | running: bool = betterproto.bool_field(1) 14 | healthy: bool = betterproto.bool_field(2) 15 | unknown: bool = betterproto.bool_field(3) 16 | -------------------------------------------------------------------------------- /src/talos_linux_api/v1_6_0/time/__init__.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # sources: time/time.proto 3 | # plugin: python-betterproto 4 | from dataclasses import dataclass 5 | from datetime import datetime 6 | from typing import ( 7 | TYPE_CHECKING, 8 | Dict, 9 | List, 10 | Optional, 11 | ) 12 | 13 | import betterproto 14 | import grpclib 15 | from betterproto.grpc.grpclib_server import ServiceBase 16 | 17 | from .. import common as _common__ 18 | 19 | 20 | if TYPE_CHECKING: 21 | import grpclib.server 22 | from betterproto.grpc.grpclib_client import MetadataLike 23 | from grpclib.metadata import Deadline 24 | 25 | 26 | @dataclass(eq=False, repr=False) 27 | class TimeRequest(betterproto.Message): 28 | """The response message containing the ntp server""" 29 | 30 | server: str = betterproto.string_field(1) 31 | 32 | 33 | @dataclass(eq=False, repr=False) 34 | class Time(betterproto.Message): 35 | metadata: "_common__.Metadata" = betterproto.message_field(1) 36 | server: str = betterproto.string_field(2) 37 | localtime: datetime = betterproto.message_field(3) 38 | remotetime: datetime = betterproto.message_field(4) 39 | 40 | 41 | @dataclass(eq=False, repr=False) 42 | class TimeResponse(betterproto.Message): 43 | """The response message containing the ntp server, time, and offset""" 44 | 45 | messages: List["Time"] = betterproto.message_field(1) 46 | 47 | 48 | class TimeServiceStub(betterproto.ServiceStub): 49 | async def time( 50 | self, 51 | betterproto_lib_google_protobuf_empty: "betterproto_lib_google_protobuf.Empty", 52 | *, 53 | timeout: Optional[float] = None, 54 | deadline: Optional["Deadline"] = None, 55 | metadata: Optional["MetadataLike"] = None 56 | ) -> "TimeResponse": 57 | return await self._unary_unary( 58 | "/time.TimeService/Time", 59 | betterproto_lib_google_protobuf_empty, 60 | TimeResponse, 61 | timeout=timeout, 62 | deadline=deadline, 63 | metadata=metadata, 64 | ) 65 | 66 | async def time_check( 67 | self, 68 | time_request: "TimeRequest", 69 | *, 70 | timeout: Optional[float] = None, 71 | deadline: Optional["Deadline"] = None, 72 | metadata: Optional["MetadataLike"] = None 73 | ) -> "TimeResponse": 74 | return await self._unary_unary( 75 | "/time.TimeService/TimeCheck", 76 | time_request, 77 | TimeResponse, 78 | timeout=timeout, 79 | deadline=deadline, 80 | metadata=metadata, 81 | ) 82 | 83 | 84 | class TimeServiceBase(ServiceBase): 85 | async def time( 86 | self, 87 | betterproto_lib_google_protobuf_empty: "betterproto_lib_google_protobuf.Empty", 88 | ) -> "TimeResponse": 89 | raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) 90 | 91 | async def time_check(self, time_request: "TimeRequest") -> "TimeResponse": 92 | raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED) 93 | 94 | async def __rpc_time( 95 | self, 96 | stream: "grpclib.server.Stream[betterproto_lib_google_protobuf.Empty, TimeResponse]", 97 | ) -> None: 98 | request = await stream.recv_message() 99 | response = await self.time(request) 100 | await stream.send_message(response) 101 | 102 | async def __rpc_time_check( 103 | self, stream: "grpclib.server.Stream[TimeRequest, TimeResponse]" 104 | ) -> None: 105 | request = await stream.recv_message() 106 | response = await self.time_check(request) 107 | await stream.send_message(response) 108 | 109 | def __mapping__(self) -> Dict[str, grpclib.const.Handler]: 110 | return { 111 | "/time.TimeService/Time": grpclib.const.Handler( 112 | self.__rpc_time, 113 | grpclib.const.Cardinality.UNARY_UNARY, 114 | betterproto_lib_google_protobuf.Empty, 115 | TimeResponse, 116 | ), 117 | "/time.TimeService/TimeCheck": grpclib.const.Handler( 118 | self.__rpc_time_check, 119 | grpclib.const.Cardinality.UNARY_UNARY, 120 | TimeRequest, 121 | TimeResponse, 122 | ), 123 | } 124 | -------------------------------------------------------------------------------- /tasks.py: -------------------------------------------------------------------------------- 1 | from invoke import task 2 | import fsspec 3 | from pathlib import Path 4 | import re 5 | import tomlkit 6 | 7 | 8 | @task 9 | def download_protos(c, username=None, token=None): 10 | c.run("rm -rf protos") 11 | print(f"Downloading proto files for Talos API {c['api_version']} to ./protos") 12 | source_repo = fsspec.filesystem( 13 | "github", 14 | org="siderolabs", 15 | repo="talos", 16 | sha=c["api_version"], 17 | username=username, 18 | token=token, 19 | ) 20 | destination = Path("./protos") 21 | destination.mkdir(exist_ok=True) 22 | source_repo.get(source_repo.ls("api/"), destination.as_posix(), recursive=True) 23 | source_repo.get("LICENSE", (destination / "LICENSE").as_posix()) 24 | 25 | 26 | @task 27 | def patch_pyproject_toml(c): 28 | api_version = c["api_version"] 29 | print(f"Patching pyproject.toml with API version tag {api_version}") 30 | with open("pyproject.toml", "r") as file: 31 | config = tomlkit.load(file) 32 | 33 | config["project"]["name"] = f"talos-linux-api-{api_version}" 34 | config["project"]["description"] = re.sub( 35 | "\(.*\)", f"({api_version})", config["project"]["description"] 36 | ) 37 | 38 | with open("pyproject.toml", "w") as file: 39 | tomlkit.dump(config, file) 40 | 41 | 42 | @task 43 | def clean(c): 44 | c.run("rm -rf src") 45 | 46 | 47 | @task(clean) 48 | def compile(c): 49 | module_name = c["api_version"].replace(".", "_") 50 | out_dir = Path("src/talos_linux_api") / module_name 51 | print(f"Compiling to {out_dir}") 52 | out_dir.mkdir(exist_ok=True, parents=True) 53 | c.run( 54 | "protoc " 55 | f"--python_betterproto_out={out_dir.as_posix()} " 56 | "-I protos " 57 | "-I protos/vendor " 58 | '$(find protos -name "*.proto" -and -not -path "*vendor*")' 59 | ) 60 | 61 | 62 | @task(compile, patch_pyproject_toml) 63 | def build(c): 64 | c.run("pytest") 65 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import inspect 3 | import importlib 4 | import pkgutil 5 | 6 | 7 | @pytest.fixture 8 | def api_version(): 9 | lib = importlib.import_module("talos_linux_api") 10 | members = list(pkgutil.iter_modules(path=lib.__path__)) 11 | assert len(members) == 1, "`talos_linux_api` module contains unexpected members" 12 | return members[0].name 13 | -------------------------------------------------------------------------------- /tests/test_imports.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import inspect 3 | import importlib 4 | import pkgutil 5 | 6 | 7 | def test_modules_are_importable(): 8 | lib = importlib.import_module("talos_linux_api") 9 | for loader, module_name, is_pkg in pkgutil.walk_packages( 10 | lib.__path__, lib.__name__ + "." 11 | ): 12 | importlib.import_module(module_name) 13 | 14 | 15 | @pytest.mark.parametrize( 16 | "module_name, stub_cls", 17 | [ 18 | ("cluster", "ClusterServiceStub"), 19 | ("inspect", "InspectServiceStub"), 20 | ("machine", "MachineServiceStub"), 21 | ("securityapi", "SecurityServiceStub"), 22 | ("storage", "StorageServiceStub"), 23 | ("time", "TimeServiceStub"), 24 | ], 25 | ) 26 | def test_service_stubs_exist(api_version, module_name, stub_cls): 27 | module = importlib.import_module(f"talos_linux_api.{api_version}.{module_name}") 28 | assert stub_cls in dir(module) 29 | --------------------------------------------------------------------------------