aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/dmaap/components/dmaap-dr-node/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/dmaap/components/dmaap-dr-node/templates')
-rw-r--r--kubernetes/dmaap/components/dmaap-dr-node/templates/ingress.yaml1
-rw-r--r--kubernetes/dmaap/components/dmaap-dr-node/templates/pv-aaf.yaml54
-rw-r--r--kubernetes/dmaap/components/dmaap-dr-node/templates/pv-event.yaml51
-rw-r--r--kubernetes/dmaap/components/dmaap-dr-node/templates/pv-spool.yaml50
-rw-r--r--kubernetes/dmaap/components/dmaap-dr-node/templates/pv.yaml61
-rw-r--r--kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml114
6 files changed, 244 insertions, 87 deletions
diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/ingress.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/ingress.yaml
new file mode 100644
index 0000000000..8f87c68f1e
--- /dev/null
+++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/ingress.yaml
@@ -0,0 +1 @@
+{{ include "common.ingress" . }}
diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-aaf.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-aaf.yaml
new file mode 100644
index 0000000000..9b71b93290
--- /dev/null
+++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-aaf.yaml
@@ -0,0 +1,54 @@
+{{/*
+ # ============LICENSE_START=======================================================
+ # Copyright (C) 2019 Nordix Foundation.
+ # ================================================================================
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+ # SPDX-License-Identifier: Apache-2.0
+ # ============LICENSE_END=========================================================
+*/}}
+
+
+{{- if .Values.global.aafEnabled }}
+{{- $global := . }}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
+{{- if eq "True" (include "common.needPV" .) -}}
+{{- range $i := until (int $global.Values.replicaCount)}}
+---
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" $global }}-aaf-props-{{ $i }}
+ namespace: {{ include "common.namespace" $global }}
+ labels:
+ app: {{ include "common.name" $global }}
+ chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}"
+ release: "{{ $global.Release.Name }}"
+ heritage: "{{ $global.Release.Service }}"
+ name: {{ include "common.fullname" $global }}-aaf-props
+spec:
+ capacity:
+ storage: {{ $global.Values.persistence.aafCredsSize }}
+ accessModes:
+ - {{ $global.Values.persistence.accessMode }}
+ storageClassName: "{{ include "common.fullname" $global }}-data-aaf-props"
+ persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }}
+ hostPath:
+ path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.aafCredsMountSubPath }}-{{$i}}
+{{if ne $i (int $global.Values.replicaCount) }}
+---
+{{- end -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-event.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-event.yaml
new file mode 100644
index 0000000000..1dd7302695
--- /dev/null
+++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-event.yaml
@@ -0,0 +1,51 @@
+{{/*
+ # ============LICENSE_START=======================================================
+ # Copyright (C) 2019 Nordix Foundation.
+ # ================================================================================
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+ # SPDX-License-Identifier: Apache-2.0
+ # ============LICENSE_END=========================================================
+*/}}
+
+---
+{{- $global := . }}
+{{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) }}
+{{- if eq "True" (include "common.needPV" .) -}}
+{{- range $i := until (int $global.Values.replicaCount)}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" $global }}-event-logs-{{ $i }}
+ namespace: {{ include "common.namespace" $global }}
+ labels:
+ app: {{ include "common.fullname" $global }}
+ chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}"
+ release: "{{ $global.Release.Name }}"
+ heritage: "{{ $global.Release.Service }}"
+ name: {{ include "common.fullname" $global }}-event-logs
+spec:
+ capacity:
+ storage: {{ $global.Values.persistence.eventLogSize}}
+ accessModes:
+ - {{ $global.Values.persistence.accessMode }}
+ persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }}
+ storageClassName: "{{ include "common.fullname" $global }}-data-event-logs"
+ hostPath:
+ path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.eventLogsMountSubPath }}-{{$i}}
+{{if ne $i (int $global.Values.replicaCount) }}
+---
+{{- end -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-spool.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-spool.yaml
new file mode 100644
index 0000000000..5e1c339815
--- /dev/null
+++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/pv-spool.yaml
@@ -0,0 +1,50 @@
+{{/*
+ # ============LICENSE_START=======================================================
+ # Copyright (C) 2019 Nordix Foundation.
+ # ================================================================================
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+ # SPDX-License-Identifier: Apache-2.0
+ # ============LICENSE_END=========================================================
+*/}}
+
+{{- $global := . }}
+{{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) }}
+{{- if eq "True" (include "common.needPV" .) -}}
+{{- range $i := until (int $global.Values.replicaCount)}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" $global }}-spool-data-{{$i}}
+ namespace: {{ include "common.namespace" $global }}
+ labels:
+ app: {{ include "common.fullname" $global }}
+ chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}"
+ release: "{{ $global.Release.Name }}"
+ heritage: "{{ $global.Release.Service }}"
+ name: {{ include "common.fullname" $global }}-spool-data
+spec:
+ capacity:
+ storage: {{ $global.Values.persistence.spoolSize}}
+ accessModes:
+ - {{ $global.Values.persistence.accessMode }}
+ persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }}
+ storageClassName: "{{ include "common.fullname" $global }}-data"
+ hostPath:
+ path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.spoolMountSubPath }}-{{$i}}
+{{if ne $i (int $global.Values.replicaCount) }}
+---
+{{- end -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/pv.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/pv.yaml
deleted file mode 100644
index 016a6ea023..0000000000
--- a/kubernetes/dmaap/components/dmaap-dr-node/templates/pv.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
- # ============LICENSE_START=======================================================
- # Copyright (C) 2019 Nordix Foundation.
- # ================================================================================
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- #
- # SPDX-License-Identifier: Apache-2.0
- # ============LICENSE_END=========================================================
-*/}}
-
-kind: PersistentVolume
-apiVersion: v1
-metadata:
- name: {{ include "common.fullname" . }}-spool-data-pv
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
- release: "{{ .Release.Name }}"
- heritage: "{{ .Release.Service }}"
- name: {{ include "common.fullname" . }}-spool-data-pv
-spec:
- capacity:
- storage: {{ .Values.persistence.spoolSize }}
- accessModes:
- - {{ .Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" . }}-spool-data-stcl"
- persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
- hostPath:
- path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.spoolMountSubPath }}
----
-kind: PersistentVolume
-apiVersion: v1
-metadata:
- name: {{ include "common.fullname" . }}-event-logs-pv
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
- release: "{{ .Release.Name }}"
- heritage: "{{ .Release.Service }}"
- name: {{ include "common.fullname" . }}-event-logs-pv
-spec:
- capacity:
- storage: {{ .Values.persistence.eventLogSize }}
- accessModes:
- - {{ .Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" . }}-event-logs-stcl"
- persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
- hostPath:
- path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.eventLogsMountSubPath }} \ No newline at end of file
diff --git a/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml b/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml
index a190d0d7d2..7ab2f8356d 100644
--- a/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml
+++ b/kubernetes/dmaap/components/dmaap-dr-node/templates/statefulset.yaml
@@ -45,15 +45,51 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
+ {{- if .Values.global.aafEnabled }}
+ - name: {{ include "common.name" . }}-dr-node-aaf-config
+ image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: {{ .Values.persistence.aafCredsPath }}
+ name: {{ include "common.fullname" . }}-aaf-props
+ command: ["bash","-c","exec /opt/app/aaf_config/bin/agent.sh"]
+ env:
+ - name: APP_FQI
+ value: "{{ .Values.aafConfig.fqi }}"
+ - name: aaf_locate_url
+ value: "https://aaf-locate.{{ .Release.Namespace }}:8095"
+ - name: aaf_locator_container
+ value: "{{ .Values.global.aafLocatorContainer }}"
+ - name: aaf_locator_container_ns
+ value: "{{ .Release.Namespace }}"
+ - name: aaf_locator_fqdn
+ value: "{{ .Values.aafConfig.fqdn }}"
+ - name: aaf_locator_public_fqdn
+ value: "{{.Values.aafConfig.publicFqdn}}"
+ - name: aaf_locator_app_ns
+ value: "{{ .Values.global.aafAppNs }}"
+ - name: DEPLOY_FQI
+ value: "{{ .Values.aafConfig.aafDeployFqi }}"
+ - name: DEPLOY_PASSWORD
+ value: "{{ .Values.aafConfig.aafDeployPass }}"
+ - name: cadi_longitude
+ value: "{{ .Values.aafConfig.cadiLongitude }}"
+ - name: cadi_latitude
+ value: "{{ .Values.aafConfig.cadiLatitude }}"
+ {{- end }}
- name: {{ include "common.name" . }}-permission-fixer
image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- mountPath: {{ .Values.persistence.spoolPath }}
- name: {{ include "common.fullname" . }}-spool-data-pvc
+ name: {{ include "common.fullname" . }}-data
- mountPath: {{ .Values.persistence.eventLogsPath }}
- name: {{ include "common.fullname" . }}-event-logs-pvc
- command: ["chown","-Rf","1000:1001", "/opt/app/datartr"]
+ name: {{ include "common.fullname" . }}-event-logs
+ {{- if .Values.global.aafEnabled }}
+ - mountPath: {{ .Values.persistence.aafCredsPath }}
+ name: {{ include "common.fullname" . }}-aaf-props
+ {{- end }}
+ command: ["chown","-Rf","1000:1001", "/opt/app/"]
containers:
- name: {{ include "common.name" . }}
image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -74,26 +110,27 @@ spec:
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
volumeMounts:
+ {{- if .Values.global.aafEnabled }}
+ - mountPath: {{ .Values.persistence.aafCredsPath }}
+ name: {{ include "common.fullname" . }}-aaf-props
+ {{- end }}
- mountPath: {{ .Values.persistence.spoolPath }}
- name: {{ include "common.fullname" . }}-spool-data-pvc
+ name: {{ include "common.fullname" . }}-data
- mountPath: {{ .Values.persistence.eventLogsPath }}
- name: {{ include "common.fullname" . }}-event-logs-pvc
+ name: {{ include "common.fullname" . }}-event-logs
- mountPath: /etc/localtime
name: localtime
readOnly: false
- mountPath: /opt/app/datartr/etc/node.properties
name: {{ include "common.fullname" . }}-config
subPath: node.properties
- - mountPath: /opt/app/datartr/etc/drNodeCadi.properties
- name: {{ include "common.fullname" . }}-config
- subPath: drNodeCadi.properties
- mountPath: /opt/app/datartr/etc/logback.xml
name: {{ include "common.fullname" . }}-log-conf
subPath: logback.xml
- mountPath: {{ .Values.global.loggingDirectory }}
name: {{ include "common.fullname" . }}-logs
resources:
-{{ include "common.resources" . | indent 12 }}
+{{ include "common.resources" . }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 10 }}
@@ -101,8 +138,8 @@ spec:
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 10 }}
- {{- end }}
- # Filebeat sidecar container
+ {{- end -}}
+ # Filebeat sidecar container
- name: {{ include "common.name" . }}-filebeat-onap
image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
@@ -126,8 +163,6 @@ spec:
items:
- key: node.properties
path: node.properties
- - key: drNodeCadi.properties
- path: drNodeCadi.properties
- name: {{ include "common.fullname" . }}-log-conf
configMap:
name: {{ include "common.fullname" . }}-log
@@ -136,34 +171,61 @@ spec:
name: {{ include "common.fullname" . }}-dmaap-dr-node-filebeat-configmap
- name: {{ include "common.fullname" . }}-data-filebeat
emptyDir: {}
+ - name: {{ include "common.fullname" . }}-logs
+ emptyDir: {}
+ {{- if not .Values.persistence.enabled }}
- name: {{ include "common.fullname" . }}-event-logs-pvc
emptyDir: {}
- - name: {{ include "common.fullname" . }}-logs
+ - name: {{ include "common.fullname" . }}-data
+ emptyDir: {}
+ {{- if .Values.global.aafEnabled }}
+ - name: {{ include "common.fullname" . }}-aaf-props-pvc
emptyDir: {}
+ {{- end }}
+ {{- end }}
+{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
- name: {{ include "common.fullname" . }}-spool-data-pvc
+ name: {{ include "common.fullname" . }}-data
labels:
name: {{ include "common.fullname" . }}
spec:
- accessModes: [ {{ .Values.persistence.accessMode }} ]
- storageClassName: {{ include "common.fullname" . }}-spool-data-stcl
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ storageClassName: {{ include "common.storageClass" . }}
resources:
requests:
storage: {{ .Values.persistence.spoolSize }}
- selector:
- matchLabels:
- name: {{ include "common.fullname" . }}-spool-data-pv
- metadata:
- name: {{ include "common.fullname" . }}-event-logs-pvc
+ name: {{ include "common.fullname" . }}-event-logs
labels:
name: {{ include "common.fullname" . }}
spec:
- accessModes: [ {{ .Values.persistence.accessMode }} ]
- storageClassName: {{ include "common.fullname" . }}-event-logs-stcl
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ {{- if eq "True" (include "common.needPV" .) }}
+ storageClassName: "{{ include "common.fullname" . }}-data-event-logs"
+ {{- else }}
+ storageClassName: {{ include "common.storageClass" . }}
+ {{- end }}
resources:
requests:
storage: {{ .Values.persistence.eventLogSize }}
- selector:
- matchLabels:
- name: {{ include "common.fullname" . }}-event-logs-pv
+{{- if .Values.global.aafEnabled }}
+ - metadata:
+ name: {{ include "common.fullname" . }}-aaf-props
+ labels:
+ name: {{ include "common.fullname" . }}
+ spec:
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ {{- if eq "True" (include "common.needPV" .) }}
+ storageClassName: "{{ include "common.fullname" . }}-data-aaf-props"
+ {{- else }}
+ storageClassName: {{ include "common.storageClass" . }}
+ {{- end }}
+ resources:
+ requests:
+ storage: {{ .Values.persistence.aafCredsSize }}
+{{- end }}
+{{- end }}