Skip to content
Permalink
Browse files

Manager image patch (#101)

* example manager image patch

Signed-off-by: Craig Tabita <ctab@google.com>

* Update readme (#99)

* Update gitignore to not ignore logs packages

Signed-off-by: Max Smythe <smythe@google.com>

* Explicitly include vendor directory

Signed-off-by: Max Smythe <smythe@google.com>

* No need to run dep ensure

Signed-off-by: Max Smythe <smythe@google.com>

* No need to install dep

Signed-off-by: Max Smythe <smythe@google.com>

* Fix error in explicit inclusion of all vendor subpackages

Signed-off-by: Max Smythe <smythe@google.com>

* Remove vistigial config/default/manager_image_patch.yaml

Signed-off-by: Max Smythe <smythe@google.com>

* Add requirement that user have cluster-admin rolebinding to install instructions

Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Craig Tabita <ctab@google.com>

* Update readme

Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
Signed-off-by: Craig Tabita <ctab@google.com>

* manager image patch

Signed-off-by: Craig Tabita <ctab@google.com>

* manager image patch

Signed-off-by: Craig Tabita <ctab@google.com>

* move patch file back to original location

Signed-off-by: Craig Tabita <ctab@google.com>

* rm empty image patch file

Signed-off-by: Craig Tabita <ctab@google.com>

* check in image patch file, go back to sed in makefile

Signed-off-by: Craig Tabita <ctab@google.com>

* fix gitignore

Signed-off-by: Craig Tabita <ctab@google.com>

* add patch file to make file

Signed-off-by: Craig Tabita <ctab@google.com>

* add touch to make deploy

Signed-off-by: Craig Tabita <ctab@google.com>
  • Loading branch information...
ctab authored and maxsmythe committed May 1, 2019
1 parent c97041d commit 548bba7be31d6c1d5864b68ab72decc28f38d897
Showing with 20 additions and 13 deletions.
  1. +3 −0 .gitignore
  2. +17 −1 Makefile
  3. +0 −12 config/manager_image_patch.yaml
@@ -15,6 +15,9 @@ bin
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Manager image patch file
config/manager_image_patch.yaml

# Kubernetes Generated files - skip generated files, except for vendored files

!vendor/**/zz_generated.*
@@ -16,6 +16,18 @@ LDFLAGS := "-X github.com/open-policy-agent/gatekeeper/version.Version=$(VERSION
-X github.com/open-policy-agent/gatekeeper/version.Timestamp=$(BUILD_TIMESTAMP) \
-X github.com/open-policy-agent/gatekeeper/version.Hostname=$(BUILD_HOSTNAME)"

MANAGER_IMAGE_PATCH := "apiVersion: apps/v1\
\nkind: StatefulSet\
\nmetadata:\
\n name: controller-manager\
\n namespace: system\
\nspec:\
\n template:\
\n spec:\
\n containers:\
\n - image: <your image file>\
\n name: manager"

all: test manager

# Run tests
@@ -50,6 +62,7 @@ install: manifests

# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
deploy: manifests
touch -a ./config/manager_image_patch.yaml
kubectl apply -f config/crds
kubectl apply -f vendor/github.com/open-policy-agent/frameworks/constraint/config/crds
kustomize build config | kubectl apply -f -
@@ -96,7 +109,10 @@ docker-push-release: docker-tag-release
docker-build:
docker build . -t ${IMG}
@echo "updating kustomize image patch file for manager resource"
sed -i'' -e 's@image: .*@image: '"${IMG}"'@' ./config/manager_image_patch.yaml

@test -s ./config/manager_image_patch.yaml || bash -c 'echo -e ${MANAGER_IMAGE_PATCH} > ./config/manager_image_patch.yaml'

@sed -i'' -e 's@image: .*@image: '"${IMG}"'@' ./config/manager_image_patch.yaml

docker-build-ci:
docker build . -t $(IMG) -f Dockerfile_ci

This file was deleted.

0 comments on commit 548bba7

Please sign in to comment.
You can’t perform that action at this time.