Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e6c00f5
init
Jul 8, 2025
3ae842d
init
Jul 8, 2025
1e25ba7
add mapuser webhook
Jul 8, 2025
406d137
add verify.go
Jul 9, 2025
644dfc7
add webhooks
Jul 9, 2025
738b068
add webhooks
Jul 10, 2025
09c291b
account create,update,delete with verification
Jul 10, 2025
7d7e55e
user create,update,delete with verification
Jul 10, 2025
b574565
user create,update,delete with verification
Jul 11, 2025
2b0ad93
user create,update,delete with verification
Jul 11, 2025
9bca556
user create,update,delete with verification
Jul 11, 2025
7f24478
reconf MapUser
Jul 12, 2025
45f263a
add checking data in already created MapUser resources for duplicates
Jul 12, 2025
4cb8d0d
add checking data in already created MapUser resources for duplicates
Jul 12, 2025
6098f09
clean
Jul 12, 2025
de34739
clean
Jul 12, 2025
ef877e0
clean
Jul 12, 2025
c1655c2
clean
Jul 12, 2025
5768626
clean
Jul 12, 2025
a9db080
mapAccount convertation
Jul 13, 2025
ecf1400
reconfigure mapRole
Jul 13, 2025
39571f4
add timewait to maprole webhook
Jul 13, 2025
696ae52
disable check existent in cm
Jul 13, 2025
e32c6fa
fix logging
Jul 13, 2025
ebf2d7b
fix logging
Jul 13, 2025
0b6261f
set retry params
Jul 13, 2025
34728a3
edt logs output
Jul 14, 2025
25e0c78
edt logs output
Jul 14, 2025
e99e5a7
update deprecated func
Jul 15, 2025
dbcd591
fix lint errors
Jul 15, 2025
a8e6f2f
fix lint errors
Jul 15, 2025
3d6c1cc
fix test suite
Jul 15, 2025
de0134c
add deploy samples to makefile
Jul 15, 2025
94cf805
translate comments
Jul 15, 2025
fba9ca9
ltl fixes
Jul 15, 2025
8f6d62f
fix logging
Jul 15, 2025
57e0690
change kubeconfig for testing
Jul 16, 2025
4093f87
add webhook tests
Jul 16, 2025
20a54f0
fix e2e tests
Jul 16, 2025
617d970
helmchart edt
Jul 17, 2025
9f09f74
add codecow
Jul 17, 2025
d9e9fc4
add codecow badge
Jul 17, 2025
37f8a6f
add tests badge
Jul 17, 2025
4973f85
add LICENSE
Jul 17, 2025
17b56cf
ups
Jul 17, 2025
f31b80b
chart edt
Jul 18, 2025
4ba16f0
chart edt
Jul 18, 2025
1fc041c
chart edt
Jul 21, 2025
11ac7ca
chart edt
Jul 21, 2025
2adbd8e
chart edt
Jul 21, 2025
da735d6
add chart creation action
Jul 21, 2025
69e8527
fix actions
Jul 21, 2025
6d3bab2
fix actions
Jul 21, 2025
90e1891
edt helm chart
Jul 21, 2025
cc5d627
edt README.md
Jul 21, 2025
fe925c9
edt README.md
Jul 21, 2025
882cd22
ltl fix
Jul 22, 2025
66dfee3
edt README.md
Jul 24, 2025
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
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Kubebuilder DevContainer",
"image": "golang:1.24",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/git:1": {}
},

"runArgs": ["--network=host"],

"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"ms-kubernetes-tools.vscode-kubernetes-tools",
"ms-azuretools.vscode-docker"
]
}
},

"onCreateCommand": "bash .devcontainer/post-install.sh"
}

23 changes: 23 additions & 0 deletions .devcontainer/post-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -x

curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
mv ./kind /usr/local/bin/kind

curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/linux/amd64
chmod +x kubebuilder
mv kubebuilder /usr/local/bin/

KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl"
chmod +x kubectl
mv kubectl /usr/local/bin/kubectl

docker network create -d=bridge --subnet=172.19.0.0/24 kind

kind version
kubebuilder version
docker --version
go version
kubectl version --client
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on:
push:
pull_request:

jobs:
lint:
name: Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run linter
uses: golangci/golangci-lint-action@v8
with:
version: v2.1.0
110 changes: 110 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Publish release

on:
push:
tags:
- "*.*.*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
verify-app:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.24.0"

- name: Lint app
run: make lint

build-and-push-image:
needs: verify-app
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

release-chart:
needs: verify-app
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Release chart
run: |
# download helm chart releaser
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v1.8.1/chart-releaser_1.8.1_linux_amd64.tar.gz"
tar -xzf cr.tar.gz
rm -f cr.tar.gz
owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY")
repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY")
# package chart
./cr package charts/$repo
# upload chart to github releases
./cr upload \
--owner "$owner" \
--git-repo "$repo" \
--token "${{ secrets.GITHUB_TOKEN }}" \
--release-name-template "{{ .Version }}"
# update index and push to github pages
git config user.email "$owner@users.noreply.github.com"
git config user.name "$owner"
./cr index \
--owner "$owner" \
--git-repo "$repo" \
--token "${{ secrets.GITHUB_TOKEN }}" \
--release-name-template "{{ .Version }}" \
--index-path ./index.yaml \
--charts-repo https://$owner.github.io/$repo \
--push
32 changes: 32 additions & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: E2E Tests

on:
push:
pull_request:

jobs:
test-e2e:
name: Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Install the latest version of kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

- name: Verify kind installation
run: kind version

- name: Running Test e2e
run: |
go mod tidy
make test-e2e
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on:
push:
pull_request:

jobs:
test:
name: Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Running Tests
run: |
go mod tidy
make test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so

*.tgz

*.dylib
bin/*
Dockerfile.cross

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

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

# Go workspace file
go.work

# Kubernetes Generated files - skip generated files, except for vendored files
!vendor/**/zz_generated.*

# editor and IDE paraphernalia
.idea
.vscode
*.swp
*.swo
*~
/coverage.txt
/.env
52 changes: 52 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: "2"
run:
allow-parallel-runners: true
linters:
default: none
enable:
- copyloopvar
- dupl
- errcheck
- ginkgolinter
- goconst
- gocyclo
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- unconvert
- unparam
- unused
settings:
revive:
rules:
- name: comment-spacings
- name: import-shadowing
exclusions:
generated: lax
rules:
- linters:
- lll
path: api/*
- linters:
- dupl
- lll
path: internal/*
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Loading
Loading