Hello

I’m Wildcard, a DevOps engineer, in love with Golang, mainly working on Prometheus and Kubernetes.

Docker in IPv6-Only Network

Recently I’ve been using Hetzner Cloud with IPv6 only. I installed Docker and deployed some services. With the default settings of Docker, containers cannot access the IPv6 only network on the host.

March 10, 2024 · Wi1dcard

Git Commit Messages 和 Changelog 中的常用动词参考

优质的 Git commit message 和 Changelog 不仅可以让协作者们一目了然地了解版本变更,更能帮助你快速回忆曾经的修改。因此,合理地使用英语动词、通过「一句话」精准地概括做了什么事、编写易读易懂的描述就显得尤为重要。本文目的是索引和总结常用的动词列表,内容仅凭我个人经验以及有限的查阅资料,请结合实际情况使用。

September 17, 2021 · Wi1dcard

Serve HTTP and WebSocket with the Same Port and Path in Nginx

Polkadot and other Substrate-based chain nodes supports JSON RPC over HTTP and over WebSocket on ports 9933 and 9944 individually. However, according to the WebSocket handshake, we can determine if the client is requesting WebSocket or other HTTP resource by the header Upgrade: websocket. Here’s a little trick in Nginx to reverse proxy both 9933 (HTTP) and 9944 (WebSocket) with the same host, same port, and same path / location.

February 19, 2021 · Wi1dcard

Customize Kube-Prometheus Built-in Alerts

Kube-prometheus provides quite a few great collections of components and alerts that help us monitoring our Kubernetes cluster. I’ve used it in the production cluster for serveral months. Although the project exposes a bunch of options via _config+:: to makes it partially configurable, the scope of parameters that we can modify is still limited.

February 16, 2021 · Wi1dcard

一篇不长但似乎还是有点乏味的年终总结

记得去年写过一篇 一篇又长又乏味的年终总结和展望,虽然现在已经是 2021 年的 2 月了,再来回顾稍微晚了些,不过我还是决定总结一下去年,再给新一年制定几个长期目标。

February 2, 2021 · Wi1dcard

通俗解释反伪造邮件机制 SPF、DKIM 和 DMARC

这篇博客一改我之前文风的常态,因为网上的相关专业资料已经很多,我尽可能以通俗易懂的语言来介绍,放弃了部分专业性,望读者见谅。 我们先来谈谈「防止攻击者伪造我们向其他人发送邮件」。要理解为什么会存在伪造邮件以及如何防止伪造邮件,首先需要明白邮件机制是怎样工作的。

February 2, 2021 · Wi1dcard

我的工作方法

2020 年转眼结束了,本想写年终总结和新年计划,却发现 2020 年除了技术进步,还总结了不少我自己的「工作技巧」,或者也可以叫做「工作守则」。我遵循着这些实践中总结出来的方法工作,为我自己以及我所在的岗位,带来了不小的时间效益和经济效益。 当然,适合自己的才是最好的,我不喜欢一味模仿其它人,希望你也带着这种想法读这篇博客。

February 1, 2021 · Wi1dcard

ESXi OpenWrt 使用华为随身 Wi-Fi 实现 WAN 故障转移

这几天想给家里上「双网」,但弱电箱只有一根光纤,所以无法拉双线。正好手上有一个 华为 5G 随身 Wi-Fi Pro,干脆用它来做 Failover(故障转移)吧。

November 11, 2020 · Wi1dcard

改进 Alertmanager 的钉钉通知

多亏了 prometheus-webhook-dingtalk 项目,Alertmanager 集成钉钉消息通知得以实现。在实际使用过程中,我发现了一些可以改进的配置,例如通知消息模板可以更加清晰简洁、可以根据不同的报警优先级决定是否 Mention 某人等。

October 2, 2020 · Wi1dcard

Convert Kubernetes-Mixin Severities to OpsGenie Priorities in Prometheus

In kubernetes-mixin (a dependency of kube-prometheus-stack and prometheus-operator charts) rules, the severity label of alrets can be critical, warning, or info etc. However, OpsGenie’s priority field only accepts values like P1, P2 … P5. As a user of both of them, I would have to convert the “severity” to OpsGenie’s “priority”. For example, if a critical alert was fired, a matched P1 alert to be created in OpsGenie is expected, and warning -> P2, info -> P3, as well.

September 30, 2020 · Wi1dcard