在创建po-finition.yml文件之后。
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
labels:
app: myapp
type: server
spec:
containers:
- name: nginx-container
image: nginx
林特正在发出警告。
One or more containers do not have resource limits - this could starve other processes
发布于 2020-09-26 17:12:33
我正在处理我的YAML对象文件,以前,我把每个对象都放在一个单独的文件中,最近我注意到对于一个“部署”对象文件,我有以下的链接警告:
One or more containers do not have resource limits - this could starve other processes
在解决这个问题之前,我决定稍微重构一下我的对象定义,并在一个文件中定义多个对象(如果它们是相关的)。所以现在我有了和以前一样的部署,还有卷声明和服务,所有东西都在同一个文件中。
但是,我注意到,部署时没有显示linting警告,但是如果我从文件中删除服务和卷声明,那么它就会显示出来,而不需要部署。
因此,我认为linting代码没有考虑到每个文件定义多个对象的可能性。
谢谢!
https://stackoverflow.com/questions/64080471
复制相似问题