PyConChina2022-北京-用Python给Kubernetes写个自定义控制器-张晋涛
用 Python 给 Kubernetes 写个控制器 主讲人: 张晋涛 个人介绍 Apache APISIX PMC Kubernetes Ingress NGINX maintainer Microsoft MVP 『 K8S 生态周报』发起人和维护者 GitHub:tao12345666333 Mail: zhangjintao@apache.org Agenda Agenda Kubernetes 中请求处理流程 什么是准入控制器 用 Python 实现准入控制器 与其他方案对比 Kubernetes 架构 kube-apiserver Kubernetes 集群的核心组件 处理集群内外的所有请求 Kubernetes 请求处理流程 API Handler 匹配处理链路( /apis ) 认证 / 授权 Mutating 关操作的代码逻辑或者组件 (静态)准入控制器: Kubernetes 代码中携带,不可动 态调整的 动态准入控制器:利用 Kubernetes 提供的 MutatingAdmissionWebhook 和 ValidatingAdmissionWebhook 扩展点,由用户自行开发 的组件,接收 HTTP 回调。 为什么需要准入控制器 Kubernetes 中一系列复杂的校验 / 事务逻辑0 码力 | 17 页 | 1.76 MB | 1 年前303 小罗 python与devops
•自动部署:ansible、saltstack、puppet •持续集成(CI):Jenkins •配置管理:Ansible、Chef、Puppet、SaltStack •容器:Docker、kvm •编排:Kubernetes、openstack、Apache Mesos、swarm •服务注册与发现:Zookeeper、etcd、Consul •脚本语言:python、ruby、shell •日志管理:ELK、Logentries0 码力 | 22 页 | 1.64 MB | 1 年前33 在AWS部署与发布你面向全球的Python Serverless应用 谢洪恩
0 LicenseUrl: LICENSE ReadmeUrl: README.md Labels: [demo','lambda','kubectl','eks', 'aws', 'kubernetes', 'k8s'] HomePageUrl: https://github.com/pahud/my-demo-sar-app SemanticVersion: 1.0.1 SourceCodeUrl:0 码力 | 53 页 | 24.15 MB | 1 年前3Tornado 5.1 Documentation
only for development use. Without reworking Tornado IOLoop interface, it’s not possible to add a native Tornado Windows IOLoop implementation or leverage Windows’ IOCP support from frameworks like AsyncIO straightforward way than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: 12 Chapter 5. Documentation Tornado Documentation, Release 5.1.1 from tornado.httpclient0 码力 | 243 页 | 895.80 KB | 1 年前3Tornado 5.1 Documentation
only for development use. Without reworking Tornado IOLoop interface, it’s not possible to add a native Tornado Windows IOLoop implementation or leverage Windows’ IOCP support from frameworks like AsyncIO guide Introduction Asynchronous and non-Blocking I/O Blocking Asynchronous Examples Coroutines Native vs decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking straightforward way than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when0 码力 | 359 页 | 347.32 KB | 1 年前3Tornado 6.0 Documentation
only for development use. Without reworking Tornado IOLoop interface, it’s not possible to add a native Tornado Windows IOLoop implementation or leverage Windows’ IOCP support from frameworks like AsyncIO straightforward way than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client0 码力 | 245 页 | 885.76 KB | 1 年前3Tornado 6.1 Documentation
straightforward way than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: 14 Chapter 6. Documentation Tornado Documentation, Release 6.1 from tornado.httpclient Tornado Documentation, Release 6.1 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native coroutines”). For compatibility0 码力 | 245 页 | 904.24 KB | 1 年前3Tornado 6.0 Documentation
only for development use. Without reworking Tornado IOLoop interface, it’s not possible to add a native Tornado Windows IOLoop implementation or leverage Windows’ IOCP support from frameworks like AsyncIO guide Introduction Asynchronous and non-Blocking I/O Blocking Asynchronous Examples Coroutines Native vs decorated coroutines How it works How to call a coroutine Coroutine patterns Calling blocking straightforward way than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when0 码力 | 869 页 | 692.83 KB | 1 年前3Tornado 6.4 Documentation
http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client Tornado Documentation, Release 6.4 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility you can use “decorated” or “yield-based” coroutines using the tornado.gen.coroutine decorator. Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
http_client.fetch(url) return response.body And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client Tornado Documentation, Release 6.4 Native vs decorated coroutines Python 3.5 introduced the async and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility you can use “decorated” or “yield-based” coroutines using the tornado.gen.coroutine decorator. Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility0 码力 | 268 页 | 1.09 MB | 1 年前3
共 387 条
- 1
- 2
- 3
- 4
- 5
- 6
- 39