Files
open-cluster-management/hack/patch/patch-crd.sh
Qing Hao c625fd317a 🌱 remove ClusterSet ClusterSetBinding API version v1beta1 (#257)
* update api

Signed-off-by: haoqing0110 <qhao@redhat.com>

* remove webhook

Signed-off-by: haoqing0110 <qhao@redhat.com>

* remove migration files

Signed-off-by: haoqing0110 <qhao@redhat.com>

* update api

Signed-off-by: haoqing0110 <qhao@redhat.com>

* add ut for migrationRequestFiles

Signed-off-by: haoqing0110 <qhao@redhat.com>

---------

Signed-off-by: haoqing0110 <qhao@redhat.com>
2023-08-31 16:14:11 +02:00

30 lines
811 B
Bash

#!/bin/bash
#
# Example patch file 0000_00_clusters.open-cluster-management.io_managedclustersets.crd.yaml.yaml-patch
# - op: add
# path: /spec/conversion
# value:
# strategy: Webhook
# webhook:
# clientConfig:
# service:
# namespace: {{ .ClusterManagerNamespace }}
# name: cluster-manager-registration-webhook
# path: /convert
# port: {{.RegistrationWebhook.Port}}
# caBundle: {{ .RegistrationAPIServiceCABundle }}
# conversionReviewVersions:
# - v1beta1
# - v1beta2
BASE_DIR=$(dirname $(readlink -f $0))
source "$BASE_DIR/../init.sh"
for f in $HUB_CRD_FILES
do
if [ -f "$BASE_DIR/$(basename $f).yaml-patch" ]; then
$1 -o $BASE_DIR/$(basename $f).yaml-patch < $f > $PATCHED_DIR/$(basename $f)
fi
done