Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
34 changes: 34 additions & 0 deletions kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,43 @@ gcloud beta container clusters delete edge-micro

```

### Build & Release


In order to build the binaries locally, you need to install these two components

- go (Version - go1.13.8 + )
- goreleaser (Version - 0.127.0 + )

Once these are installed, there are many choices to build and release edgemicroctl. On your ./kubernetes/edgemicroctl folder :


- Build locally with go for testing.

```
go build
```
This will create edgemicroctl binary under the same folder.


- Build locally with goreleaser

```
goreleaser --snapshot --skip-publish --rm-dist
```
This will create the snapshot release under ./kubernetes/edgemicroctl/dist folder.


- Create github release:
```
export GITHUB_TOKEN=<<your github api token>>
goreleaser
```

## References
It uses istio-sidecar-proxy-injector and istio-init docker images from istio project.


## License

Apache 2.0 - See [LICENSE](LICENSE) for more information.
50 changes: 50 additions & 0 deletions kubernetes/edgemicroctl/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

builds:
- main: main.go
binary: bin/edgemicroctl
goos:
- windows
- darwin
- linux
goarch:
- amd64
- 386
archives:
- format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: true
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- samples/**/*
- install/**/*
release:
draft: true
prerelease: true
nfpms:
# note that this is an array of nfpm configs
-
file_name_template: "{{ .ProjectName }}_{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
bindir: bin
38 changes: 0 additions & 38 deletions kubernetes/edgemicroctl/.goreleaser.yml

This file was deleted.

32 changes: 32 additions & 0 deletions kubernetes/edgemicroctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,37 @@ To deploy Edge Microgateway as a Pod,
3. Run `edgemicroctl` as Usage 2 to generate a kubernetes deployment specification


### Build & Release

In order to build the binaries locally, you need to install these two components

- go (Version - go1.13.8 + )
- goreleaser (Version - 0.127.0 + )

Once these are installed, there are many choices to build and release edgemicroctl. On your ./kubernetes/edgemicroctl folder :

- Build locally with go for testing.

```
go build
```
This will create edgemicroctl binary under the same folder.


- Build locally with goreleaser

```
goreleaser --snapshot --skip-publish --rm-dist
```
This will create the snapshot release under ./kubernetes/edgemicroctl/dist folder.


- Create github release:
```
export GITHUB_TOKEN=<<your github api token>>
goreleaser
```


### TODO
* Automated testing
110 changes: 0 additions & 110 deletions kubernetes/edgemicroctl/glide.lock

This file was deleted.

22 changes: 0 additions & 22 deletions kubernetes/edgemicroctl/glide.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions kubernetes/edgemicroctl/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module github.com/apigee-internal/microgateway/kubernetes/edgemicroctl

go 1.13

require (
github.com/ghodss/yaml v1.0.0
github.com/gogo/googleapis v1.4.0
github.com/golang/protobuf v1.4.2
github.com/google/go-cmp v0.5.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/hashicorp/go-multierror v1.1.0
github.com/prometheus/client_golang v1.7.0
github.com/spf13/cobra v1.0.0
go.uber.org/zap v1.15.0
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790
google.golang.org/grpc v1.29.1
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
k8s.io/api v0.18.4
k8s.io/apimachinery v0.18.4
k8s.io/client-go v11.0.0+incompatible
)
Loading