Skip to content

Commit 4d27bf7

Browse files
authored
Milo Refactor (#68)
Creates all of the necessary changes to refactor the Datum repo to be an extension of the Milo control plane. The apiserver and controller manager components were moved to the [milo repo](https://github.com/datum-cloud/milo). This repo is now focused on extending that control plane through a custom kubebuilder controller manager and admission policies.
2 parents 0c53df1 + 16f834b commit 4d27bf7

81 files changed

Lines changed: 2239 additions & 3527 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,24 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2-
// README at: https://github.com/devcontainers/templates/tree/main/src/go
31
{
4-
"name": "Go",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/go:1-1.23-bookworm",
7-
"features": {
8-
"ghcr.io/devcontainers/features/common-utils": {
9-
"installOhMyZsh": true,
10-
"configureZshAsDefaultShell": true,
11-
"installOhMyZshConfig": true,
12-
"installZsh": true,
13-
"upgradePackages": true
14-
},
15-
"ghcr.io/devcontainers/features/docker-in-docker": {},
16-
"ghcr.io/dhoeric/features/act": {},
17-
},
18-
"customizations": {
19-
"vscode": {
20-
"extensions": [
21-
"patbenatar.advanced-new-file",
22-
"stkb.rewrap",
23-
"github.vscode-github-actions",
24-
"yzhang.markdown-all-in-one"
25-
],
26-
"settings": {
27-
"rewrap.autoWrap.enabled": true
28-
},
29-
"editor.tabSize": 2
30-
}
31-
},
2+
"name": "Kubebuilder DevContainer",
3+
"image": "docker.io/golang:1.24",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
6+
"ghcr.io/devcontainers/features/git:1": {}
7+
},
328

33-
// Features to add to the dev container. More info: https://containers.dev/features.
34-
// "features": {},
9+
"runArgs": ["--network=host"],
3510

36-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
37-
// "forwardPorts": [],
11+
"customizations": {
12+
"vscode": {
13+
"settings": {
14+
"terminal.integrated.shell.linux": "/bin/bash"
15+
},
16+
"extensions": [
17+
"ms-kubernetes-tools.vscode-kubernetes-tools",
18+
"ms-azuretools.vscode-docker"
19+
]
20+
}
21+
},
3822

39-
// Use 'postCreateCommand' to run commands after the container is created.
40-
// "postCreateCommand": "go version",
41-
42-
// Configure tool-specific properties.
43-
// "customizations": {},
23+
"onCreateCommand": "bash .devcontainer/post-install.sh"
4424
}

.devcontainer/post-install.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
set -x
3+
4+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
5+
chmod +x ./kind
6+
mv ./kind /usr/local/bin/kind
7+
8+
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/linux/amd64
9+
chmod +x kubebuilder
10+
mv kubebuilder /usr/local/bin/
11+
12+
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
13+
curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl"
14+
chmod +x kubectl
15+
mv kubectl /usr/local/bin/kubectl
16+
17+
docker network create -d=bridge --subnet=172.19.0.0/24 kind
18+
19+
kind version
20+
kubebuilder version
21+
docker --version
22+
go version
23+
kubectl version --client

.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/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 0 additions & 74 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/usability_feedback.yaml

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
publish-container-image:
11+
permissions:
12+
id-token: write
13+
contents: read
14+
packages: write
15+
uses: datum-cloud/actions/.github/workflows/publish-docker.yaml@v1.5.2
16+
with:
17+
image-name: datum
18+
secrets: inherit
19+
20+
21+
publish-kustomize-bundles:
22+
permissions:
23+
id-token: write
24+
contents: read
25+
packages: write
26+
uses: datum-cloud/actions/.github/workflows/publish-kustomize-bundle.yaml@v1.5.2
27+
with:
28+
bundle-name: ghcr.io/datum-cloud/datum-kustomize
29+
bundle-path: config
30+
secrets: inherit

.github/workflows/build.yaml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
name: Run on Ubuntu
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Clone the code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version-file: go.mod
19+
20+
- name: Run linter
21+
uses: golangci/golangci-lint-action@v7
22+
with:
23+
version: v2.1.6

.github/workflows/publish.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)