From 43b88667e6cbe6a4843deda420f6659ad5b273ce Mon Sep 17 00:00:00 2001 From: sadath-12 Date: Tue, 9 Jan 2024 23:50:23 +0530 Subject: [PATCH] d Signed-off-by: sadath-12 --- .github/workflows/validate-crd.yaml | 9 ++++++++- pkg/k8s/apis/cilium.io/v1alpha1/register.go | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-crd.yaml b/.github/workflows/validate-crd.yaml index 4d013eabc0a..d48d63e751b 100644 --- a/.github/workflows/validate-crd.yaml +++ b/.github/workflows/validate-crd.yaml @@ -10,6 +10,10 @@ jobs: check-version: runs-on: ubuntu-22.04 steps: + - name: Install git + run: | + apt-get update + apt-get install -y git - uses: actions/checkout@v3 - name: Check for CRD changes and version update run: | @@ -23,10 +27,13 @@ jobs: fi # Check for version variable changes - + old_version=$(git show ${{ github.event.pull_request.base.sha }}:pkg/k8s/apis/cilium.io/v1alpha1/register.go | grep 'CustomResourceDefinitionSchemaVersion' | awk -F'"' '{print $2}') new_version=$(git show HEAD:pkg/k8s/apis/cilium.io/v1alpha1/register.go | grep 'CustomResourceDefinitionSchemaVersion' | awk -F'"' '{print $2}') + echo "old_version=$old_version" + echo "new_version=$new_version" + if [ "$old_version" != "$new_version" ]; then version_changed=1 fi diff --git a/pkg/k8s/apis/cilium.io/v1alpha1/register.go b/pkg/k8s/apis/cilium.io/v1alpha1/register.go index d283ff972ae..2256e65aef6 100644 --- a/pkg/k8s/apis/cilium.io/v1alpha1/register.go +++ b/pkg/k8s/apis/cilium.io/v1alpha1/register.go @@ -16,7 +16,7 @@ const ( // TPCRDName is the full name of the TracingPolicy CRD. TPCRDName = TPKindDefinition + "/" + CRDVersion - CustomResourceDefinitionSchemaVersion = "0.10.4" + CustomResourceDefinitionSchemaVersion = "0.10.1" // TPNamespacedCRDName is the full name of the TracingPolicy CRD.