Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Nov 8, 2024
1 parent a0e1453 commit 74d89ed
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@ GATEKEEPER_IMG ?= $(GATEKEEPER_IMAGE_BASE):v$(GATEKEEPER_VERSION)

.PHONY: update-gatekeeper-image
update-gatekeeper-image: ## Update Gatekeeper image in manifests.
yq 'select(.kind == "Deployment") \
yq "select(.kind == \"Deployment\") \
|= .spec.template.spec.containers[] \
|= select(.name == "manager").env[] \
|= select(.name == "RELATED_IMAGE_GATEKEEPER").value = "$(GATEKEEPER_IMG)"' \
|= select(.name == \"manager\").env[] \
|= select(.name == \"RELATED_IMAGE_GATEKEEPER\").value = \"$(GATEKEEPER_IMG)\"" \
-i config/manager/manager.yaml
yq '.' config/manager/manager.yaml
cat config/manager/manager.yaml

# Set version variables for LDFLAGS
GIT_VERSION ?= $(shell git describe --match='v*' --always --dirty)
Expand Down
2 changes: 2 additions & 0 deletions build/bundle.Dockerfile.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ COPY . .
RUN /gatekeeper-operator/build/install-dependencies.sh
RUN GOFLAGS=-mod=readonly /gatekeeper-operator/build/konflux-patch.sh

RUN cat /gatekeeper-operator/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml

FROM scratch

# Copy files to locations specified by labels.
Expand Down
18 changes: 14 additions & 4 deletions build/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,18 @@ elif [[ "$ARCH" == "aarch64" ]]; then
ARCH="arm64"
fi

curl -s "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-${ARCH}" -o /usr/bin/jq
chmod +x /usr/bin/jq
# Install jq
JQ_BINARY="jq-linux-${ARCH}"

curl -s "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${ARCH}" -o /usr/bin/yq
chmod +x /usr/bin/yq
echo "Downloading ${JQ_BINARY}"
wget --no-verbose "https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/${JQ_BINARY}" -O /usr/local/bin/jq
chmod +x /usr/local/bin/jq
jq --version

# Install yq
YQ_BINARY="yq_linux_${ARCH}"

echo "Downloading ${YQ_BINARY}"
wget --no-verbose "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY}" -O /usr/local/bin/yq
chmod +x /usr/local/bin/yq
yq --version
2 changes: 2 additions & 0 deletions build/konflux-patch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! /bin/bash

set -e

# Gatekeeper Operator image
export IMG="registry.redhat.io/gatekeeper/gatekeeper-rhel9-operator@sha256:6e386be134d928bdb03b702e399c97e7aedecacaa3d0813183a8c5ecf13c7bc2"
# Gatekeeper image
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ spec:
memory: 20Mi
env:
- name: RELATED_IMAGE_GATEKEEPER
value: quay.io/gatekeeper/gatekeeper:v3.17.1
value: :v3.17.1
serviceAccountName: gatekeeper-operator-controller-manager
terminationGracePeriodSeconds: 10

0 comments on commit 74d89ed

Please sign in to comment.