Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Add issue, pr template and github action #11

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug Report
about: Create a report to help us improve
title: "[BUG]"
labels: kind/bug

---

<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!-->


**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:

**Environment**:
- OpenYurt version:
- Kubernetes version (use `kubectl version`):
- OS (e.g: `cat /etc/os-release`):
- Kernel (e.g. `uname -a`):
- Install tools:
- Others:

**others**

/kind bug
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/failing-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Failing Test
about: Report continuously failing tests or jobs in Kubernetes CI
labels: kind/failing-test

---

<!-- Please only use this template for submitting reports about continuously failing tests or jobs in Kubernetes CI -->

#### Which jobs are failing:

#### Which test(s) are failing:

#### Since when has it been failing:

#### Testgrid link:

#### Reason for failure:

#### Anything else we need to know:

#### labels

/kind failing-test
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
about: Suggest an idea for this project
title: "[feature request]"
labels: kind/feature

---

<!-- Please only use this template for submitting feature requests -->

**What would you like to be added**:


**Why is this needed**:


**others**
/kind feature
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Question
about: Question about OpenYurt.
title: "[Question]"
labels: kind/question

---

<!-- Please use this template to ask question. Thanks!-->

**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:

**Environment**:
- OpenYurt version:
- Kubernetes version (use `kubectl version`):
- OS (e.g: `cat /etc/os-release`):
- Kernel (e.g. `uname -a`):
- Install tools:
- Others:

**others**
/kind question
53 changes: 53 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- Thanks for sending a pull request! Here are some tips for you:
https://github.com/openyurtio/openyurt/blob/master/CONTRIBUTING.md
-->


#### What type of PR is this?
> Uncomment only one ` /kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line:
> /kind bug
> /kind documentation
> /kind enhancement
> /kind good-first-issue
> /kind feature
> /kind question
> /kind design
> /sig ai
> /sig iot
> /sig network
> /sig storage



#### What this PR does / why we need it:

#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #

#### Special notes for your reviewer:
<!--
use this label to assign your reviewer
/assign @your_reviewer
-->


#### Does this PR introduce a user-facing change?
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

-->
```release-note

```

#### other Note
<!--
If your current PR is still working in process, start the PR title name with [WIP], such as: [WIP] add new crd for yurt-app-manager
If the PR title name begins with [WIP], OpenYurt-bot automatically adds a do-not-merge/work-in-progress label for your pr
-->
73 changes: 73 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
push:
branches:
- main
- release-*
pull_request: {}
workflow_dispatch: {}

env:
# Common versions
GO_VERSION: '1.16'
GOLANGCI_VERSION: 'v1.40'

jobs:
check-license:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Check License
run: hack/make-rules/check_license.sh

golangci-lint:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Lint golang code
uses: golangci/golangci-lint-action@v2
with:
version: ${{ env.GOLANGCI_VERSION }}
args: --disable-all -E deadcode -E gofmt -E goimports -E ineffassign -E misspell -E vet --timeout=15m

markdownlint-misspell-shellcheck:
runs-on: ubuntu-18.04
# this image is build from Dockerfile
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
container: pouchcontainer/pouchlinter:v0.1.2
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run misspell
run: find ./* -name "*" | xargs misspell -error
- name: Lint markdown files
run: find ./ -name "*.md" | grep -v enhancements | grep -v .github | xargs mdl -r ~MD010,~MD013,~MD014,~MD022,~MD024,~MD029,~MD031,~MD032,~MD033,~MD034,~MD036
build-binaries:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Fetch History
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Build All Binaries
run: make build
12 changes: 12 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
approvers:
- charleszheng44
- qclc
- Peeknut
- rambohe-ch
- yixingjia
reviewers:
- charleszheng44
- qclc
- Peeknut
- rambohe-ch
- yixingjia
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ For details of the design, please see the [document](https://github.com/openyurt

## Architecture

Yurt-device-controller introduces an approach leverages existing edge computing platforms, like EdgeX Foundry, and uses Kubernetes custom resources to abstract edge devices.
Inspiring by the Unix philosophy, "Do one thing and do it well", we believe that Kubernetes should focus on managing computing resources while edge devices management can be done by adopting existing edge computing platforms.
Therefore, we define several generic custom resource definitions(CRD) that act as the mediator between OpenYurt and the edge platform.
Yurt-device-controller introduces an approach leverages existing edge computing platforms, like EdgeX Foundry, and uses Kubernetes custom resources to abstract edge devices.
Inspiring by the Unix philosophy, "Do one thing and do it well", we believe that Kubernetes should focus on managing computing resources while edge devices management can be done by adopting existing edge computing platforms.
Therefore, we define several generic custom resource definitions(CRD) that act as the mediator between OpenYurt and the edge platform.
Any existing edge platforms can be integrated into the OpenYurt by implementing custom controllers for these CRDs. These CRDS and corresponding controllers allow users to manage edge devices in a declarative way, which provides users with a Kubernetes-native experience and reduces the complexity of managing, operating and maintaining edge platform devices.

![yurt-device-controller-architecture](docs/img/yurt-device-controller-architecture.png)
Expand Down Expand Up @@ -48,7 +48,6 @@ Contributions are welcome, whether by creating new issues or pull requests. See
<img src="https://github.com/openyurtio/openyurt/blob/master/docs/img/ding.jpg" width=25% title="dingtalk">
</div>


## License

Yurt-device-controller is under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details. Certain implementations in Yurt-device-controller rely on the existing code from [Kubernetes](https://github.com/kubernetes/kubernetes) and [OpenKruise](https://github.com/openkruise/kruise) the credits go to the original authors.
1 change: 1 addition & 0 deletions clients/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package clients

import (
"context"

"github.com/openyurtio/device-controller/api/v1alpha1"
)

Expand Down
2 changes: 1 addition & 1 deletion controllers/deviceprofile_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (ds *DeviceProfileSyncer) Run(stop <-chan struct{}) {
}

func addNodePoolField(edgeXDevs []devicev1alpha1.DeviceProfile, NodePoolName string) {
for i, _ := range edgeXDevs {
for i := range edgeXDevs {
edgeXDevs[i].Spec.NodePool = NodePoolName
}
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
// These tests use Ginkgo (BDD-style Go testing framework). Refer to
// http://onsi.github.io/ginkgo/ to learn more about Ginkgo.

var cfg *rest.Config
var _ *rest.Config
var k8sClient client.Client
var testEnv *envtest.Environment

Expand Down
Binary file modified docs/img/yurt-device-controller-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading