Skip to content
New issue

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

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

Already on GitHub? # to your account

Use bundled packages and update CI to dual publish to DockerHub and Upbound Marketplace #350

Merged
merged 12 commits into from
Sep 7, 2022

Conversation

hasheddan
Copy link
Member

@hasheddan hasheddan commented Sep 2, 2022

Description of your changes

Updates to go1.18 and fixes linter errors that came along with the
golangci-lint bump.

Signed-off-by: hasheddan georgedanielmangum@gmail.com

Drops the spec from the crossplane.yaml as bundled images will now be
used for provider-azure.

Signed-off-by: hasheddan georgedanielmangum@gmail.com

Updates provider controller image building to use imagelight for
enhanced flexibility. Publish and promotion is deferred to xpkg
machinery.

Signed-off-by: hasheddan georgedanielmangum@gmail.com

Updates package base image to use distroless static nonroot instead of
defaulting to outdated alpine image.

Signed-off-by: hasheddan georgedanielmangum@gmail.com

Updates integration tests to consume latest stabled version of
Crossplane.

Signed-off-by: hasheddan georgedanielmangum@gmail.com

Fixes #327

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

🤖 (stack-azure) make -j2 build.all
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
17:24:18 [ .. ] verify go modules dependencies have expected content
all modules verified
17:24:24 [ OK ] go modules dependencies verified
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
17:24:25 [ .. ] go build linux_arm64
17:24:25 [ .. ] go build linux_amd64
17:24:26 [ OK ] go build linux_amd64
17:24:26 [ OK ] go build linux_arm64
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'
17:24:27 [ .. ] docker build build-3000312f/provider-azure-amd64
17:24:27 [ .. ] docker build build-3000312f/provider-azure-arm64
[+] Building 0.0s (0/2)                                                                                                     
[+] Building 0.1s (3/3)                                                                                                     
 => [internal] load .dockerignore                                                                                      0.0s
 => => transferring context: 2B                                                                                        0.0s
[+] Building 0.9s (4/6)                                                                                                     
 => [internal] load .dockerignore                                                                                      0.0s
 => => transferring context: 2B                                                                                        0.0s 
 => [internal] load metadata for gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e  0.0s
 => [1/2] FROM gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b        0.0s
 => => resolve gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b        0.0s
[+] Building 1.2s (6/7)                                                                                                     
 => [internal] load build definition from Dockerfile                                                                   0.1s
 => => transferring dockerfile: 303B                                                                                   0.0s
 => [internal] load .dockerignore                                                                                      0.1s
 => => transferring context: 2B                                                                                        0.0s
 => [internal] load metadata for gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e  0.0s
[+] Building 1.4s (8/8) FINISHED                                                                                            
 => [internal] load .dockerignore                                                                                      0.0s
 => => transferring context: 2B                                                                                        0.0s
[+] Building 1.5s (8/8) FINISHED                                                                                            
 => [internal] load build definition from Dockerfile                                                                   0.1s
 => => transferring dockerfile: 303B                                                                                   0.0s
 => [internal] load .dockerignore                                                                                      0.1s
 => => transferring context: 2B                                                                                        0.0s
 => [internal] load metadata for gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e  0.0s
 => [1/2] FROM gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b        0.0s
 => => resolve gcr.io/distroless/static@sha256:1f580b0a1922c3e54ae15b0758b5747b260bd99d39d40c2edb3e7f6e2452298b        0.0s
 => [internal] load build context                                                                                      1.0s
 => => transferring context: 44.07MB                                                                                   1.0s
 => CACHED [2/2] ADD bin/linux_amd64/provider /usr/local/bin/crossplane-azure-provider                                 0.0s
 => exporting to oci image format                                                                                      0.3s
 => => exporting layers                                                                                                0.0s
 => => exporting manifest sha256:b2ece741f520dd7937a785a07b0d10b940d3d532af5818392dc1a456c9a62ae1                      0.0s
 => => exporting config sha256:e1cfc4202493aaed3971863f2010b7118d42b37534b14b9a2188ac0b7e5d02b3                        0.0s
 => => sending tarball                                                                                                 0.3s
 => importing to docker                                                                                                0.0s
17:24:29 [ OK ] docker build build-3000312f/provider-azure-amd64
17:24:29 [ .. ] Building package provider-azure-v0.20.0-rc.0.15.g16eb8a0.xpkg for linux_amd64
xpkg saved to /home/dan/code/github.com/crossplane/stack-azure/_output/xpkg/linux_arm64/provider-azure-v0.20.0-rc.0.15.g16eb8a0.xpkg
17:24:33 [ OK ] Built package provider-azure-v0.20.0-rc.0.15.g16eb8a0.xpkg for linux_arm64
xpkg saved to /home/dan/code/github.com/crossplane/stack-azure/_output/xpkg/linux_amd64/provider-azure-v0.20.0-rc.0.15.g16eb8a0.xpkg
17:24:33 [ OK ] Built package provider-azure-v0.20.0-rc.0.15.g16eb8a0.xpkg for linux_amd64
Makefile:105: warning: overriding recipe for target 'reviewable'
build/makelib/common.mk:430: warning: ignoring old recipe for target 'reviewable'
Makefile:109: warning: overriding recipe for target 'check-diff'
build/makelib/common.mk:436: warning: ignoring old recipe for target 'check-diff'

Updates build submodule to latest to consume xpkg.mk.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Updates to go1.18 and fixes linter errors that came along with the
golangci-lint bump.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Drops all deprecated annotations from the provider-aws crossplane.yaml.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Drops the spec from the crossplane.yaml as bundled images will now be
used for provider-azure.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Renames the single controller image to provider-azure.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Updates package base image to use distroless static nonroot instead of
defaulting to outdated alpine image.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Updates provider controller image building to use imagelight for
enhanced flexibility. Publish and promotion is deferred to xpkg
machinery.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Adds the xpkg machinery to Makefile and updates other components to be
compatible.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Forces image to be built before building xpkg, ensuring that the image
is in the daemon before we try to use it as base.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Updates integration tests to consume the xpkg image that is built.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Updates integration tests to consume latest stabled version of
Crossplane.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Adds a login step to publish artifacts workflow for xpkg.upbound.io.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Copy link
Member

@negz negz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as crossplane-contrib/provider-gcp#456 (comment), but otherwise this LGTM.

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

Successfully merging this pull request may close these issues.

Updating azure sdk version
2 participants