Skip to content

Commit b622d12

Browse files
committed
chore: initial commit
0 parents  commit b622d12

File tree

210 files changed

+18900
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+18900
-0
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2+
# Ignore build and test binaries.
3+
bin/

.github/CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence,
3+
# all users in this group will be requested
4+
# for review when someone opens a pull request.
5+
6+
# Default reviewers
7+
8+
* @InditexTech/k8s-overcommit-operator-maintainers
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
3+
SPDX-FileContributor: enriqueavi@inditex.com
4+
5+
SPDX-License-Identifier: CC-BY-4.0
6+
-->
7+
---
8+
name: Bug Report
9+
about: Use this template to report a bug
10+
title: ''
11+
labels: kind/bug
12+
assignees: ''
13+
14+
---
15+
16+
### Detailed description
17+
18+
A clear and concise description of what the problem is.
19+
20+
### Expected behaviour
21+
22+
Expected behaviour one the problem is fixed.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
3+
SPDX-FileContributor: enriqueavi@inditex.com
4+
5+
SPDX-License-Identifier: CC-BY-4.0
6+
-->
7+
---
8+
name: Feature request
9+
about: Suggest an idea/feature for this project
10+
title: ''
11+
labels: 'kind/feature'
12+
assignees: ''
13+
14+
---
15+
16+
### Motivation
17+
18+
Describe here the motivation of the request.
19+
20+
### Acceptance criteria
21+
22+
- [ ] A checklist of tasks to be done to assume the issue addressed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2025 2025 INDUSTRIA DE DISEÑO TEXTIL S.A. (INDITEX S.A.)
3+
SPDX-FileContributor: enriqueavi@inditex.com
4+
5+
SPDX-License-Identifier: Apache-2.0
6+
-->
7+
8+
## Summary
9+
10+
Briefly describe the purpose of this PR and what changes it introduces.
11+
12+
## Checklist
13+
14+
- [ ] Commits are **signed** (`git commit -S`)
15+
- [ ] Commit messages follow **Conventional Commits**
16+
- [ ] Documentation has been updated (if needed)
17+
- [ ] I have read and agree to the project’s [Code of Conduct](../CODE_OF_CONDUCT.md)
18+
- [ ] I have signed the [Contributor License Agreement (CLA)](../CONTRIBUTING.md)
19+
20+
## Additional context
21+
22+
Add any screenshots, test output, or notes for reviewers here.

.github/workflows/PR-verify.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Pull Request verification
2+
permissions:
3+
contents: read
4+
5+
on:
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
repo-linter:
11+
name: Repo Linter
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16+
with:
17+
fetch-depth: 0
18+
ref: ${{ github.event.pull_request.head.sha }}
19+
20+
- name: Setup Node version
21+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
22+
with:
23+
node-version: ${{ env.NODE_VERSION }}
24+
25+
- name: Execute Repo Linter
26+
run: |
27+
echo "Installing Repo Linter"
28+
npm install -g repolinter@v0.11.2
29+
30+
echo "Executing Repo Linter"
31+
repolinter --rulesetFile repolinter.json --dryRun .
32+
33+
echo "Repo Linter execution completed"
34+
35+
36+
reuse-compliance:
37+
name: REUSE Compliance
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
42+
with:
43+
fetch-depth: 0
44+
ref: ${{ github.event.pull_request.head.sha }}
45+
46+
- name: REUSE Compliance Check
47+
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check Code Generation 🧪
2+
on:
3+
pull_request:
4+
jobs:
5+
check-dependencies-gen:
6+
name: Check Go Modules
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout 🧲
10+
uses: actions/checkout@v4
11+
12+
- name: Setup Go ⬇️
13+
uses: actions/setup-go@v3
14+
with:
15+
go-version: 1.24.2
16+
17+
- name: Check dependencies Generation 🧪
18+
run: |
19+
go mod tidy
20+
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code
21+
22+
check-code-gen:
23+
name: Check SDK Code Generation 🧪
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout 🧲
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Go ⬇️
30+
uses: actions/setup-go@v3
31+
with:
32+
go-version: 1.24.2
33+
34+
- name: Check dependencies Generation 🧪
35+
run: |
36+
make generate manifests bundle
37+
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: ⚒️ Go e2e tests for the webhook
2+
on:
3+
pull_request:
4+
jobs:
5+
e2e:
6+
runs-on: ubuntu-latest
7+
name: E2E tests 🔃
8+
steps:
9+
- name: Checkout 🧲
10+
uses: actions/checkout@v4
11+
12+
- name: Restore go build cache ⏬
13+
uses: actions/cache@v4
14+
with:
15+
path: ~/.cache/go-build
16+
key: ${{ runner.os }}-go-build-v1
17+
18+
- name: Setup Go ⬇️
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: 1.24.2
22+
23+
- name: Install kubectl, helm, kind and kuttl ⬇️
24+
env:
25+
KUTTL_VERSION: '0.20.0'
26+
KUTTL_PLUGIN_FILENAME: 'kubectl-kuttl_0.20.0_linux_x86_64'
27+
run: bash hack/install-dependencies.sh
28+
29+
- name: Run kind ⚙️
30+
run: kind create cluster --name kuttl-cluster
31+
32+
- name: Mount the image in the Kind cluster ⚙️
33+
run: |
34+
bash hack/ci-mount-image.sh
35+
36+
- name: Run the tests 🔎
37+
run: |
38+
echo "Running the tests"
39+
kubectl kuttl test test/e2e/ --start-kind=false
40+
41+
- name: Clean up Kind cluster ☠️
42+
if: always()
43+
run: kind delete cluster --name kuttl-cluster

.github/workflows/go-test.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ⚒️ Go tests and linting for the webhook
2+
on:
3+
pull_request:
4+
jobs:
5+
test:
6+
name: Test 🔨
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout 🧲
10+
uses: actions/checkout@v4
11+
12+
- name: Restore go build cache ⏬
13+
uses: actions/cache@v4
14+
with:
15+
path: ~/.cache/go-build
16+
key: ${{ runner.os }}-go-build-v1
17+
18+
- name: Setup Go ⬇️
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: 1.24.2
22+
23+
- name: Build and test 🏗️
24+
run: |
25+
make build
26+
make test
27+
28+
lint:
29+
name: Lint 🔍
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout 🧲
33+
uses: actions/checkout@v4
34+
35+
- name: Restore go build cache ⏬
36+
uses: actions/cache@v4
37+
with:
38+
path: ~/.cache/go-build
39+
key: ${{ runner.os }}-go-build-v1
40+
41+
- name: Setup Go ⬇️
42+
uses: actions/setup-go@v3
43+
with:
44+
go-version: 1.24.2
45+
46+
- name: Linter 🔍
47+
run: |
48+
make lint

.github/workflows/release.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: 🚀 Release
2+
permissions: read-all
3+
4+
on:
5+
release:
6+
types:
7+
- created
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: inditextech/k8s-overcommit-operator
12+
13+
jobs:
14+
release:
15+
name: 🏷️ Release
16+
runs-on: ubuntu-latest
17+
outputs:
18+
version: ${{ steps.version.outputs.version }}
19+
values_version: ${{ steps.version.outputs.values_version }}
20+
chart_version: ${{ steps.version.outputs.chart_version }}
21+
steps:
22+
- name: 🛎️ Checkout
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
24+
with:
25+
fetch-depth: 0
26+
- name: 📝 Load Operator version
27+
id: version
28+
run: |
29+
echo "version=$(make print-VERSION | cut -d'=' -f2)" >> $GITHUB_OUTPUT
30+
echo "values_version=$(yq '.deployment.image.tag' chart/values.yaml)" >> $GITHUB_OUTPUT
31+
echo "chart_version=$(yq '.appVersion' chart/Chart.yaml)" >> $GITHUB_OUTPUT
32+
echo $GITHUB_OUTPUT
33+
34+
check:
35+
name: 🔎 Check versions
36+
needs: release
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: 🔎 Check versions
40+
run: |
41+
echo "version: ${{ needs.release.outputs.version }}"
42+
echo "values_version: ${{ needs.release.outputs.values_version }}"
43+
echo "chart_version: ${{ needs.release.outputs.chart_version }}"
44+
echo "tag_name: ${{ github.event.release.tag_name }}"
45+
46+
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.version }}" ]; then
47+
echo "Version in Makefile does not match release tag"
48+
exit 1
49+
fi
50+
51+
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.values_version }}" ]; then
52+
echo "Version in chart/values.yaml does not match release tag"
53+
exit 1
54+
fi
55+
56+
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.chart_version }}" ]; then
57+
echo "Version in chart/Chart.yaml does not match release tag"
58+
exit 1
59+
fi
60+
61+
62+
build:
63+
name: 🛠️ Build Operator images
64+
needs: check
65+
runs-on: ubuntu-latest
66+
permissions:
67+
contents: write
68+
packages: write
69+
steps:
70+
- name: 🛎️ Checkout
71+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
72+
with:
73+
fetch-depth: 0
74+
75+
- name: 🔐 Login into ${{ env.REGISTRY }}
76+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
77+
with:
78+
registry: ${{ env.REGISTRY }}
79+
username: ${{ github.actor }}
80+
password: ${{ secrets.GITHUB_TOKEN }}
81+
82+
- name: 🏗️ Build and push Operator image
83+
run: |
84+
make docker-build docker-push
85+
- name: 🏗️ Build and push Operator bundle
86+
run: |
87+
make bundle
88+
make bundle-build bundle-push
89+
- name: 🏗️ Build and push Operator catalog
90+
run: |
91+
make catalog-build catalog-push

0 commit comments

Comments
 (0)