Compare commits
2 Commits
1fd3d4d3a9
...
948473c171
| Author | SHA1 | Date | |
|---|---|---|---|
|
948473c171
|
|||
|
6863261c3e
|
@@ -1,2 +0,0 @@
|
|||||||
[env]
|
|
||||||
RUSTC_BOOTSTRAP = "1"
|
|
||||||
@@ -9,8 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
uses: dreaded_x/workflows/.gitea/workflows/rust-kubernetes.yaml@66ab50c3ac239dbdd1e42e6276ec2e65b6a79379
|
uses: infra/workflows/.gitea/workflows/docker.yaml@956337b9bd5e72a93d3a57513cd421e7554dd61d
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
generate_crds: true
|
|
||||||
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ fail_fast: true
|
|||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v5.0.0
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
@@ -14,7 +14,7 @@ repos:
|
|||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
|
|
||||||
- repo: https://github.com/crate-ci/typos
|
- repo: https://github.com/crate-ci/typos
|
||||||
rev: v1.31.1
|
rev: typos-dict-v0.13.13
|
||||||
hooks:
|
hooks:
|
||||||
- id: typos
|
- id: typos
|
||||||
args: ["--force-exclude"]
|
args: ["--force-exclude"]
|
||||||
@@ -72,6 +72,6 @@ repos:
|
|||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
||||||
- repo: https://github.com/hadolint/hadolint
|
- repo: https://github.com/hadolint/hadolint
|
||||||
rev: v2.12.0
|
rev: v2.14.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: hadolint
|
- id: hadolint
|
||||||
|
|||||||
938
Cargo.lock
generated
938
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
20
Cargo.toml
20
Cargo.toml
@@ -5,17 +5,17 @@ edition = "2024"
|
|||||||
default-run = "authelia-controller"
|
default-run = "authelia-controller"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
color-eyre = "0.6.3"
|
color-eyre = "0.6.5"
|
||||||
dotenvy = "0.15.7"
|
dotenvy = "0.15.7"
|
||||||
futures-util = "0.3.31"
|
futures-util = "0.3.31"
|
||||||
git-version = "0.3.9"
|
git-version = "0.3.9"
|
||||||
k8s-openapi = { version = "0.24.0", features = ["v1_31"] }
|
k8s-openapi = { version = "0.26.1", features = ["v1_34"] }
|
||||||
kube = { version = "0.99.0", features = ["derive", "runtime"] }
|
kube = { version = "2.0.1", features = ["derive", "runtime"] }
|
||||||
schemars = "0.8.22"
|
schemars = "1.1.0"
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
serde_json = "1.0.140"
|
serde_json = "1.0.146"
|
||||||
serde_yaml = "0.9.34"
|
serde_yaml = "0.9.34"
|
||||||
thiserror = "2.0.12"
|
thiserror = "2.0.17"
|
||||||
tokio = { version = "1.44.2", features = ["full"] }
|
tokio = { version = "1.48.0", features = ["full"] }
|
||||||
tracing = "0.1.41"
|
tracing = "0.1.44"
|
||||||
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json"] }
|
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] }
|
||||||
|
|||||||
14
Dockerfile
14
Dockerfile
@@ -1,7 +1,7 @@
|
|||||||
FROM rust:1.86 AS base
|
FROM rust:1.92 AS base
|
||||||
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||||
RUN cargo install cargo-chef --locked --version 0.1.71 && \
|
RUN cargo install cargo-chef --locked --version 0.1.73 && \
|
||||||
cargo install cargo-auditable --locked --version 0.6.6
|
cargo install cargo-auditable --locked --version 0.7.2
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
FROM base AS planner
|
FROM base AS planner
|
||||||
@@ -15,9 +15,11 @@ RUN cargo chef cook --release --recipe-path recipe.json
|
|||||||
COPY . .
|
COPY . .
|
||||||
ARG RELEASE_VERSION
|
ARG RELEASE_VERSION
|
||||||
ENV RELEASE_VERSION=${RELEASE_VERSION}
|
ENV RELEASE_VERSION=${RELEASE_VERSION}
|
||||||
RUN cargo auditable build --release
|
RUN cargo auditable build --release && /app/target/release/crdgen > /crds.yaml
|
||||||
|
|
||||||
FROM gcr.io/distroless/cc-debian12:nonroot AS runtime
|
FROM scratch AS manifests
|
||||||
|
COPY --from=builder /crds.yaml /
|
||||||
|
|
||||||
|
FROM gcr.io/distroless/cc-debian13:nonroot AS runtime
|
||||||
COPY --from=builder /app/target/release/authelia-controller /authelia-controller
|
COPY --from=builder /app/target/release/authelia-controller /authelia-controller
|
||||||
COPY --from=builder /app/target/release/crdgen /crdgen
|
|
||||||
CMD ["/authelia-controller"]
|
CMD ["/authelia-controller"]
|
||||||
|
|||||||
23
docker-bake.hcl
Normal file
23
docker-bake.hcl
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
variable "TAG_BASE" {}
|
||||||
|
variable "RELEASE_VERSION" {}
|
||||||
|
|
||||||
|
group "default" {
|
||||||
|
targets = ["authelia-controller", "manifests"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "docker-metadata-action" {}
|
||||||
|
|
||||||
|
target "authelia-controller" {
|
||||||
|
inherits = ["docker-metadata-action"]
|
||||||
|
context = "./"
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
tags = [for tag in target.docker-metadata-action.tags : "${TAG_BASE}:${tag}"]
|
||||||
|
target = "runtime"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "manifests" {
|
||||||
|
context = "./"
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
target = "manifests"
|
||||||
|
output = [{ type = "cacheonly" }, "manifests"]
|
||||||
|
}
|
||||||
@@ -21,7 +21,7 @@ spec:
|
|||||||
securityContext: {}
|
securityContext: {}
|
||||||
containers:
|
containers:
|
||||||
- name: authelia-controller
|
- name: authelia-controller
|
||||||
image: git.huizinga.dev/dreaded_x/authelia-controller@${DIGEST}
|
image: '{{ index .images "authelia-controller" }}'
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
securityContext: {}
|
securityContext: {}
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.86"
|
channel = "1.92"
|
||||||
profile = "default"
|
profile = "default"
|
||||||
components = ["rust-analyzer"]
|
components = ["rust-analyzer"]
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#![feature(let_chains)]
|
|
||||||
pub mod context;
|
pub mod context;
|
||||||
pub mod resources;
|
pub mod resources;
|
||||||
mod version;
|
mod version;
|
||||||
|
|||||||
Reference in New Issue
Block a user