mirror of https://github.com/kubernetes/kops.git
Update docs to mention Bazelisk
This commit is contained in:
parent
4235fd3835
commit
47fb5f1d8c
|
@ -240,7 +240,7 @@ and then push nodeup using:
|
||||||
export S3_BUCKET_NAME=<yourbucketname>
|
export S3_BUCKET_NAME=<yourbucketname>
|
||||||
make kops-install dev-upload UPLOAD_DEST=s3://${S3_BUCKET_NAME}
|
make kops-install dev-upload UPLOAD_DEST=s3://${S3_BUCKET_NAME}
|
||||||
|
|
||||||
KOPS_VERSION=`bazel run //cmd/kops version -- --short`
|
KOPS_VERSION=`bazelisk run //cmd/kops version -- --short`
|
||||||
export KOPS_BASE_URL=https://${S3_BUCKET_NAME}.s3.amazonaws.com/kops/${KOPS_VERSION}/
|
export KOPS_BASE_URL=https://${S3_BUCKET_NAME}.s3.amazonaws.com/kops/${KOPS_VERSION}/
|
||||||
kops create cluster <clustername> --zones us-east-1b
|
kops create cluster <clustername> --zones us-east-1b
|
||||||
...
|
...
|
||||||
|
@ -251,7 +251,7 @@ If you have changed the dns or kOps controllers, you would want to test them as
|
||||||
For dns-controller:
|
For dns-controller:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
KOPS_VERSION=`bazel run //cmd/kops version -- --short`
|
KOPS_VERSION=`bazelisk run //cmd/kops version -- --short`
|
||||||
export DOCKER_IMAGE_PREFIX=${USER}/
|
export DOCKER_IMAGE_PREFIX=${USER}/
|
||||||
export DOCKER_REGISTRY=
|
export DOCKER_REGISTRY=
|
||||||
make dns-controller-push
|
make dns-controller-push
|
||||||
|
@ -261,7 +261,7 @@ export DNSCONTROLLER_IMAGE=${DOCKER_IMAGE_PREFIX}dns-controller:${KOPS_VERSION}
|
||||||
For kops-controller:
|
For kops-controller:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
KOPS_VERSION=`bazel run //cmd/kops version -- --short`
|
KOPS_VERSION=`bazelisk run //cmd/kops version -- --short`
|
||||||
export DOCKER_IMAGE_PREFIX=${USER}/
|
export DOCKER_IMAGE_PREFIX=${USER}/
|
||||||
export DOCKER_REGISTRY=
|
export DOCKER_REGISTRY=
|
||||||
make kops-controller-push
|
make kops-controller-push
|
||||||
|
|
|
@ -2,17 +2,15 @@
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Building with bazel offers a deterministic, faster build, including creating smaller docker images.
|
Building with Bazel offers a deterministic, faster build, including creating smaller docker images.
|
||||||
|
|
||||||
While bazel works well for small projects, building with kubernetes still has a few challenges. We take the following approach:
|
While bazel works well for small projects, building with kubernetes still has a few challenges. We take the following approach:
|
||||||
|
|
||||||
|
* We use [Bazelisk](https://github.com/bazelbuild/bazelisk), which automatically picks the correct version of Bazel for a branch
|
||||||
* We don't yet generate files in bazel - we use external scripts (for now)
|
* We don't yet generate files in bazel - we use external scripts (for now)
|
||||||
* We vendor our dependencies, rather than relying on gazelle (although actually gazelle works, the issue is when external dependencies like apimachinery include bazel files that confuse gazelle)
|
* We vendor our dependencies, rather than relying on gazelle (although actually gazelle works, the issue is when external dependencies like apimachinery include bazel files that confuse gazelle)
|
||||||
* We strip bazel files from external dependencies, so we don't confuse gazelle
|
* We strip bazel files from external dependencies, so we don't confuse gazelle
|
||||||
|
|
||||||
## Bazel versions:
|
|
||||||
For building kOps release branches 1.14 and older, you may need to run an older version of bazel such as `0.24.0`. kOps 1.15 and newer should be able to use more recent versions of bazel due to deprecation fixes that have not be backported.
|
|
||||||
|
|
||||||
## How to run
|
## How to run
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -8,9 +8,8 @@ vendored dependencies.
|
||||||
The following software must be installed prior to running the
|
The following software must be installed prior to running the
|
||||||
update commands:
|
update commands:
|
||||||
|
|
||||||
* [bazel](https://github.com/bazelbuild/bazel)
|
* [bazelisk](https://github.com/bazelbuild/bazelisk)
|
||||||
* [go mod](https://github.com/golang/go/wiki/Modules)
|
* [go mod](https://github.com/golang/go/wiki/Modules)
|
||||||
* [hg](https://www.mercurial-scm.org/wiki/Download)
|
|
||||||
|
|
||||||
## Adding a dependency to the vendor directory
|
## Adding a dependency to the vendor directory
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue