Skip to content

Commit

Permalink
Merge pull request #1 from kaytu-io/setup-plugin
Browse files Browse the repository at this point in the history
Setup plugin
  • Loading branch information
acx1729 committed Jun 7, 2024
2 parents dadd715 + 64c715b commit 419972f
Show file tree
Hide file tree
Showing 20 changed files with 928 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
.kaytu
cli
cli
.vscode
54 changes: 54 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
project_name: kaytu

release:
github:
owner: "{{ .Env.REPOSITORY_OWNER }}"
name: "{{ .Env.REPOSITORY_NAME }}"
prerelease: auto
make_latest: "{{ .Env.GORELEASER_MAKE_LATEST}}"

checksum: {}

builds:
- id: linux
binary: kaytu
ldflags:
- -s -w -X github.com/{{ .Env.REPOSITORY_OWNER }}/{{ .Env.REPOSITORY_NAME }}/pkg/version.VERSION={{ .Version }}
goos:
- linux
goarch:
- amd64
- arm64
main: ./main.go
- id: darwin
binary: kaytu
ldflags:
- -s -w -X github.com/{{ .Env.REPOSITORY_OWNER }}/{{ .Env.REPOSITORY_NAME }}/pkg/version.VERSION={{ .Version }}
goos:
- darwin
goarch:
- amd64
- arm64
main: ./main.go
- id: windows
binary: kaytu
ldflags:
- -s -w -X github.com/{{ .Env.REPOSITORY_OWNER }}/{{ .Env.REPOSITORY_NAME }}/pkg/version.VERSION={{ .Version }}
goos:
- windows
goarch:
- amd64
main: ./main.go
archives:
- id: binary
format: binary
- id: windows
format: zip
builds: [windows]
- id: linux
format: tar.gz
builds: [linux]
- id: darwin
format: tar.gz
builds: [darwin]
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# run plugin in debug mode
# (Assuming Kaytu CLI is running in debug mode AND Kaytu CLI has plugin-gcp installed)
debug:
go run main.go --server localhost:30422

# removes the dist folder, which is generated by goreleaser build(make goreleaser)
clean:
rm -rf dist

# cleans the dist directory and generates build using the goreleaser's configuration for current GOOS and GOARCH
goreleaser: clean
REPOSITORY_NAME="kaytu" REPOSITORY_OWNER="kaytu-io" goreleaser build --snapshot --single-target

# test components of plugin/gcp
testgcp:
go test -v ./plugin/gcp
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ curl -fsSL https://raw.githubusercontent.com/kaytu-io/kaytu/main/scripts/install
Download Windows (Linux, and MacOS) binary from [releases](https://github.com/kaytu-io/kaytu/releases)


### 2. Login to AWS CLI
### 2. Login to Gcloud CLI

Kaytu works with your existing AWS CLI profile (read-only access required) to gather metrics.
Kaytu works with your existing Google Cloud CLI(gcloud) configuration (read-only access required) to gather metrics.

To confirm your AWS CLI login is working correctly:
To confirm your gcloud login is configured correctly:

```
aws sts get-caller-identity
gcloud config list
```
[Click here to see how to log in to AWS CLI.](https://docs.aws.amazon.com/signin/latest/userguide/command-line-sign-in.html)
[Click here to see how to configure Gcloud.](https://cloud.google.com/sdk/docs/initializing)

We respect your privacy. Our open-source code guarantees that we never collect sensitive information like AWS credentials, IPs, tags, etc.
We respect your privacy. Our open-source code guarantees that we never collect sensitive information like GCP credentials, IPs, tags, etc.

### 3. Run Kaytu CLI

Expand Down
44 changes: 44 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module github.com/kaytu-io/plugin-gcp

go 1.21.5

require (
cloud.google.com/go/compute v1.24.0
cloud.google.com/go/monitoring v1.18.0
github.com/kaytu-io/kaytu v0.8.8
golang.org/x/oauth2 v0.17.0
google.golang.org/api v0.162.0
)

require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.0 // indirect
)
Loading

0 comments on commit 419972f

Please sign in to comment.