Skip to content

Commit

Permalink
Update image path to use icr.io registry
Browse files Browse the repository at this point in the history
- use go 1.18 builder image to build operator
- remove yum and replace it with microdnf update

Signed-off-by: Torsten Kohn <[email protected]>
  • Loading branch information
tkohn authored Apr 7, 2022
1 parent a1295d2 commit 1323d3e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# Build the manager binary, always build on amd64 platform
FROM --platform=linux/amd64 golang:1.16 as builder
FROM --platform=linux/amd64 golang:1.18 as builder

ARG TARGETPLATFORM='linux/amd64'
ARG VERSION=dev
Expand Down Expand Up @@ -39,7 +39,7 @@ ARG TARGETPLATFORM='linux/amd64'
ARG VERSION=dev
ARG BUILD=1
ARG GIT_COMMIT=unspecified
ARG DATE=
ARG DATE=""

LABEL name="instana-agent-operator" \
vendor="Instana Inc" \
Expand All @@ -62,9 +62,7 @@ ENV OPERATOR=instana-agent-operator \
USER_UID=1001 \
USER_NAME=instana-agent-operator

RUN microdnf install yum \
&& yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical \
&& yum clean all \
RUN microdnf update \
&& microdnf clean all

WORKDIR /
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ endif
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)

# Image URL to use all building/pushing image targets
IMG ?= instana/instana-agent-operator:latest
IMG ?= icr.io/instana/instana-agent-operator:latest

# Image URL for the Instana Agent, as listed in the 'relatedImages' field in the CSV
AGENT_IMG ?= instana/agent:latest
AGENT_IMG ?= icr.io/instana/agent:latest

# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"
Expand Down
4 changes: 2 additions & 2 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
COPY bundle/tests/scorecard /tests/scorecard/

# Allow bundle to be published on 4.5 and beyond
LABEL com.redhat.openshift.versions="v4.5"
# Allow bundle to be published on 4.6 and beyond
LABEL com.redhat.openshift.versions="v4.6"
LABEL com.redhat.delivery.operator.bundle=true
LABEL com.redhat.delivery.backport=false
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ metadata:
capabilities: Full Lifecycle
categories: Monitoring,Logging & Tracing,OpenShift Optional
certified: "false"
containerImage: instana/instana-agent-operator:latest
containerImage: icr.io/instana/instana-agent-operator:latest
description: Fully automated Application Performance Monitoring (APM) for microservices.
operators.operatorframework.io/builder: operator-sdk-v1.16.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down Expand Up @@ -376,7 +376,7 @@ spec:
- --leader-elect
command:
- /manager
image: instana/instana-agent-operator:latest
image: icr.io/instana/instana-agent-operator:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -431,9 +431,9 @@ spec:
provider:
name: Instana
relatedImages:
- image: instana/instana-agent-operator:latest
- image: icr.io/instana/instana-agent-operator:latest
name: instana-agent-operator
- image: instana/agent:latest
- image: icr.io/instana/agent:latest
name: instana-agent
replaces: instana-agent-operator.v0.0.0
version: 0.0.1
Expand Down
12 changes: 6 additions & 6 deletions ci/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -500,27 +500,27 @@ jobs:
if [[ "x${OPERATOR_IMAGE_MANIFEST_SHA}" = "x" ]]; then
echo "No Operator manifest SHA found, using version ${OLM_RELEASE_VERSION} for Operator image"
export OPERATOR_IMAGE="instana/instana-agent-operator:${OLM_RELEASE_VERSION}"
export OPERATOR_IMAGE=" icr.io/instana/instana-agent-operator:${OLM_RELEASE_VERSION}"
else
echo "Operator manifest SHA found, using digest ${OPERATOR_IMAGE_MANIFEST_SHA} for Operator image"
export OPERATOR_IMAGE="instana/instana-agent-operator@${OPERATOR_IMAGE_MANIFEST_SHA}"
export OPERATOR_IMAGE=" icr.io/instana/instana-agent-operator@${OPERATOR_IMAGE_MANIFEST_SHA}"
fi
# Create bundle for public operator with image: instana/instana-agent-operator:<version>
# Create bundle for public operator with image: icr.io/instana/instana-agent-operator:<version>
make IMG="${OPERATOR_IMAGE}" \
VERSION="${OLM_RELEASE_VERSION}" \
PREV_VERSION="${PREV_VERSION}" \
AGENT_IMG="instana/agent@${AGENT_IMG_DIGEST}" \
AGENT_IMG="icr.io/instana/agent@${AGENT_IMG_DIGEST}" \
bundle
pushd bundle
zip -r ../target/olm-${OLM_RELEASE_VERSION}.zip .
popd
# Create the YAML for installing the Agent Operator, which we want to package with the release
make --silent IMG="instana/instana-agent-operator:${OLM_RELEASE_VERSION}" controller-yaml > target/instana-agent-operator.yaml
make --silent IMG=" icr.io/instana/instana-agent-operator:${OLM_RELEASE_VERSION}" controller-yaml > target/instana-agent-operator.yaml
# Create the YAML for installing the Agent Operator, which we want to package with the release (WITHOUT WEBHOOK)
make --silent IMG="instana/instana-agent-operator:${OLM_RELEASE_VERSION}" controller-yaml-no-webhook > target/instana-agent-operator-no-conversion-webhook.yaml
make --silent IMG=" icr.io/instana/instana-agent-operator:${OLM_RELEASE_VERSION}" controller-yaml-no-webhook > target/instana-agent-operator-no-conversion-webhook.yaml
# For public releases, also create the appropriate github release:
export RELEASE_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+$'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ metadata:
capabilities: Full Lifecycle
categories: Monitoring,Logging & Tracing,OpenShift Optional
certified: "false"
containerImage: instana/instana-agent-operator:0.0.0
containerImage: icr.io/instana/instana-agent-operator:0.0.0
description: Fully automated Application Performance Monitoring (APM) for microservices.
repository: https://github.com/instana/instana-agent-operator
support: Instana
Expand Down Expand Up @@ -307,7 +307,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: instana/instana-agent-operator:0.0.0
image: icr.io/instana/instana-agent-operator:0.0.0
imagePullPolicy: Always
name: instana-agent-operator
ports:
Expand Down Expand Up @@ -339,9 +339,9 @@ spec:
provider:
name: Instana
relatedImages:
- image: instana/instana-agent-operator:0.0.0
- image: icr.io/instana/instana-agent-operator:0.0.0
name: instana-agent-operator
- image: instana/agent:latest
- image: icr.io/instana/agent:latest
name: instana-agent
replaces: instana-agent-operator.v0.0.0
version: 0.0.0

1 comment on commit 1323d3e

@animatecitizen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please sign in to comment.