 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 年前3 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 年前3
 The Python Handbook
1. Variable 5.2. Expressions and statement 5.3. Comment 5.4. Indentation 6. Data Types 7. Operators 7.0.1. Assignment operator 7.0.2. Arithmetic operator 7.0.3. Comparison operator 7.0.4. Boolean We'll explore them all soon. 26 7. Operators Python operators are symbols that we use to run operations upon values and variables. We can divide operators based on the kind of operation they perform: perform: assignment operator arithmetic operators comparison operators logical operators bitwise operators plus some interesting ones like is and in . 7.0.1. Assignment operator The assignment0 码力 | 93 页 | 7.31 MB | 1 年前3 The Python Handbook
1. Variable 5.2. Expressions and statement 5.3. Comment 5.4. Indentation 6. Data Types 7. Operators 7.0.1. Assignment operator 7.0.2. Arithmetic operator 7.0.3. Comparison operator 7.0.4. Boolean We'll explore them all soon. 26 7. Operators Python operators are symbols that we use to run operations upon values and variables. We can divide operators based on the kind of operation they perform: perform: assignment operator arithmetic operators comparison operators logical operators bitwise operators plus some interesting ones like is and in . 7.0.1. Assignment operator The assignment0 码力 | 93 页 | 7.31 MB | 1 年前3
 1 Beautiful PythonEXAMPLE: SET OPERATORS 51 SETS IN A FEW LANGUAGES AND PLATFORMS Some languages/platform APIs that implement sets in their standard libraries 52 Python set, frozenset: > 10 methods and operators Ruby Ruby Set: > 10 methods and operators Elixir MapSet: > 10 methods .Net (C# etc.) ISet interface: > 10 methods; 2 implementations JavaScript (ES6) Set: < 10 methods Java Set interface: < 10 methods; 8 in their standard libraries 53 Python set, frozenset: > 10 methods and operators ? Ruby Set: > 10 methods and operators ? Elixir MapSet: > 10 methods ? .Net (C# etc.) ISet interface: > 10 methods;0 码力 | 109 页 | 34.99 MB | 1 年前3 1 Beautiful PythonEXAMPLE: SET OPERATORS 51 SETS IN A FEW LANGUAGES AND PLATFORMS Some languages/platform APIs that implement sets in their standard libraries 52 Python set, frozenset: > 10 methods and operators Ruby Ruby Set: > 10 methods and operators Elixir MapSet: > 10 methods .Net (C# etc.) ISet interface: > 10 methods; 2 implementations JavaScript (ES6) Set: < 10 methods Java Set interface: < 10 methods; 8 in their standard libraries 53 Python set, frozenset: > 10 methods and operators ? Ruby Set: > 10 methods and operators ? Elixir MapSet: > 10 methods ? .Net (C# etc.) ISet interface: > 10 methods;0 码力 | 109 页 | 34.99 MB | 1 年前3
 Jinja2 Documentation Release 2.10executed instead of the builtin operator. This can be used to fine tune the behavior of certain operators. New in version 2.6. call_unop(context, operator, arg) For intercepted unary operator calls executed instead of the builtin operator. This can be used to fine tune the behavior of certain operators. New in version 2.6. default_binop_table = {‘/’: Jinja2 Documentation Release 2.10executed instead of the builtin operator. This can be used to fine tune the behavior of certain operators. New in version 2.6. call_unop(context, operator, arg) For intercepted unary operator calls executed instead of the builtin operator. This can be used to fine tune the behavior of certain operators. New in version 2.6. default_binop_table = {‘/’:- , ‘%’: - , ‘*’: - } default callback table for the binary operators. A copy of this is available on each instance of a sandboxed environment as binop_table default_unop_table 0 码力 | 148 页 | 475.08 KB | 1 年前3
 peewee Documentation
Release 3.5.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 1.8 Query operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 1 through it. • Example Twitter app written using Flask framework. • Guide to the various query operators describes how to construct queries and combine expressions. • Field types table lists the various exotic operations, like the postgresql HStore field acts like a key/value store and has custom operators for things like contains and update. You can specify custom operations as well. For example code0 码力 | 282 页 | 1.02 MB | 1 年前3 peewee Documentation
Release 3.5.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 1.8 Query operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 1 through it. • Example Twitter app written using Flask framework. • Guide to the various query operators describes how to construct queries and combine expressions. • Field types table lists the various exotic operations, like the postgresql HStore field acts like a key/value store and has custom operators for things like contains and update. You can specify custom operations as well. For example code0 码力 | 282 页 | 1.02 MB | 1 年前3
 peewee Documentation Release 3.0.0essentials. It will take you between 5 and 10 minutes to go through it. Guide to the various query operators describes how to construct queries and combine expressions. Field types table lists the various Retrieving row tuples / dictionaries / namedtuples Returning Clause Query operators Three valued logic Adding user-defined operators Expressions Foreign Keys Traversing foreign keys Joining tables Implementing = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: | - UNION + - UNION ALL & - INTERSECT - - EXCEPT Simple aggregation You’d like to get the signup0 码力 | 319 页 | 361.50 KB | 1 年前3 peewee Documentation Release 3.0.0essentials. It will take you between 5 and 10 minutes to go through it. Guide to the various query operators describes how to construct queries and combine expressions. Field types table lists the various Retrieving row tuples / dictionaries / namedtuples Returning Clause Query operators Three valued logic Adding user-defined operators Expressions Foreign Keys Traversing foreign keys Joining tables Implementing = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: | - UNION + - UNION ALL & - INTERSECT - - EXCEPT Simple aggregation You’d like to get the signup0 码力 | 319 页 | 361.50 KB | 1 年前3
 peewee Documentation
Release 3.3.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 1.9 Query operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 1 • Example queries taken from the PostgreSQL exercises website. • Guide to the various query operators describes how to construct queries and combine expressions. • Field types table lists the various = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: • | - UNION • + - UNION ALL • & - INTERSECT • - - EXCEPT Simple aggregation You’d like to0 码力 | 280 页 | 1.02 MB | 1 年前3 peewee Documentation
Release 3.3.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 1.9 Query operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 1 • Example queries taken from the PostgreSQL exercises website. • Guide to the various query operators describes how to construct queries and combine expressions. • Field types table lists the various = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: • | - UNION • + - UNION ALL • & - INTERSECT • - - EXCEPT Simple aggregation You’d like to0 码力 | 280 页 | 1.02 MB | 1 年前3
 peewee Documentation
Release 3.4.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 1.9 Query operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 1 • Example queries taken from the PostgreSQL exercises website. • Guide to the various query operators describes how to construct queries and combine expressions. • Field types table lists the various = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: • | - UNION • + - UNION ALL • & - INTERSECT • - - EXCEPT Simple aggregation You’d like to0 码力 | 284 页 | 1.03 MB | 1 年前3 peewee Documentation
Release 3.4.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 1.9 Query operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 1 • Example queries taken from the PostgreSQL exercises website. • Guide to the various query operators describes how to construct queries and combine expressions. • Field types table lists the various = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: • | - UNION • + - UNION ALL • & - INTERSECT • - - EXCEPT Simple aggregation You’d like to0 码力 | 284 页 | 1.03 MB | 1 年前3
 peewee Documentation
Release 3.5.0to go through it. Example Twitter app written using Flask framework. Guide to the various query operators describes how to construct queries and combine expressions. Field types table lists the various Joins Implementing Many to Many Self-joins Performance Techniques Query operators Three valued logic Adding user-defined operators Expressions SQL Functions SQL Helper Security and SQL Injection API Documentation exotic operations, like the postgresql HStore field acts like a key/value store and has custom operators for things like contains and update. You can specify custom operations as well. For example code0 码力 | 347 页 | 380.80 KB | 1 年前3 peewee Documentation
Release 3.5.0to go through it. Example Twitter app written using Flask framework. Guide to the various query operators describes how to construct queries and combine expressions. Field types table lists the various Joins Implementing Many to Many Self-joins Performance Techniques Query operators Three valued logic Adding user-defined operators Expressions SQL Functions SQL Helper Security and SQL Injection API Documentation exotic operations, like the postgresql HStore field acts like a key/value store and has custom operators for things like contains and update. You can specify custom operations as well. For example code0 码力 | 347 页 | 380.80 KB | 1 年前3
 peewee Documentation Release 3.4.0taken from the PostgreSQL exercises website [https://pgexercises.com]. Guide to the various query operators describes how to construct queries and combine expressions. Field types table lists the various Retrieving row tuples / dictionaries / namedtuples Returning Clause Query operators Three valued logic Adding user-defined operators Expressions Foreign Keys Traversing foreign keys Joining tables Implementing = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: | - UNION + - UNION ALL & - INTERSECT - - EXCEPT Simple aggregation You’d like to get the signup0 码力 | 349 页 | 382.34 KB | 1 年前3 peewee Documentation Release 3.4.0taken from the PostgreSQL exercises website [https://pgexercises.com]. Guide to the various query operators describes how to construct queries and combine expressions. Field types table lists the various Retrieving row tuples / dictionaries / namedtuples Returning Clause Query operators Three valued logic Adding user-defined operators Expressions Foreign Keys Traversing foreign keys Joining tables Implementing = Facility.select(Facility.name) query = lhs | rhs Queries can be composed using the following operators: | - UNION + - UNION ALL & - INTERSECT - - EXCEPT Simple aggregation You’d like to get the signup0 码力 | 349 页 | 382.34 KB | 1 年前3
共 114 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12














