Code Monkey home page Code Monkey logo

crossplane-provider-oci's People

Contributors

kssaril avatar s-vo avatar sharathchandrab avatar spavlusieva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crossplane-provider-oci's Issues

[Provider] Failed with EOF

Hi after the make generate and make build the provider is in unhealty status.
With the make run all is working fine.

Normal ApplyClusterRoles 34m (x7 over 3h30m) rbac/providerrevision.pkg.crossplane.io Applied RBAC ClusterRoles
Normal BindClusterRole 34m (x10 over 3h30m) rbac/providerrevision.pkg.crossplane.io Bound system ClusterRole to provider ServiceAccount(s)
Warning ParsePackage 4m27s (x174 over 3h30m) packages/providerrevision.pkg.crossplane.io cannot initialize parser backend: failed to open package stream file: EOF

panic: cannot run goimports for apis folder: bash: line 1: goimports: command not found

OS is Ubuntu 22.04 on the Oracle cloud.

Just installing the provider, and when I run "make generate" I get the command not found error:

$ make generate
04:50:15 [ .. ] verify go modules dependencies have expected content
all modules verified
04:50:18 [ OK ] go modules dependencies verified
04:50:18 [ .. ] installing terraform linux-x86_64
Archive:  /home/ubuntu/go/1.19/src/github.com/crossplane-providers/crossplane-provider-oci/.cache/tools/linux_x86_64/tmp-terraform/terraform.zip
  inflating: /home/ubuntu/go/1.19/src/github.com/crossplane-providers/crossplane-provider-oci/.cache/tools/linux_x86_64/tmp-terraform/terraform
04:50:19 [ OK ] installing terraform linux-x86_64
04:50:19 [ .. ] generating provider schema for oracle/oci 4.120.0
04:50:25 [ OK ] generating provider schema for oracle/oci 4.120.0
Cloning into '/home/ubuntu/go/1.19/src/github.com/crossplane-providers/crossplane-provider-oci/.work/oracle/oci'...
remote: Enumerating objects: 1199, done.
remote: Counting objects: 100% (1199/1199), done.
remote: Compressing objects: 100% (811/811), done.
remote: Total 1199 (delta 3), reused 932 (delta 3), pack-reused 0
Receiving objects: 100% (1199/1199), 706.24 KiB | 3.36 MiB/s, done.
Resolving deltas: 100% (3/3), done.
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 17 (delta 2), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (17/17), 80.64 KiB | 11.52 MiB/s, done.
Resolving deltas: 100% (2/2), done.
remote: Enumerating objects: 518, done.
remote: Counting objects: 100% (518/518), done.
remote: Compressing objects: 100% (378/378), done.
remote: Total 518 (delta 168), reused 313 (delta 140), pack-reused 0
Receiving objects: 100% (518/518), 957.20 KiB | 18.77 MiB/s, done.
Resolving deltas: 100% (168/168), done.
Updating files: 100% (535/535), done.
04:50:28 [ .. ] go generate linux_amd64
go: downloading github.com/crossplane/crossplane-runtime v0.19.0-rc.0.0.20221012013934-bce61005a175
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/upbound/upjet v0.8.0-rc.0.0.20221024111721-c82119f5ef34
go: downloading k8s.io/apimachinery v0.25.0
go: downloading sigs.k8s.io/controller-runtime v0.12.1
go: downloading gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: downloading k8s.io/client-go v0.25.0
go: downloading github.com/imdario/mergo v0.3.12
go: downloading k8s.io/api v0.25.0
go: downloading github.com/spf13/afero v1.8.0
go: downloading golang.org/x/time v0.0.0-20220609170525-579cf78fd858
go: downloading github.com/go-logr/logr v1.2.3
go: downloading github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e
go: downloading sigs.k8s.io/controller-tools v0.8.0
go: downloading k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
go: downloading github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
go: downloading github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a
go: downloading github.com/evanphx/json-patch v4.12.0+incompatible
go: downloading github.com/google/go-cmp v0.5.9
go: downloading github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0
go: downloading github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/google/gofuzz v1.1.0
go: downloading github.com/go-logr/zapr v1.2.3
go: downloading go.uber.org/zap v1.19.1
go: downloading k8s.io/klog/v2 v2.70.1
go: downloading sigs.k8s.io/structured-merge-diff/v4 v4.2.3
go: downloading golang.org/x/text v0.3.7
go: downloading golang.org/x/net v0.0.0-20220722155237-a158d28d115b
go: downloading github.com/prometheus/client_golang v1.12.2
go: downloading golang.org/x/tools v0.1.12
go: downloading github.com/hashicorp/terraform-json v0.14.0
go: downloading github.com/json-iterator/go v1.1.12
go: downloading github.com/spf13/cobra v1.4.0
go: downloading github.com/hashicorp/vault/api v1.3.1
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2
go: downloading k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1
go: downloading github.com/golang/mock v1.6.0
go: downloading sigs.k8s.io/yaml v1.3.0
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
go: downloading github.com/hashicorp/terraform-plugin-go v0.14.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/hashicorp/terraform-plugin-log v0.7.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/mitchellh/go-testing-interface v1.14.1
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading go.uber.org/atomic v1.9.0
go: downloading go.uber.org/multierr v1.7.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
go: downloading golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.32.1
go: downloading k8s.io/component-base v0.25.0
go: downloading gomodules.xyz/jsonpatch/v2 v2.2.0
go: downloading github.com/dave/jennifer v1.4.1
go: downloading github.com/hashicorp/go-version v1.6.0
go: downloading github.com/zclconf/go-cty v1.11.0
go: downloading github.com/antchfx/htmlquery v1.2.4
go: downloading github.com/hashicorp/hcl/v2 v2.14.1
go: downloading github.com/tmccombs/hcl2json v0.3.3
go: downloading github.com/yuin/goldmark v1.4.13
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/fatih/camelcase v1.0.0
go: downloading github.com/iancoleman/strcase v0.2.0
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.2
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/gobuffalo/flect v0.2.3
go: downloading k8s.io/apiextensions-apiserver v0.24.0
go: downloading github.com/fatih/color v1.13.0
go: downloading github.com/cenkalti/backoff/v3 v3.0.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/hashicorp/go-retryablehttp v0.6.6
go: downloading github.com/hashicorp/go-rootcerts v1.0.2
go: downloading github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1
go: downloading github.com/hashicorp/vault/sdk v0.3.0
go: downloading gopkg.in/square/go-jose.v2 v2.5.1
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/google/gnostic v0.5.7-v3refs
go: downloading golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
go: downloading github.com/vmihailenco/msgpack v4.0.4+incompatible
go: downloading golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
go: downloading github.com/hashicorp/go-hclog v1.2.1
go: downloading github.com/hashicorp/go-uuid v1.0.3
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/vmihailenco/msgpack/v4 v4.3.12
go: downloading github.com/google/uuid v1.1.2
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.2
go: downloading github.com/prometheus/procfs v0.7.3
go: downloading google.golang.org/protobuf v1.28.1
go: downloading github.com/fsnotify/fsnotify v1.5.4
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369        
go: downloading github.com/antchfx/xpath v1.2.0
go: downloading github.com/agext/levenshtein v1.2.3
go: downloading github.com/apparentlymart/go-textseg/v13 v13.0.0
go: downloading github.com/mitchellh/go-wordwrap v1.0.1
go: downloading github.com/mattn/go-colorable v0.1.12
go: downloading github.com/mattn/go-isatty v0.0.14
go: downloading github.com/hashicorp/go-secure-stdlib/strutil v0.1.1
go: downloading github.com/hashicorp/go-sockaddr v1.0.2
go: downloading github.com/hashicorp/logutils v1.0.0
go: downloading github.com/vmihailenco/tagparser v0.1.1
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/pierrec/lz4 v2.5.2+incompatible
go: downloading github.com/hashicorp/go-plugin v1.4.4
go: downloading github.com/hashicorp/go-secure-stdlib/mlock v0.1.1
go: downloading github.com/armon/go-metrics v0.3.9
go: downloading github.com/hashicorp/golang-lru v0.5.4
go: downloading github.com/armon/go-radix v1.0.0
go: downloading github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
go: downloading golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167
go: downloading github.com/ryanuber/go-glob v1.0.0
go: downloading github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d
go: downloading github.com/oklog/run v1.0.0
go: downloading google.golang.org/grpc v1.48.0
go: downloading github.com/hashicorp/go-immutable-radix v1.3.1
go: downloading github.com/emicklei/go-restful/v3 v3.8.0
go: downloading github.com/go-openapi/swag v0.19.14
go: downloading github.com/go-openapi/jsonreference v0.19.5
go: downloading google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21
go: downloading github.com/mailru/easyjson v0.7.6
go: downloading github.com/PuerkitoBio/purell v1.1.1
go: downloading github.com/go-openapi/jsonpointer v0.19.5
go: downloading github.com/josharian/intern v1.0.0
go: downloading github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
panic: cannot run goimports for apis folder: bash: line 1: goimports: command not found
: exit status 127

goroutine 1 [running]:
github.com/upbound/upjet/pkg/pipeline.Run(0xc0017130a0, {0xc000114360, 0x50})
        /home/ubuntu/go/1.19/pkg/mod/github.com/upbound/[email protected]/pkg/pipeline/run.go:120 +0xb9a
main.main()
        /home/ubuntu/go/1.19/src/github.com/crossplane-providers/crossplane-provider-oci/cmd/generator/main.go:26 +0x74
exit status 2
apis/generate.go:25: running "go": exit status 1
generate: open /home/ubuntu/go/1.19/src/github.com/crossplane-providers/crossplane-provider-oci/apis/artifacts/v1alpha1/zz_generated.deepcopy.go: no such file or directory
04:50:43 [FAIL]
make[1]: *** [build/makelib/golang.mk:246: go.generate] Error 1
make: *** [build/makelib/common.mk:434: generate] Error 2

I'm using Go 1.19

$ go version
go version go1.19.13 linux/amd64

I have installed the goimport package as follows:

go install golang.org/x/tools/cmd/goimports@latest

Installing and Running cross plan on kubernetes is failing with unable to calculate manifest

As per the README to use OCI cross plane for k8s clusters we need to build it locally and pushing it to ocr. We are facing issues while building it locally below are the details..

Command

make build.all

Output

13:47:53 [ .. ] verify go modules dependencies have expected content
all modules verified
13:47:55 [ OK ] go modules dependencies verified
13:47:55 [WARN] the source directory is not relative to the GOPATH at /Users/prakharjoshi/go/1.19.13 or you are you using symlinks. The build might run into issue. Please move the source directory to be at /Users/prakharjoshi/go/1.19.13/src/github.com/oracle/provider-oci
13:47:56 [ .. ] go build darwin_amd64
13:47:58 [ OK ] go build darwin_amd64
13:47:59 [ .. ] go build linux_arm64
13:48:01 [ OK ] go build linux_arm64
13:48:01 [ .. ] go build linux_amd64
13:48:03 [ OK ] go build linux_amd64
13:48:04 [ OK ] Skipping xpkg build for unsupported platform darwin/amd64
13:48:04 [ OK ] Skipping image build for unsupported platform darwin/amd64
13:48:04 [ .. ] docker build build-3e74ee39/provider-oci-arm64
[+] Building 3.0s (16/16) FINISHED                                                                                                                                                                        docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                                                      0.0s
 => => transferring dockerfile: 2.17kB                                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/alpine:3.16.2                                                                                                                                                          2.4s
 => [auth] library/alpine:pull token for registry-1.docker.io                                                                                                                                                             0.0s
 => [internal] load .dockerignore                                                                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                                                                           0.0s
 => [1/8] FROM docker.io/library/alpine:3.16.2@sha256:65a2763f593ae85fab3b5406dc9e80f744ec5b449f269b699b5efd37a07ad32e                                                                                                    0.0s
 => [internal] load build context                                                                                                                                                                                         0.5s
 => => transferring context: 55.20MB                                                                                                                                                                                      0.5s
 => https://releases.hashicorp.com/terraform-provider-oci/4.120.0/terraform-provider-oci_4.120.0_linux_arm64.zip                                                                                                          0.2s
 => https://releases.hashicorp.com/terraform/1.4.6/terraform_1.4.6_linux_arm64.zip                                                                                                                                        0.2s
 => CACHED [2/8] RUN apk --no-cache add ca-certificates bash                                                                                                                                                              0.0s
 => CACHED [3/8] ADD bin/linux_arm64/provider /usr/local/bin/provider                                                                                                                                                     0.0s
 => CACHED [4/8] RUN mkdir -p /terraform/provider-mirror/registry.terraform.io/oracle/oci/4.120.0/linux_arm64                                                                                                             0.0s
 => CACHED [5/8] ADD https://releases.hashicorp.com/terraform/1.4.6/terraform_1.4.6_linux_arm64.zip /tmp                                                                                                                  0.0s
 => CACHED [6/8] ADD https://releases.hashicorp.com/terraform-provider-oci/4.120.0/terraform-provider-oci_4.120.0_linux_arm64.zip /tmp                                                                                    0.0s
 => CACHED [7/8] ADD terraformrc.hcl /terraform/.terraformrc                                                                                                                                                              0.0s
 => CACHED [8/8] RUN unzip /tmp/terraform_1.4.6_linux_arm64.zip -d /usr/local/bin   && chmod +x /usr/local/bin/terraform   && rm /tmp/terraform_1.4.6_linux_arm64.zip   && unzip /tmp/terraform-provider-oci_4.120.0_lin  0.0s
 => exporting to image                                                                                                                                                                                                    0.0s
 => => exporting layers                                                                                                                                                                                                   0.0s
 => => writing image sha256:002e96a95a5ebada414287c82819e5fa768819362b130715065e5e926e714fe4                                                                                                                              0.0s
 => => naming to docker.io/build-3e74ee39/provider-oci-arm64                                                                                                                                                              0.0s
13:48:10 [ OK ] docker build build-3e74ee39/provider-oci-arm64
13:48:10 [ .. ] Building package provider-oci-0.0.1-alphav1.4.g085df4e.xpkg for linux_arm64
up: error: unable to calculate manifest: blob sha256:913d2d8d0afe24c4038a10fa3dd18763bb5e8ab8839e82fa86699dd4710121c9 not found
13:48:12 [FAIL]
make[2]: *** [xpkg.build.provider-oci] Error 1
make[1]: *** [do.build.artifacts.linux_arm64] Error 2
make: *** [build.all] Error 2

Error When Build Provider on amd64 arch

When execute the command make build.all on a linux arch amd64 machine it tries to build the cross container pipeline.

19:47:33 [ OK ] go build linux_amd64
19:47:33 [ OK ] Skipping image build for unsupported platform darwin/amd64
19:47:33 [ OK ] Skipping xpkg build for unsupported platform darwin/amd64
19:47:33 [ .. ] docker build build-a6fbffd1/provider-oci-arm64
[+] Building 9.5s (8/14)                                                                                                docker:default
 => [internal] load build definition from Dockerfile                                                                              0.0s
 => => transferring dockerfile: 2.19kB                                                                                            0.0s
 => [internal] load .dockerignore                                                                                                 0.0s
 => => transferring context: 2B                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/alpine:3.16.2                                                                  1.6s
 => [1/8] FROM docker.io/library/alpine:3.16.2@sha256:65a2763f593ae85fab3b5406dc9e80f744ec5b449f269b699b5efd37a07ad32e            0.8s
 => => resolve docker.io/library/alpine:3.16.2@sha256:65a2763f593ae85fab3b5406dc9e80f744ec5b449f269b699b5efd37a07ad32e            0.0s
 => => sha256:65a2763f593ae85fab3b5406dc9e80f744ec5b449f269b699b5efd37a07ad32e 1.64kB / 1.64kB                                    0.0s
 => => sha256:922df7f9352943c7447dbc07c53563e6971fce3100d2ef2b8368b1ba9aac605d 528B / 528B                                        0.0s
 => => sha256:16d65c69c39d32f07bf75fdecca40ed6486e0cd37890fc9e5ac37f316b4f78c4 1.49kB / 1.49kB                                    0.0s
 => => sha256:9b18e9b68314027565b90ff6189d65942c0f7986da80df008b8431276885218e 2.71MB / 2.71MB                                    0.3s
 => => extracting sha256:9b18e9b68314027565b90ff6189d65942c0f7986da80df008b8431276885218e                                         0.4s
 => https://releases.hashicorp.com/terraform/1.4.6/terraform_1.4.6_linux_arm64.zip                                                0.5s
 => [internal] load build context                                                                                                 1.1s
 => => transferring context: 55.20MB                                                                                              1.1s
 => https://releases.hashicorp.com/terraform-provider-oci/4.120.0/terraform-provider-oci_4.120.0_linux_arm64.zip                  0.8s
 => ERROR [2/8] RUN apk --no-cache add ca-certificates bash                                                                       6.9s
------
 > [2/8] RUN apk --no-cache add ca-certificates bash:
0.566 exec /bin/sh: exec format error
------
ERROR: failed to solve: executor failed running [/bin/sh -c apk --no-cache add ca-certificates bash]: exit code: 1
19:47:43 [FAIL]
make[4]: *** [Makefile:28: img.build.shared] Error 1
make[3]: *** [Makefile:16: img.build] Error 2
make[2]: *** [build/makelib/imagelight.mk:114: do.build.image.provider-oci] Error 2
make[1]: *** [build/makelib/common.mk:337: do.build.artifacts.linux_arm64] Error 2
make: *** [build/makelib/common.mk:347: build.all] Error 2

It should just build for linux/amd64 or display a error message that you should only deploy on linux/arm64.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.