Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
feat: ingress leverages pipy multi-threads feature (#50)
Browse files Browse the repository at this point in the history
* chore: bump version to v0.1.0-rc.2

Signed-off-by: Lin Yang <[email protected]>

* feat: leverage pipy multi-threads feature

Signed-off-by: Lin Yang <[email protected]>

Signed-off-by: Lin Yang <[email protected]>
  • Loading branch information
reaver-flomesh authored Jan 26, 2023
1 parent d916816 commit 2b4877b
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 29 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To install the chart with the release name `ec` run:

```bash
helm repo add ec https://ec.flomesh.io
helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-rc.1
helm install ec ec/erie-canal --namespace erie-canal --create-namespace --version=0.1.0-rc.2
```

The command deploys ErieCanal on the Kubernetes cluster using the default configuration in namespace `erie-canal` and creates the namespace if it doesn't exist. The [configuration](#configuration) section lists the parameters that can be configured during installation.
Expand All @@ -55,7 +55,7 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
helm install ec ec/erie-canal \
--namespace erie-canal \
--create-namespace \
--version=0.1.0-rc.1 \
--version=0.1.0-rc.2 \
--set ec.image.pullPolicy=Always
```

Expand All @@ -65,6 +65,6 @@ Alternatively, a YAML file that specifies the values for the parameters can be p
helm install ec ec/erie-canal \
--namespace erie-canal \
--create-namespace \
--version=0.1.0-rc.1 \
--version=0.1.0-rc.2 \
-f values-override.yaml
```
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_VERSION=0.1.0-rc.1
HELM_CHART_VERSION=0.1.0-rc.1
APP_VERSION=0.1.0-rc.2
HELM_CHART_VERSION=0.1.0-rc.2
K8S_VERSION=1.25.5
ENVTEST_K8S_VERSION=1.25
6 changes: 3 additions & 3 deletions charts/erie-canal/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: tpls
repository: file://../tpls
version: 0.1.0-rc.1
version: 0.1.0-rc.2
- name: cert-manager
repository: https://charts.jetstack.io
version: v1.7.3
digest: sha256:9a023a4d4108639d03b0182e2b235da0ec14837138ea585cf6114a227cfbd281
generated: "2023-01-26T16:05:02.395651+08:00"
digest: sha256:af0e9320fbc7b175d9e053a5f349a4843b2adbdbe614f9662c9e6e7e324034e5
generated: "2023-01-26T18:14:23.789055+08:00"
6 changes: 3 additions & 3 deletions charts/erie-canal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0-rc.1
version: 0.1.0-rc.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0-rc.1"
appVersion: "0.1.0-rc.2"

keywords:
- kubernetes
Expand All @@ -48,7 +48,7 @@ sources:

dependencies:
- name: tpls
version: 0.1.0-rc.1
version: 0.1.0-rc.2
repository: file://../tpls
- name: cert-manager
version: 1.7.3
Expand Down
6 changes: 3 additions & 3 deletions charts/namespaced-ingress/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: tpls
repository: file://../tpls
version: 0.1.0-rc.1
digest: sha256:ab186cc0c892d6a7d15640c8daf3af4dc6b9080cd09a274d4ee5c241b7759912
generated: "2023-01-26T16:05:07.157522+08:00"
version: 0.1.0-rc.2
digest: sha256:2df03b4cd70c53890a3e2de1c8f9fda6ab0a12b0ca14072d234e1acc72016eb1
generated: "2023-01-26T18:14:28.68231+08:00"
6 changes: 3 additions & 3 deletions charts/namespaced-ingress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0-rc.1
version: 0.1.0-rc.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0-rc.1"
appVersion: "0.1.0-rc.2"

dependencies:
- name: tpls
version: 0.1.0-rc.1
version: 0.1.0-rc.2
repository: file://../tpls
4 changes: 2 additions & 2 deletions charts/tpls/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0-rc.1
version: 0.1.0-rc.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0-rc.1"
appVersion: "0.1.0-rc.2"
16 changes: 9 additions & 7 deletions cmd/ingress-pipy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@ func main() {
klog.Infof("PIPY SPAWN = %d", spawn)

// start pipy
for i := int64(0); i < spawn; i++ {
klog.Infof("starting pipy(index=%d) ...", i)
startPipy(ingressRepoUrl)
}
startPipy(spawn, ingressRepoUrl)

startHealthAndReadyProbeServer()
}
Expand Down Expand Up @@ -180,12 +177,17 @@ func (i *ingress) getIngressCpuLimitsQuota() (*resource.Quantity, error) {
return nil, errors.Errorf("No container named 'ingress' in POD %q", pod.Name)
}

func startPipy(ingressRepoUrl string) {
cmd := exec.Command("pipy", "--reuse-port", ingressRepoUrl)
func startPipy(spawn int64, ingressRepoUrl string) {
args := []string{ingressRepoUrl}
if spawn > 1 {
args = append([]string{"--reuse-port", fmt.Sprintf("--threads=%d", spawn)}, args...)
}

cmd := exec.Command("pipy", args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr

klog.Infof("cmd = %#v", cmd)
klog.Infof("cmd = %v", cmd)

if err := cmd.Start(); err != nil {
klog.Fatal(err)
Expand Down
6 changes: 3 additions & 3 deletions samples/setup/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/qui

#### Install ErieCanal to Control Plane
```shell
helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-rc.1-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/
helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-rc.2-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/
```

### Cluster 1
Expand Down Expand Up @@ -73,7 +73,7 @@ Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/qui

#### Install ErieCanal to Cluster1
```shell
helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-rc.1-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/
helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-rc.2-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/
```

### Cluster 2
Expand Down Expand Up @@ -102,7 +102,7 @@ Not sure what to do next? 😅 Check out https://kind.sigs.k8s.io/docs/user/qui

#### Install ErieCanal to Cluster2
```shell
helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-rc.1-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/
helm install --namespace erie-canal --create-namespace --set ec.version=0.1.0-rc.2-dev --set ec.logLevel=5 --set ec.serviceLB.enabled=true erie-canal charts/erie-canal/
```

## Create/Update Cluster CRD yamls
Expand Down

0 comments on commit 2b4877b

Please sign in to comment.