From e19d964042f676cd3b4089a43fa4c5063b4057d2 Mon Sep 17 00:00:00 2001 From: Jessica Yao Date: Wed, 16 Aug 2017 10:06:43 -0700 Subject: [PATCH] simplify local build instructions Signed-off-by: Jessica Yao --- docs/build-from-scratch.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/build-from-scratch.md b/docs/build-from-scratch.md index 092f23ea0..0edde6fb2 100644 --- a/docs/build-from-scratch.md +++ b/docs/build-from-scratch.md @@ -21,6 +21,10 @@ The files are installed in `$GOPATH/src/github.com/heptio/ark`. ## 2. Build +### Using a locally built image + +To ensure that your Ark deployment uses your local image rather than pulling from an image registry, you'll need to explicitly set the `spec.template.spec.containers[*].imagePullPolicy` in your deployment file to `IfNotPresent`. This file is either `examples/azure/00-ark-deployment.yaml` if you're using Azure, or `examples/common/10-deployment.yaml` for all other cloud providers. + ### Using your own registry If you want to push the Heptio Ark images to your own registry, set the `$REGISTRY` environment variable (used in the `Makefile`). This allows any node in your cluster to pull your locally built image. @@ -34,12 +38,6 @@ sudo make all To push your image to a registry, use `make push`. -### Keeping the Heptio registry tag - -If you don't wish to push your image to your own registry (not changing `$REGISTRY`), but simply want to build it locally with the Heptio tag, *you need to modify the deployment file that are using.* This is either `examples/azure/00-ark-deployment.yaml` if you're using Azure, or `examples/common/10-deployment.yaml` for all other cloud providers. - -Because the existing deployment files reference `gcr.io/heptio-images/ark:latest`, and Kubernetes handles the `latest` tag with the `imagePullPolicy` of "Always", your Ark deployment will pull from the Heptio image registry instead of using the local image. In order to use your local image, you'll need to specify a `$VERSION` tag (consistent with the value in the `Makefile`). If your `$VERSION` is "v0.3.3", for example, you need to set `spec.template.spec.containers[*].image` in your deployment file to be `gcr.io/heptio0images/ark:v0.3.3`. - ## 3. Run When running Heptio Ark, you will need to account for the following (all of which are handled in the [`/examples`][6] manifests): * Appropriate RBAC permissions in the cluster