Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add apps v1alpha1 api #1

Merged
merged 6 commits into from
Aug 16, 2023
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
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Bug Report
zoumo marked this conversation as resolved.
Show resolved Hide resolved
description: As a User, I want to report a Bug.
title: "Bug: "
labels: ["kind/bug", "kafed"]
assignees:
- wu8685
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: reproduce-step
attributes:
label: Minimal reproduce step
placeholder: a step by step guide for reproducing the bug.
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect to see?
validations:
required: true
- type: textarea
id: actual
attributes:
label: What did you see instead
validations:
required: true
- type: textarea
id: version
attributes:
label: What is your KusionStack components and its version?
validations:
required: true
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Enhancement
zoumo marked this conversation as resolved.
Show resolved Hide resolved
description: As a KusionStack developer, I want to make an enhancement.
title: "Enhancement: "
labels: ["kind/feature", "kafed"]
body:
- type: textarea
id: content
attributes:
label: What would you like to be added?
validations:
required: true
- type: textarea
id: reason
attributes:
label: Why is this needed?
validations:
required: true
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Feature Request
zoumo marked this conversation as resolved.
Show resolved Hide resolved
description: As a user, I want to request a New Feature on the product.
title: "FeatureRequest: <title>"
labels: ["kafed"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request detail!
- type: textarea
id: reason
attributes:
label: "Is your feature request related to a problem? Please describe:"
placeholder: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]"
validations:
required: true
- type: textarea
id: description
attributes:
label: "Describe the feature you'd like:"
placeholder: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
placeholder: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: details
attributes:
label: Teachability, Documentation, Adoption, Migration Strategy
placeholder: If you can, explain some scenarios how users might use this, situations it would be helpful in. Any API designs, mockups, or diagrams are also helpful.
validations:
required: false
149 changes: 149 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# Reference from:
zoumo marked this conversation as resolved.
Show resolved Hide resolved
# https://github.com/c-bata/go-prompt/blob/master/.github/workflows/test.yml
name: Check
on:
pull_request:
branches:
- main
- release-*
push:
branches:
- main
- release-*

env:
GO_VERSION: '1.19'

jobs:

# Test:
# name: Unit Test
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - name: Fetch History
# run: git fetch --prune --unshallow
# - name: Setup Go
# uses: actions/setup-go@v3
# 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: Run Unit Tests
# run: |
# make test
# git status
# # TODO: enable after public
# # - name: Publish Unit Test Coverage
# # uses: codecov/codecov-action@v3
# # with:
# # flags: unittests
# # file: cover.out
# - name: Check diff
# run: '[[ -z $(git status -s) ]] || (printf "Existing modified/untracked files.\nPlease run \"make generate manifests fmt vet\" and push again.\n"; exit 1)'

GolangLint:
name: Golang Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.53
args: --timeout=30m

# Lints Pull Request commits with commitlint.
#
# Rules can be referenced:
# https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
# CommitLint:
# name: Commit Lint
# runs-on: ubuntu-latest
# if: contains(fromJSON('["pull_request"]'), github.event_name)
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: wagoid/commitlint-github-action@v5

# Lints Pull Request title, because the title will be used as the
# commit message in branch main.
#
# Configuration detail can be referenced:
# https://github.com/marketplace/actions/pull-request-title-rules

# PullRequestTitleLint:
# name: Pull Request Title Lint
# runs-on: ubuntu-latest
# if: contains(fromJSON('["pull_request"]'), github.event_name)
# steps:
# - uses: deepakputhraya/action-pr-title@master
# with:
# allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test' # title should start with the given prefix
# disallowed_prefixes: 'WIP,[WIP]' # title should not start with the given prefix
# prefix_case_sensitive: false # title prefix are case insensitive
# min_length: 5 # Min length of the title
# max_length: 80 # Max length of the title
# github_token: ${{ github.token }} # Default: ${{ github.token }}

LicenseCheck:
name: License Check
runs-on: ubuntu-latest
env:
TERM: xterm
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: apache/skywalking-eyes@main

# The TruffleHog OSS Github Action can be used to scan a range of commits for leaked credentials. The action will fail if any results are found.
# More see: https://github.com/marketplace/actions/trufflehog-oss
SecretScan:
name: Secret Scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
extra_args: --debug --json

# TODO: Uncomment when the repository is publicly.
# DependencyReview:
# permissions:
# actions: read
# contents: read
# security-events: write
# name: Dependency Review
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: actions/dependency-review-action@v3
# with:
# fail-on-severity: critical
40 changes: 40 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CLA Assistant"
zoumo marked this conversation as resolved.
Show resolved Hide resolved
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: contributor-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN : ${{ secrets.KUSIONSTACK_BOT_TOKEN }}
with:
path-to-document: 'https://github.com/KusionStack/.github/blob/main/CLA.md' # e.g. a CLA or a DCO document

# branch should not be protected
lock-pullrequest-aftermerge: True
path-to-signatures: 'signatures/version1/cla.json'
remote-organization-name: KusionStack
remote-repository-name: cla.db
branch: 'main'
allowlist: bot*

#below are the optional inputs - If the optional inputs are not given, then default values will be taken
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
#remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
#use-dco-flag: true - If you are using DCO instead of CLA

10 changes: 10 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
run:
skip-files:
- ".*_test.go"
skip-dirs:
- vendor/

linters:
disable:
- errcheck
- unused
64 changes: 64 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
header:
license:
content: |
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
paths:
- '**'
paths-ignore:
- '**/*.conf'
- '**/*.DS_Store'
- '**/*.json'
- '**/*.lock'
- '**/*.Dockerfile'
- '**/*.sh'
- '**/*.yaml'
- '**/*.md'
- '**/*.mk'
- '**/*.svg'
- '**/*.txt'
- '**/*.xlf'
- '**/.husky/**'
- '**/node_modules/**'
- '**/.babelrc'
- '**/.browserslistrc'
- '**/.editorconfig'
- '**/.jsbeautifyrc'
- '**/.yarnrc.yml'
- '**/config_repos'
- '**/go.mod'
- '**/go.sum'
- '**/go.work'
- '**/go.work.sum'
- '**/lcov.info'
- '**/Makefile'
- '**/OWNERS'
- '.github/**'
- '.idea/**'
- '.vscode/**'
- '.dist/**'
- '.husky/**'
- 'hack/**'
- 'LICENSE'
- 'OWNERS_ALIASES'
- 'SECURITY_CONTACTS'
- 'vendor/**'
- '.gitignore'
- '.licenserc'
- '**/zz_generated.deepcopy.go'
- '**/*.pb.go'
- '**/*.proto'
- '**/PROJECT'
- '**/Dockerfile'
- '**/.dockerignore'
comment: never
license-location-threshold: 80
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# kube-api
Kubernetes-style API types.
Schema of the Kubernetes-style API types that are served by KusionStack.

## Purpose
This library is the canonical location of the KusionStack API definition.

Most likely interaction with this repository is as a dependency of k8s.io/api.
Loading
Loading