首页 > 解决方案 > 搜索 Kubernetes 项目作为测试对象

问题描述


我正在写关于 Kubernetes 开发最佳实践的硕士论文,然后实现一个原型来对 Kubernetes 清单进行静态分析,以检查是否遵循了最佳实践。

现在我正在寻找“准备好生产”的项目,因此在他们已经有时间实施最佳实践的状态下,而不是在“我只想让事情现在运行”的状态下。感谢您对有趣项目的任何提示,我可以将其用作将来评估部分的测试对象。

此外,如果您阅读了我不应该错过的任何有趣的文章或科学论文,我也期待着这样的输入。

谢谢大家
有美好的一天

标签: kuberneteskubernetes-helmazure-aks

解决方案


Perhaps your master thesis project is already implemented by conftest - a tool which helps you write tests against structured configuration data.

For example, the following rule will prevent running containers as root

deny[msg] {
  input.kind = "Deployment"
  not input.spec.template.spec.securityContext.runAsNonRoot = true
  msg = "Containers must not run as root"
}

Check some other kubernetes examples.


推荐阅读