Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add imageIndex field to imageData (cherry-pick #1433) #1436

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content/en/docs/writing-policies/external-data-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ the output `imageData` variable will have a structure which looks like the follo
"registry": "ghcr.io",
"repository": "kyverno/kyverno",
"identifier": "latest",
"imageIndex": imageIndex,
"manifest": manifest,
"configData": config,
}
Expand All @@ -771,7 +772,7 @@ The `imageData` variable represents a "normalized" view of an image after any re
```
{{% /alert %}}

The `manifest` and `config` keys contain the output from `crane manifest <image>` and `crane config <image>` respectively.
The `imageIndex`, `manifest` and `config` keys contain the output from `crane manifest <image>` and `crane config <image>` respectively.

For example, one could inspect the labels, entrypoint, volumes, history, layers, etc of a given image. Using the [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) tool, show the config of the `ghcr.io/kyverno/kyverno:latest` image:

Expand Down