-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. k8s initial structure (broken for sure)
2. gha: meta secret server, docker push action
- Loading branch information
1 parent
b9cb413
commit 1d7cfe2
Showing
7 changed files
with
118 additions
and
24 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "Docker Automation" | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
docker_push: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: earthly/actions-setup@v1 | ||
with: | ||
version: v0.8.0 | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: cypherkitty | ||
password: ${{ secrets.META_SECRET_GH_PAT }} | ||
|
||
- name: run tests | ||
run: | | ||
earthly \ | ||
--allow-privileged \ | ||
--ci \ | ||
--remote-cache=ghcr.io/meta-secret/core:cache \ | ||
--push \ | ||
./meta-secret+build-meta-server-image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
VERSION 0.8 | ||
FROM scratch | ||
|
||
sub-sub: | ||
FROM ubuntu:latest | ||
kcl-config-gen: | ||
FROM --platform=linux/amd64 kcllang/kcl:v0.11.0 | ||
RUN --no-cache kcl | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
schema Metadata: | ||
name: str | ||
labels: Labels | ||
|
||
schema Labels: | ||
type: str | ||
location: str | ||
|
||
|
||
projectName = "meta-secret-server" | ||
volumeName = "${projectName}-vol" | ||
appPath = "/meta-secret/app/meta-server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
name = "meta-secret-server" | ||
edition = "v0.8.0" | ||
version = "0.0.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import .common | ||
|
||
apiVersion = "apps/v1" | ||
kind = "StatefulSet" | ||
|
||
metadata = { | ||
name = common.projectName | ||
} | ||
|
||
spec = { | ||
replicas = 1 | ||
serviceName = common.projectName | ||
selector = { | ||
matchLabels = { | ||
app = common.projectName | ||
} | ||
} | ||
template = { | ||
metadata = { | ||
labels = { | ||
app = common.projectName | ||
} | ||
} | ||
spec = { | ||
containers = [ | ||
{ | ||
name = common.projectName | ||
imagePullPolicy = "Always" | ||
image = option("imageName") | ||
command = ["/bin/sh", "-c", "./meta-server"] | ||
volumeMounts = [ | ||
{ | ||
name = "config" | ||
mountPath = "${common.appPath}/config.yaml" | ||
subPath = "config.yaml" | ||
} | ||
] | ||
} | ||
] | ||
volumes = [ | ||
{ | ||
name = "config" | ||
configMap = { | ||
name = "${common.projectName}-config" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters