Skip to content

Commit ac26857

Browse files
authored
Merge pull request #2079 from hexlet-codebattle/cert-manager
add cert-manager for easy cert issuing
2 parents 99762e7 + 5c01601 commit ac26857

File tree

15 files changed

+10251
-16
lines changed

15 files changed

+10251
-16
lines changed

k8s/flux.cue

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@ bundle: {
22
apiVersion: "v1alpha1"
33
name: "codebattle"
44
instances: {
5+
"cert-manager": {
6+
module: url: "oci://ghcr.io/stefanprodan/modules/flux-helm-release"
7+
namespace: "flux-system"
8+
values: {
9+
repository: url: "https://charts.jetstack.io"
10+
chart: {
11+
name: "cert-manager"
12+
version: "v1.17.0"
13+
}
14+
sync: targetNamespace: "codebattle"
15+
helmValues: {
16+
crds: enabled: true
17+
config: {
18+
apiVersion: "controller.config.cert-manager.io/v1alpha1"
19+
kind: "ControllerConfiguration"
20+
enableGatewayAPI: true
21+
}
22+
}
23+
}
24+
}
525
"gateway": {
626
module: url: "oci://ghcr.io/stefanprodan/modules/flux-helm-release"
727
namespace: "flux-system"
@@ -26,17 +46,23 @@ bundle: {
2646
username: string @timoni(runtime:string:GITHUB_USERNAME)
2747
password: string @timoni(runtime:string:GITHUB_TOKEN)
2848
}
49+
_hostname: string @timoni(runtime:string:CODEBATTLE_HOSTNAME)
2950
patches: [{
30-
apiVersion: "gateway.networking.k8s.io/v1"
31-
kind: "HTTPRoute"
32-
metadata: {
33-
name: "codebattle"
51+
patch: [{
52+
op: "add"
53+
path: "/spec/listeners/0/hostname"
54+
value: _hostname
55+
}, {
56+
op: "add"
57+
path: "/spec/listeners/1/hostname"
58+
value: _hostname
59+
}]
60+
target: {
61+
group: "gateway.networking.k8s.io"
62+
kind: "Gateway"
63+
name: "gateway"
3464
namespace: "codebattle"
3565
}
36-
spec: {
37-
_hostname: string @timoni(runtime:string:CODEBATTLE_HOSTNAME)
38-
hostnames: [_hostname]
39-
}
4066
}]
4167
}
4268
}

0 commit comments

Comments
 (0)