Skip to content
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
33 changes: 24 additions & 9 deletions hack/generate/csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ client_version="$(metadata.get dependencies.cli)"
kn_event="${registry_host}/knative/release-${client_version%.*}:client-plugin-event"
rbac_proxy="registry.ci.openshift.org/origin/4.7:kube-rbac-proxy"

function default_knative_serving_images() {
local serving
serving="${registry}/knative-v$(metadata.get dependencies.serving):knative-serving"
export KNATIVE_SERVING_QUEUE=${KNATIVE_SERVING_QUEUE:-"${serving}-queue"}
export KNATIVE_SERVING_ACTIVATOR=${KNATIVE_SERVING_ACTIVATOR:-"${serving}-activator"}
export KNATIVE_SERVING_AUTOSCALER=${KNATIVE_SERVING_AUTOSCALER:-"${serving}-autoscaler"}
export KNATIVE_SERVING_AUTOSCALER_HPA=${KNATIVE_SERVING_AUTOSCALER_HPA:-"${serving}-autoscaler-hpa"}
export KNATIVE_SERVING_CONTROLLER=${KNATIVE_SERVING_CONTROLLER:-"${serving}-controller"}
export KNATIVE_SERVING_WEBHOOK=${KNATIVE_SERVING_WEBHOOK:-"${serving}-webhook"}
export KNATIVE_SERVING_DOMAIN_MAPPING=${KNATIVE_SERVING_DOMAIN_MAPPING:-"${serving}-domain-mapping"}
export KNATIVE_SERVING_DOMAIN_MAPPING_WEBHOOK=${KNATIVE_SERVING_DOMAIN_MAPPING_WEBHOOK:-"${serving}-domain-mapping-webhook"}
export KNATIVE_SERVING_STORAGE_VERSION_MIGRATION=${KNATIVE_SERVING_STORAGE_VERSION_MIGRATION:-"${serving}-storage-version-migration"}
}

function default_knative_eventing_images() {
local eventing
eventing="${registry}/knative-v$(metadata.get dependencies.eventing):knative-eventing"
Expand Down Expand Up @@ -43,6 +57,7 @@ function default_knative_eventing_kafka_broker_images() {

default_knative_eventing_images
default_knative_eventing_kafka_broker_images
default_knative_serving_images

declare -a images
declare -A images_addresses
Expand All @@ -66,15 +81,15 @@ function kafka_image {
kafka_images_addresses["${name}"]="${address}"
}

image "queue-proxy" "${serving}-queue"
image "activator" "${serving}-activator"
image "autoscaler" "${serving}-autoscaler"
image "autoscaler-hpa" "${serving}-autoscaler-hpa"
image "controller__controller" "${serving}-controller"
image "webhook__webhook" "${serving}-webhook"
image "domain-mapping" "${serving}-domain-mapping"
image "domainmapping-webhook" "${serving}-domain-mapping-webhook"
image "storage-version-migration-serving-serving-$(metadata.get dependencies.serving)__migrate" "${serving}-storage-version-migration"
image "queue-proxy" "${KNATIVE_SERVING_QUEUE}"
image "activator" "${KNATIVE_SERVING_ACTIVATOR}"
image "autoscaler" "${KNATIVE_SERVING_AUTOSCALER}"
image "autoscaler-hpa" "${KNATIVE_SERVING_AUTOSCALER_HPA}"
image "controller__controller" "${KNATIVE_SERVING_CONTROLLER}"
image "webhook__webhook" "${KNATIVE_SERVING_WEBHOOK}"
image "domain-mapping" "${KNATIVE_SERVING_DOMAIN_MAPPING}"
image "domainmapping-webhook" "${KNATIVE_SERVING_DOMAIN_MAPPING_WEBHOOK}"
image "storage-version-migration-serving-serving-$(metadata.get dependencies.serving)__migrate" "${KNATIVE_SERVING_STORAGE_VERSION_MIGRATION}"

image "kourier-gateway" "quay.io/maistra/proxyv2-ubi8:$(metadata.get dependencies.maistra)"
image "kourier-control" "${registry}/knative-v$(metadata.get dependencies.kourier):kourier"
Expand Down
4 changes: 4 additions & 0 deletions olm-catalog/serverless-operator/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ requirements:

dependencies:
serving: 1.3.0
# serving midstream branch name
serving_artifacts_branch: release-v1.3

# versions for networking components
kourier: 1.3.0
net_istio: 1.3.0
maistra: 2.1.0
Expand Down

This file was deleted.

32 changes: 0 additions & 32 deletions openshift-knative-operator/hack/002-openshift-serving-role.patch

This file was deleted.

40 changes: 0 additions & 40 deletions openshift-knative-operator/hack/003-serving-pdb.patch

This file was deleted.

34 changes: 21 additions & 13 deletions openshift-knative-operator/hack/update-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ eventing_files=(eventing-crds.yaml eventing-core.yaml in-memory-channel.yaml mt-
istio_files=(200-clusterrole 400-config-istio 500-controller 500-webhook-deployment 500-webhook-secret 500-webhook-service 600-mutating-webhook 600-validating-webhook)

export KNATIVE_EVENTING_MANIFESTS_DIR=${KNATIVE_EVENTING_MANIFESTS_DIR:-""}
export KNATIVE_SERVING_MANIFESTS_DIR=${KNATIVE_SERVING_MANIFESTS_DIR:-""}
export KNATIVE_SERVING_TEST_MANIFESTS_DIR=${KNATIVE_SERVING_TEST_MANIFESTS_DIR:-""}

function download {
function download_serving {
component=$1
version=$2
shift
Expand All @@ -32,15 +34,19 @@ function download {
rm -r "$component_dir"
mkdir -p "$target_dir"

branch=$(metadata.get dependencies.serving_artifacts_branch)
for (( i=0; i<${#files[@]}; i++ ));
do
index=$(( i+1 ))
file="${files[$i]}.yaml"
target_file="$target_dir/$index-$file"

url="https://github.com/knative/$component/releases/download/knative-$version/$file"
wget --no-check-certificate "$url" -O "$target_file"

if [[ ${KNATIVE_SERVING_MANIFESTS_DIR} = "" ]]; then
url="https://raw.githubusercontent.com/openshift/serving/${branch}/openshift/release/artifacts/$index-$file"
wget --no-check-certificate "$url" -O "$target_file"
else
cp "${KNATIVE_SERVING_MANIFESTS_DIR}/${file}" "$target_file"
fi
# Break all image references so we know our overrides work correctly.
yaml.break_image_references "$target_file"
done
Expand Down Expand Up @@ -107,17 +113,19 @@ function download_ingress {
#
# DOWNLOAD SERVING
#
download serving "${KNATIVE_SERVING_VERSION}" "${serving_files[@]}"

# Drop namespace from manifest.
git apply "$root/openshift-knative-operator/hack/001-serving-namespace-deletion.patch"
# When openshift/knative-serving uses this repo to run a job (eg. PR against openshift/knative-serving) it will use a minimum
# setup with net-kourier. Thus it will not use the release artifacts generated under openshift-knative-operator/cmd/kodata/knative-serving.
# Instead openshift/knative-serving uses its own generated ci manifests and sets KNATIVE_SERVING_TEST_MANIFESTS_DIR.
# Extensive Serving testing is done at this repo only. For the latter we do use manifests under openshift-knative-operator/cmd/kodata/knative-serving which are fetched from the midstream
# repo.
if [[ ${KNATIVE_SERVING_TEST_MANIFESTS_DIR} = "" ]]; then
download_serving serving "${KNATIVE_SERVING_VERSION}" "${serving_files[@]}"
fi

# Extra role for downstream, so that users can get the autoscaling CM to fetch defaults.
git apply "$root/openshift-knative-operator/hack/002-openshift-serving-role.patch"

# TODO: Remove this once upstream fixed https://github.com/knative/operator/issues/376.
# See also https://issues.redhat.com/browse/SRVKS-670.
git apply "$root/openshift-knative-operator/hack/003-serving-pdb.patch"
#
# DOWNLOAD INGRESS
#

download_ingress net-istio "v$(metadata.get dependencies.net_istio)" "${istio_files[@]}"

Expand Down