Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Konflux client, event-sender plugin and must-gather images to CSV #2983

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions hack/generate/csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ source "$(dirname "${BASH_SOURCE[0]}")/../lib/metadata.bash"
# shellcheck disable=SC1091,SC1090
source "$(dirname "${BASH_SOURCE[0]}")/../lib/images.bash"

# TODO migrate CLI images to Konflux
client_version="$(metadata.get dependencies.cli)"
kn_event="${ci_registry_host}/knative/release-${client_version#knative-v}:client-plugin-event"

rbac_proxy=$(metadata.get 'dependencies.kube_rbac_proxy')

default_serverless_operator_images
Expand All @@ -28,13 +24,17 @@ if [[ ${USE_RELEASE_NEXT:-} == "true" ]]; then
knative_backstage_plugins_images_release
knative_serving_images_release
knative_kn_plugin_func_images_release
knative_client_images_release
knative_kn_plugin_event_images_release
else
default_knative_eventing_images
default_knative_eventing_istio_images
default_knative_eventing_kafka_broker_images
default_knative_backstage_plugins_images
default_knative_serving_images
default_knative_kn_plugin_func_images
default_knative_client_images
default_knative_kn_plugin_event_images
fi

declare -a operator_images
Expand Down Expand Up @@ -124,8 +124,8 @@ kafka_image "kafka-controller-post-install__post-install" "${KNATIVE_EVEN
kafka_image "knative-kafka-storage-version-migrator__migrate" "${KNATIVE_EVENTING_STORAGE_VERSION_MIGRATION}" # Use eventing core image

image 'KUBE_RBAC_PROXY' "${rbac_proxy}"
image 'KN_PLUGIN_EVENT_SENDER' "${kn_event}-sender"
image 'KN_CLIENT' "${ci_registry}/$(metadata.get dependencies.cli):knative-client-kn"
image 'KN_PLUGIN_EVENT_SENDER' "${KNATIVE_KN_PLUGIN_EVENT_SENDER}"
image 'KN_CLIENT' "${KNATIVE_KN_CLIENT}"

image "KN_PLUGIN_FUNC_UTIL" "${KNATIVE_KN_PLUGIN_FUNC_FUNC_UTIL}"
image "KN_PLUGIN_FUNC_TEKTON_S2I" "${KNATIVE_KN_PLUGIN_FUNC_TEKTON_S2I}"
Expand All @@ -138,7 +138,7 @@ declare -A yaml_keys
yaml_keys[spec.version]="$(metadata.get project.version)"
yaml_keys[metadata.name]="$(metadata.get project.name).v$(metadata.get project.version)"
yaml_keys['metadata.annotations[olm.skipRange]']="$(metadata.get olm.skipRange)"
yaml_keys['metadata.annotations[operators.openshift.io/must-gather-image]']="$(metadata.get dependencies.mustgather.image)"
yaml_keys['metadata.annotations[operators.openshift.io/must-gather-image]']="${SERVERLESS_MUST_GATHER}"
yaml_keys[spec.minKubeVersion]="$(metadata.get requirements.kube.minVersion)"
yaml_keys[spec.replaces]="$(metadata.get project.name).v$(metadata.get olm.replaces)"

Expand Down Expand Up @@ -221,7 +221,8 @@ for name in "${kafka_images[@]}"; do
add_downstream_operator_deployment_env "$target" "KAFKA_IMAGE_${name}" "${kafka_images_addresses[$name]}"
done

add_related_image "$target" "IMAGE_MUST_GATHER" "$(metadata.get dependencies.mustgather.image)"
add_related_image "$target" "IMAGE_MUST_GATHER" "${SERVERLESS_MUST_GATHER}"
add_related_image "$target" "IMAGE_KN_CLIENT_CLI_ARTIFACTS" "${KNATIVE_KN_CLIENT_CLI_ARTIFACTS}"

# Add Knative Kafka version to the downstream operator
add_downstream_operator_deployment_env "$target" "CURRENT_VERSION" "$(metadata.get project.version)"
Expand All @@ -239,7 +240,7 @@ add_upstream_operator_deployment_env "$target" "KNATIVE_EVENTING_VERSION" "${eve
add_upstream_operator_deployment_env "$target" "KNATIVE_EVENTING_KAFKA_BROKER_VERSION" "${ekb_version/knative-v/}" # Remove `knative-v` prefix if exists

# Override the image for the CLI artifact deployment
yq write --inplace "$target" "spec.install.spec.deployments(name==knative-openshift).spec.template.spec.initContainers(name==cli-artifacts).image" "${ci_registry}/$(metadata.get dependencies.cli):knative-client-cli-artifacts"
yq write --inplace "$target" "spec.install.spec.deployments(name==knative-openshift).spec.template.spec.initContainers(name==cli-artifacts).image" "${KNATIVE_KN_CLIENT_CLI_ARTIFACTS}"

for name in "${!yaml_keys[@]}"; do
echo "Value: ${name} -> ${yaml_keys[$name]}"
Expand Down
2 changes: 2 additions & 0 deletions hack/generate/images-rekt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ default_knative_eventing_kafka_broker_images
default_knative_backstage_plugins_images
default_knative_serving_images
default_knative_ingress_images
default_knative_kn_plugin_func_images
default_knative_client_images

envsubst < "$template" > "$target"
38 changes: 38 additions & 0 deletions hack/lib/images.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function default_serverless_operator_images() {
export SERVERLESS_KNATIVE_OPERATOR=${SERVERLESS_KNATIVE_OPERATOR:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-kn-operator:${CURRENT_VERSION_IMAGES}")}
export SERVERLESS_OPENSHIFT_KNATIVE_OPERATOR=${SERVERLESS_OPENSHIFT_KNATIVE_OPERATOR:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-openshift-kn-operator:${CURRENT_VERSION_IMAGES}")}
export SERVERLESS_INGRESS=${SERVERLESS_INGRESS:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-ingress:${CURRENT_VERSION_IMAGES}")}
export SERVERLESS_MUST_GATHER=${SERVERLESS_MUST_GATHER:-$(latest_registry_redhat_io_image_sha "${serverless_registry}-must-gather:${CURRENT_VERSION_IMAGES}")}

export SERVERLESS_BUNDLE=${SERVERLESS_BUNDLE:-$(get_bundle_for_version "${CURRENT_VERSION}")}
export DEFAULT_SERVERLESS_BUNDLE=${DEFAULT_SERVERLESS_BUNDLE:-$(get_bundle_for_version "${CURRENT_VERSION}")}
Expand Down Expand Up @@ -211,6 +212,43 @@ function knative_kn_plugin_func_images() {
export KNATIVE_KN_PLUGIN_FUNC_PYTHON_39=${KNATIVE_KN_PLUGIN_FUNC_UTIL:-"$(metadata.get dependencies.func.python-39)"}
}

function knative_kn_plugin_event_images_release() {
knative_kn_plugin_event_images "${USE_IMAGE_RELEASE_TAG}"
}

function default_knative_kn_plugin_event_images() {
knative_kn_plugin_event_images "$(metadata.get dependencies.cli)"
}

function knative_kn_plugin_event_images() {
local knative_kn_plugin_event tag app_version
tag=${1:?"Provide tag for kn-plugin-event images"}

app_version=$(get_app_version_from_tag "${tag}")
knative_kn_plugin_event="${registry_prefix_quay}${app_version}/kn-plugin-event"

export KNATIVE_KN_PLUGIN_EVENT_SENDER=${KNATIVE_KN_PLUGIN_EVENT_SENDER:-$(latest_registry_redhat_io_image_sha "${knative_kn_plugin_event}-sender:${tag}")}
}
creydr marked this conversation as resolved.
Show resolved Hide resolved

function knative_client_images_release() {
knative_client_images "${USE_IMAGE_RELEASE_TAG}"
}

function default_knative_client_images() {
knative_client_images "$(metadata.get dependencies.cli)"
}

function knative_client_images() {
local knative_client tag app_version
tag=${1:?"Provide tag for kn-client images"}

app_version=$(get_app_version_from_tag "${tag}")
knative_client="${registry_prefix_quay}${app_version}/kn-client"

export KNATIVE_KN_CLIENT=${KNATIVE_KN_CLIENT:-$(latest_registry_redhat_io_image_sha "${knative_client}-kn:${tag}")}
export KNATIVE_KN_CLIENT_CLI_ARTIFACTS=${KNATIVE_KN_CLIENT_CLI_ARTIFACTS:-$(latest_registry_redhat_io_image_sha "${knative_client}-cli-artifacts:${tag}")}
}

function default_knative_ingress_images() {
local kourier_registry istio_registry knative_kourier knative_istio kourier_app_version istio_app_version

Expand Down
2 changes: 1 addition & 1 deletion olm-catalog/serverless-operator-index/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ registry.ci.openshift.org/knative/release-1.34.0:serverless-bundle \
/bin/opm render --skip-tls-verify -o yaml \
registry.ci.openshift.org/knative/release-1.33.0:serverless-bundle \
registry.ci.openshift.org/knative/release-1.34.0:serverless-bundle \
quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-135/serverless-bundle@sha256:500de85cb1b20b39fa14ffdfb76419ad1776d841707bde5c8e2e4042dd542f47 >> /configs/index.yaml
quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-135/serverless-bundle@sha256:2571da2116d3f183be0156798f0fc9038daf2aaa1cbd2c2814d272a1551932b2 >> /configs/index.yaml

# The base image is expected to contain
# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ metadata:
repository: https://github.com/openshift-knative/serverless-operator
support: Red Hat
olm.skipRange: '>=1.34.0 <1.35.0'
operators.openshift.io/must-gather-image: quay.io/openshift-knative/must-gather
operators.openshift.io/must-gather-image: registry.redhat.io/openshift-serverless-1/serverless-must-gather-rhel8@sha256:73bd7baf5f1875f5f5c64509c7675f9476ba3bbcd0b032bdf91e51ff9ffb0e7b
labels:
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.ppc64le: supported
Expand Down Expand Up @@ -830,7 +830,7 @@ spec:
serviceAccountName: knative-operator
containers:
- name: knative-operator
image: registry.redhat.io/openshift-serverless-1/serverless-openshift-kn-rhel8-operator@sha256:47822a7b95679ea90c1a953f7948c3e8d12e9bbdd002bcc67c86223ae57f0b52
image: registry.redhat.io/openshift-serverless-1/serverless-openshift-kn-rhel8-operator@sha256:60cc08a98a63cd7b235b056c13b34f13a1aeb36e3598a111199d3ef7be6e756b
readinessProbe:
periodSeconds: 1
httpGet:
Expand Down Expand Up @@ -935,9 +935,9 @@ spec:
- name: "IMAGE_KUBE_RBAC_PROXY"
value: "registry.redhat.io/openshift4/ose-kube-rbac-proxy-rhel9@sha256:42be2d5bb4d09f4fa31602f8521af07b0c1f27f47379d1529b769bc7bd61abc9"
- name: "IMAGE_KN_PLUGIN_EVENT_SENDER"
value: "registry.ci.openshift.org/knative/release-1.15:client-plugin-event-sender"
value: "registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel8@sha256:f0db760171a95c618a5b1fc93ac05b05cd1e19d880fc321a353d454ae2679109"
- name: "IMAGE_KN_CLIENT"
value: "registry.ci.openshift.org/openshift/knative-v1.15:knative-client-kn"
value: "registry.redhat.io/openshift-serverless-1/kn-client-kn-rhel8@sha256:2e24f1085ed369597713dc6416e454d62add751c8c22a0531210e727f35b6502"
- name: "IMAGE_KN_PLUGIN_FUNC_UTIL"
value: "registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@sha256:da3263b8d1961358ef384d35f152eb43260052bc0788f5f85cb101a492934117"
- name: "IMAGE_KN_PLUGIN_FUNC_TEKTON_S2I"
Expand Down Expand Up @@ -981,7 +981,7 @@ spec:
serviceAccountName: knative-openshift
initContainers:
- name: cli-artifacts
image: registry.ci.openshift.org/openshift/knative-v1.15:knative-client-cli-artifacts
image: registry.redhat.io/openshift-serverless-1/kn-client-cli-artifacts-rhel8@sha256:82a41eaae2cd8b6004dcb663a2cd359c09fecf646bf5beaec330463abea0ea90
imagePullPolicy: Always
command: ["sh", "-c", "rm -rf /cli-artifacts/* && cp /usr/share/kn/**/* /cli-artifacts && chmod 444 /cli-artifacts/*"]
volumeMounts:
Expand All @@ -995,7 +995,7 @@ spec:
- ALL
containers:
- name: knative-openshift
image: registry.redhat.io/openshift-serverless-1/serverless-kn-operator-rhel8@sha256:5058e9c600d6f3f9553d8f4c6a4dc1f4a43049a3d93240ed505f2f5d3108658b
image: registry.redhat.io/openshift-serverless-1/serverless-kn-operator-rhel8@sha256:d1520e74c889f34be0e42a79271d1689cb3cd50f3566d891ca2ef60e8dcbc565
imagePullPolicy: Always
readinessProbe:
httpGet:
Expand Down Expand Up @@ -1109,9 +1109,9 @@ spec:
- name: "IMAGE_KUBE_RBAC_PROXY"
value: "registry.redhat.io/openshift4/ose-kube-rbac-proxy-rhel9@sha256:42be2d5bb4d09f4fa31602f8521af07b0c1f27f47379d1529b769bc7bd61abc9"
- name: "IMAGE_KN_PLUGIN_EVENT_SENDER"
value: "registry.ci.openshift.org/knative/release-1.15:client-plugin-event-sender"
value: "registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel8@sha256:f0db760171a95c618a5b1fc93ac05b05cd1e19d880fc321a353d454ae2679109"
- name: "IMAGE_KN_CLIENT"
value: "registry.ci.openshift.org/openshift/knative-v1.15:knative-client-kn"
value: "registry.redhat.io/openshift-serverless-1/kn-client-kn-rhel8@sha256:2e24f1085ed369597713dc6416e454d62add751c8c22a0531210e727f35b6502"
- name: "IMAGE_KN_PLUGIN_FUNC_UTIL"
value: "registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@sha256:da3263b8d1961358ef384d35f152eb43260052bc0788f5f85cb101a492934117"
- name: "IMAGE_KN_PLUGIN_FUNC_TEKTON_S2I"
Expand Down Expand Up @@ -1177,7 +1177,7 @@ spec:
serviceAccountName: knative-openshift-ingress
containers:
- name: knative-openshift-ingress
image: registry.redhat.io/openshift-serverless-1/serverless-ingress-rhel8@sha256:3eb9407f9505f4aa91158fcd432c03ceca26d8273fa1678cf304079049f0d9ed
image: registry.redhat.io/openshift-serverless-1/serverless-ingress-rhel8@sha256:38c9120e8fbd9baf65c82205b2c8396b6759a08dac9006fe0677a2a3a615e25f
imagePullPolicy: Always
ports:
- containerPort: 9090
Expand Down Expand Up @@ -1326,11 +1326,11 @@ spec:
- knativeeventings.operator.knative.dev
relatedImages:
- name: "knative-operator"
image: "registry.redhat.io/openshift-serverless-1/serverless-openshift-kn-rhel8-operator@sha256:47822a7b95679ea90c1a953f7948c3e8d12e9bbdd002bcc67c86223ae57f0b52"
image: "registry.redhat.io/openshift-serverless-1/serverless-openshift-kn-rhel8-operator@sha256:60cc08a98a63cd7b235b056c13b34f13a1aeb36e3598a111199d3ef7be6e756b"
- name: "knative-openshift"
image: "registry.redhat.io/openshift-serverless-1/serverless-kn-operator-rhel8@sha256:5058e9c600d6f3f9553d8f4c6a4dc1f4a43049a3d93240ed505f2f5d3108658b"
image: "registry.redhat.io/openshift-serverless-1/serverless-kn-operator-rhel8@sha256:d1520e74c889f34be0e42a79271d1689cb3cd50f3566d891ca2ef60e8dcbc565"
- name: "knative-openshift-ingress"
image: "registry.redhat.io/openshift-serverless-1/serverless-ingress-rhel8@sha256:3eb9407f9505f4aa91158fcd432c03ceca26d8273fa1678cf304079049f0d9ed"
image: "registry.redhat.io/openshift-serverless-1/serverless-ingress-rhel8@sha256:38c9120e8fbd9baf65c82205b2c8396b6759a08dac9006fe0677a2a3a615e25f"
- name: "IMAGE_queue-proxy"
image: "registry.redhat.io/openshift-serverless-1/kn-serving-queue-rhel8@sha256:f6f9208f8da20ea331d1d0062814d332931d059a8e7e811b6bc3b82d96ebb498"
- name: "IMAGE_activator"
Expand Down Expand Up @@ -1384,9 +1384,9 @@ spec:
- name: "IMAGE_KUBE_RBAC_PROXY"
image: "registry.redhat.io/openshift4/ose-kube-rbac-proxy-rhel9@sha256:42be2d5bb4d09f4fa31602f8521af07b0c1f27f47379d1529b769bc7bd61abc9"
- name: "IMAGE_KN_PLUGIN_EVENT_SENDER"
image: "registry.ci.openshift.org/knative/release-1.15:client-plugin-event-sender"
image: "registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel8@sha256:f0db760171a95c618a5b1fc93ac05b05cd1e19d880fc321a353d454ae2679109"
- name: "IMAGE_KN_CLIENT"
image: "registry.ci.openshift.org/openshift/knative-v1.15:knative-client-kn"
image: "registry.redhat.io/openshift-serverless-1/kn-client-kn-rhel8@sha256:2e24f1085ed369597713dc6416e454d62add751c8c22a0531210e727f35b6502"
- name: "IMAGE_KN_PLUGIN_FUNC_UTIL"
image: "registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@sha256:da3263b8d1961358ef384d35f152eb43260052bc0788f5f85cb101a492934117"
- name: "IMAGE_KN_PLUGIN_FUNC_TEKTON_S2I"
Expand Down Expand Up @@ -1420,6 +1420,8 @@ spec:
- name: "KAFKA_IMAGE_knative-kafka-storage-version-migrator__migrate"
image: "registry.redhat.io/openshift-serverless-1/kn-eventing-migrate-rhel8@sha256:16628700b0b4ac8a079cc46750aefd829dc278e538a9f0d41473392f3896eaf2"
- name: "IMAGE_MUST_GATHER"
image: "quay.io/openshift-knative/must-gather"
image: "registry.redhat.io/openshift-serverless-1/serverless-must-gather-rhel8@sha256:73bd7baf5f1875f5f5c64509c7675f9476ba3bbcd0b032bdf91e51ff9ffb0e7b"
- name: "IMAGE_KN_CLIENT_CLI_ARTIFACTS"
image: "registry.redhat.io/openshift-serverless-1/kn-client-cli-artifacts-rhel8@sha256:82a41eaae2cd8b6004dcb663a2cd359c09fecf646bf5beaec330463abea0ea90"
replaces: serverless-operator.v1.34.0
version: 1.35.0
Loading