Skip to content

Commit

Permalink
Merge pull request #46 from gyohuangxin/define_component
Browse files Browse the repository at this point in the history
Add SMPModel in /templates/meshmodel
  • Loading branch information
Mohd Uzair authored Mar 7, 2024
2 parents ee1d6c4 + 03e272b commit 4d459d2
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 136 deletions.
4 changes: 2 additions & 2 deletions .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ firstPRMergeComment: >
<img alt="Meshery Celebration logo" src="https://raw.githubusercontent.com/meshery/meshery-nighthawk/master/.github/welcome/meshery-darkmode-celebration.svg">
</picture>
&nbsp; &#9; &nbsp; &#9; &nbsp; &#9; &nbsp; &#9; [Join the community](http://slack.layer5.io), if you haven't yet and please leave a :star: [star on the project](../stargazers). :smile:
&nbsp; &#9; &nbsp; &#9; &nbsp; &#9; &nbsp; &#9; [Join the community](https://slack.meshery.io), if you haven't yet and please leave a :star: [star on the project](../stargazers). :smile:
#-------------------------------------------------------------------------------
# Configuration for request-info - https://github.com/behaviorbot/request-info
Expand All @@ -44,5 +44,5 @@ sentimentBotToxicityThreshold: .9

# *Required* Comment to reply with
sentimentBotReplyComment: >
Please be sure to review the code of conduct and be respectful of other users. // @layer5io/maintainers
Please be sure to review the code of conduct and be respectful of other users. // @meshery/maintainers
2 changes: 1 addition & 1 deletion .github/label-commenter-config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
comment:
footer: "\
---\n\n
> &nbsp; &#9; &nbsp; &#9; &nbsp; &#9; &nbsp; &#9; Be sure to [join the community](http://slack.layer5.io), if you haven't yet and please leave a :star: [star on the project](../stargazers) :smile: on the project.
> &nbsp; &#9; &nbsp; &#9; &nbsp; &#9; &nbsp; &#9; Be sure to [join the community](https://slack.meshery.io), if you haven't yet and please leave a :star: [star on the project](../stargazers) :smile: on the project.
"

labels:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.22
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
docker:
name: Docker build and push
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.22
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.22
- name: Create cluster using KinD
uses: engineerd/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/component-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.22
- name: Run adapter to create components
run: |
touch log.txt
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/error-ref-publisher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.22

- name: Run utility
run: |
go run github.com/layer5io/meshkit/cmd/errorutil -d . update --skip-dirs meshery -i ./helpers -o ./helpers
go run github.com/meshery/meshkit/cmd/errorutil -d . update --skip-dirs meshery -i ./helpers -o ./helpers
# to update errorutil* files in meshkit repo
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: l5io
commit_user_email: ci@layer5.io
commit_user_email: ci@meshery.io
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "run error codes utility"
Expand All @@ -56,7 +56,7 @@ jobs:
with:
repository: ./meshery
commit_user_name: l5io
commit_user_email: ci@layer5.io
commit_user_email: ci@meshery.io
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
commit_options: "--signoff"
commit_message: "[Docs] Error Code Reference: Meshery Adapter for Nighthawk updated"
Expand Down
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Layer5 Community Code of Conduct
# Meshery Community Code of Conduct

The Layer5 community follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
The Meshery community follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [email protected].
2 changes: 1 addition & 1 deletion CONTRIBUTING-gitflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ While this isn't an absolutely necessary step, if you plan on doing anything mor

## Add 'upstream' repo to list of remotes
```
git remote add upstream https://github.com/layer5io/meshery.git
git remote add upstream https://github.com/meshery/meshery.git
```
("meshery" is used as the example repo. Be sure to reference the _actual_ repo you're contributing to e.g. "meshery-linkerd").

Expand Down
105 changes: 2 additions & 103 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,104 +1,3 @@
# <a name="contributing">Contributing Overview</a>
Please do! Thanks for your help improving the project! :balloon:
# Contributing to Meshery

All contributors are welcome. Please see the [newcomers welcome guide](https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit) for how, where and why to contribute. This project is community-built and welcomes collaboration. Contributors are expected to adhere to our [Code of Conduct](.CODE_OF_CONDUCT.md).

Not sure where to start? First, see the [newcomers welcome guide](https://docs.google.com/document/d/17OPtDE_rdnPQxmk2Kauhm3GwXF1R5dZ3Cj8qZLKdo5E/edit). Grab an open issue with the [help-wanted label](../../labels/help%20wanted) and jump in. Join the [Slack account](http://slack.layer5.io) and engage in conversation. Create a [new issue](/../../issues/new/choose) if needed. All [pull requests](/../../pulls) should reference an open [issue](/../../issues). Include keywords in your pull request descriptions, as well as commit messages, to [automatically close issues in GitHub](https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords).

**Sections**
- <a name="contributing">General Contribution Flow</a>
- <a href="#commit-signing">Developer Certificate of Origin</a>

Relevant coding style guidelines are the Go Code Review Comments and the Formatting and style section of Peter Bourgon's Go: Best Practices for Production Environments.

# <a name="contributing">General Contribution Flow</a>

In order to contribute to Meshery, please follow the fork-and-pull request workflow described [here](./CONTRIBUTING-gitflow.md).

## <a name="commit-signing">Signing-off on Commits (Developer Certificate of Origin)</a>

To contribute to this project, you must agree to the Developer Certificate of
Origin (DCO) for each commit you make. The DCO is a simple statement that you,
as a contributor, have the legal right to make the contribution.

See the [DCO](https://developercertificate.org) file for the full text of what you must agree to
and how it works [here](https://github.com/probot/dco#how-it-works).
To signify that you agree to the DCO for contributions, you simply add a line to each of your
git commit messages:

```
Signed-off-by: Jane Smith <[email protected]>
```

In most cases, you can add this signoff to your commit automatically with the
`-s` or `--signoff` flag to `git commit`. You must use your real name and a reachable email
address (sorry, no pseudonyms or anonymous contributions). An example of signing off on a commit:
```
$ commit -s -m “my commit message w/signoff”
```

To ensure all your commits are signed, you may choose to add this alias to your global ```.gitconfig```:

*~/.gitconfig*
```
[alias]
amend = commit -s --amend
cm = commit -s -m
commit = commit -s
```
Or you may configure your IDE, for example, Visual Studio Code to automatically sign-off commits for you:

<a href="https://user-images.githubusercontent.com/7570704/64490167-98906400-d25a-11e9-8b8a-5f465b854d49.png" ><img src="https://user-images.githubusercontent.com/7570704/64490167-98906400-d25a-11e9-8b8a-5f465b854d49.png" width="50%"><a>

## <a name="contributing-docs">Documentation Contribution Flow</a>
Please contribute! Layer5 documentation uses Jekyll and GitHub Pages to host docs sites. Learn more about [Layer5's documentation framework](https://docs.google.com/document/d/17guuaxb0xsfutBCzyj2CT6OZiFnMu9w4PzoILXhRXSo/edit?usp=sharing). The process of contributing follows this flow:

1. Create a fork, if you have not already, by following the steps described [here](./CONTRIBUTING-gitflow.md)
1. In the local copy of your fork, navigate to the docs folder.
`cd docs`
1. Create and checkout a new branch to make changes within
`git checkout -b <my-changes>`
1. Edit/add documentation.
`vi <specific page>.md`
1. Run site locally to preview changes.
`make site`
1. Commit, [sign-off](#commit-signing), and push changes to your remote branch.
`git push origin <my-changes>`
1. Open a pull request (in your web browser) against the repo.


#### Tests
Users can now test their code on their local machine against the CI checks implemented using `make run-tests`.

To test code changes on your local machine, run the following command:
```
make run-tests
```

#### Building Docker image
To build a Docker image of the project, please ensure you have `Docker` installed to be able to build the image. Now, run the following command to build the Docker image:
```sh
make docker
```

### UI Lint Rules

Layer5 uses ES-Lint to maintain code quality & consistency in our UI Code.

# <a name="maintaining"> Reviews</a>
All contributors are invited to review pull requests. See this short video on [how to review a pull request](https://www.youtube.com/watch?v=isLfo7jfE6g&feature=youtu.be).

# New to Git?
Resources: https://lab.github.com and https://try.github.com/

### License

This repository and site are available as open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0).

### About Layer5

**Community First**
<p>The <a href="https://layer5.io">Layer5</a> community represents the largest collection of service mesh projects and their maintainers in the world.</p>

**Open Source First**
<p>Our projects establish industry standards and enable service developers, owners, and operators with repeatable patterns and best practices for managing all aspects of distributed services. Our shared commitment to the open source spirit push the Layer5 community and its projects forward.</p>
You want to contribute to the project? Yay! We want you to! Visit our centralized instructions for [contributing](https://github.com/layer5io/meshery/blob/master/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG_VERSION=1.21
ARG GOLANG_VERSION=1.22
FROM golang:${GOLANG_VERSION} as builder

ARG VERSION
Expand Down
34 changes: 18 additions & 16 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Security Policy

We are very grateful to the security researchers and users that report
back Layer5 project security vulnerabilities. We investigate every report thoroughly.
back Meshery project security vulnerabilities. We investigate every report thoroughly.

## Reporting a vulnerability

To make a report, send an email to the private
[security[email protected]](mailto:security[email protected])
[security@meshery.dev](mailto:security@meshery.dev)
mailing list with the vulnerability details. For normal product bugs
unrelated to latent security vulnerabilities, please head to
the appropriate repository and submit a [new issue](../../issues/new/choose).
Expand All @@ -13,39 +15,39 @@ the appropriate repository and submit a [new issue](../../issues/new/choose).

Send us a report whenever you:

- Think Layer5 projects have a potential security vulnerability.
- Are unsure whether or how a vulnerability affects Layer5 projects.
- Think a vulnerability is present in another project that Layer5 projects
- Think Meshery projects have a potential security vulnerability.
- Are unsure whether or how a vulnerability affects Meshery projects.
- Think a vulnerability is present in another project that Meshery projects
depend on (Docker for example).

### When not to report a security vulnerability?

Don't send a vulnerability report if:

- You need help tuning Layer5 project components for security.
- You need help tuning Meshery project components for security.
- You need help applying security related updates.
- Your issue is not security related.

## Evaluation

The Layer5 team acknowledges and analyzes each vulnerability report within 10 working days.
The Meshery team acknowledges and analyzes each vulnerability report within 10 working days.

Any vulnerability information you share with the Layer5 team stays
within the Layer5 project. We don't disseminate the information to other
Any vulnerability information you share with the Meshery team stays
within the Meshery project. We don't disseminate the information to other
projects. We only share the information as needed to fix the issue.

We keep the reporter updated as the status of the security issue is addressed.

## Fixing the issue

Once a security vulnerability has been fully characterized, a fix is developed by the Layer5 team.
Once a security vulnerability has been fully characterized, a fix is developed by the Meshery team.
The development and testing for the fix happens in a private GitHub repository in order to prevent
premature disclosure of the vulnerability.

## Early disclosure

The Layer5 team maintains a mailing list for private early disclosure of security vulnerabilities.
The list is used to provide actionable information to close Layer5 partners. The list is not intended
The Meshery team maintains a mailing list for private early disclosure of security vulnerabilities.
The list is used to provide actionable information to close Meshery partners. The list is not intended
for individuals to find out about security issues.

## Public disclosure
Expand All @@ -54,11 +56,11 @@ On the day chosen for public disclosure, a sequence of activities takes place as

- Changes are merged from the private GitHub repository holding the fix into the appropriate set of public
branches.
- Layer5 team ensures all necessary binaries are promptly built and published.
- Meshery team ensures all necessary binaries are promptly built and published.
- Once the binaries are available, an announcement is sent out on the following channels:
- The [Layer5 blog](https://layer5.io/blog/)
- The [Layer5 Twitter feed](https://twitter.com/layer5)
- The [Meshery blog](https://meshery.io/blog/)
- The [Meshery Twitter feed](https://twitter.com/mesheryio)
- The #announcements channel on Slack

As much as possible this announcement will be actionable, and include any mitigating steps customers can take prior to
upgrading to a fixed version.
upgrading to a fixed version.
2 changes: 1 addition & 1 deletion build/Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ GIT_VERSION = $(shell git describe --tags `git rev-list --tags --max-count=1`)
GIT_COMMITSHA = $(shell git rev-list -1 HEAD)
GIT_STRIPPED_VERSION=$(shell git describe --tags `git rev-list --tags --max-count=1` | cut -c 2-)

GOVERSION = 1.21
GOVERSION = 1.22
GOPATH = $(shell go env GOPATH)
GOBIN = $(GOPATH)/bin

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/meshery/meshery-nighthawk

go 1.21
go 1.22

replace (
github.com/kudobuilder/kuttl => github.com/layer5io/kuttl v0.4.1-0.20200723152044-916f10574334
Expand Down
1 change: 1 addition & 0 deletions manifests/charts/crds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO: Define performance profile
43 changes: 43 additions & 0 deletions templates/meshmodel/components/v0.7.0/PerformanceTestConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"kind": "PerformaceTestConfig",
"apiVersion": "core.meshery.io/v1beta1",
"displayName": "Performace Test Config",
"format": "JSON",
"metadata": {
"capabilities": "",
"defaultData": "",
"genealogy": "",
"isAnnotation": false,
"isNamespaced": true,
"logoURL": "",
"primaryColor": "",
"published": true,
"secondaryColor": "",
"shape": "rectangle",
"shapePolygonPoints": "",
"styleOverrides": "",
"subCategory": "",
"svgColor": "",
"svgComplete": "",
"svgWhite": ""
},
"model": {
"name": "meshery-perf",
"version": "v1",
"displayName": "Meshery Performance",
"status": "",
"category": {
"name": "Orchestration \u0026 Management",
"metadata": null
},
"metadata": {
"isAnnotation": false,
"svgColor": "",
"svgWhite": ""
},
"components": null,
"relationships": null
},
"schema": "{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"format\":\"uuid\"},\"user_id\":{\"type\":\"string\",\"format\":\"uuid\"},\"name\":{\"type\":\"string\"},\"schedule\":{\"type\":\"string\"},\"loadGenerators\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"endpoints\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"serviceMesh\":{\"type\":\"string\"},\"concurrentRequest\":{\"type\":\"integer\"},\"qps\":{\"type\":\"integer\"},\"duration\":{\"type\":\"string\"},\"lastRun\":{\"type\":\"string\",\"format\":\"date-time\"},\"totalResults\":{\"type\":\"integer\"},\"headers\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"cookies\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"metadata\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"string\"}},\"body\":{\"type\":\"string\"},\"contentType\":{\"type\":\"string\"},\"createdAt\":{\"type\":\"string\",\"format\":\"date-time\"},\"updatedAt\":{\"type\":\"string\",\"format\":\"date-time\"}},\"additionalProperties\":false,\"required\":[\"id\",\"user_id\",\"name\",\"loadGenerators\",\"endpoints\",\"serviceMesh\",\"concurrentRequest\",\"qps\",\"duration\",\"totalResults\",\"headers\",\"cookies\",\"metadata\",\"body\",\"contentType\",\"createdAt\",\"updatedAt\"]}"
}

8 changes: 8 additions & 0 deletions templates/meshmodel/components/v0.7.0/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"primaryColor": "",
"secondaryColor": "",
"shape": "",
"logoURL": "",
"svgColor": "",
"svgWhite": ""
}

0 comments on commit 4d459d2

Please sign in to comment.