Best practices for building Kubernetes Operators
Best practices for building Kubernetes Operators Patryk WasielewskiAbout me ● DevOps Consultant at Amazon Web Services (AWS) ● 6 years professional experience as DevOps / SRE / Developer ● Cloud-native json-patch/merge-patch support ○ Finalizers ○ Built-in Authz/AuthnControllers https://able8.medium.com/kubernetes-controllers-overview-b6ec086c1fbControllers ● Controller tracks at least one resource type ● implementation of typical Day-1 tasks (installation, configuration, etc.) and Day-2 tasks (reconfiguration, upgrade, backup, failover, recovery, etc.), for a software running within the Kubernetes cluster, https://www0 码力 | 36 页 | 2.19 MB | 5 月前3Go 2 Generics? A (P)review
Go 2 Generics? A (P)review Changkun Ou https://changkun.de/s/go2generics/ https://youtu.be/E16Y6bI2S08 Go 夜读 SIG 小组 | 第 80 期 March 18, 2020 # Based on Contracts ( Version July 31, 2019 © Changkun Ou · Go 夜读 · Go 2 Generics? A (P)review 主要内容 ● 泛型的起源 ● 泛型的早期设计 ● Go 2 的「合约」 ● 上手时间 ● 历史性评述 ● 展望 泛型的起源 Origin of Generics 2020 © Changkun Ou · Go 夜读 · Go 2 Generics? A (P)review 当我们谈论泛型时,我们在谈论什么? 语言中不允许同名函数 Add(1, 2) // 调用第一个 Add(1.0, 2.0) // 调用第二个 Add("1", "2") // 编译时不检查,运行时找不到实现,崩溃 参数化多态(Parametric Polymorphism)根据实参类型生成不同的版本 ,支持任意数量的 调用。即泛型 func Add(a, b T) T{ return a+b } Add(1, 2)0 码力 | 41 页 | 770.62 KB | 1 年前3Secure access to EC2 (for developers)
access to EC2 (for developers) Agenda – introduction – EC2 in native environment – 3-tier architecture intro – alternative methods of resource connection: – Bastion host – SSM – EC2 Instance Connect DDoS attacks A regular virtual machineIt's a VM. Classic EC2 instance in de‐ fault setting. Resources: EC2SecurityGroup: Type: AWS:: EC2:: SecurityGroup Properties: GroupName: Launch-wizard-13 Launch-wizard-13 GroupDescription: Allow traffic to EC2 SecurityGroupIngress: - CidrIp: 0.0.0.0/0 IpProtocol: -1 SecurityGroupEgress: - CidrIp: 0.0.0.0/00 码力 | 10 页 | 3.11 MB | 5 月前3Practices of Go Microservices on Post-Kubernetes-Wei Zheng
on Post-Kubernetes 郑伟 ⽯墨⽂档 Background in Shimo Language • Go • Node • Rust Background in Shimo Framework • Gin • Echo • gRPC • … Background in Shimo Platform • All in Kubernetes • Ingress IDL Debug IDL Mock ... API Gateway Framework(Ego) Auth Interceptor Metrics IDL Docs Kubernetes Redis CMP DB CMP Log Interceptor Err Interceptor Metric Interceptor MQ CMP Mongo Protobuf mono repo • Git/CI workflow • Custom cli tool • IDL style guide • Google Style • Uber V2 Style IDL Tool Chain - CI Workflow IDL Tool Chain - Cli • egoctl: (https://github.com/gotomicro/egoctl)0 码力 | 59 页 | 5.66 MB | 1 年前3Hello 算法 1.0.0b2 Golang版
Hello 算法 Go 语言版 靳宇栋(Krahets) Release 1.0.0b2 2023‑03‑30 序 两年前,我在力扣上分享了《剑指 Offer》系列题解,受到了很多小伙伴的喜爱与支持。在此期间,我也回复 了许多读者的评论问题,遇到最多的问题是“如何入门学习算法”。我渐渐也对这个问题好奇了起来。 两眼一抹黑地刷题应该是最受欢迎的方式,简单粗暴且有效。然而,刷题就如同玩“扫雷”游戏,自学能力强 qualifier1024, Cathay‑Chen, Guanngxu, xBLACKICEx, what‑is‑me, L‑Super, Slone123c, mgisr, longranger2, xiongsp, WSL0809, Wonderdch, a16su, hpstory, JeffersonHuang, xjr7670, MolDuM, XC‑Zero, DullSword, 1.3. 小结 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2. 复杂度分析 12 2.1. 算法效率评估 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 码力 | 202 页 | 15.73 MB | 1 年前32-6-Golang 在 Baidu-FrontEnd 的应用-陶春华
–Python, Ruby • 并发性 –Process, Thread, Event(编程难度) • 开发效率 –语言的描述效率:代码量 –语言的简洁、易用 –库支持 后台程序开发的需求(2) • 大型程序的组织 –数据封装能力 –Namespace • 可测试能力 –单测,覆盖度测量 • 错误检查能力 –编译 –程序异常的trouble shooting 后台程序开发的需求(3) C:直接用系统的机制 – Python: 自己实现的thread, 只能使用一个CPU • 开发效率 – 相差5-10倍 – 内存的处理是一个难点 – dict/map, list C vs Python (2) • 大型程序的组织 – C: 无namespace • 可测试能力 – C、python都有*Unit测试框架 • 错误检查能力 – C: 编译,core dump 调试成本 • 并发性 –Go routine: 屏蔽底层的机制,充分利用cpu资源 –多线程模型:容易思考 • 开发效率 –描述能力和python接近 –较丰富的库(系统库,第三方库) Golang (2) • 大型程序的组织 –Package –数据访问的限制(首字母大小写的区别) • 可测试能力 –内置的单测和覆盖检查工具,易于做TDD –go test • 错误检查能力 –严格的编译阶段检查:强类型,文件包含,…0 码力 | 35 页 | 730.17 KB | 1 年前32.游戏战中陪伴助手微服务架构设计与应用
初始方案——Lua 脚本 如何新增策略 初始方案——Lua 脚本 如何修改策略 初始方案——Lua 方案 显而易见的问题 范畴 问题 需求 - 所有策略需求都需要走开发流程 - 迭代周期长:2周开发、测试、上线 运营 - 变更困难,修改策略 = 修改代码 开发 - 代码低内聚,交接难度大 扩展 - 没有考虑扩展 功能 - 难以实现战略推荐 - 早期:先考虑有无 - 引入推荐系统 新需求流程 需求 -> 开发 -> 运营 需求 -> (开发) -> 运营 需求变更流程 需求 -> 开发 -> 运营 需求 -> 运营 策略设计模式 人工设计 人工设计 + 离线挖掘 需求迭代周期 2 周 3~5 天 常驻人力 运营 1、开发 1、项目管理 0.5 运营 1 后台技术栈 Lua Go 代码理解成本 >10000 行代码 + 1500 行注释 135 行代码 + 82 行注释 + + 开发模式文档 交接周期 未知(未交接过) 1 天(几位开发参与过) 持续测试 无 有 性能和成本优化 第四部分 贵 - 部署:腾讯云 TKE(Tencent Kubernetes Engine);微服务 - 上线前压测: - 预估 CPU:20,000+ 核,其中推荐系统接近 18,000 - 现象:网络流量极大 - 原因:流量中包含对局完整历史(Token 历史、推荐历史、……)0 码力 | 47 页 | 11.10 MB | 1 年前32.Go语言实现中的几个研究课题_毛康力
如果⼀一个goroutine执⾏行channel操作阻塞,它会被挂 在这个channel的结构上⾯面,以便唤醒。 select • select如何实现? • select其实是⼀一个整体 • c1 c2并不能独⽴立对待 • 要么全部成功,要么失败,否则可能死锁 • 单纯对select结构加锁⾏行不通!!! • 共享⼀一个全局锁? select • 研究课题:能否实现lock-free channels? network跟上⼀一次读在相同核上 ⼤大纲 • 并发 • 接⼝口 • 垃圾回收 • 调度 • 死锁检测 死锁检测 死锁检测 • 构造⼀一个图(Graph) • L1锁住后再加锁L2,则构造边L1->L2 • 如果图中出现环,可能存在死锁 • 当图上新加⼀一条边时,判断是否存在环 channel死锁 • Go不仅有锁,还有channel • channel其实是信号量 •0 码力 | 37 页 | 566.26 KB | 1 年前32.2 龚浩华(月牙寂)p2p缓存系统 基于Golang的Aop设计模式
LOGO p2p缓存系统 基于Golang的Aop设计模式 龚浩华 QQ 29185807 月牙寂 背景 v Web缓存(类似CDN技术) § 网页、图片 § 普通下载 § 普通视频 v P2P缓存 § 下载(bt等) § 视频(qvod、百度影音等) 背景 v P2P缓存好处 § 一次获取,多次利用 § 减少局域网出网流量 减少局域网出网流量 § 提升用户体验 背景 v P2P缓存服务器(基于c++开发) § 代码量大 § 协议数量多 § 耦合性高 § 潜在bug多 重构 or 重新推倒? 背景 现实世界是怎么样的 分布式、并发 职能化、松散化 自组织、智能化 程序框架是否也可以这样? OOP v C++对象代码运行 Agent:智能体、职能代理。源于分布式人 工智能(DAI) 1、自主的、智能的 2、具有社会性(与环境通信) 3、反应能力,理解环境并对环境刺激做出 适应的反应 4、主动性,不是简单的反应,而是有目的 的反应 5、一般agent处在分布式网络中,行为具 有局部效应和全局效应 golang 1、对象: 类 2、属性:成员变量 3、行为:成员函数 4、自主性、并发:协程0 码力 | 29 页 | 338.20 KB | 1 年前3Casdoor · An Open Source UI-first Identity Access Management (IAM) / Single-Sign-On (SSO) platform supporting OAuth 2.0, OIDC, SAML and CAS
concurrency, provides a web-based UI for management, and supports localization in 10+ languages. 2. Casdoor supports third-party application login, such as GitHub, Google, QQ, and WeChat, and it supports make the user launch a request to this URL, and the Authorization Request is completed. St Step 2 (Aut ep 2 (Authorization Grant) horization Grant) This step is straightforward: the user is redirected to (Authorization Grant) horization Grant) In this step, your Application already has the code from Step 2, and it will speak to Casdoor: "Hey, the user agreed to give me the code . Can you verify this code0 码力 | 825 页 | 58.31 MB | 1 年前3
共 137 条
- 1
- 2
- 3
- 4
- 5
- 6
- 14
相关搜索词
BestpracticesforbuildingKubernetesOperatorsGoGenericsreviewSecureaccesstoEC2developersPracticesofMicroservicesonPostWeiZhengHello算法1.00b2GolangBaiduFrontEnd应用春华游戏战中陪伴助手服务架构构设设计架构设计语言实现几个研究课题研究课题毛康力2.2浩华月牙p2p缓存系统CasdoorAnOpenSourceUIfirstIdentityAccessManagementIAMSingleSignOnSSOplatformsupportingOAuth2.0OIDCSAMLandCAS