Skip to content

Commit

Permalink
Initial open source release
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Wischke <felix.wischke@ionos.com>
Co-authored-by: Jonas Bender <90411737+jonas-be@users.noreply.github.com>
Co-authored-by: Ludwig Bedacht <132355999+lubedacht@users.noreply.github.com>
Co-authored-by: Mario Valderrama <15158349+avorima@users.noreply.github.com>
Co-authored-by: Mohamed Chiheb Ben jemaa <mohamed-chiheb.ben-jemaa@ionos.com>
Co-authored-by: Vic Kerr <318870+wikkyk@users.noreply.github.com>
  • Loading branch information
7 people committed Nov 29, 2023
0 parents commit 45f5888
Show file tree
Hide file tree
Showing 164 changed files with 17,101 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
capi
proxmox
capmox
decorder
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
testbin/
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Tell us about a problem you are experiencing
labels: bug

---


**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]


**What did you expect to happen:**


**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]


**Environment:**

- Cluster-api-provider-proxmox version:
- Kubernetes version: (use `kubectl version`):
- OS (e.g. from `/etc/os-release`):
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature enhancement request
about: Suggest an idea for this project
labels: enhancement, feature

---


**Describe the solution you'd like**
[A clear and concise description of what you want to happen.]


**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]


**Environment:**

- Cluster-api-provider-proxmox version:
- Kubernetes version: (use `kubectl version`):
- OS (e.g. from `/etc/os-release`):
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/report_vulnerability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Report vulnerability
about: Report a security vulnerability

---

**Describe the vulnerability**
[A clear and concise description of what the vulnerability is and what impact it has.]

**How To Reproduce**
Steps to reproduce the behavior:

**How To Fix**
[If available, provide information how users can fix the issue, e.g. downgrading to the last stable release.]

**References**
[Links to relevant information about the vulnerability, e.g. cve.mitre.org.]

**Environment:**

- Cluster-api-provider-proxmox version:
- Kubernetes version: (use `kubectl version`):
- OS (e.g. from `/etc/os-release`):
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Issue #, if available:*

*Description of changes:*

*Testing performed:*
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
groups:
kubernetes:
patterns:
- k8s.io/api
- k8s.io/apimachinery
- k8s.io/client-go

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
15 changes: 15 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Helps catch spelling errors
name: Codespell
on: [ pull_request ]

jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: codespell-project/actions-codespell@94259cd8be02ad2903ba34a22d9c13de21a74461 # v2.0
with:
skip: .git,_artifacts,*.sum
ignore_words_file: .codespellignore
check_filenames: true
check_hidden: true
53 changes: 53 additions & 0 deletions .github/workflows/container-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: container-image

on:
push:
branches:
- main
- release-*
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

pull_request:
branches:
- main
- release-*

jobs:
image:
name: build image
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4.1.1

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/ionos-cloud/cluster-api-provider-proxmox

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.BOT_USERNAME }}
password: ${{ secrets.BOT_PAT }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Scan image
if: github.event_name == 'pull_request'
uses: anchore/scan-action@v3
id: scan
with:
image: ${{ steps.meta.outputs.tags }}
add-cpes-if-none: true
output-format: table
9 changes: 9 additions & 0 deletions .github/workflows/license.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"include": [ "**/*.go" ],
"license": "hack/boilerplate.go.txt"
},
{
"include": [ "**" ]
}
]
14 changes: 14 additions & 0 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Checks if all go files have the required license header
name: License
on: [ pull_request ]

jobs:
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: viperproject/check-license-header@v2
with:
path: .
config: .github/workflows/license.conf
strict: false
38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint
on: [ pull_request ]

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
with:
version: v1.54

yamllint:
name: yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: ibiqlik/action-yamllint@v3
with:
format: github

actionlint:
name: actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

permissions:
contents: write # Allow to create a release.

env:
go_version: 1.20

jobs:
build:
name: create draft release
runs-on: ubuntu-latest
steps:
- name: Set env
run: echo "RELEASE_TAG=${GITHUB_REF##refs/tags/}" >> "$GITHUB_ENV"
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.go_version }}
- name: generate release artifacts
run: |
make release-manifests RELEASE_VERSION=${{ env.RELEASE_TAG }}
- name: generate release templates
run: |
make release-templates
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: out/*
generate_release_notes: true
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test
on:
push:
branches: ["main"]
pull_request:
types: ["opened", "synchronize", "reopened"]

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Verify
run: "make verify"
go_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run tests
run: "make test"

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v2.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
bin
testbin/*
Dockerfile.cross

# Test binary, build with `go test -c`

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
out/

# Kubernetes Generated files - skip generated files, except for vendored files

!vendor/**/zz_generated.*

# editor and IDE paraphernalia
.idea
*.swp
*.swo
*~

**.DS_Store
envfile.yaml
envfile-**.yaml
cluster.yaml
cluster-**.yaml
**.userdata
**kubeadm-config.yaml

# direnv files
.envrc
Loading

0 comments on commit 45f5888

Please sign in to comment.