From 946dc1821a1388dd0e1f4383a1e5bb898ddea238 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Fri, 25 Oct 2024 09:38:20 +0545 Subject: [PATCH] fix: canary CRD. kubebuilder annotation on metrics --- api/v1/common.go | 1 + config/deploy/crd.yaml | 39 ++++++++++++++++++++++++++++++++++++ config/deploy/manifests.yaml | 39 ++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) diff --git a/api/v1/common.go b/api/v1/common.go index 23cb242af..4f6048fb2 100644 --- a/api/v1/common.go +++ b/api/v1/common.go @@ -362,6 +362,7 @@ type Description struct { TransformDeleteStrategy string `yaml:"transformDeleteStrategy,omitempty" json:"transformDeleteStrategy,omitempty"` // Metrics to expose from check. // https://canarychecker.io/concepts/metrics-exporter + // +kubebuilder:validation:XPreserveUnknownFields Metrics []external.Metrics `json:"metrics,omitempty" yaml:"metrics,omitempty"` } diff --git a/config/deploy/crd.yaml b/config/deploy/crd.yaml index bca5a9ee6..1a3aac46d 100644 --- a/config/deploy/crd.yaml +++ b/config/deploy/crd.yaml @@ -128,6 +128,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -507,6 +508,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -899,6 +901,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -1241,6 +1244,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -1546,6 +1550,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -1895,6 +1900,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -2309,6 +2315,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -2523,6 +2530,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -2814,6 +2822,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -3051,6 +3060,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true minrecords: type: integer name: @@ -3368,6 +3378,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -3667,6 +3678,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -3935,6 +3947,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -4186,6 +4199,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -5055,6 +5069,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -5532,6 +5547,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true minAge: description: MinAge the latest object should be older than defined age type: string @@ -5987,6 +6003,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -6361,6 +6378,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -6687,6 +6705,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -7014,6 +7033,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -7518,6 +7538,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -7788,6 +7809,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8041,6 +8063,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8347,6 +8370,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8680,6 +8704,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8954,6 +8979,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -9258,6 +9284,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -9398,6 +9425,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -9735,6 +9763,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10084,6 +10113,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10337,6 +10367,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10691,6 +10722,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10933,6 +10965,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -11315,6 +11348,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -11881,6 +11915,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -12238,6 +12273,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -12593,6 +12629,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -12906,6 +12943,7 @@ spec: type: object additionalProperties: true type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -13143,6 +13181,7 @@ spec: type: string type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string diff --git a/config/deploy/manifests.yaml b/config/deploy/manifests.yaml index 39e4803fb..c1ba1f1d8 100644 --- a/config/deploy/manifests.yaml +++ b/config/deploy/manifests.yaml @@ -127,6 +127,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -506,6 +507,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -898,6 +900,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -1240,6 +1243,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -1545,6 +1549,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -1894,6 +1899,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -2308,6 +2314,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -2522,6 +2529,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -2813,6 +2821,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -3050,6 +3059,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true minrecords: type: integer name: @@ -3367,6 +3377,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -3666,6 +3677,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -3934,6 +3946,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -4185,6 +4198,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -5054,6 +5068,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -5531,6 +5546,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true minAge: description: MinAge the latest object should be older than defined age type: string @@ -5986,6 +6002,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -6360,6 +6377,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -6686,6 +6704,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -7013,6 +7032,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -7517,6 +7537,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -7787,6 +7808,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8040,6 +8062,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8346,6 +8369,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8679,6 +8703,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -8953,6 +8978,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -9257,6 +9283,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -9397,6 +9424,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -9734,6 +9762,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10083,6 +10112,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10336,6 +10366,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10690,6 +10721,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -10932,6 +10964,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -11314,6 +11347,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -11880,6 +11914,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -12237,6 +12272,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -12592,6 +12628,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -12905,6 +12942,7 @@ spec: type: array type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string @@ -13142,6 +13180,7 @@ spec: type: string type: object type: array + x-kubernetes-preserve-unknown-fields: true name: description: Name of the check type: string