Created
May 2, 2024 19:05
-
-
Save padlar/3379a0600413a8219c14e67736beae7c to your computer and use it in GitHub Desktop.
crossplane context-aware docker cli demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functions.yaml tries to pull an image from private harbor registry. My local docker pull works just fine. The PR patches the docker-client to be made context-aware. | |
crossplane/c/private-registry on issue-5581 [$!?] took 2s | |
❯ cat functions.yaml | |
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
│ File: functions.yaml | |
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
1 │ --- | |
2 │ apiVersion: pkg.crossplane.io/v1beta1 | |
3 │ kind: Function | |
4 │ metadata: | |
5 │ name: function-patch-and-transform | |
6 │ spec: | |
7 │ package: remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4 | |
───────┴─────────────────────────────────────────────────────────────────────────────────────────── | |
*Problem* | |
crossplane/c/private-registry on issue-5581 [$!?] | |
❯ crossplane beta render --verbose xr.yaml composition.yaml functions.yaml | |
2024-05-02T20:59:41+02:00 DEBUG Starting Docker container runtime {"image": "remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4"} | |
2024-05-02T20:59:41+02:00 DEBUG Creating Docker container {"image": "remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4", "address": "127.0.0.1:58489"} | |
2024-05-02T20:59:41+02:00 DEBUG Image not found, pulling {"image": "remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4"} | |
ccrossplane: error: cannot render composite resource: cannot start Function "function-patch-and-transform": cannot pull Docker image "remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4": Error response from daemon: unauthorized: unauthorized to access repository: crossplane-system/function-patch-and-tranform, action: pull: unauthorized to access repository: crossplane-system/function-patch-and-tranform, action: pull | |
crossplane/c/private-registry on issue-5581 [$!?] | |
❯ crossplane --version | |
v1.15.2 | |
*After Fix* | |
crossplane/c/private-registry on issue-5581 [$!?] | |
❯ ../../cmd/crank/crank beta render --verbose xr.yaml composition.yaml functions.yaml | |
2024-05-02T20:59:52+02:00 DEBUG Starting Docker container runtime {"image": "remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4"} | |
2024-05-02T20:59:52+02:00 DEBUG Creating Docker container {"image": "remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4", "address": "127.0.0.1:58494"} | |
2024-05-02T20:59:52+02:00 DEBUG Image not found, pulling {"image": "remote-registry.private.no/crossplane-system/function-patch-and-tranform:v0.1.4"} | |
--- | |
apiVersion: example.crossplane.io/v1 | |
kind: XBucket | |
metadata: | |
name: example-render | |
status: | |
conditions: | |
- lastTransitionTime: "2024-01-01T00:00:00Z" | |
message: 'Unready resources: storage-bucket' | |
reason: Creating | |
status: "False" | |
type: Ready | |
--- | |
apiVersion: s3.aws.upbound.io/v1beta1 | |
kind: Bucket | |
metadata: | |
annotations: | |
crossplane.io/composition-resource-name: storage-bucket | |
generateName: example-render- | |
labels: | |
crossplane.io/composite: example-render | |
ownerReferences: | |
- apiVersion: example.crossplane.io/v1 | |
blockOwnerDeletion: true | |
controller: true | |
kind: XBucket | |
name: example-render | |
uid: "" | |
spec: | |
forProvider: | |
region: us-east-2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment