From 9efa5682a8a1a1268ac458e4c44609075f71d2f6 Mon Sep 17 00:00:00 2001 From: Craig Tabita Date: Mon, 29 Apr 2019 15:39:26 -0700 Subject: [PATCH] manager image patch --- Makefile | 3 +-- README.md | 12 ++++++------ ...xample.yaml => manager_image_patch_template.yaml} | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) rename config/manager/{manager_image_patch.example.yaml => manager_image_patch_template.yaml} (76%) diff --git a/Makefile b/Makefile index a1d22319f88..7a5581473c1 100644 --- a/Makefile +++ b/Makefile @@ -96,8 +96,7 @@ docker-push-release: docker-tag-release docker-build: docker build . -t ${IMG} @echo "updating kustomize image patch file for manager resource" - cp ./config/manager/manager_image_patch.example.yaml ./config/manager/manager_image_patch.yaml - sed -i'' -e 's@image: .*@image: '"${IMG}"'@' ./config/manager/manager_image_patch.yaml + echo "#" > ./config/manager/manager_image_patch.yaml docker-build-ci: docker build . -t $(IMG) -f Dockerfile_ci diff --git a/README.md b/README.md index dd6c218a664..318b2af40ac 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,14 @@ Currently the most reliable way of installing Gatekeeper is to build and install #### Deploying a Release using Prebuilt Image - If you want to deploy a released version of Gatekeeper in your cluster with a prebuilt image, then you can run the following command, substituting the url to your prebuilt image: - - ``` - IMG= - cp ./config/manager/manager_image_patch.example.yaml ./config/manager/manager_image_patch.yaml - sed -i'' -e 's@image: .*@image: '"${IMG}"'@' ./config/manager/manager_image_patch.yaml +If you want to deploy a released version of Gatekeeper in your cluster with a prebuilt image, then first copy the following kustomize configuration patch: + + ```sh + cp config/manager/manager_image_patch.example.yaml config/manager/manager_image_patch.yaml ``` +Then modify the new manager_image_patch.yaml file to point to your prebuilt image. Finally, run the following: + ```sh kubectl apply -f https://raw.githubusercontent.com/open-policy-agent/gatekeeper/master/deploy/gatekeeper-constraint.yaml ``` diff --git a/config/manager/manager_image_patch.example.yaml b/config/manager/manager_image_patch_template.yaml similarity index 76% rename from config/manager/manager_image_patch.example.yaml rename to config/manager/manager_image_patch_template.yaml index 084e4c62db8..ea9d95beb9f 100644 --- a/config/manager/manager_image_patch.example.yaml +++ b/config/manager/manager_image_patch_template.yaml @@ -1,3 +1,4 @@ +# You can copy this file to manager_image_patch.yaml to specify a prebuilt image apiVersion: apps/v1 kind: StatefulSet metadata: