namespace: {{ $xappNamespace }}
rules:
- apiGroups: [""]
- resources: ["pods", "services"]
+ resources: ["pods", "pods/log", "services"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
resources: ["deployments", "daemonsets", "replicasets", "statefulsets"]
name: {{ $jobName }}-ric-robot-run
namespace: {{ .Release.Namespace }}
spec:
+ backoffLimit: {{ default 0 .Values.ric.robot.job.backoffLimit }}
template:
spec:
serviceAccountName: {{ $serviceAccountName }}
- restartPolicy: Never
+ restartPolicy: {{ default "Never" .Values.ric.robot.job.restartPolicy }}
initContainers:
- name: {{ $jobName }}-generate-robot-kubeconfig
{{ with .Values.images.ric.robot.job.init }}
- name: robot-etc
mountPath: /robot/etc
readOnly: false
+ {{- if .Values.ric.robot.log }}
- name: robot-log
mountPath: /robot/log
readOnly: false
+ {{- end }}
- name: robot-bin
mountPath: /robot/bin
readOnly: true
{{- if not .Values.ric.robot.job.failOnTestFail }}
- "--NoStatusRC"
{{- end }}
+ {{- if .Values.ric.robot.log }}
- "-d"
- "/robot/log"
+ {{- else }}
+ - "-o"
+ - "NONE"
+ - "-l"
+ - "NONE"
+ - "-r"
+ - "NONE"
+ - "-L"
+ - "NONE"
+ {{- end }}
- "--console"
- "verbose"
- "-C"
- name: robot-etc
mountPath: /robot/etc
readOnly: true
+ {{- if .Values.ric.robot.log }}
- name: robot-log
mountPath: /robot/log
readOnly: false
+ {{- end }}
# for compatability with the ric robot, we mount
# both properties files and interface libraries
# under resources/.
- name: robot-etc
emptyDir: {}
- name: robot-log
+ {{- if .Values.ric.robot.log }}
hostPath:
path: {{ default "/opt/ric/robot/log" .Values.ric.robot.log }}
type: DirectoryOrCreate
+ {{- end }}
- name: robot-bin
configMap:
name: robot-bin