Skip to content

Commit

Permalink
Merge branch 'release/0.46.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ljupcovangelski committed Jun 28, 2022
2 parents 3ba8113 + a464420 commit 4f7c4d1
Show file tree
Hide file tree
Showing 146 changed files with 3,946 additions and 2,796 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.45.1
0.46.0
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

git_repository(
name = "com_github_airyhq_bazel_tools",
commit = "3da34dbb12d47ac9b1759fd6b5bafce754dac679",
commit = "e0dacc284148983bac428012adef1f7e25cabe45",
remote = "https://github.com/airyhq/bazel-tools.git",
shallow_since = "1653559887 +0200",
shallow_since = "1655129212 +0200",
)

load("@com_github_airyhq_bazel_tools//:repositories.bzl", "airy_bazel_tools_dependencies", "airy_jvm_deps")
Expand Down
1 change: 0 additions & 1 deletion cli/pkg/cmd/create/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ go_library(
"version": "{STABLE_VERSION}",
},
deps = [
"//cli/pkg/cmd/config",
"//cli/pkg/console",
"//cli/pkg/helm",
"//cli/pkg/providers",
Expand Down
6 changes: 1 addition & 5 deletions cli/pkg/providers/minikube/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "minikube",
srcs = [
"hostsfile.go",
"minikube.go",
],
srcs = ["minikube.go"],
importpath = "cli/pkg/providers/minikube",
visibility = ["//visibility:public"],
deps = [
"//cli/pkg/console",
"//cli/pkg/kube",
"//cli/pkg/workspace",
"//cli/pkg/workspace/template",
"@com_github_txn2_txeh//:txeh",
"@in_gopkg_segmentio_analytics_go_v3//:analytics-go_v3",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
"@io_k8s_client_go//util/homedir:go_default_library",
Expand Down
50 changes: 0 additions & 50 deletions cli/pkg/providers/minikube/hostsfile.go

This file was deleted.

35 changes: 27 additions & 8 deletions cli/pkg/providers/minikube/minikube.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ import (
)

const (
minikube = "minikube"
profile = "airy-core"
hostAlias = "airy.core"
minikube = "minikube"
profile = "airy-core"
hostAlias = "airy.core"
dockerRuntime = " --container-runtime=containerd"
)

type provider struct {
Expand All @@ -40,7 +41,7 @@ func New(w io.Writer, analytics *console.AiryAnalytics) *provider {
func (p *provider) GetOverrides() template.Variables {
return template.Variables{
NgrokEnabled: true,
Host: "airy.core",
Host: "localhost",
}
}

Expand All @@ -49,7 +50,7 @@ func (p *provider) Provision(providerConfig map[string]string, dir workspace.Con
return kube.KubeCtx{}, err
}

if err := p.startCluster(); err != nil {
if err := p.startCluster(providerConfig); err != nil {
return kube.KubeCtx{}, err
}

Expand All @@ -68,8 +69,18 @@ func checkInstallation() error {
return err
}

func (p *provider) startCluster() error {
args := []string{"start", "--driver=virtualbox", "--cpus=4", "--memory=7168", "--extra-config=apiserver.service-node-port-range=1-65535", "--driver=virtualbox"}
func (p *provider) startCluster(providerConfig map[string]string) error {
minikubeDriver := getArg(providerConfig, "driver", "docker")
minikubeCpus := getArg(providerConfig, "cpus", "4")
minikubeMemory := getArg(providerConfig, "memory", "7168")
driverArg := "--driver=" + minikubeDriver
runtimeArg := ""
if minikubeDriver == "docker" {
runtimeArg = dockerRuntime
}
cpusArg := "--cpus=" + minikubeCpus
memoryArg := "--memory=" + minikubeMemory
args := []string{"start", "--extra-config=apiserver.service-node-port-range=1-65535", "--ports=80:80", driverArg, runtimeArg, cpusArg, memoryArg}
// Prevent minikube download progress bar from polluting the output
_, err := runGetOutput(append(args, "--download-only")...)
if err != nil {
Expand Down Expand Up @@ -138,5 +149,13 @@ func (p *provider) PostInstallation(providerConfig map[string]string, namespace
return err
}

return AddHostRecord()
return nil
}

func getArg(providerConfig map[string]string, key string, fallback string) string {
value := providerConfig[key]
if value == "" {
return fallback
}
return value
}
2 changes: 1 addition & 1 deletion docs/docs/api/endpoints/attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Expects a multi-part form upload including the original filename
**Sample curl**

```shell script
curl http://airy.core/media.upload \
curl http://localhost/media.upload \
-X POST \
-H "Content-Type: multipart/form-data" \
--form file=@test_image.jpg
Expand Down
5 changes: 0 additions & 5 deletions docs/docs/api/endpoints/client-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ The `tag_config` property in the response represents the configuration for [tags
"healthy": false,
"component": "sources-google"
},
"sources-viber-events-router": {
"enabled": false,
"healthy": false,
"component": "sources-viber"
},
"api-communication": {
"enabled": true,
"healthy": true,
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/api/httpClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The library exports an `HttpClient` class with public methods that make requests
To get started, instantiate the `HttpClient` class with your API host URL:

```
const client = new HttpClient("http://airy.core");
const client = new HttpClient("http://localhost");
```

## Call a method
Expand Down
Loading

0 comments on commit 4f7c4d1

Please sign in to comment.