2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2021 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
16 name: {{ include "opendaylight.fullname" . }}
20 mountpath="{{ .Values.persistence.mountPath }}"
21 BASEDIR="{{ .Values.config.odl_basedir }}"
22 odl_prefix="/opt/opendaylight"
24 if [[ ! -d "$mountpath/snapshots" ]];then
25 mkdir -p $mountpath/snapshots
28 if [[ ! -d "$mountpath/data" ]];then
29 mkdir -p $mountpath/data
32 if [[ ! -d "$mountpath/segmented-journal" ]];then
33 mkdir -p $mountpath/segmented-journal
36 if [[ ! -d "$mountpath/daexim" ]];then
37 mkdir -p $mountpath/daexim
40 if [[ ! -L "$odl_prefix/snapshots" ]];then
41 rm -rf $odl_prefix/snapshots && ln -s $mountpath/snapshots $odl_prefix/snapshots
44 if [[ ! -L "$odl_prefix/data" ]];then
45 rm -rf $odl_prefix/data && ln -s $mountpath/data $odl_prefix/data
48 if [[ ! -L "$odl_prefix/segmented-journal" ]];then
49 rm -rf $odl_prefix/segmented-journal && ln -s $mountpath/segmented-journal $odl_prefix/segmented-journal
52 if [[ ! -L "$odl_prefix/daexim" ]];then
53 rm -rf $odl_prefix/daexim && ln -s $mountpath/daexim $odl_prefix/daexim
56 sed -i "s/\(featuresBoot= \|featuresBoot = \)/featuresBoot = ${FEATURES},/g" ${BASEDIR}/etc/org.apache.karaf.features.cfg
57 cat ${BASEDIR}/etc/org.apache.karaf.features.cfg
58 ${BASEDIR}/bin/karaf run