File tree Expand file tree Collapse file tree 6 files changed +132
-0
lines changed
Expand file tree Collapse file tree 6 files changed +132
-0
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ cue_library(
1414 "service_account_list.cue" ,
1515 "service_list.cue" ,
1616 "validating_webhook_configuration_list.cue" ,
17+ "vm_pod_scrape_list.cue" ,
1718 ],
1819 importpath = "github.com/uhthomas/automata/k8s/magiclove/cnpg_system" ,
1920 visibility = ["//visibility:public" ],
2021 deps = [
22+ "//cue.mod/gen/github.com/VictoriaMetrics/operator/api/operator/v1beta1:cue_v1beta1_library" ,
2123 "//cue.mod/gen/k8s.io/api/admissionregistration/v1:cue_v1_library" ,
2224 "//cue.mod/gen/k8s.io/api/apps/v1:cue_v1_library" ,
2325 "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library" ,
Original file line number Diff line number Diff line change 1+ package cnpg_system
2+
3+ import operatorv1beta1 " github.com/VictoriaMetrics/operator/api/operator/v1beta1 "
4+
5+ #VMPodScrapeList : operatorv1beta1 .#VMPodScrapeList & {
6+ apiVersion : " operator.victoriametrics.com/v1beta1 "
7+ kind : " VMPodScrapeList "
8+ items : [...{
9+ apiVersion : " operator.victoriametrics.com/v1beta1 "
10+ kind : " VMPodScrape "
11+ }]
12+ }
13+
14+ #VMPodScrapeList : items : [{
15+ spec : {
16+ podMetricsEndpoints : [{port : " metrics " }]
17+ selector : matchLabels : " app.kubernetes.io/name " : #Name
18+ }
19+ }]
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ cue_library(
55 srcs = [
66 "cluster_list.cue" ,
77 "external_secret_list.cue" ,
8+ "gateway_list.cue" ,
9+ "http_route_list.cue" ,
810 "list.cue" ,
911 "namespace_list.cue" ,
1012 "vm_pod_scrape_list.cue" ,
@@ -16,6 +18,7 @@ cue_library(
1618 "//cue.mod/gen/github.com/cloudnative-pg/cloudnative-pg/api/v1:cue_v1_library" ,
1719 "//cue.mod/gen/github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1:cue_v1beta1_library" ,
1820 "//cue.mod/gen/k8s.io/api/core/v1:cue_v1_library" ,
21+ "//cue.mod/gen/sigs.k8s.io/gateway-api/apis/v1:cue_v1_library" ,
1922 "//k8s/magiclove/immich/machine_learning:cue_machine_learning_library" ,
2023 "//k8s/magiclove/immich/server:cue_server_library" ,
2124 "//k8s/magiclove/immich/valkey:cue_valkey_library" ,
Original file line number Diff line number Diff line change 1+ package immich
2+
3+ import gatewayv1 " sigs.k8s.io/gateway-api/apis/v1 "
4+
5+ #GatewayList : gatewayv1 .#GatewayList & {
6+ apiVersion : " gateway.networking.k8s.io/v1 "
7+ kind : " GatewayList "
8+ items : [...{
9+ apiVersion : " gateway.networking.k8s.io/v1 "
10+ kind : " Gateway "
11+ }]
12+ }
13+
14+ #GatewayList : items : [{
15+ metadata : {
16+ name : #Name
17+ annotations : {
18+ " cert-manager.io/cluster-issuer " : " letsencrypt "
19+ " external-dns.alpha.kubernetes.io/hostname " : " \(#Name )-magiclove.hipparcos.net "
20+ }
21+ }
22+ spec : {
23+ gatewayClassName : " cilium "
24+ listeners : [{
25+ name : " http "
26+ hostname : " \(#Name )-magiclove.hipparcos.net "
27+ port : 80
28+ protocol : gatewayv1 .#HTTPProtocolType
29+ }, {
30+ name : " https "
31+ hostname : " \(#Name )-magiclove.hipparcos.net "
32+ port : 443
33+ protocol : gatewayv1 .#HTTPSProtocolType
34+ tls : certificateRefs : [{name : " \(#Name )-tls " }]
35+ }]
36+ }
37+ }]
Original file line number Diff line number Diff line change 1+ package immich
2+
3+ import gatewayv1 " sigs.k8s.io/gateway-api/apis/v1 "
4+
5+ #HTTPRouteList : gatewayv1 .#HTTPRouteList & {
6+ apiVersion : " gateway.networking.k8s.io/v1 "
7+ kind : " HTTPRouteList "
8+ items : [...{
9+ apiVersion : " gateway.networking.k8s.io/v1 "
10+ kind : " HTTPRoute "
11+ }]
12+ }
13+
14+ #HTTPRouteList : items : [{
15+ metadata : name : " \(#Name )-http "
16+ spec : {
17+ parentRefs : [{
18+ name : #Name
19+ sectionName : " http "
20+ }]
21+ rules : [{
22+ filters : [{
23+ type : gatewayv1 .#HTTPRouteFilterRequestRedirect
24+ requestRedirect : {
25+ scheme : " https "
26+ statusCode : 301
27+ }
28+ }]
29+ }]
30+ }
31+ }, {
32+ metadata : name : " \(#Name )-https "
33+ spec : {
34+ parentRefs : [{
35+ name : #Name
36+ sectionName : " https "
37+ }]
38+ rules : [{
39+ matches : [{
40+ path : {
41+ type : gatewayv1 .#PathMatchPathPrefix
42+ value : " / "
43+ }
44+ }]
45+ backendRefs : [{
46+ name : " \(#Name )-server "
47+ port : 80
48+ }]
49+ }]
50+ }
51+ }]
Original file line number Diff line number Diff line change 1+ package immich
2+
3+ import operatorv1beta1 " github.com/VictoriaMetrics/operator/api/operator/v1beta1 "
4+
5+ #VMPodScrapeList : operatorv1beta1 .#VMPodScrapeList & {
6+ apiVersion : " operator.victoriametrics.com/v1beta1 "
7+ kind : " VMPodScrapeList "
8+ items : [...{
9+ apiVersion : " operator.victoriametrics.com/v1beta1 "
10+ kind : " VMPodScrape "
11+ }]
12+ }
13+
14+ #VMPodScrapeList : items : [{
15+ metadata : name : " immich-pg-db "
16+ spec : {
17+ podMetricsEndpoints : [{port : " metrics " }]
18+ selector : matchLabels : " cnpg.io/cluster " : " immich-pg-db "
19+ }
20+ }]
You can’t perform that action at this time.
0 commit comments