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
ff1f002f
Commit
ff1f002f
authored
Oct 10, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rollback tool to etcd image
parent
4be6d5e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
Dockerfile
cluster/images/etcd/Dockerfile
+2
-2
Makefile
cluster/images/etcd/Makefile
+4
-0
migrate-if-needed.sh
cluster/images/etcd/migrate-if-needed.sh
+1
-1
No files found.
cluster/images/etcd/Dockerfile
View file @
ff1f002f
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
FROM
BASEIMAGE
FROM
BASEIMAGE
MAINTAINER
Dawn Chen <dawnchen
@google.com>
MAINTAINER
Wojciech Tyczynski <wojtekt
@google.com>
EXPOSE
2379 2380 4001 7001
EXPOSE
2379 2380 4001 7001
COPY
etcd* etcdctl* /usr/local/bin/
COPY
etcd* etcdctl* /usr/local/bin/
COPY
migrate-if-needed.sh attachlease /usr/local/bin/
COPY
migrate-if-needed.sh attachlease
rollback
/usr/local/bin/
cluster/images/etcd/Makefile
View file @
ff1f002f
...
@@ -55,6 +55,10 @@ build:
...
@@ -55,6 +55,10 @@ build:
# Compile attachlease
# Compile attachlease
docker run -it -v $(shell pwd)/../../../
:
/go/src/k8s.io/kubernetes -v $(TEMP_DIR):/build -e GOARCH=$(ARCH) golang:$(GOLANG_VERSION)
\
docker run -it -v $(shell pwd)/../../../
:
/go/src/k8s.io/kubernetes -v $(TEMP_DIR):/build -e GOARCH=$(ARCH) golang:$(GOLANG_VERSION)
\
/bin/bash -c "CGO_ENABLED=0 go build -o /build/attachlease k8s.io/kubernetes/cluster/images/etcd/attachlease"
/bin/bash -c "CGO_ENABLED=0 go build -o /build/attachlease k8s.io/kubernetes/cluster/images/etcd/attachlease"
# Compile rollback
docker run
-it
-v
$(
shell
pwd
)
/../../../:/go/src/k8s.io/kubernetes
-v
$(TEMP_DIR)
:/build
-e
GOARCH
=
$(ARCH)
golang:
$(GOLANG_VERSION)
\
/bin/bash
-c
"CGO_ENABLED=0 go build -o /build/rollback k8s.io/kubernetes/cluster/images/etcd/rollback"
ifeq
($(ARCH),amd64)
ifeq
($(ARCH),amd64)
...
...
cluster/images/etcd/migrate-if-needed.sh
View file @
ff1f002f
...
@@ -79,7 +79,7 @@ fi
...
@@ -79,7 +79,7 @@ fi
if
[
!
-d
"
${
DATA_DIRECTORY
}
"
]
;
then
if
[
!
-d
"
${
DATA_DIRECTORY
}
"
]
;
then
mkdir
-p
"
${
DATA_DIRECTORY
}
"
mkdir
-p
"
${
DATA_DIRECTORY
}
"
fi
fi
if
[
!
"
$(
ls
-A
${
DATA_DIRECTORY
})
"
]
;
then
if
[
-z
"
$(
ls
-A
${
DATA_DIRECTORY
})
"
]
;
then
echo
"
${
DATA_DIRECTORY
}
is empty - skipping migration"
echo
"
${
DATA_DIRECTORY
}
is empty - skipping migration"
echo
"
${
TARGET_VERSION
}
/
${
TARGET_STORAGE
}
"
>
"
${
DATA_DIRECTORY
}
/
${
VERSION_FILE
}
"
echo
"
${
TARGET_VERSION
}
/
${
TARGET_STORAGE
}
"
>
"
${
DATA_DIRECTORY
}
/
${
VERSION_FILE
}
"
exit
0
exit
0
...
...
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