Skip to content

Commit

Permalink
add cert-manager for easy cert issuing
Browse files Browse the repository at this point in the history
  • Loading branch information
kjubybot committed Feb 17, 2025
1 parent ff31aaf commit 5c01601
Show file tree
Hide file tree
Showing 15 changed files with 10,251 additions and 16 deletions.
42 changes: 34 additions & 8 deletions k8s/flux.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@ bundle: {
apiVersion: "v1alpha1"
name: "codebattle"
instances: {
"cert-manager": {
module: url: "oci://ghcr.io/stefanprodan/modules/flux-helm-release"
namespace: "flux-system"
values: {
repository: url: "https://charts.jetstack.io"
chart: {
name: "cert-manager"
version: "v1.17.0"
}
sync: targetNamespace: "codebattle"
helmValues: {
crds: enabled: true
config: {
apiVersion: "controller.config.cert-manager.io/v1alpha1"
kind: "ControllerConfiguration"
enableGatewayAPI: true
}
}
}
}
"gateway": {
module: url: "oci://ghcr.io/stefanprodan/modules/flux-helm-release"
namespace: "flux-system"
Expand All @@ -26,17 +46,23 @@ bundle: {
username: string @timoni(runtime:string:GITHUB_USERNAME)
password: string @timoni(runtime:string:GITHUB_TOKEN)
}
_hostname: string @timoni(runtime:string:CODEBATTLE_HOSTNAME)
patches: [{
apiVersion: "gateway.networking.k8s.io/v1"
kind: "HTTPRoute"
metadata: {
name: "codebattle"
patch: [{
op: "add"
path: "/spec/listeners/0/hostname"
value: _hostname
}, {
op: "add"
path: "/spec/listeners/1/hostname"
value: _hostname
}]
target: {
group: "gateway.networking.k8s.io"
kind: "Gateway"
name: "gateway"
namespace: "codebattle"
}
spec: {
_hostname: string @timoni(runtime:string:CODEBATTLE_HOSTNAME)
hostnames: [_hostname]
}
}]
}
}
Expand Down
Loading

0 comments on commit 5c01601

Please sign in to comment.