Skip to content

Commit

Permalink
Merge branch 'master' into aabidsofi/k8s-switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
aabidsofi19 authored Sep 6, 2023
2 parents 152ff27 + 56eb7b7 commit 1e0e43b
Show file tree
Hide file tree
Showing 32 changed files with 494 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cncf-playground-deploy-meshery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
cd meshery
git pull
docker compose -f install/playground/docker/docker-compose.yaml pull
docker compose -f install/playground/docker/docker-compose.yaml up -d
docker compose -f install/playground/docker/docker-compose.yaml up -d --remove-orphans
# steps:
# - uses: azure/setup-kubectl@v3
# - name: Extract kubeconfig
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/error-codes-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,20 @@ jobs:
- name: Run Utility For Meshery Server
run: |
~/errorutil update -d . -i ./server/helpers -o ./server/helpers --skip-dirs mesheryctl
output=$(~/errorutil -d . analyze -i ./server/helpers -o ./server/helpers --skip-dirs mesheryctl | wc -c)
if [ "$output" -ne 0 ]; then
exit 1
fi
echo '{ "errors_export": "" }' | jq --slurpfile export ./server/helpers/errorutil_errors_export.json '.errors_export = $export[0]' > ./docs/_data/errorref/meshery-server_errors_export.json
- name: Run Utility For Mesheryctl
run: |
cd ./mesheryctl
~/errorutil update -d . -i ./helpers -o ./helpers
output=$(~/errorutil -d . analyze -i ./helpers -o ./helpers | wc -c)
if [ "$output" -ne 0 ]; then
exit 1
fi
echo '{ "errors_export": "" }' | jq --slurpfile export ../server/helpers/errorutil_errors_export.json '.errors_export = $export[0]' > ../docs/_data/errorref/mesheryctl_errors_export.json
- name: Commit changes
Expand Down
2 changes: 1 addition & 1 deletion docs/_data/discuss/meshery.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_data/discuss/mesheryctl.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions docs/_integrations/istio/1.19.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
component: 1.19.0
integrations:
- authorizationpolicy.Istio
- destinationrule.Istio
- envoyfilter.Istio
- gateway.Istio
- peerauthentication.Istio
- proxyconfig.Istio
- requestauthentication.Istio
- serviceentry.Istio
- sidecar.Istio
- telemetry.Istio
- virtualservice.Istio
- wasmplugin.Istio
- workloadentry.Istio
- workloadgroup.Istio
---
38 changes: 38 additions & 0 deletions docs/_releases/v0.6.135.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: release
date: 2023-09-05
tag: v0.6.135
---

## What's New
## 🔤 General
- REST APIs for events. @MUzairS15 (#8655)
- Bump Meshkit version from 0.6.63 to 0.6.64 @Yashsharma1911 (#8658)

## ⌨️ Meshery CLI

- [mesheryctl] handling default port in mesheryctl @suhail34 (#8579)

## 🖥 Meshery UI

- Update package.json @MUzairS15 (#8651)
- Bump uuid from 8.3.2 to 9.0.0 in /ui @dependabot (#8532)
- [Events] Notification / Operation Center @MUzairS15 (#8644)
- [UI] Fix credential Icon color in settings @Yashsharma1911 (#8646)

## 🧰 Maintenance

- [CI] Playground: --remove-orphans in Meshery deployments @leecalcote (#8652)
- Bump uuid from 8.3.2 to 9.0.0 in /ui @dependabot (#8532)
- Bump gorm.io/gorm from 1.25.3 to 1.25.4 @dependabot (#8630)
- [CI] Meskit Error Utility Workflow Does not fails for duplicacy @suhail34 (#8649)
- Update MeshModel Issue Template @Boombag0607 (#8637)

## 📖 Documentation

- [Docs] Added how to use token for Meshery API in postman @Freedisch (#8122)

## 👨🏽‍💻 Contributors

Thank you to our contributors for making this release possible:
@Boombag0607, @Freedisch, @MUzairS15, @Yashsharma1911, @dependabot, @leecalcote and @suhail34
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/jinzhu/copier v0.3.5
github.com/layer5io/gowrk2 v0.6.1
github.com/layer5io/meshery-operator v0.6.10
github.com/layer5io/meshkit v0.6.63
github.com/layer5io/meshkit v0.6.64
github.com/layer5io/meshsync v0.6.14
github.com/layer5io/nighthawk-go v1.0.6
github.com/layer5io/service-mesh-performance v0.6.1
Expand Down Expand Up @@ -68,7 +68,7 @@ require (
google.golang.org/grpc v1.57.0
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v2 v2.4.0
gorm.io/gorm v1.25.3
gorm.io/gorm v1.25.4
k8s.io/api v0.26.1
k8s.io/apiextensions-apiserver v0.26.1
k8s.io/apimachinery v0.26.1
Expand Down Expand Up @@ -252,7 +252,7 @@ require (
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.12.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1547,8 +1547,8 @@ github.com/layer5io/gowrk2 v0.6.1 h1:0eBj7VFYJ+QTMJt7i3PzxDJTEL+X+zWx4OP+lARWIoI
github.com/layer5io/gowrk2 v0.6.1/go.mod h1:ugxQ23+HwQ8dmZYJd1LScw/TLKbdgfN6OOtg6iYMljg=
github.com/layer5io/meshery-operator v0.6.10 h1:4YiznhS4AO/bA+uHBxCYp9Fc9w9LU2sopE3oJBdRU/Y=
github.com/layer5io/meshery-operator v0.6.10/go.mod h1:RX9yjSvJS0KAdWOb/zRfYU/mSOVP1ySuUUlxHhrms1M=
github.com/layer5io/meshkit v0.6.63 h1:z3kqjd5YBr7yMqFgeBFdjliqjakDqE7djuDWMIK0vGk=
github.com/layer5io/meshkit v0.6.63/go.mod h1:+nN6krd+axNFAsXjZ+KH9NJcnUcT4Tq+gyCUZ/4Gcmw=
github.com/layer5io/meshkit v0.6.64 h1:VvlIrPb0yeHVSU9D3qyEJtPSUI06XZ9FKn+eR+92zsw=
github.com/layer5io/meshkit v0.6.64/go.mod h1:wYknaN9JfSjpT0BqaYVJC7KPSbQtD51Uw3oGUyxGVxM=
github.com/layer5io/meshsync v0.6.14 h1:y5Fbq76WGYWjdzYFNOD1YgowP/0m/NxPZ/hA1JGJ3RA=
github.com/layer5io/meshsync v0.6.14/go.mod h1:21VTdYITKXpBSb+kj2CcR3T0KbrcLJwhiewQRKTqvUM=
github.com/layer5io/nighthawk-go v1.0.6 h1:YMCw65FvwpbByX+M7McdNYRNDW9oOw3GQaXJ1RMDdGw=
Expand Down Expand Up @@ -2499,8 +2499,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand Down Expand Up @@ -2976,8 +2976,8 @@ gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc=
gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI=
gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
gorm.io/gorm v1.24.2/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
gorm.io/gorm v1.25.3 h1:zi4rHZj1anhZS2EuEODMhDisGy+Daq9jtPrNGgbQYD8=
gorm.io/gorm v1.25.3/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw=
gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
Expand Down
59 changes: 7 additions & 52 deletions install/playground/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
services:
meshery:
image: layer5/meshery:playground-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
environment:
- PROVIDER_BASE_URLS=https://meshery.layer5.io
- ADAPTER_URLS=meshery-istio:10000 meshery-linkerd:10001 meshery-consul:10002 meshery-nsm:10004 meshery-app-mesh:10005 meshery-kuma:10007 meshery-traefik-mesh:10006 meshery-nginx-sm:10010 meshery-cilium:10012
# - ADAPTER_URLS=meshery-istio:10000 meshery-linkerd:10001 meshery-consul:10002 meshery-nsm:10004 meshery-app-mesh:10005 meshery-kuma:10007 meshery-traefik-mesh:10006 meshery-nginx-sm:10010 meshery-cilium:10012
- EVENT=mesheryLocal
- PORT=9081
- MESHERY_SERVER_CALLBACK_URL=https://playground.meshery.io/api/user/token
Expand All @@ -30,76 +28,33 @@ services:
# restart: always
meshery-istio:
image: layer5/meshery-istio:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10000:10000
restart: always
meshery-linkerd:
image: layer5/meshery-linkerd:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10001:10001
restart: always
meshery-consul:
image: layer5/meshery-consul:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10002:10002
restart: always
meshery-nsm:
image: layer5/meshery-nsm:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10004:10004
restart: always
meshery-app-mesh:
image: layer5/meshery-app-mesh:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10005:10005
restart: always
meshery-traefik-mesh:
image: layer5/meshery-traefik-mesh:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10006:10006
restart: always
meshery-kuma:
image: layer5/meshery-kuma:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10007:10007
restart: always
meshery-nginx-sm:
image: layer5/meshery-nginx-sm:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10010:10010
restart: always
meshery-cilium:
image: layer5/meshery-cilium:stable-latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
ports:
- 10012:10012
restart: always
# nighthawk-lg:
# image: envoyproxy/nighthawk-dev:latest
watchtower:
image: containrrr/watchtower
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --label-enable --interval 21600
restart: always
# meshery-cilium:
# image: layer5/meshery-cilium:stable-latest
# ports:
# - 10012:10012
# restart: always

version: "3"
version: "3"
2 changes: 1 addition & 1 deletion mesheryctl/internal/cli/root/app/offboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mesheryctl app offboard -f [filepath]
app := ""
isID := false
if len(args) > 0 {
app, isID, err = utils.ValidId(args[0], "application")
app, isID, err = utils.ValidId(mctlCfg.GetBaseMesheryURL(), args[0], "application")
if err != nil {
utils.Log.Error(err)
return nil
Expand Down
2 changes: 1 addition & 1 deletion mesheryctl/internal/cli/root/app/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ mesheryctl app view --all
if viewAllFlag {
return errors.New("-a cannot be used when [application-name|application-id] is specified")
}
applicationID, isID, err = utils.ValidId(args[0], "application")
applicationID, isID, err = utils.ValidId(mctlCfg.GetBaseMesheryURL(), args[0], "application")
if err != nil {
utils.Log.Error(err)
return nil
Expand Down
4 changes: 2 additions & 2 deletions mesheryctl/internal/cli/root/filter/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ mesheryctl filter delete [filter-name | ID]
var filterName string
var isValidName bool

filterID, isValidID, err = utils.ValidId(args[0], "filter")
filterID, isValidID, err = utils.ValidId(mctlCfg.GetBaseMesheryURL(), args[0], "filter")
if err != nil {
utils.Log.Error(err)
return err
}

if !isValidID {
filterName, filterID, isValidName, err = utils.ValidName(args[0], "filter")
filterName, filterID, isValidName, err = utils.ValidName(mctlCfg.GetBaseMesheryURL(), args[0], "filter")
if err != nil {
utils.Log.Error(err)
return err
Expand Down
2 changes: 1 addition & 1 deletion mesheryctl/internal/cli/root/filter/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mesheryctl filter view --all
if viewAllFlag {
return errors.New(utils.FilterViewError("--all cannot be used when filter name or ID is specified\nUse 'mesheryctl filter view --help' to display usage guide\n"))
}
filter, isID, err = utils.ValidId(args[0], "filter")
filter, isID, err = utils.ValidId(mctlCfg.GetBaseMesheryURL(), args[0], "filter")
if err != nil {
utils.Log.Error(err)
return nil
Expand Down
2 changes: 1 addition & 1 deletion mesheryctl/internal/cli/root/pattern/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ mesheryctl pattern delete [file | URL]
pattern := ""
isID := false
if len(args) > 0 {
pattern, isID, err = utils.ValidId(args[0], "pattern")
pattern, isID, err = utils.ValidId(mctlCfg.GetBaseMesheryURL(), args[0], "pattern")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion mesheryctl/internal/cli/root/pattern/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mesheryctl pattern view [pattern-name | ID]
if viewAllFlag {
return errors.New("-a cannot be used when [pattern-name|pattern-id] is specified")
}
pattern, isID, err = utils.ValidId(args[0], "pattern")
pattern, isID, err = utils.ValidId(mctlCfg.GetBaseMesheryURL(), args[0], "pattern")
if err != nil {
utils.Log.Error(err)
return nil
Expand Down
20 changes: 10 additions & 10 deletions mesheryctl/pkg/utils/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,8 @@ func StringInSlice(str string, slice []string) bool {
}

// GetID returns a array of IDs from meshery server endpoint /api/{configurations}
func GetID(configuration string) ([]string, error) {
url := MesheryEndpoint + "/api/" + configuration + "?page_size=10000"
func GetID(mesheryServerUrl, configuration string) ([]string, error) {
url := mesheryServerUrl + "/api/" + configuration + "?page_size=10000"
configType := configuration + "s"
var idList []string
req, err := NewRequest("GET", url, nil)
Expand Down Expand Up @@ -516,8 +516,8 @@ func GetID(configuration string) ([]string, error) {
}

// GetName returns a of name:id from meshery server endpoint /api/{configurations}
func GetName(configuration string) (map[string]string, error) {
url := MesheryEndpoint + "/api/" + configuration + "?page_size=10000"
func GetName(mesheryServerUrl, configuration string) (map[string]string, error) {
url := mesheryServerUrl + "/api/" + configuration + "?page_size=10000"
configType := configuration + "s"
nameIdMap := make(map[string]string)
req, err := NewRequest("GET", url, nil)
Expand Down Expand Up @@ -552,8 +552,8 @@ func GetName(configuration string) (map[string]string, error) {
}

// Delete configuration from meshery server endpoint /api/{configurations}/{id}
func DeleteConfiguration(baseUrl, id, configuration string) error {
url := baseUrl + "/api/" + configuration + "/" + id
func DeleteConfiguration(mesheryServerUrl, id, configuration string) error {
url := mesheryServerUrl + "/api/" + configuration + "/" + id
req, err := NewRequest("DELETE", url, nil)
if err != nil {
return err
Expand All @@ -567,9 +567,9 @@ func DeleteConfiguration(baseUrl, id, configuration string) error {
}

// ValidId - Check if args is a valid ID or a valid ID prefix and returns the full ID
func ValidId(args string, configuration string) (string, bool, error) {
func ValidId(mesheryServerUrl, args string, configuration string) (string, bool, error) {
isID := false
configID, err := GetID(configuration)
configID, err := GetID(mesheryServerUrl, configuration)
if err == nil {
for _, id := range configID {
if strings.HasPrefix(id, args) {
Expand All @@ -587,9 +587,9 @@ func ValidId(args string, configuration string) (string, bool, error) {
}

// ValidId - Check if args is a valid name or a valid name prefix and returns the full name and ID
func ValidName(args string, configuration string) (string, string, bool, error) {
func ValidName(mesheryServerUrl, args string, configuration string) (string, string, bool, error) {
isName := false
nameIdMap, err := GetName(configuration)
nameIdMap, err := GetName(mesheryServerUrl, configuration)

if err != nil {
return "", "", false, err
Expand Down
2 changes: 1 addition & 1 deletion server/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func main() {
PrometheusClientForQuery: models.NewPrometheusClientWithHTTPClient(&http.Client{Timeout: time.Second}),

ConfigurationChannel: models.NewConfigurationHelper(),
EventBroadcaster: models.NewSignal(),
EventBroadcaster: models.NewEventBroadcaster(),
DashboardK8sResourcesChan: models.NewDashboardK8sResourcesHelper(),
MeshModelSummaryChannel: mesherymeshmodel.NewSummaryHelper(),

Expand Down
2 changes: 1 addition & 1 deletion server/handlers/component_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (h *Handler) GetMeshmodelModelsByCategories(rw http.ResponseWriter, r *http
if limitstr != "all" {
limit, _ = strconv.Atoi(limitstr)
if limit == 0 { //If limit is unspecified then it defaults to 25
limit = DefaultPageSizeForMeshModelComponents
limit = defaultPageSize
}
}
pagestr := r.URL.Query().Get("page")
Expand Down
2 changes: 0 additions & 2 deletions server/handlers/database_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
"gorm.io/gorm/clause"
)

const defaultPageSize = 10

// swagger:route GET /api/system/database GetSystemDatabase idGetSystemDatabase
// Handle GET request for getting summary about the system database.
//
Expand Down
Loading

0 comments on commit 1e0e43b

Please sign in to comment.