Code Review
/
oom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[AAI] Deploy latest AAI images
[oom.git]
/
kubernetes
/
common
/
cassandra
/
templates
/
backup
/
cronjob.yaml
diff --git
a/kubernetes/common/cassandra/templates/backup/cronjob.yaml
b/kubernetes/common/cassandra/templates/backup/cronjob.yaml
index
b242de2
..
6db1202
100644
(file)
--- a/
kubernetes/common/cassandra/templates/backup/cronjob.yaml
+++ b/
kubernetes/common/cassandra/templates/backup/cronjob.yaml
@@
-14,6
+14,8
@@
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
# limitations under the License.
*/}}
{{- if .Values.backup.enabled }}
+{{- if .Values.global.cassandra.useOperator }}
+{{ else }}
apiVersion: batch/v1beta1
kind: CronJob
metadata:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
@@
-37,7
+39,7
@@
spec:
- command:
- /app/ready.py
args:
- command:
- /app/ready.py
args:
- - --
container
-name
+ - --
app
-name
- {{ include "common.name" . }}
env:
- name: NAMESPACE
- {{ include "common.name" . }}
env:
- name: NAMESPACE
@@
-45,12
+47,26
@@
spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- image:
"{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+ image:
{{ include "repositoryGenerator.image.readiness" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: {{ include "common.name" . }}-readiness
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: {{ include "common.name" . }}-readiness
+ resources:
+ limits:
+ cpu: "100m"
+ memory: "500Mi"
+ requests:
+ cpu: "3m"
+ memory: "20Mi"
- name: "cassandra-backup-init"
- name: "cassandra-backup-init"
- image:
"{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+ image:
{{ include "repositoryGenerator.image.readiness" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ resources:
+ limits:
+ cpu: "100m"
+ memory: "500Mi"
+ requests:
+ cpu: "3m"
+ memory: "20Mi"
command:
- /bin/bash
- -c
command:
- /bin/bash
- -c
@@
-132,9
+148,6
@@
spec:
apiVersion: v1
fieldPath: metadata.namespace
volumeMounts:
apiVersion: v1
fieldPath: metadata.namespace
volumeMounts:
- - mountPath: /etc/localtime
- name: localtime
- readOnly: true
{{- range $i := until (int .Values.replicaCount)}}
- mountPath: /onap-data/cassandra-{{ $i }}
name: data-dir-{{ $i }}
{{- range $i := until (int .Values.replicaCount)}}
- mountPath: /onap-data/cassandra-{{ $i }}
name: data-dir-{{ $i }}
@@
-149,7
+162,7
@@
spec:
subPath: exec.py
containers:
- name: cassandra-backup-validate
subPath: exec.py
containers:
- name: cassandra-backup-validate
- image:
"{{ include "common.repository" . }}/{{ .Values.image }}"
+ image:
{{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/bash
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/bash
@@
-223,13
+236,7
@@
spec:
volumeMounts:
- name: backup-dir
mountPath: /backup
volumeMounts:
- name: backup-dir
mountPath: /backup
- - name: localtime
- mountPath: /etc/localtime
- readOnly: true
volumes:
volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- name: scripts
configMap:
name: {{ include "common.fullname" . }}-configmap
- name: scripts
configMap:
name: {{ include "common.fullname" . }}-configmap
@@
-243,3
+250,4
@@
spec:
persistentVolumeClaim:
claimName: {{ include "common.fullname" . }}-backup-data
{{- end -}}
persistentVolumeClaim:
claimName: {{ include "common.fullname" . }}-backup-data
{{- end -}}
+{{- end -}}
\ No newline at end of file