Skip to content

Commit 4062751

Browse files
jhbeskowvgrassia
andauthored
Restructuring repository based on feedback (#17)
* Restructuring repository based on feedback from Matt Bishop * Apply suggestions from code review Co-authored-by: Vince Grassia <[email protected]> --------- Co-authored-by: Vince Grassia <[email protected]>
1 parent 94273d3 commit 4062751

File tree

78 files changed

+373
-1082
lines changed

Some content is hidden

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

78 files changed

+373
-1082
lines changed

src/sm-operator/.devcontainer/common/devcontainer.json renamed to .devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "BW k8s Operator",
33
"image": "mcr.microsoft.com/devcontainers/go:1.21",
44
"runArgs": ["--network=host"], // needed for kind
5-
"postCreateCommand": "sudo .devcontainer/common/postCreateCommand.sh",
5+
"postCreateCommand": "sudo .devcontainer/postCreateCommand.sh",
66
"customizations": {
77
"vscode": {
88
"extensions": [

src/sm-operator/.devcontainer/common/postCreateCommand.sh renamed to .devcontainer/postCreateCommand.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
#!/usr/bin/env bash
22
apt-get update
33
apt-get install -y kubernetes-client musl-tools # kubectl
4-
kind delete cluster --name sm-operator && kind create cluster --name sm-operator --config .devcontainer/common/kind-config.yaml
5-
# kind export kubeconfig
4+
kind delete cluster --name sm-operator && kind create cluster --name sm-operator --config .devcontainer/kind-config.yaml
65

76
PATH="$PATH:/usr/local/go/bin" make setup
87
PATH="$PATH:/usr/local/go/bin" make install
98

10-
# shellcheck disable=SC2016
119
echo '
1210
devcontainer setup complete!
1311
File renamed without changes.
File renamed without changes.

.github/workflows/build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
id: test
3737
run: |
3838
sudo apt update && sudo apt install musl-tools -y
39-
cd src/sm-operator
4039
make setup
4140
make test
4241
go tool cover -html=cover.out -o=cover.html
@@ -45,7 +44,7 @@ jobs:
4544
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
4645
with:
4746
name: cover.html
48-
path: src/sm-operator/cover.html
47+
path: cover.html
4948
if-no-files-found: error
5049

5150
- name: Generate Docker image tag
@@ -66,8 +65,7 @@ jobs:
6665
- name: Build Docker image
6766
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
6867
with:
69-
context: src/sm-operator
70-
file: src/sm-operator/Dockerfile
68+
file: Dockerfile
7169
platforms: linux/amd64,linux/arm64
7270
push: true
7371
tags: ${{ steps.image-name.outputs.name }}
@@ -80,7 +78,6 @@ jobs:
8078
env:
8179
IMAGE: ${{ steps.image-name.outputs.name }}
8280
run: |
83-
cd src/sm-operator
8481
make deploy IMG=$IMAGE
8582
8683
#Setup image pull secret (Until repo is made public)
@@ -114,6 +111,5 @@ jobs:
114111
115112
- name: Clean-up
116113
run: |
117-
cd src/sm-operator
118114
make undeploy
119115
kind delete cluster

.github/workflows/build_ghcr.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
id: test
3636
run: |
3737
sudo apt update && sudo apt install musl-tools -y
38-
cd src/sm-operator
3938
make setup
4039
make test
4140
go tool cover -html=cover.out -o=cover.html
@@ -45,7 +44,7 @@ jobs:
4544
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
4645
with:
4746
name: cover.html
48-
path: src/sm-operator/cover.html
47+
path: cover.html
4948
if-no-files-found: error
5049

5150
- name: Generate Docker image tag
@@ -66,8 +65,7 @@ jobs:
6665
- name: Build Docker image
6766
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
6867
with:
69-
context: src/sm-operator
70-
file: src/sm-operator/Dockerfile
68+
file: Dockerfile
7169
platforms: linux/amd64,linux/arm64
7270
push: true
7371
tags: ${{ steps.image-name.outputs.name }}
@@ -80,7 +78,6 @@ jobs:
8078
env:
8179
IMAGE: ${{ steps.image-name.outputs.name }}
8280
run: |
83-
cd src/sm-operator
8481
make deploy IMG=$IMAGE
8582
8683
#Setup image pull secret (Until repo is made public)
@@ -114,6 +111,5 @@ jobs:
114111
115112
- name: Clean-up
116113
run: |
117-
cd src/sm-operator
118114
make undeploy
119115
kind delete cluster

.github/workflows/bump_version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Bump Version
4747
run: |
48-
sed -i -E '/^VERSION\s+\?=\s+[^\s]+/!b;cVERSION ?= ${{ github.event.inputs.version_number }}' src/sm-operator/Makefile
48+
sed -i -E '/^VERSION\s+\?=\s+[^\s]+/!b;cVERSION ?= ${{ github.event.inputs.version_number }}' Makefile
4949
5050
- name: Setup git
5151
run: |

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Get Version
3939
id: version
4040
run: |
41-
VERSION=$(sed -nE 's/^VERSION\s+\?=\s+([^\s]+)/\1/p' src/sm-operator/Makefile)
41+
VERSION=$(sed -nE 's/^VERSION\s+\?=\s+([^\s]+)/\1/p' Makefile)
4242
echo "version=$VERSION" >> $GITHUB_OUTPUT
4343
4444
- name: Get branch name

.gitignore

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,33 @@ Thumbs.db
2323
node_modules
2424
npm-debug.log
2525

26-
src/sm-operator/bin/*
27-
src/sm-operator/sm-operator.tar
28-
src/sm-operator/bw-sdk/internal/cinterface/lib/*
29-
src/sm-operator/cmd/__debug_bin*
26+
# Binaries for programs and plugins
27+
*.exe
28+
*.exe~
29+
*.dll
30+
*.so
31+
*.dylib
32+
bin/*
33+
Dockerfile.cross
34+
35+
# Test binary, build with `go test -c`
36+
*.test
37+
38+
# Output of the go coverage tool, specifically when used with LiteIDE
39+
*.out
40+
41+
# Kubernetes Generated files - skip generated files, except for vendored files
42+
43+
!vendor/**/zz_generated.*
44+
45+
# editor and IDE paraphernalia
46+
.idea
47+
*.swp
48+
*.swo
49+
*~
50+
51+
sm-operator.tar
52+
bw-sdk/internal/cinterface/lib/*
53+
**/__debug_bin*
3054
**/temp.zip
3155
**/.env

0 commit comments

Comments
 (0)