Skip to content

Commit 4dd6735

Browse files
authored
Merge pull request #1029 from Random-Liu/add-runtime-config-api
Add a generic runtime options api.
2 parents 5d1a07e + d9914c8 commit 4dd6735

7 files changed

Lines changed: 428 additions & 27 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ push: $(BUILD_DIR)/$(TARBALL)
154154
@BUILD_DIR=$(BUILD_DIR) TARBALL=$(TARBALL) VERSION=$(VERSION) ./hack/push.sh
155155

156156
proto:
157-
@hack/update-proto.sh
157+
@API_PATH=pkg/api/v1 hack/update-proto.sh
158+
@API_PATH=pkg/api/runtimeoptions/v1 hack/update-proto.sh
158159

159160
.PHONY: install.deps
160161

hack/update-proto.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set -o nounset
2020
set -o pipefail
2121

2222
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
23-
API_ROOT="${ROOT}/pkg/api/v1"
23+
API_ROOT="${ROOT}/${API_PATH-"pkg/api/v1"}"
2424

2525
go get k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo
2626
if ! which protoc-gen-gogo >/dev/null; then
@@ -29,7 +29,7 @@ if ! which protoc-gen-gogo >/dev/null; then
2929
fi
3030

3131
function cleanup {
32-
rm -f ${API_ROOT}/api.pb.go.bak
32+
rm -f ${API_ROOT}/api.pb.go.bak
3333
}
3434

3535
trap cleanup EXIT
@@ -41,6 +41,6 @@ protoc \
4141

4242
# Update boilerplate for the generated file.
4343
echo "$(cat hack/boilerplate/boilerplate.go.txt ${API_ROOT}/api.pb.go)" > ${API_ROOT}/api.pb.go
44-
sed -i".bak" "s/Copyright YEAR AUTHORS/Copyright $(date '+%Y') The containerd Authors/g" ${API_ROOT}/api.pb.go
44+
sed -i".bak" "s/Copyright AUTHORS/Copyright $(date '+%Y') The containerd Authors/g" ${API_ROOT}/api.pb.go
4545

4646
gofmt -l -s -w ${API_ROOT}/api.pb.go

0 commit comments

Comments
 (0)