From 5d3f1b682e1a19c27bcf012dff898e7da0e0a1c1 Mon Sep 17 00:00:00 2001 From: schogges Date: Mon, 11 Nov 2024 12:20:03 +0100 Subject: [PATCH] feat(tools/policy-gen/templates/schema): add creationTime and modificationTime to policy specs Signed-off-by: schogges --- docs/generated/openapi.yaml | 160 ++++++++++++++++++ .../api/v1alpha1/schema.yaml | 8 + .../api/v1alpha1/schema.yaml | 8 + .../api/v1alpha1/schema.yaml | 8 + .../apis/meshservice/api/v1alpha1/schema.yaml | 8 + .../meshaccesslog/api/v1alpha1/schema.yaml | 8 + .../api/v1alpha1/schema.yaml | 8 + .../api/v1alpha1/schema.yaml | 8 + .../meshhealthcheck/api/v1alpha1/schema.yaml | 8 + .../meshhttproute/api/v1alpha1/schema.yaml | 8 + .../api/v1alpha1/schema.yaml | 8 + .../meshmetric/api/v1alpha1/schema.yaml | 8 + .../meshpassthrough/api/v1alpha1/schema.yaml | 8 + .../meshproxypatch/api/v1alpha1/schema.yaml | 8 + .../meshratelimit/api/v1alpha1/schema.yaml | 8 + .../meshretry/api/v1alpha1/schema.yaml | 8 + .../meshtcproute/api/v1alpha1/schema.yaml | 8 + .../meshtimeout/api/v1alpha1/schema.yaml | 8 + .../policies/meshtls/api/v1alpha1/schema.yaml | 8 + .../meshtrace/api/v1alpha1/schema.yaml | 8 + .../api/v1alpha1/schema.yaml | 8 + tools/policy-gen/templates/schema.yaml | 8 + 22 files changed, 328 insertions(+) diff --git a/docs/generated/openapi.yaml b/docs/generated/openapi.yaml index 8fdbcf1a0f76..149480dab6aa 100644 --- a/docs/generated/openapi.yaml +++ b/docs/generated/openapi.yaml @@ -3278,6 +3278,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshAccessLogCreateOrUpdateSuccessResponse: type: object properties: @@ -4487,6 +4495,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshCircuitBreakerCreateOrUpdateSuccessResponse: type: object properties: @@ -4990,6 +5006,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshFaultInjectionCreateOrUpdateSuccessResponse: type: object properties: @@ -5467,6 +5491,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshHealthCheckCreateOrUpdateSuccessResponse: type: object properties: @@ -6261,6 +6293,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshHTTPRouteCreateOrUpdateSuccessResponse: type: object properties: @@ -7012,6 +7052,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshLoadBalancingStrategyCreateOrUpdateSuccessResponse: type: object properties: @@ -7334,6 +7382,14 @@ components: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshMetricCreateOrUpdateSuccessResponse: type: object properties: @@ -7508,6 +7564,14 @@ components: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshPassthroughCreateOrUpdateSuccessResponse: type: object properties: @@ -8215,6 +8279,14 @@ components: required: - default type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshProxyPatchCreateOrUpdateSuccessResponse: type: object properties: @@ -8792,6 +8864,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshRateLimitCreateOrUpdateSuccessResponse: type: object properties: @@ -9428,6 +9508,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshRetryCreateOrUpdateSuccessResponse: type: object properties: @@ -9758,6 +9846,14 @@ components: minItems: 1 type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshTCPRouteCreateOrUpdateSuccessResponse: type: object properties: @@ -10227,6 +10323,14 @@ components: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshTimeoutCreateOrUpdateSuccessResponse: type: object properties: @@ -10497,6 +10601,14 @@ components: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshTLSCreateOrUpdateSuccessResponse: type: object properties: @@ -10837,6 +10949,14 @@ components: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshTraceCreateOrUpdateSuccessResponse: type: object properties: @@ -11068,6 +11188,14 @@ components: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' MeshTrafficPermissionCreateOrUpdateSuccessResponse: type: object properties: @@ -11131,6 +11259,14 @@ components: template: type: string type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' HostnameGeneratorCreateOrUpdateSuccessResponse: type: object properties: @@ -11375,6 +11511,14 @@ components: required: - match type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' status: description: >- Status is the current status of the Kuma MeshExternalService @@ -11558,6 +11702,14 @@ components: required: - selector type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' status: description: >- Status is the current status of the Kuma MeshMultiZoneService @@ -11787,6 +11939,14 @@ components: - Unavailable type: string type: object + modificationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' + creationTime: + type: string + format: date-time + example: '0001-01-01T00:00:00Z' status: description: Status is the current status of the Kuma MeshService resource. properties: diff --git a/pkg/core/resources/apis/hostnamegenerator/api/v1alpha1/schema.yaml b/pkg/core/resources/apis/hostnamegenerator/api/v1alpha1/schema.yaml index 055abf117f71..42cc14dadbbe 100644 --- a/pkg/core/resources/apis/hostnamegenerator/api/v1alpha1/schema.yaml +++ b/pkg/core/resources/apis/hostnamegenerator/api/v1alpha1/schema.yaml @@ -44,3 +44,11 @@ properties: template: type: string type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/core/resources/apis/meshexternalservice/api/v1alpha1/schema.yaml b/pkg/core/resources/apis/meshexternalservice/api/v1alpha1/schema.yaml index bccea2c63c35..146bcec6a316 100644 --- a/pkg/core/resources/apis/meshexternalservice/api/v1alpha1/schema.yaml +++ b/pkg/core/resources/apis/meshexternalservice/api/v1alpha1/schema.yaml @@ -196,6 +196,14 @@ properties: required: - match type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" status: description: Status is the current status of the Kuma MeshExternalService resource. properties: diff --git a/pkg/core/resources/apis/meshmultizoneservice/api/v1alpha1/schema.yaml b/pkg/core/resources/apis/meshmultizoneservice/api/v1alpha1/schema.yaml index 2d326384d686..7c55c5520bde 100644 --- a/pkg/core/resources/apis/meshmultizoneservice/api/v1alpha1/schema.yaml +++ b/pkg/core/resources/apis/meshmultizoneservice/api/v1alpha1/schema.yaml @@ -59,6 +59,14 @@ properties: required: - selector type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" status: description: Status is the current status of the Kuma MeshMultiZoneService resource. properties: diff --git a/pkg/core/resources/apis/meshservice/api/v1alpha1/schema.yaml b/pkg/core/resources/apis/meshservice/api/v1alpha1/schema.yaml index dd109e21c29d..bb2824b95ada 100644 --- a/pkg/core/resources/apis/meshservice/api/v1alpha1/schema.yaml +++ b/pkg/core/resources/apis/meshservice/api/v1alpha1/schema.yaml @@ -81,6 +81,14 @@ properties: - Unavailable type: string type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" status: description: Status is the current status of the Kuma MeshService resource. properties: diff --git a/pkg/plugins/policies/meshaccesslog/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshaccesslog/api/v1alpha1/schema.yaml index b1260fda7667..0c68fb1f550c 100644 --- a/pkg/plugins/policies/meshaccesslog/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshaccesslog/api/v1alpha1/schema.yaml @@ -514,3 +514,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshcircuitbreaker/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshcircuitbreaker/api/v1alpha1/schema.yaml index 0bf2d3a9929a..048bf94fbc8a 100644 --- a/pkg/plugins/policies/meshcircuitbreaker/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshcircuitbreaker/api/v1alpha1/schema.yaml @@ -698,3 +698,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshfaultinjection/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshfaultinjection/api/v1alpha1/schema.yaml index 39a803554ae5..5f197aef1eef 100644 --- a/pkg/plugins/policies/meshfaultinjection/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshfaultinjection/api/v1alpha1/schema.yaml @@ -372,3 +372,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshhealthcheck/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshhealthcheck/api/v1alpha1/schema.yaml index 67e5e318c869..91cfc6b0a908 100644 --- a/pkg/plugins/policies/meshhealthcheck/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshhealthcheck/api/v1alpha1/schema.yaml @@ -342,3 +342,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshhttproute/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshhttproute/api/v1alpha1/schema.yaml index 179f8d100e93..f528f235f5c7 100644 --- a/pkg/plugins/policies/meshhttproute/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshhttproute/api/v1alpha1/schema.yaml @@ -620,3 +620,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshloadbalancingstrategy/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshloadbalancingstrategy/api/v1alpha1/schema.yaml index 090992740ee4..62f5839cf386 100644 --- a/pkg/plugins/policies/meshloadbalancingstrategy/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshloadbalancingstrategy/api/v1alpha1/schema.yaml @@ -515,3 +515,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshmetric/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshmetric/api/v1alpha1/schema.yaml index c97b088023ec..09522955970e 100644 --- a/pkg/plugins/policies/meshmetric/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshmetric/api/v1alpha1/schema.yaml @@ -243,3 +243,11 @@ properties: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshpassthrough/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshpassthrough/api/v1alpha1/schema.yaml index fb94ec0222f6..db1be5c7030a 100644 --- a/pkg/plugins/policies/meshpassthrough/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshpassthrough/api/v1alpha1/schema.yaml @@ -127,3 +127,11 @@ properties: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshproxypatch/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshproxypatch/api/v1alpha1/schema.yaml index 1111f8d95b50..67225acc7f15 100644 --- a/pkg/plugins/policies/meshproxypatch/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshproxypatch/api/v1alpha1/schema.yaml @@ -485,3 +485,11 @@ properties: required: - default type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshratelimit/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshratelimit/api/v1alpha1/schema.yaml index 88e890b30929..0658366381f4 100644 --- a/pkg/plugins/policies/meshratelimit/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshratelimit/api/v1alpha1/schema.yaml @@ -446,3 +446,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshretry/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshretry/api/v1alpha1/schema.yaml index a33ccefde6a1..b9e1f0d1ea74 100644 --- a/pkg/plugins/policies/meshretry/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshretry/api/v1alpha1/schema.yaml @@ -462,3 +462,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshtcproute/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshtcproute/api/v1alpha1/schema.yaml index 90f00168f495..efafaac86ef0 100644 --- a/pkg/plugins/policies/meshtcproute/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshtcproute/api/v1alpha1/schema.yaml @@ -245,3 +245,11 @@ properties: minItems: 1 type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshtimeout/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshtimeout/api/v1alpha1/schema.yaml index 05cb884424ec..f4264c6547cb 100644 --- a/pkg/plugins/policies/meshtimeout/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshtimeout/api/v1alpha1/schema.yaml @@ -324,3 +324,11 @@ properties: type: object type: array type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshtls/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshtls/api/v1alpha1/schema.yaml index 32ac5c8a5b8f..bfe128d2f631 100644 --- a/pkg/plugins/policies/meshtls/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshtls/api/v1alpha1/schema.yaml @@ -201,3 +201,11 @@ properties: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshtrace/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshtrace/api/v1alpha1/schema.yaml index 201175a2ce58..4783015d1aa0 100644 --- a/pkg/plugins/policies/meshtrace/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshtrace/api/v1alpha1/schema.yaml @@ -249,3 +249,11 @@ properties: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/pkg/plugins/policies/meshtrafficpermission/api/v1alpha1/schema.yaml b/pkg/plugins/policies/meshtrafficpermission/api/v1alpha1/schema.yaml index 9d5fe080af57..b25c0cdf10a9 100644 --- a/pkg/plugins/policies/meshtrafficpermission/api/v1alpha1/schema.yaml +++ b/pkg/plugins/policies/meshtrafficpermission/api/v1alpha1/schema.yaml @@ -166,3 +166,11 @@ properties: type: object type: object type: object + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" diff --git a/tools/policy-gen/templates/schema.yaml b/tools/policy-gen/templates/schema.yaml index 94cc2c3ccc88..3ef90fd6ddc2 100644 --- a/tools/policy-gen/templates/schema.yaml +++ b/tools/policy-gen/templates/schema.yaml @@ -20,3 +20,11 @@ properties: description: 'The labels to help identity resources' type: object spec: {} + modificationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z" + creationTime: + type: string + format: date-time + example: "0001-01-01T00:00:00Z"