Skip to content

Commit

Permalink
feat: init project
Browse files Browse the repository at this point in the history
  • Loading branch information
sergelogvinov committed Dec 21, 2024
0 parents commit d954dca
Show file tree
Hide file tree
Showing 34 changed files with 2,139 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .conform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
policies:
- type: commit
spec:
header:
length: 89
imperative: true
case: lower
invalidLastCharacters: .
body:
required: true
dco: true
gpg: false
spellcheck:
locale: US
maximumOfOneCommit: false
conventional:
types:
- build
- chore
- ci
- docs
- perf
- refactor
- revert
- style
- test
scopes:
- deps
- main
- chart
descriptionLength: 72
- type: license
spec:
skipPaths:
- .git/
includeSuffixes:
- .go
excludeSuffixes:
- .pb.go
allowPrecedingComments: false
header: |
/*
Copyright 2023 The Kubernetes Authors.
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.
*/
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.vscode/
.github/
.git/
**/.gitignore
#
bin/
charts/
docs/
dist/
hack/
docker-compose.yml
Dockerfile

# other
*.md
*.yml
*.zip
*.sql

# cosign
/cosign.key
/cosign.pub
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug Report
about: Report a bug.
title: ""
labels: ""
assignees: ""
---

## Bug Report

### Description

### Logs

### Environment

- Plugin version:
- Kubernetes version: [`kubectl version --short`]
- CSI capasity: [`kubectl get csistoragecapacities -ocustom-columns=CLASS:.storageClassName,AVAIL:.capacity,ZONE:.nodeTopology.matchLabels -A`]
- CSI resource on the node: [`kubectl get CSINode <node> -oyaml`]
- Node describe: [`kubectl describe node <node>`]
- OS version [`cat /etc/os-release`]

### Community Note

* Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature Requests
about: Create a feature request.
title: ""
labels: ""
assignees: ""
---

## Feature Request

### Description

### Community Note

* Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Pull Request

<!--
## Note to the Contributor
We encourage contributors to go through a proposal process to discuss major changes.
Before your PR is allowed to run through CI, the maintainers of Talos CCM will first have to approve the PR.
-->

## What? (description)

## Why? (reasoning)

## Acceptance

Please use the following checklist:

- [ ] you linked an issue (if applicable)
- [ ] you included tests (if applicable)
- [ ] you linted your code (`make lint`)
- [ ] you linted your code (`make unit`)

> See `make help` for a description of the available targets.
50 changes: 50 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---

# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
commit-message:
prefix: "chore:"
open-pull-requests-limit: 8
rebase-strategy: disabled
schedule:
interval: "monthly"
day: "monday"
time: "08:00"
timezone: "UTC"

- package-ecosystem: "gomod"
directory: "/"
commit-message:
prefix: "chore:"
open-pull-requests-limit: 8
rebase-strategy: disabled
schedule:
interval: "monthly"
day: "monday"
time: "07:00"
timezone: "UTC"
groups:
k8s.io:
patterns:
- "k8s.io/api"
- "k8s.io/apimachinery"
- "k8s.io/client-go"
- "k8s.io/cloud-provider"
- "k8s.io/component-base"
- "k8s.io/mount-utils"

- package-ecosystem: "docker"
directory: "/"
commit-message:
prefix: "chore:"
open-pull-requests-limit: 8
rebase-strategy: disabled
schedule:
interval: "monthly"
day: "monday"
time: "07:00"
timezone: "UTC"
57 changes: 57 additions & 0 deletions .github/workflows/build-edge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build edge

on:
push:
branches:
- main
paths:
- 'go.mod'
- 'go.sum'
- 'cmd/**'
- 'pkg/**'
- 'Dockerfile'

jobs:
build-publish:
name: "Build image and publish"
timeout-minutes: 15
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow

- name: Install Cosign
uses: sigstore/cosign-installer@v3.7.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3

- name: Github registry login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
timeout-minutes: 10
run: make images
env:
USERNAME: ${{ github.repository_owner }}
PUSH: "true"
TAG: "edge"
- name: Sign images
timeout-minutes: 4
run: make images-cosign
env:
USERNAME: ${{ github.repository_owner }}
TAG: "edge"
48 changes: 48 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build check

on:
pull_request:
branches:
- main
paths:
- 'go.mod'
- 'go.sum'
- 'cmd/**'
- 'pkg/**'
- 'Dockerfile'

jobs:
build:
name: Build
timeout-minutes: 15
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up go
timeout-minutes: 5
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.2
args: --timeout=5m --config=.golangci.yml
- name: Unit
run: make unit
- name: Build
timeout-minutes: 10
run: make images
env:
PLATFORM: linux/amd64
- name: Check node tools
timeout-minutes: 5
run: make image-tools-check
env:
PLATFORM: linux/amd64
28 changes: 28 additions & 0 deletions .github/workflows/charts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Helm chart check

on:
pull_request:
branches:
- main
paths:
- 'charts/**'

jobs:
helm-lint:
name: Helm chart check
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow

- name: Install chart-testing tools
id: lint
uses: helm/chart-testing-action@v2.6.1

- name: Run helm chart linter
run: ct --config hack/ct.yml lint
- name: Run helm template
run: make helm-unit
26 changes: 26 additions & 0 deletions .github/workflows/conform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Conformance check

on:
pull_request:
branches:
- main

jobs:
conform:
name: Conformance
timeout-minutes: 5
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout main branch
run: git fetch --no-tags origin main:main

- name: Conform action
uses: talos-systems/conform@v0.1.0-alpha.30
with:
token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit d954dca

Please sign in to comment.