forked from istio-ecosystem/admiral
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'istio-ecosystem:master' into master
- Loading branch information
Showing
300 changed files
with
63,565 additions
and
7,775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@aattuluri | ||
@nirvanagit | ||
@shriramsharma | ||
@kpharasi | ||
@vinay-g | ||
@vrushalijoshi | ||
@virajrk | ||
@rtay1188 | ||
@Punakshi | ||
@psikka1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
### Checklist | ||
🚨 Please review this repository's [contribution guidelines](./CONTRIBUTING.md). | ||
|
||
- [ ] I've read and agree to the project's contribution guidelines. | ||
- [ ] I'm requesting to **pull a topic/feature/bugfix branch**. | ||
- [ ] I checked that my code additions will pass code linting checks and unit tests. | ||
- [ ] I updated unit and integration tests (if applicable). | ||
- [ ] I'm ready to notify the team of this contribution. | ||
|
||
### Description | ||
What does this change do and why? | ||
|
||
[Link to related ISSUE] | ||
|
||
Thank you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.43.0 | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
|
||
# Optional: golangci-lint command line arguments. | ||
args: >- | ||
--skip-dirs=admiral/pkg/client/clientset/versioned | ||
--tests=false | ||
--timeout=5m | ||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# only-new-issues: true | ||
#name: golangci-lint | ||
#on: | ||
# push: | ||
# tags: | ||
# - v* | ||
# branches: | ||
# - master | ||
# - main | ||
# pull_request: | ||
#jobs: | ||
# golangci: | ||
# name: lint | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: '1.22.2' | ||
# - name: golangci-lint | ||
# uses: golangci/golangci-lint-action@v2 | ||
# with: | ||
# # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
# version: v1.58.1 | ||
# skip-go-installation: true | ||
# | ||
# # Optional: working directory, useful for monorepos | ||
# # working-directory: somedir | ||
# | ||
# # Optional: golangci-lint command line arguments. | ||
# args: >- | ||
# --skip-dirs=admiral/pkg/client/clientset/versioned | ||
# --tests=false | ||
# --timeout=5m | ||
# | ||
# # Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# # only-new-issues: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
.idea | ||
.idea/vcs.xml | ||
|
||
out* | ||
*.tar.gz | ||
out/* | ||
out.yaml | ||
*.tar.gz | ||
*.out | ||
*.prof | ||
istio-* | ||
.DS_Store | ||
cobertura-coverage.xml | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#name: golangci-lint | ||
#on: | ||
# push: | ||
# tags: | ||
# - v* | ||
# branches: | ||
# - master | ||
# - main | ||
# pull_request: | ||
#jobs: | ||
# golangci: | ||
# name: lint | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: actions/setup-go@v3 | ||
# with: | ||
# go-version: '1.22.3' | ||
# - name: golangci-lint | ||
# uses: golangci/golangci-lint-action@v2 | ||
# with: | ||
# # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
# version: v1.58.1 | ||
# skip-go-installation: true | ||
# | ||
# # Optional: working directory, useful for monorepos | ||
# # working-directory: somedir | ||
# | ||
# # Optional: golangci-lint command line arguments. | ||
# args: >- | ||
# --skip-dirs=admiral/pkg/client/clientset/versioned | ||
# --tests=false | ||
# --timeout=5m || true | ||
# | ||
# # Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# # only-new-issues: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
We welcome contributions :) | ||
|
||
## Submitting PRs | ||
* Make sure to check existing issues and file an issue before starting to work on a feature/bug. This will help prevent duplication of work. | ||
* Make sure to check existing issues and file an issue before starting to work on a feature/bug. This will help prevent duplication of work. | ||
Also refer to [Collaboration](./README.md) for communication channels. | ||
|
||
## Setting up for local Development | ||
|
@@ -20,10 +20,12 @@ $ADMIRAL_HOME/tests/create_cluster.sh 1.16.8 | |
export KUBECONFIG=~/.kube/config | ||
``` | ||
* Install [Prerequisites](./docs/Examples.md#Prerequisite) and make sure to install istio control plane in cluster. Alternatively, you can use the script to install istio control plane on the cluster created in previous step: | ||
|
||
Mac: `$ADMIRAL_HOME/tests/install_istio.sh 1.7.4 osx` | ||
|
||
Linux: `$ADMIRAL_HOME/tests/install_istio.sh 1.7.4 linux` | ||
Mac: `$ADMIRAL_HOME/tests/install_istio.sh 1.20.2 osx` | ||
|
||
Mac (Apple Silicon): `$ADMIRAL_HOME/tests/install_istio.sh 1.20.2 osx-arm64` | ||
|
||
Linux: `$ADMIRAL_HOME/tests/install_istio.sh 1.20.2 linux` | ||
|
||
* Set up necessary permissions and configurations for Admiral | ||
|
||
|
@@ -40,8 +42,69 @@ $ADMIRAL_HOME/admiral/cmd/admiral/main.go --kube_config "<Path_to_Kubeconfig>" | |
$ADMIRAL_HOME/install/scripts/cluster-secret.sh <Path_to_Kubeconfig_Admiral_Cluster> <Path_to_Kubeconfig_Remote_Cluster> admiral | ||
``` | ||
|
||
* `Optional`: Run `admiral` inside the minikube cluster | ||
```bash | ||
# point to the admiral primary cluster | ||
export KUBECONFIG=<Path_to_Kubeconfig_Admiral_Cluster> | ||
|
||
# build the yaml files | ||
make gen-yaml | ||
|
||
# run the install scripts | ||
$ADMIRAL_HOME/install/scripts/install_admiral.sh $ADMIRAL_HOME/out/ | ||
|
||
# get the http url for admiral api | ||
minikube service admiral-http -n admiral --url | ||
|
||
# get the http url for admiral metrics api | ||
minikube service admiral-metrics -n admiral --url | ||
``` | ||
|
||
* `Optional`: Install prometheus for metrics. | ||
```bash | ||
# build the yaml files | ||
make gen-yaml | ||
|
||
# run the install scripts | ||
$ADMIRAL_HOME/install/scripts/install_prometheus.sh $ADMIRAL_HOME/out | ||
|
||
# get the http url for prometheus dashboard | ||
minikube service prometheus -n istio-system --url | ||
``` | ||
|
||
## Protobuf code generation | ||
* If you've made changes to protobuf model objects and need to re-generate their clientsets, use `sh hack/update-codegen.sh` and checkin the generated files | ||
* Required installations and their versions - | ||
|
||
### Initial Setup | ||
```bash | ||
Install protobuf | ||
go install sigs.k8s.io/[email protected] | ||
go install k8s.io/code-generator v0.24.2 | ||
go install google.golang.org/[email protected] | ||
make setup | ||
``` | ||
|
||
### Generate `*.pb.go` files from `*.proto` files | ||
```bash | ||
go generate ./... | ||
``` | ||
|
||
### Generate deepcopy functions | ||
```bash | ||
make model-gen | ||
``` | ||
|
||
* If you've made changes to protobuf model objects and need to re-generate their clientsets, use following steps and checkin the generated files | ||
### Generate clientsets | ||
```bash | ||
sh hack/update-codegen.sh | ||
``` | ||
|
||
### Generate CRD | ||
```bash | ||
set $GOPATH based on your go setup | ||
chmod +x $GOPATH/pkg/mod/sigs.k8s.io/[email protected]/.run-in.sh && sh $GOPATH/pkg/mod/sigs.k8s.io/[email protected]/.run-controller-gen.sh crd paths=./admiral/pkg/apis/admiral/v1/... output:stdout > admiral/crd/out.yaml | ||
``` | ||
|
||
## Integration tests | ||
### Single cluster | ||
|
@@ -51,8 +114,24 @@ make gen-yaml | |
cd $ADMIRAL_HOME/tests | ||
./run.sh "1.16.8" "1.7.4" "../out" | ||
``` | ||
* Multi-cluster | ||
* Multi-cluster | ||
``` | ||
TODO | ||
``` | ||
|
||
|
||
## Before PR | ||
1. Clone repository | ||
1. Add unit tests and fmea tests(in case applicable) along with the checked in code. | ||
1. Confirm that the unit test coverage did not drop with your change. | ||
1. Run regression and make sure it is not failing | ||
1. Please update any bdd tests in case applicable | ||
|
||
## During PR | ||
1. Create Pull Request from your branch to the master branch. | ||
1. Make sure the build succeeds | ||
1. Maintainers on Admiral Repository will review the pull request. | ||
1. PR will be merged after code is reviewed and all checks are passing | ||
|
||
## After PR | ||
1. When merging the PR, ensure that all commits are squashed into a single commit. (This can be done in advance via interactive rebase or through the github UI) | ||
1. Once the changes are deployed to qal environment, verify the fix looks good and bdds are successful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Admiral |
Oops, something went wrong.