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

Makefile: correctly annotate container image designated platform #124

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

paulfantom
Copy link
Collaborator

This should fix the incorrectly assigned CPU architecture in container image manifests. This is mostly a cosmetic change as we set proper CPU architecture in a main virtual manifest.

Example manifest for ppc64le before this change:

$ manifest-tool inspect quay.io/brancz/kube-rbac-proxy:v0.9.0-ppc64le
quay.io/brancz/kube-rbac-proxy:v0.9.0-ppc64le: manifest type: application/vnd.docker.distribution.manifest.v2+json
      Digest: sha256:56673d4eed7952068952ba84219ffc6693496a2e4fef57ea9bd776fb430fb6a3
Architecture: amd64
          OS: linux
    # Layers: 2
      layer 1: digest = sha256:5dea5ec2316d4a067b946b15c3c4f140b4f2ad607e73e9bc41b673ee5ebb99a3
      layer 2: digest = sha256:ea0eb814dc9409f25a39a903ad26b0e1d137f7fbfc3e61be8adf8dddb2d2ede2

After this change:

$ manifest-tool inspect quay.io/paulfantom/kube-rbac-proxy:better-arch-2021-04-28-561752e9-ppc64le
quay.io/paulfantom/kube-rbac-proxy:better-arch-2021-04-28-561752e9-ppc64le: manifest type: application/vnd.docker.distribution.manifest.v2+json
      Digest: sha256:e24c5afd19b69d4770e2780913128c217623663a718d06189db5c8313c007721
Architecture: ppc64le
          OS: linux
    # Layers: 2
      layer 1: digest = sha256:6e9c11b56e44f7f50a9868e2f481dc7f539ad6d77a71de7e9758683bf26282dc
      layer 2: digest = sha256:e6eba0c2a36ce4e43da3df5a80c41f9034eace684811f1498e9a08c43e27dcd8

As you can see Architecture field is filed correctly.

/cc @s-urbaniak

@paulfantom
Copy link
Collaborator Author

This PR is a side effect of watching discussion from kubernetes-sigs/kubebuilder#1785 :)

@paulfantom
Copy link
Collaborator Author

To make this complete, here is our main virtual manifest which already has proper architecture settings (this one is from latest release):

$ manifest-tool inspect quay.io/brancz/kube-rbac-proxy:v0.9.0
Name:   quay.io/brancz/kube-rbac-proxy:v0.9.0 (Type: application/vnd.docker.distribution.manifest.list.v2+json)
Digest: sha256:836fb4215f60a77f592a46d459067814ef306fb5409d75730c63b7572ebe1509
 * Contains 5 manifest references:
1    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
1       Digest: sha256:cc0aba33fe5083c3d23c463a84b64d1cd921434b0e530418c7e8f08855c1e28f
1  Mfst Length: 739
1     Platform:
1           -      OS: linux
1           - OS Vers: 
1           - OS Feat: []
1           -    Arch: amd64
1           - Variant: 
1           - Feature: 
1     # Layers: 2
         layer 1: digest = sha256:5dea5ec2316d4a067b946b15c3c4f140b4f2ad607e73e9bc41b673ee5ebb99a3
         layer 2: digest = sha256:0cb54490015b1c8bc1318e4eeac58f0ac7452bbf992ba7a0f982eacf407b3db6

2    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
2       Digest: sha256:b2e86f12ec25b2789fcbbd0295cf4ba578ce45d5f2ff953154dfa2e770c2a291
2  Mfst Length: 739
2     Platform:
2           -      OS: linux
2           - OS Vers: 
2           - OS Feat: []
2           -    Arch: arm
2           - Variant: 
2           - Feature: 
2     # Layers: 2
         layer 1: digest = sha256:5dea5ec2316d4a067b946b15c3c4f140b4f2ad607e73e9bc41b673ee5ebb99a3
         layer 2: digest = sha256:70b2107db14c555cf57017c4b259adedba94e732bc0e7070650a9495eaa61065

3    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
3       Digest: sha256:b5018990dab8c3d39bdd51db046d7cae0b757dc12ff7cee567c61cbb64571a64
3  Mfst Length: 739
3     Platform:
3           -      OS: linux
3           - OS Vers: 
3           - OS Feat: []
3           -    Arch: arm64
3           - Variant: 
3           - Feature: 
3     # Layers: 2
         layer 1: digest = sha256:5dea5ec2316d4a067b946b15c3c4f140b4f2ad607e73e9bc41b673ee5ebb99a3
         layer 2: digest = sha256:99cfe4c126e3c7085373b5b8ae084ef05a41eba38a717e9f54befd41aeebfd4d

4    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
4       Digest: sha256:56673d4eed7952068952ba84219ffc6693496a2e4fef57ea9bd776fb430fb6a3
4  Mfst Length: 739
4     Platform:
4           -      OS: linux
4           - OS Vers: 
4           - OS Feat: []
4           -    Arch: ppc64le
4           - Variant: 
4           - Feature: 
4     # Layers: 2
         layer 1: digest = sha256:5dea5ec2316d4a067b946b15c3c4f140b4f2ad607e73e9bc41b673ee5ebb99a3
         layer 2: digest = sha256:ea0eb814dc9409f25a39a903ad26b0e1d137f7fbfc3e61be8adf8dddb2d2ede2

5    Mfst Type: application/vnd.docker.distribution.manifest.v2+json
5       Digest: sha256:d4fc3dae5266d6b9a1662d79cac9f2c4fd78d7f4ef6494c6c650107e22e0b7a2
5  Mfst Length: 739
5     Platform:
5           -      OS: linux
5           - OS Vers: 
5           - OS Feat: []
5           -    Arch: s390x
5           - Variant: 
5           - Feature: 
5     # Layers: 2
         layer 1: digest = sha256:5dea5ec2316d4a067b946b15c3c4f140b4f2ad607e73e9bc41b673ee5ebb99a3
         layer 2: digest = sha256:e3e860aecefbe1d9d9adea667c19d69f2e35cb522707a92af349e7cfa1e08390

@s-urbaniak
Copy link
Collaborator

@paulfantom nice, thank you! lgtm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants