我在OpenShift上构建a maven project专用于S2I,但是构建失败并且出现了#34; Generic Build失败 - 检查日志以获取详细信息。"
但是,构建日志显示没有错误。
为什么这个版本失败?
答案 0 :(得分:2)
在ptrk回答诊断出这是问题之后: 运行时,有两种方法可以在OpenShift上为wildfly pod提供更多内存:
对于构建内存,您还可以在模板中指定它:
- kind: BuildConfig
...
spec:
...
resources:
limits:
cpu: 1
memory: 1Gi
# requests:
# cpu: 1
# memory: 1Gi
答案 1 :(得分:0)
通过以下方式检查@Graham建议的限制:
oc -n yourproject get limits -o yaml
oc -n yourproject get quota -o yaml
甚至直接编辑:
oc -n yourproject edit limits
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
kind: LimitRange
metadata:
creationTimestamp: 1999-08-11T13:58:34Z
name: resource-limits
namespace: yourproject
resourceVersion: "61912526"
selfLink: /api/v1/namespaces/betvictor/limitranges/resource-limits
uid: 2a275347-7e9d-11e7-8242-005056957160
spec:
limits:
- max:
memory: 3001Mi
min:
memory: 10Mi
type: Pod
- default:
memory: 300Mi
defaultRequest:
memory: 250Mi
max:
memory: 3000Mi
min:
memory: 10Mi
type: Container
注意单位,如果每个单位的单位相同,则更好。 Pod最大值必须等于或大于容器最大值
用于构建Java应用程序的半场演出并不是我所知道的......