Comments (5)
that's wild that it's returning different digest every time instead of failing but yeah it is related to image being v1 schema [1]. im guessing v1 schema did not have a "stable" digest that was being returned, so api is doing some magic.
as you said later versions of nginx (that do not use v1 schema) are ok. (e.g. echo "image: nginx:1.17.8" | kbld -f-
results in consistent digest)
in general kbld is built on go-containerregistry library and does not support v1 schema images.
i wonder if it's worth for kbld to resolve each image twice to make sure that digest is being returned correctly, and fail if it's not.
[1] Image docker.io/library/nginx:1.7.9 uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
from kbld.
ImageOverride is your friend (https://github.com/k14s/kbld/blob/develop/docs/config.md#imageoverrides) if you want to preresolve the image to whatever you want (ie have kbld ignore it).
from kbld.
made kbld double check returned digest: 91a5653. available in 0.14.0.
from kbld.
Also of note, when performing the following command:
watch kbld -f k8s/
where the file for the nginx deployment is:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
The sha digets changes upon every iteration of watch. For example, on first iteration
resolve | final: nginx:1.7.9 -> index.docker.io/library/nginx@sha256:2d190f022cf883acd41f475f461b1e28320ebe826a9358b4d3f98fab8c9b8af3
and on second iteration
resolve | final: nginx:1.7.9 -> index.docker.io/library/nginx@sha256:25931ac2fa92c76f5b4e5465cae87c8d87c8f201e6ace9e0427c53b8da65c35d
from kbld.
Wow, very interesting. Yes, I agree, if the digest is not consistent, it would make sense to fail since the API is maybe trying to do it's best. Thanks for looking into this!
from kbld.
Related Issues (20)
- Ability to use specific platform when generating ImagesLock HOT 2
- Document how to use `kbld` with `kind`? HOT 4
- kbld appends duplicate preresolved origin HOT 3
- How to efficiently cache docker layer in CI with kbld? HOT 6
- kbld does not work with git error messages set to a different language HOT 3
- `kbld` resolve as a Go library
- Environment variable is passed with single quotes to pack and is not used HOT 2
- Is it possible to package images by themselves? HOT 5
- Ability to produce multi-arch images with Docker (image indexes/manifest lists) HOT 1
- simple-app-build-local example builds the same image twice HOT 2
- Add apko as a Builder HOT 4
- add railwayapp/nixpacks as a builder HOT 3
- [Guides] Building images with `KO` and `kbld` HOT 2
- Support jib for builds HOT 2
- kbld should be smart enough to see a Carvel tagSelection without additional work HOT 1
- release v0.36.0 HOT 1
- Keep original tag and only append sha256 digest HOT 7
- Containerd mess with kbld HOT 2
- keymatcher ignores path if name is set HOT 1
- kbld fails on `image:` field in Kyverno CRD HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kbld.