Initial commit

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
Andy Goldstein
2017-08-02 13:27:17 -04:00
commit 2fe501f527
2024 changed files with 948288 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SAVES=(
k8s.io/kubernetes/cmd/libs/go2idl/client-gen
k8s.io/kubernetes/cmd/libs/go2idl/lister-gen
k8s.io/kubernetes/cmd/libs/go2idl/informer-gen
)
godep save ./... "${SAVES[@]}"
# remove files we don't want
find vendor \( -name BUILD -o -name .travis.yml \) -exec rm {} \;
+56
View File
@@ -0,0 +1,56 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/client-gen ./vendor/k8s.io/kubernetes/cmd/libs/go2idl/client-gen
OUTPUT_BASE=""
if [[ -z "${GOPATH}" ]]; then
OUTPUT_BASE="${HOME}/go/src"
else
OUTPUT_BASE="${GOPATH}/src"
fi
verify=""
for i in "$@"; do
if [[ $i == "--verify-only" ]]; then
verify=1
break
fi
done
if [[ -z ${verify} ]]; then
find ${ARK_ROOT}/pkg/generated/clientset \
\( \
-name '*.go' -and \
\( \
! -name '*_expansion.go' \
-or \
-name generated_expansion.go \
\) \
\) -exec rm {} \;
fi
${BIN}/client-gen \
--go-header-file /dev/null \
--output-base ${OUTPUT_BASE} \
--input-base github.com/heptio/ark/pkg/apis \
--clientset-path github.com/heptio/ark/pkg/generated \
--input ark/v1 \
--clientset-name clientset \
$@
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/docs-gen ./docs/generate/ark.go
if [[ $# -gt 1 ]]; then
echo "usage: ${BASH_SOURCE} [DIRECTORY]"
exit 1
fi
OUTPUT_DIR="$@"
if [[ -z "${OUTPUT_DIR}" ]]; then
OUTPUT_DIR=${ARK_ROOT}/docs/cli-reference
fi
${BIN}/docs-gen ark ${OUTPUT_DIR}
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/informer-gen ./vendor/k8s.io/kubernetes/cmd/libs/go2idl/informer-gen
OUTPUT_BASE=""
if [[ -z "${GOPATH}" ]]; then
OUTPUT_BASE="${HOME}/go/src"
else
OUTPUT_BASE="${GOPATH}/src"
fi
verify=""
for i in "$@"; do
if [[ $i == "--verify-only" ]]; then
verify=1
break
fi
done
if [[ -z ${verify} ]]; then
rm -rf ${ARK_ROOT}/pkg/generated/informers
fi
${BIN}/informer-gen \
--logtostderr \
--go-header-file /dev/null \
--output-base ${OUTPUT_BASE} \
--input-dirs github.com/heptio/ark/pkg/apis/ark/v1 \
--output-package github.com/heptio/ark/pkg/generated/informers \
--listers-package github.com/heptio/ark/pkg/generated/listers \
--internal-clientset-package github.com/heptio/ark/pkg/generated/clientset \
--versioned-clientset-package github.com/heptio/ark/pkg/generated/clientset \
$@
+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
BIN=${ARK_ROOT}/_output/bin
mkdir -p ${BIN}
go build -o ${BIN}/lister-gen ./vendor/k8s.io/kubernetes/cmd/libs/go2idl/lister-gen
OUTPUT_BASE=""
if [[ -z "${GOPATH}" ]]; then
OUTPUT_BASE="${HOME}/go/src"
else
OUTPUT_BASE="${GOPATH}/src"
fi
verify=""
for i in "$@"; do
if [[ $i == "--verify-only" ]]; then
verify=1
break
fi
done
if [[ -z ${verify} ]]; then
find ${ARK_ROOT}/pkg/generated/listers \
\( \
-name '*.go' -and \
\( \
! -name '*_expansion.go' \
-or \
-name generated_expansion.go \
\) \
\) -exec rm {} \;
fi
${BIN}/lister-gen \
--logtostderr \
--go-header-file /dev/null \
--output-base ${OUTPUT_BASE} \
--input-dirs github.com/heptio/ark/pkg/apis/ark/v1 \
--output-package github.com/heptio/ark/pkg/generated/listers \
$@
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
HACK_DIR=$(dirname "${BASH_SOURCE}")
if ! output=$(${HACK_DIR}/update-generated-clientsets.sh --verify-only 2>&1); then
echo "FAILURE: verification of clientsets failed:"
echo "${output}"
exit 1
fi
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARK_ROOT=$(realpath $(dirname ${BASH_SOURCE})/..)
HACK_DIR=$(dirname "${BASH_SOURCE}")
DOCS_DIR=${ARK_ROOT}/docs/cli-reference
TMP_DIR="$(mktemp -d)"
trap cleanup INT TERM HUP EXIT
cleanup() {
rm -rf ${TMP_DIR}
}
${HACK_DIR}/update-generated-docs.sh ${TMP_DIR}
exclude_file="README.md"
output=$(echo "`diff -r ${DOCS_DIR} ${TMP_DIR}`" | sed "/${exclude_file}/d")
if [[ -n "${output}" ]] ; then
echo "FAILURE: verification of docs failed:"
echo "${output}"
exit 1
fi
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
HACK_DIR=$(dirname "${BASH_SOURCE}")
if ! output=$(${HACK_DIR}/update-generated-informers.sh --verify-only 2>&1); then
echo "FAILURE: verification of informers failed:"
echo "${output}"
exit 1
fi
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash -e
#
# Copyright 2017 Heptio Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
HACK_DIR=$(dirname "${BASH_SOURCE}")
if ! output=$(${HACK_DIR}/update-generated-listers.sh --verify-only 2>&1); then
echo "FAILURE: verification of listers failed:"
echo "${output}"
exit 1
fi