Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
896d53c4
Commit
896d53c4
authored
Sep 01, 2017
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make etcd prefix configurable in migration script
parent
6a845c67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
migrate-if-needed.sh
cluster/images/etcd/migrate-if-needed.sh
+3
-2
No files found.
cluster/images/etcd/migrate-if-needed.sh
View file @
896d53c4
...
@@ -82,6 +82,7 @@ if [ -e "${DATA_DIRECTORY}/${VERSION_FILE}" ]; then
...
@@ -82,6 +82,7 @@ if [ -e "${DATA_DIRECTORY}/${VERSION_FILE}" ]; then
CURRENT_VERSION
=
"
$(
echo
$VERSION_CONTENTS
|
cut
-d
'/'
-f
1
)
"
CURRENT_VERSION
=
"
$(
echo
$VERSION_CONTENTS
|
cut
-d
'/'
-f
1
)
"
CURRENT_STORAGE
=
"
$(
echo
$VERSION_CONTENTS
|
cut
-d
'/'
-f
2
)
"
CURRENT_STORAGE
=
"
$(
echo
$VERSION_CONTENTS
|
cut
-d
'/'
-f
2
)
"
fi
fi
ETCD_DATA_PREFIX
=
"
${
ETCD_DATA_PREFIX
:-
/registry
}
"
# If there is no data in DATA_DIRECTORY, this means that we are
# If there is no data in DATA_DIRECTORY, this means that we are
# starting etcd from scratch. In that case, we don't need to do
# starting etcd from scratch. In that case, we don't need to do
...
@@ -207,7 +208,7 @@ for step in ${SUPPORTED_VERSIONS}; do
...
@@ -207,7 +208,7 @@ for step in ${SUPPORTED_VERSIONS}; do
# Create a lease and attach all keys to it.
# Create a lease and attach all keys to it.
${
ATTACHLEASE
}
\
${
ATTACHLEASE
}
\
--etcd-address
http://127.0.0.1:
${
ETCD_PORT
}
\
--etcd-address
http://127.0.0.1:
${
ETCD_PORT
}
\
--ttl-keys-prefix
"
${
TTL_KEYS_DIRECTORY
:-
/registry
/events
}
"
\
--ttl-keys-prefix
"
${
TTL_KEYS_DIRECTORY
:-
${
ETCD_DATA_PREFIX
}
/events
}
"
\
--lease-duration
1h
--lease-duration
1h
# Kill etcd and wait until this is down.
# Kill etcd and wait until this is down.
stop_etcd
stop_etcd
...
@@ -226,7 +227,7 @@ for step in ${SUPPORTED_VERSIONS}; do
...
@@ -226,7 +227,7 @@ for step in ${SUPPORTED_VERSIONS}; do
echo
"Starting etcd
${
step
}
in v3 mode failed"
echo
"Starting etcd
${
step
}
in v3 mode failed"
exit
1
exit
1
fi
fi
${
ETCDCTL_CMD
}
rm
--recursive
"
/registry
"
${
ETCDCTL_CMD
}
rm
--recursive
"
${
ETCD_DATA_PREFIX
}
"
# Kill etcd and wait until this is down.
# Kill etcd and wait until this is down.
stop_etcd
stop_etcd
echo
"Successfully remove v2 data"
echo
"Successfully remove v2 data"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment