Skip to content

Commit 96d88dd

Browse files
Merge pull request #4104 from pacevedom/USHIFT-4715
USHIFT-4715: Add gateway-api-release-info RPM
2 parents f09e98d + 47506dc commit 96d88dd

File tree

5 files changed

+65
-0
lines changed

5 files changed

+65
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"release": {
3+
"base": "3.0.0-tp.1"
4+
},
5+
"images": {
6+
"istio-rhel9-operator-ea78213a4c5e1ef3f419df6910740f040c71ad13514aaac0e22c95e7ff4cb96b-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-rhel9-operator@sha256:ea78213a4c5e1ef3f419df6910740f040c71ad13514aaac0e22c95e7ff4cb96b",
7+
"kube-rbac-proxy": "registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:0848d89e9f94be04f17beeee75807d7fd11102737e6483ee674f2cf3ae28f213",
8+
"manager": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-rhel9-operator@sha256:ea78213a4c5e1ef3f419df6910740f040c71ad13514aaac0e22c95e7ff4cb96b",
9+
"istio-pilot-rhel9-376f64eab0ebeb06035983a60d1e7647c5d41354f31a49cb34f4deb7b6708e3e-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-pilot-rhel9@sha256:376f64eab0ebeb06035983a60d1e7647c5d41354f31a49cb34f4deb7b6708e3e",
10+
"istio-proxyv2-rhel9-cbd6bc47341ab8618609f89d063552e17232541c727429855c01deab73e4d06c-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-proxyv2-rhel9@sha256:cbd6bc47341ab8618609f89d063552e17232541c727429855c01deab73e4d06c",
11+
"istio-must-gather-rhel9-e3978aecaafe2678355e21a7303f8620f53d8b774f6592f10527c15bae957224-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-must-gather-rhel9@sha256:e3978aecaafe2678355e21a7303f8620f53d8b774f6592f10527c15bae957224",
12+
"istio-cni-rhel9-f16cd8a29ddcbb3de77cbfcf7e1da78e42cc0c1c502132d477a01c52689cdf23-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-cni-rhel9@sha256:f16cd8a29ddcbb3de77cbfcf7e1da78e42cc0c1c502132d477a01c52689cdf23"
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"release": {
3+
"base": "3.0.0-tp.1"
4+
},
5+
"images": {
6+
"istio-rhel9-operator-ea78213a4c5e1ef3f419df6910740f040c71ad13514aaac0e22c95e7ff4cb96b-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-rhel9-operator@sha256:ea78213a4c5e1ef3f419df6910740f040c71ad13514aaac0e22c95e7ff4cb96b",
7+
"kube-rbac-proxy": "registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:0848d89e9f94be04f17beeee75807d7fd11102737e6483ee674f2cf3ae28f213",
8+
"manager": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-rhel9-operator@sha256:ea78213a4c5e1ef3f419df6910740f040c71ad13514aaac0e22c95e7ff4cb96b",
9+
"istio-pilot-rhel9-376f64eab0ebeb06035983a60d1e7647c5d41354f31a49cb34f4deb7b6708e3e-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-pilot-rhel9@sha256:376f64eab0ebeb06035983a60d1e7647c5d41354f31a49cb34f4deb7b6708e3e",
10+
"istio-proxyv2-rhel9-cbd6bc47341ab8618609f89d063552e17232541c727429855c01deab73e4d06c-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-proxyv2-rhel9@sha256:cbd6bc47341ab8618609f89d063552e17232541c727429855c01deab73e4d06c",
11+
"istio-must-gather-rhel9-e3978aecaafe2678355e21a7303f8620f53d8b774f6592f10527c15bae957224-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-must-gather-rhel9@sha256:e3978aecaafe2678355e21a7303f8620f53d8b774f6592f10527c15bae957224",
12+
"istio-cni-rhel9-f16cd8a29ddcbb3de77cbfcf7e1da78e42cc0c1c502132d477a01c52689cdf23-annotation": "registry.redhat.io/openshift-service-mesh-tech-preview/istio-cni-rhel9@sha256:f16cd8a29ddcbb3de77cbfcf7e1da78e42cc0c1c502132d477a01c52689cdf23"
13+
}
14+
}

packaging/rpm/microshift.spec

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,16 @@ Requires: microshift = %{version}
209209
%description gateway-api
210210
The microshift-gateway-api package provides the required manifests for the Gateway API to be installed on MicroShift.
211211

212+
%package gateway-api-release-info
213+
Summary: Release information for Gateway API for MicroShift
214+
BuildArch: noarch
215+
Requires: microshift = %{version}
216+
217+
%description gateway-api-release-info
218+
The microshift-gateway-api-release-info package provides release information files for this
219+
release. These files contain the list of container image references used by Gateway API
220+
and can be used to embed those images into osbuilder blueprints.
221+
212222
%prep
213223
# Dynamic detection of the available golang version also works for non-RPM golang packages
214224
golang_detected=$(go version | awk '{print $3}' | tr -d '[a-z]' | cut -f1-2 -d.)
@@ -466,6 +476,10 @@ cat assets/optional/gateway-api/kustomization.aarch64.yaml >> %{buildroot}/%{_pr
466476
cat assets/optional/gateway-api/kustomization.x86_64.yaml >> %{buildroot}/%{_prefix}/lib/microshift/manifests.d/000-microshift-gateway-api/kustomization.yaml
467477
%endif
468478

479+
# gateway-api-release-info
480+
mkdir -p -m755 %{buildroot}%{_datadir}/microshift/release
481+
install -p -m644 assets/optional/gateway-api/release-gateway-api-{x86_64,aarch64}.json %{buildroot}%{_datadir}/microshift/release/
482+
469483
%pre networking
470484

471485
getent group hugetlbfs >/dev/null || groupadd -r hugetlbfs
@@ -624,10 +638,22 @@ fi
624638
%{_prefix}/lib/microshift/manifests.d/000-microshift-gateway-api/*
625639
%{_sysconfdir}/greenboot/check/required.d/41_microshift_running_check_gateway_api.sh
626640

641+
%files gateway-api-release-info
642+
%{_datadir}/microshift/release/release-gateway-api-{x86_64,aarch64}.json
643+
627644

628645
# Use Git command to generate the log and replace the VERSION string
629646
# LANG=C git log --date="format:%a %b %d %Y" --pretty="tformat:* %cd %an <%ae> VERSION%n- %s%n" packaging/rpm/microshift.spec
630647
%changelog
648+
* Fri Oct 25 2024 Pablo Acevedo Montserrat <[email protected]> 4.18.0
649+
- USHIFT-4715: Add gateway-api-release-info rpm
650+
651+
* Tue Oct 15 2024 Pablo Acevedo Montserrat <[email protected]> 4.18.0
652+
- USHIFT-4565: Add greenboot script
653+
654+
* Tue Oct 15 2024 Pablo Acevedo Montserrat <[email protected]> 4.18.0
655+
- USHIFT-4565: Add microshift-gateway-api rpm
656+
631657
* Mon Sep 16 2024 Praveen Kumar <[email protected]> 4.18.0
632658
- Add microshift-flannel subpackage
633659

scripts/auto-rebase/ossm_assets.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ assets:
7575
ignore: "Provided by MicroShift"
7676
- file: kustomization.aarch64.yaml
7777
ignore: "Provided by MicroShift"
78+
# Additional files
79+
- file: release-gateway-api-aarch64.json
80+
ignore: "Provided by MicroShift"
81+
- file: release-gateway-api-x86_64.json
82+
ignore: "Provided by MicroShift"

scripts/auto-rebase/rebase_gateway_api.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ write_ossm_images_for_arch() {
198198

199199
local csv_manifest="${arch_dir}/servicemeshoperator3.clusterserviceversion.yaml"
200200
local kustomization_arch_file="${REPOROOT}/assets/optional/gateway-api/kustomization.${GOARCH_TO_UNAME_MAP[${arch}]}.yaml"
201+
local gateway_api_release_json="${REPOROOT}/assets/optional/gateway-api/release-gateway-api-${GOARCH_TO_UNAME_MAP[${arch}]}.json"
202+
203+
local base_release
204+
base_release=$(yq ".spec.version" "${csv_manifest}")
205+
jq -n "{\"release\": {\"base\": \"${base_release}\"}, \"images\": {}}" > "${gateway_api_release_json}"
201206

202207
cat <<EOF > "${kustomization_arch_file}"
203208
images:
@@ -213,6 +218,7 @@ EOF
213218
newName: ${new_image_name}
214219
digest: ${new_image_digest}
215220
EOF
221+
yq -i -o json ".images += {\"${image_name}\": \"${new_image}\"}" "${gateway_api_release_json}"
216222
done
217223
}
218224

0 commit comments

Comments
 (0)