1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

feat: add globalcontext loader and interface (#9602)

* feat(globalcontext): add interface

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>

* fix(globalcontext): package import path

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>

* design(contextloader): move globalcontext from Load to init

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>

* fix(globalcontext): remove pointer

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>

* design(globalcontext): create specific Store

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>

* codegen

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

---------

Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Khaled Emara 2024-02-05 13:24:37 +02:00 committed by GitHub
parent 2e68d163fc
commit 8a4d9941de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 3178 additions and 11 deletions

View file

@ -95,6 +95,9 @@ type ContextEntry struct {
// Variable defines an arbitrary JMESPath context variable that can be defined inline.
Variable *Variable `json:"variable,omitempty" yaml:"variable,omitempty"`
// GlobalContextEntryReference is a reference to a cached global context entry.
GlobalReference *GlobalContextEntryReference `json:"globalReference,omitempty" yaml:"globalReference,omitempty"`
}
// Variable defines an arbitrary JMESPath context variable that can be defined inline.

View file

@ -483,6 +483,11 @@ func (in *ContextEntry) DeepCopyInto(out *ContextEntry) {
*out = new(Variable)
(*in).DeepCopyInto(*out)
}
if in.GlobalReference != nil {
in, out := &in.GlobalReference, &out.GlobalReference
*out = new(GlobalContextEntryReference)
**out = **in
}
return
}

View file

@ -221,6 +221,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1462,6 +1478,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -2703,6 +2735,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.

View file

@ -221,6 +221,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1462,6 +1478,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -2703,6 +2735,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.

View file

@ -267,6 +267,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1975,6 +1992,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2308,6 +2344,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2873,6 +2928,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -4686,6 +4760,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -6472,6 +6563,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -6820,6 +6932,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -7415,6 +7548,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -9378,6 +9532,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -10660,6 +10831,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -10993,6 +11183,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -11737,6 +11946,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -13524,6 +13752,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -15310,6 +15555,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -15658,6 +15924,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -16253,6 +16540,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch

View file

@ -268,6 +268,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1976,6 +1993,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2309,6 +2345,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2874,6 +2929,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -4688,6 +4762,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -6474,6 +6565,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -6822,6 +6934,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -7417,6 +7550,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -9381,6 +9535,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -10663,6 +10834,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -10996,6 +11186,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -11740,6 +11949,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -13527,6 +13755,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -15313,6 +15558,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -15661,6 +15927,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -16256,6 +16543,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch

View file

@ -155,12 +155,13 @@ func main() {
eventGenerator,
event.Workers,
)
gcstore := store.New()
gceController := internal.NewController(
globalcontextcontroller.ControllerName,
globalcontextcontroller.NewController(
kyvernoInformer.Kyverno().V2alpha1().GlobalContextEntries(),
setup.KyvernoDynamicClient,
store.New(),
gcstore,
maxAPICallResponseLength,
),
globalcontextcontroller.Workers,
@ -184,6 +185,7 @@ func main() {
setup.KyvernoClient,
setup.RegistrySecretLister,
apicall.NewAPICallConfiguration(maxAPICallResponseLength),
gcstore,
)
// start informers and wait for cache sync
if !internal.StartInformersAndWaitForCacheSync(signalCtx, setup.Logger, kyvernoInformer) {

View file

@ -161,12 +161,13 @@ func main() {
eventGenerator,
event.Workers,
)
gcstore := store.New()
gceController := internal.NewController(
globalcontextcontroller.ControllerName,
globalcontextcontroller.NewController(
kyvernoInformer.Kyverno().V2alpha1().GlobalContextEntries(),
setup.KyvernoDynamicClient,
store.New(),
gcstore,
maxAPICallResponseLength,
),
globalcontextcontroller.Workers,

View file

@ -261,6 +261,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1969,6 +1986,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2302,6 +2338,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2867,6 +2922,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -4680,6 +4754,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -6466,6 +6557,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -6814,6 +6926,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -7409,6 +7542,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -9372,6 +9526,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -10654,6 +10825,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -10987,6 +11177,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -11731,6 +11940,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -13518,6 +13746,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -15304,6 +15549,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -15652,6 +15918,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -16247,6 +16534,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch

View file

@ -262,6 +262,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1970,6 +1987,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2303,6 +2339,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2868,6 +2923,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -4682,6 +4756,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -6468,6 +6559,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -6816,6 +6928,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -7411,6 +7544,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -9375,6 +9529,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -10657,6 +10828,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -10990,6 +11180,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -11734,6 +11943,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -13521,6 +13749,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -15307,6 +15552,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -15655,6 +15921,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -16250,6 +16537,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch

View file

@ -14,6 +14,7 @@ import (
"github.com/kyverno/kyverno/pkg/engine/adapters"
engineapi "github.com/kyverno/kyverno/pkg/engine/api"
"github.com/kyverno/kyverno/pkg/engine/apicall"
"github.com/kyverno/kyverno/pkg/engine/context/loaders"
"github.com/kyverno/kyverno/pkg/engine/context/resolvers"
"github.com/kyverno/kyverno/pkg/engine/factories"
"github.com/kyverno/kyverno/pkg/engine/jmespath"
@ -36,6 +37,7 @@ func NewEngine(
kyvernoClient versioned.Interface,
secretLister corev1listers.SecretNamespaceLister,
apiCallConfig apicall.APICallConfiguration,
gctxStore loaders.Store,
) engineapi.Engine {
configMapResolver := NewConfigMapResolver(ctx, logger, kubeClient, 15*time.Minute)
exceptionsSelector := NewExceptionSelector(ctx, logger, kyvernoClient, 15*time.Minute)
@ -48,7 +50,7 @@ func NewEngine(
adapters.Client(client),
factories.DefaultRegistryClientFactory(adapters.RegistryClient(rclient), secretLister),
ivCache,
factories.DefaultContextLoaderFactory(configMapResolver, factories.WithAPICallConfig(apiCallConfig)),
factories.DefaultContextLoaderFactory(configMapResolver, factories.WithAPICallConfig(apiCallConfig), factories.WithGlobalContextStore(gctxStore)),
exceptionsSelector,
imageSignatureRepository,
)

View file

@ -149,6 +149,7 @@ func createrLeaderControllers(
caInformer,
kubeKyvernoInformer.Coordination().V1().Leases(),
kubeInformer.Rbac().V1().ClusterRoles(),
kyvernoInformer.Kyverno().V2alpha1().GlobalContextEntries(),
serverIP,
int32(webhookTimeout),
servicePort,
@ -356,12 +357,13 @@ func main() {
logging.WithName("EventGenerator"),
strings.Split(omitEvents, ",")...,
)
gcstore := store.New()
gceController := internal.NewController(
globalcontextcontroller.ControllerName,
globalcontextcontroller.NewController(
kyvernoInformer.Kyverno().V2alpha1().GlobalContextEntries(),
setup.KyvernoDynamicClient,
store.New(),
gcstore,
maxAPICallResponseLength,
),
globalcontextcontroller.Workers,
@ -411,6 +413,7 @@ func main() {
setup.KyvernoClient,
setup.RegistrySecretLister,
apicall.NewAPICallConfiguration(maxAPICallResponseLength),
gcstore,
)
// create non leader controllers
nonLeaderControllers, nonLeaderBootstrap := createNonLeaderControllers(

View file

@ -285,12 +285,13 @@ func main() {
eventGenerator,
event.Workers,
)
gcstore := store.New()
gceController := internal.NewController(
globalcontextcontroller.ControllerName,
globalcontextcontroller.NewController(
kyvernoInformer.Kyverno().V2alpha1().GlobalContextEntries(),
setup.KyvernoDynamicClient,
store.New(),
gcstore,
maxAPICallResponseLength,
),
globalcontextcontroller.Workers,
@ -309,6 +310,7 @@ func main() {
setup.KyvernoClient,
setup.RegistrySecretLister,
apicall.NewAPICallConfiguration(maxAPICallResponseLength),
gcstore,
)
// start informers and wait for cache sync
if !internal.StartInformersAndWaitForCacheSync(ctx, setup.Logger, kyvernoInformer) {

View file

@ -215,6 +215,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1456,6 +1472,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -2697,6 +2729,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.

View file

@ -215,6 +215,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1456,6 +1472,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -2697,6 +2729,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.

View file

@ -261,6 +261,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1969,6 +1986,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2302,6 +2338,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2867,6 +2922,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -4680,6 +4754,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -6466,6 +6557,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -6814,6 +6926,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -7409,6 +7542,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -9372,6 +9526,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -10654,6 +10825,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -10987,6 +11177,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -11731,6 +11940,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -13518,6 +13746,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -15304,6 +15549,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -15652,6 +15918,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -16247,6 +16534,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch

View file

@ -262,6 +262,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -1970,6 +1987,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2303,6 +2339,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -2868,6 +2923,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -4682,6 +4756,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -6468,6 +6559,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -6816,6 +6928,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -7411,6 +7544,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -9375,6 +9529,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -10657,6 +10828,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -10990,6 +11180,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -11734,6 +11943,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -13521,6 +13749,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -15307,6 +15552,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -15655,6 +15921,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -16250,6 +16537,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch

View file

@ -1655,6 +1655,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -2896,6 +2912,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -4137,6 +4169,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -6635,6 +6683,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -7876,6 +7940,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -9117,6 +9197,22 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference to a
cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response returned
from the server. For example a JMESPath of "items | length(@)"
applied to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across all
namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -10431,6 +10527,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -12139,6 +12252,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -12472,6 +12604,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -13037,6 +13188,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -14850,6 +15020,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -16636,6 +16823,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -16984,6 +17192,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -17579,6 +17808,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -19542,6 +19792,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -20824,6 +21091,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -21157,6 +21443,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -21901,6 +22206,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -23688,6 +24012,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -25474,6 +25815,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -25822,6 +26184,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -26417,6 +26800,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -28611,6 +29015,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -30319,6 +30740,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -30652,6 +31092,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -31217,6 +31676,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -33031,6 +33509,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -34817,6 +35312,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -35165,6 +35681,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -35760,6 +36297,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -37724,6 +38282,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match Expression
that can be used to transform the JSON response
returned from the server. For example a JMESPath
of "items | length(@)" applied to the API server
response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an OCI/Docker
V2 registry to fetch image details.
@ -39006,6 +39581,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -39339,6 +39933,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -40083,6 +40696,25 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is
a reference to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON
Match Expression that can be used to transform
the JSON response returned from the server.
For example a JMESPath of "items | length(@)"
applied to the API server response for
the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch image
@ -41870,6 +42502,23 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference is a reference
to a cached global context entry.
properties:
jmesPath:
description: JMESPath is an optional JSON Match
Expression that can be used to transform the
JSON response returned from the server. For
example a JMESPath of "items | length(@)" applied
to the API server response for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments across
all namespaces.
type: string
name:
description: Name of the global context entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests to an
OCI/Docker V2 registry to fetch image details.
@ -43656,6 +44305,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -44004,6 +44674,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch
@ -44599,6 +45290,27 @@ spec:
required:
- name
type: object
globalReference:
description: GlobalContextEntryReference
is a reference to a cached global context
entry.
properties:
jmesPath:
description: JMESPath is an optional
JSON Match Expression that can be
used to transform the JSON response
returned from the server. For example
a JMESPath of "items | length(@)"
applied to the API server response
for the URLPath "/apis/apps/v1/deployments"
will return the total count of deployments
across all namespaces.
type: string
name:
description: Name of the global context
entry
type: string
type: object
imageRegistry:
description: ImageRegistry defines requests
to an OCI/Docker V2 registry to fetch

View file

@ -1522,6 +1522,19 @@ Variable
<p>Variable defines an arbitrary JMESPath context variable that can be defined inline.</p>
</td>
</tr>
<tr>
<td>
<code>globalReference</code><br/>
<em>
<a href="#kyverno.io/v1.GlobalContextEntryReference">
GlobalContextEntryReference
</a>
</em>
</td>
<td>
<p>GlobalContextEntryReference is a reference to a cached global context entry.</p>
</td>
</tr>
</tbody>
</table>
<hr />
@ -1995,6 +2008,10 @@ CloneList
<h3 id="kyverno.io/v1.GlobalContextEntryReference">GlobalContextEntryReference
</h3>
<p>
(<em>Appears on:</em>
<a href="#kyverno.io/v1.ContextEntry">ContextEntry</a>)
</p>
<p>
</p>
<table class="table table-striped">
<thead class="thead-dark">

View file

@ -3074,6 +3074,37 @@ details.</p>
</tr>
<tr>
<td><code>globalReference</code>
<span style="color:blue;"> *</span>
</br>
<a href="#kyverno-io-v1-GlobalContextEntryReference">
<span style="font-family: monospace">GlobalContextEntryReference</span>
</a>
</td>
<td>
<p>GlobalContextEntryReference is a reference to a cached global context entry.</p>
</td>
</tr>
</tbody>
@ -3992,6 +4023,103 @@ resource will be created with default data only.</p>
</tbody>
</table>
<H3 id="kyverno-io-v1-GlobalContextEntryReference">GlobalContextEntryReference
</H3>
<p>
(<em>Appears in:</em>
<a href="#kyverno-io-v1-ContextEntry">ContextEntry</a>)
</p>
<p></p>
<table class="table table-striped">
<thead class="thead-dark">
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code>
<span style="color:blue;"> *</span>
</br>
<span style="font-family: monospace">string</span>
</td>
<td>
<p>Name of the global context entry</p>
</td>
</tr>
<tr>
<td><code>jmesPath</code>
<span style="color:blue;"> *</span>
</br>
<span style="font-family: monospace">string</span>
</td>
<td>
<p>JMESPath is an optional JSON Match Expression that can be used to
transform the JSON response returned from the server. For example
a JMESPath of &quot;items | length(@)&quot; applied to the API server response
for the URLPath &quot;/apis/apps/v1/deployments&quot; will return the total count
of deployments across all namespaces.</p>
</td>
</tr>
</tbody>
</table>

View file

@ -21,11 +21,12 @@ package v1
// ContextEntryApplyConfiguration represents an declarative configuration of the ContextEntry type for use
// with apply.
type ContextEntryApplyConfiguration struct {
Name *string `json:"name,omitempty"`
ConfigMap *ConfigMapReferenceApplyConfiguration `json:"configMap,omitempty"`
APICall *ContextAPICallApplyConfiguration `json:"apiCall,omitempty"`
ImageRegistry *ImageRegistryApplyConfiguration `json:"imageRegistry,omitempty"`
Variable *VariableApplyConfiguration `json:"variable,omitempty"`
Name *string `json:"name,omitempty"`
ConfigMap *ConfigMapReferenceApplyConfiguration `json:"configMap,omitempty"`
APICall *ContextAPICallApplyConfiguration `json:"apiCall,omitempty"`
ImageRegistry *ImageRegistryApplyConfiguration `json:"imageRegistry,omitempty"`
Variable *VariableApplyConfiguration `json:"variable,omitempty"`
GlobalReference *GlobalContextEntryReferenceApplyConfiguration `json:"globalReference,omitempty"`
}
// ContextEntryApplyConfiguration constructs an declarative configuration of the ContextEntry type for use with
@ -73,3 +74,11 @@ func (b *ContextEntryApplyConfiguration) WithVariable(value *VariableApplyConfig
b.Variable = value
return b
}
// WithGlobalReference sets the GlobalReference field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GlobalReference field is set to the value of the last call.
func (b *ContextEntryApplyConfiguration) WithGlobalReference(value *GlobalContextEntryReferenceApplyConfiguration) *ContextEntryApplyConfiguration {
b.GlobalReference = value
return b
}

View file

@ -0,0 +1,48 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// GlobalContextEntryReferenceApplyConfiguration represents an declarative configuration of the GlobalContextEntryReference type for use
// with apply.
type GlobalContextEntryReferenceApplyConfiguration struct {
Name *string `json:"name,omitempty"`
JMESPath *string `json:"jmesPath,omitempty"`
}
// GlobalContextEntryReferenceApplyConfiguration constructs an declarative configuration of the GlobalContextEntryReference type for use with
// apply.
func GlobalContextEntryReference() *GlobalContextEntryReferenceApplyConfiguration {
return &GlobalContextEntryReferenceApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *GlobalContextEntryReferenceApplyConfiguration) WithName(value string) *GlobalContextEntryReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithJMESPath sets the JMESPath field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the JMESPath field is set to the value of the last call.
func (b *GlobalContextEntryReferenceApplyConfiguration) WithJMESPath(value string) *GlobalContextEntryReferenceApplyConfiguration {
b.JMESPath = &value
return b
}

View file

@ -85,6 +85,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &kyvernov1.ForEachValidationApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("Generation"):
return &kyvernov1.GenerationApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("GlobalContextEntryReference"):
return &kyvernov1.GlobalContextEntryReferenceApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("ImageExtractorConfig"):
return &kyvernov1.ImageExtractorConfigApplyConfiguration{}
case v1.SchemeGroupVersion.WithKind("ImageRegistry"):

View file

@ -10,11 +10,14 @@ import (
"github.com/go-logr/logr"
"github.com/kyverno/kyverno/api/kyverno"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
kyvernov2alpha1 "github.com/kyverno/kyverno/api/kyverno/v2alpha1"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/autogen"
"github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernov1informers "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1"
kyvernov2alpha1informers "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v2alpha1"
kyvernov1listers "github.com/kyverno/kyverno/pkg/client/listers/kyverno/v1"
kyvernov2alpha1listers "github.com/kyverno/kyverno/pkg/client/listers/kyverno/v2alpha1"
"github.com/kyverno/kyverno/pkg/clients/dclient"
"github.com/kyverno/kyverno/pkg/config"
"github.com/kyverno/kyverno/pkg/controllers"
@ -91,6 +94,7 @@ type controller struct {
secretLister corev1listers.SecretLister
leaseLister coordinationv1listers.LeaseLister
clusterroleLister rbacv1listers.ClusterRoleLister
gctxentryLister kyvernov2alpha1listers.GlobalContextEntryLister
// queue
queue workqueue.RateLimitingInterface
@ -123,6 +127,7 @@ func NewController(
secretInformer corev1informers.SecretInformer,
leaseInformer coordinationv1informers.LeaseInformer,
clusterroleInformer rbacv1informers.ClusterRoleInformer,
gctxentryInformer kyvernov2alpha1informers.GlobalContextEntryInformer,
server string,
defaultTimeout int32,
servicePort int32,
@ -147,6 +152,7 @@ func NewController(
secretLister: secretInformer.Lister(),
leaseLister: leaseInformer.Lister(),
clusterroleLister: clusterroleInformer.Lister(),
gctxentryLister: gctxentryInformer.Lister(),
queue: queue,
server: server,
defaultTimeout: defaultTimeout,
@ -417,6 +423,15 @@ func (c *controller) reconcileMutatingWebhookConfiguration(ctx context.Context,
return err
}
func (c *controller) isGlobalContextEntryReady(name string, gctxentries []*kyvernov2alpha1.GlobalContextEntry) bool {
for _, gctxentry := range gctxentries {
if gctxentry.Name == name {
return gctxentry.Status.Ready
}
}
return false
}
func (c *controller) updatePolicyStatuses(ctx context.Context) error {
c.lock.Lock()
defer c.lock.Unlock()
@ -424,6 +439,10 @@ func (c *controller) updatePolicyStatuses(ctx context.Context) error {
if err != nil {
return err
}
gctxentries, err := c.gctxentryLister.List(labels.Everything())
if err != nil {
return err
}
updateStatusFunc := func(policy kyvernov1.PolicyInterface) error {
policyKey, err := cache.MetaNamespaceKeyFunc(policy)
if err != nil {
@ -438,6 +457,22 @@ func (c *controller) updatePolicyStatuses(ctx context.Context) error {
}
}
}
// If there are global context entries under , check if they are ready
if ready {
for _, rule := range policy.GetSpec().Rules {
if rule.Context == nil {
continue
}
for _, ctxEntry := range rule.Context {
if ctxEntry.GlobalReference != nil {
if !c.isGlobalContextEntryReady(ctxEntry.GlobalReference.Name, gctxentries) {
ready, message = false, "Not ready yet"
break
}
}
}
}
}
status := policy.GetStatus()
status.SetReady(ready, message)
status.Autogen.Rules = nil

View file

@ -0,0 +1,142 @@
package loaders
import (
"context"
"encoding/json"
"fmt"
"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
enginecontext "github.com/kyverno/kyverno/pkg/engine/context"
"github.com/kyverno/kyverno/pkg/engine/jmespath"
"github.com/kyverno/kyverno/pkg/engine/variables"
"github.com/kyverno/kyverno/pkg/globalcontext/store"
)
type Store interface {
Get(key string) (store.Entry, bool)
}
type gctxLoader struct {
ctx context.Context //nolint:containedctx
logger logr.Logger
entry kyvernov1.ContextEntry
enginectx enginecontext.Interface
jp jmespath.Interface
gctxStore Store
data []byte
}
func NewGCTXLoader(
ctx context.Context,
logger logr.Logger,
entry kyvernov1.ContextEntry,
enginectx enginecontext.Interface,
jp jmespath.Interface,
gctxStore Store,
) enginecontext.Loader {
return &gctxLoader{
ctx: ctx,
logger: logger,
entry: entry,
enginectx: enginectx,
jp: jp,
gctxStore: gctxStore,
}
}
func (g *gctxLoader) HasLoaded() bool {
data, ok := g.gctxStore.Get(g.entry.Name)
if ok {
g.logger.Error(fmt.Errorf("failed to get data from global context store"), "failed to get data from global context store")
return false
}
if data == nil {
return false
}
return true
}
func (g *gctxLoader) LoadData() error {
contextData, err := g.loadGctxData()
if err != nil {
g.logger.Error(err, "failed to marshal APICall data for context entry")
return fmt.Errorf("failed to marshal APICall data for context entry %s: %w", g.entry.Name, err)
}
err = g.enginectx.AddContextEntry(g.entry.Name, contextData)
if err != nil {
g.logger.Error(err, "failed to add resource cache results for context entry")
return fmt.Errorf("failed to add resource cache results for context entry %s: %w", g.entry.Name, err)
}
g.logger.V(6).Info("added context data", "name", g.entry.Name, "contextData", contextData)
g.data = contextData
return nil
}
func (g *gctxLoader) loadGctxData() ([]byte, error) {
var data interface{}
var err error
if g.entry.GlobalReference == nil {
g.logger.Error(err, "context entry does not have resource cache")
return nil, fmt.Errorf("resource cache not found")
}
rc, err := variables.SubstituteAllInType(g.logger, g.enginectx, g.entry.GlobalReference)
if err != nil {
return nil, err
}
g.logger.V(6).Info("variables substituted", "resourcecache", rc)
storeEntry, ok := g.gctxStore.Get(rc.Name)
if !ok {
err := fmt.Errorf("failed to fetch entry key=%s", rc.Name)
g.logger.Error(err, "")
return nil, err
}
data, err = storeEntry.Get()
if err != nil {
g.logger.Error(err, "failed to fetch data from entry")
return nil, err
}
jsonData, err := json.Marshal(data)
if err != nil {
return nil, err
}
g.logger.V(6).Info("fetched json data", "name", g.entry.Name, "jsondata", jsonData)
if g.entry.GlobalReference.JMESPath == "" {
err := g.enginectx.AddContextEntry(g.entry.Name, jsonData)
if err != nil {
g.logger.Error(err, "failed to add resource data to context entry")
return nil, fmt.Errorf("failed to add resource data to context entry %s: %w", g.entry.Name, err)
}
return jsonData, nil
}
path, err := variables.SubstituteAll(g.logger, g.enginectx, rc.JMESPath)
if err != nil {
g.logger.Error(err, "failed to substitute variables in context entry")
return nil, fmt.Errorf("failed to substitute variables in context entry %s JMESPath %s: %w", g.entry.Name, rc.JMESPath, err)
}
results, err := g.applyJMESPathJSON(path.(string), jsonData)
if err != nil {
g.logger.Error(err, "failed to apply JMESPath for context entry")
return nil, fmt.Errorf("failed to apply JMESPath %s for context entry %s: %w", path, g.entry.Name, err)
}
g.logger.V(6).Info("applied jmespath expression", "name", g.entry.Name, "results", results)
return json.Marshal(results)
}
func (a *gctxLoader) applyJMESPathJSON(jmesPath string, jsonData []byte) (interface{}, error) {
var data interface{}
err := json.Unmarshal(jsonData, &data)
if err != nil {
return nil, fmt.Errorf("failed to unmarshal JSON: %s, error: %w", string(jsonData), err)
}
return a.jp.Search(jmesPath, data)
}

View file

@ -42,11 +42,18 @@ func WithAPICallConfig(config apicall.APICallConfiguration) ContextLoaderFactory
}
}
func WithGlobalContextStore(gctxStore loaders.Store) ContextLoaderFactoryOptions {
return func(cl *contextLoader) {
cl.gctxStore = gctxStore
}
}
type contextLoader struct {
logger logr.Logger
cmResolver engineapi.ConfigmapResolver
initializers []engineapi.Initializer
apiCallConfig apicall.APICallConfiguration
gctxStore loaders.Store
}
func (l *contextLoader) Load(
@ -63,7 +70,7 @@ func (l *contextLoader) Load(
}
}
for _, entry := range contextEntries {
loader, err := l.newLoader(ctx, jp, client, rclientFactory, entry, jsonContext)
loader, err := l.newLoader(ctx, jp, client, rclientFactory, entry, jsonContext, l.gctxStore)
if err != nil {
return fmt.Errorf("failed to create deferred loader for context entry %s", entry.Name)
}
@ -89,6 +96,7 @@ func (l *contextLoader) newLoader(
rclientFactory engineapi.RegistryClientFactory,
entry kyvernov1.ContextEntry,
jsonContext enginecontext.Interface,
gctx loaders.Store,
) (enginecontext.DeferredLoader, error) {
if entry.ConfigMap != nil {
if l.cmResolver != nil {
@ -106,6 +114,14 @@ func (l *contextLoader) newLoader(
l.logger.Info("disabled loading of APICall context entry", "name", entry.Name)
return nil, nil
}
} else if entry.GlobalReference != nil {
if gctx != nil {
ldr := loaders.NewGCTXLoader(ctx, l.logger, entry, jsonContext, jp, gctx)
return enginecontext.NewDeferredLoader(entry.Name, ldr, l.logger)
} else {
l.logger.Info("disabled loading of GlobalContext context entry", "name", entry.Name)
return nil, nil
}
} else if entry.ImageRegistry != nil {
if rclientFactory != nil {
ldr := loaders.NewImageDataLoader(ctx, l.logger, entry, jsonContext, jp, rclientFactory)