File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ The `updated` folder has all of the files needed for the migration. The next ste
797910 ) Apply IndexerCluster CR
808011 ) Apply SearchHeadCluster CR
818112 ) Apply Standalone CR
82+ 13 ) Migrate apps from master-apps to manager-apps directory
8283
8384Once you validate your environment, you can delete the CM and LM CRs using the files in the folder ` to_remove_CRs ` .
8485Example: ` kubectl delete -f ./to_remove_CRs/<filename> `
Original file line number Diff line number Diff line change @@ -561,6 +561,20 @@ get_current_deployment() {
561561
562562}
563563
564+ # Migrate apps from master-app to manager-app directory
565+ migrate_appframework_dirs () {
566+ PODS=$( kubectl get pod -n ${NS} | grep -i ' cluster-manager' | awk ' {print $1}' )
567+ command=" find /opt/splunk/etc/master-apps -mindepth 1 -maxdepth 1 ! -name '_cluster' -exec mv {} /opt/splunk/etc/manager-apps/ \;"
568+
569+ for pod in ${PODS} ; do
570+ echo " Executing command ${command} on pod=${pod} "
571+ kubectl -n ${NS} exec -i ${pod} -- /bin/bash -c " ${command} "
572+ if [[ " $? " -ne 0 ]]; then
573+ echo " Failed to execute command ${command} on pod=${pod} "
574+ fi
575+ done
576+ }
577+
564578# Driver for Migration Mode
565579apply_new_CRs () {
566580 echo -e " \nApplying new CRs generated:\n"
@@ -634,6 +648,8 @@ apply_new_CRs() {
634648 fi
635649 fi
636650 done
651+
652+ migrate_appframework_dirs
637653
638654 # Disable maintenance mode in all CMs migrated
639655 for CM in " ${to_disable_maint_mode[@]} " ; do
You can’t perform that action at this time.
0 commit comments