
Neutron小记
前段时间的花了很多功夫对接k8s和openstack的kuryr-kubernetes网路组件。 学到了很多openstack的知识,今天抽出时间来整理下。 ...

前段时间的花了很多功夫对接k8s和openstack的kuryr-kubernetes网路组件。 学到了很多openstack的知识,今天抽出时间来整理下。 ...

update: ioutil逐渐被io 取代。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 package ioutil // import "io/ioutil" func NopCloser(r io.Reader) io.ReadCloser NopCloser returns a ReadCloser with a no-op Close method wrapping the provided Reader r. As of Go 1.16, this function simply calls io.NopCloser. package io // import "io" func NopCloser(r Reader) ReadCloser NopCloser returns a ReadCloser with a no-op Close method wrapping the provided Reader r. 最近使用baloo写集成测试,遇到了个需求, 在unmarshalrespones之后(或者之前)还要再输出一次response的纯文本格式供debug参考。 ...

base 通过修改ibase和obase可以实现各种进制的转化,比如十进制和二进制和十六进制之间的转换; If you aren’t familiar with conversion between decimal, binary, and hexadecimal formats, you can use a calculator utility such as bc or dc to convert between different radix representations. For example, in bc, you can run the command obase=2; 240 to print the number 240 in binary (base 2) form. ...

今天测试给我反馈了一个pod问题,测试给出的 use case 描述如下: 配置一个nginx的web服务; 在生命周期中选择http协议,端口配置80,路径配置/errorpath; 服务中pod能正常启动; 预期在pod的事件中应该有一个“FailedPostStartHook”错误信息。 测试人员发现,第4点的预期没有达到,pod 正常启动了,却没有 FailedPostStarHook事件出现。 简单分析了一下,我发现是测试人员把pod的lifecycle和 pod的liveness/readiness 诺混淆了,从而写出了错的test case。 ...

最近开发的遇到一个需求是在判断 两个目录是否相互包含。 想着用正则表达式或者递归去解决,捣鼓一段时间后发现总有些edge case 不能cover到, 后来发现用 python 的pathlib 可以很好的解决。 ...

客户需要把kubernetes apiserver/etcd/kubelet/kubectl 等所有的证书有效期修改为100年。 很明显这是一个不合理的需求,不过客户说什么就是什么。 于是经几天的调试有了下面的这个 Makefile批量生成所有(FILES变量)的证书。 ...

update: flannel从v0.14.0(2021/05/27)开始已经支持腾讯云的vpc backend了。 客户需要在腾讯云上部署kubernetes集群而且选用的网络插件是flannel,所以我们需要为flannel 添加 腾讯云 vpc 的 backend 适配。 ...

网络上关于 makefile的教程有很多,由于我日常不是写c/c++的, 不常使用makefile,需要用的时候总是要重新Google搜索makefile的语法。 ...

在shell脚本里使用mkfifo命令创建named pipes可以实现简单的事件驱动, 避免poll(轮询)带来的时延(not real-time)和资源消耗的问题。 ...

使用vim有7,8年了,整理一下自己用到的vim配置,方便自查。 vim basic 基本设置,语法高亮,行号,等等: 1 2 3 4 execute pathogen#infect() syntax on filetype plugin indent on set number paste 复制粘贴: disable auto indent 1 set paste Notice the “– INSERT (paste) –” at the bottom of the Vim window. ...
我的歌单