Skip to content

Commit 6fbdb3e

Browse files
committed
Move kuadrant resources to separate kustomization file
Signed-off-by: David Martin <[email protected]>
1 parent 88cda97 commit 6fbdb3e

File tree

9 files changed

+978
-218
lines changed

9 files changed

+978
-218
lines changed

Diff for: .github/workflows/ci.yaml

+19-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-latest
4646
steps:
4747
- name: Checkout Code
48-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4949
- name: Download Kustomize
5050
run: |
5151
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
@@ -55,4 +55,21 @@ jobs:
5555
if ! make compare-bundles; then
5656
echo "::error:: Bundles comparison failed. Please run 'make generate-bundles' and check in changes."
5757
exit 1
58-
fi
58+
fi
59+
60+
check-kuadrant-custom-resource-state:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Checkout Code
64+
uses: actions/checkout@v4
65+
66+
- name: Execute generation script
67+
run: ./hack/gen_kuadrant_custom_resource_state.sh
68+
69+
- name: Check for changes in generated file
70+
run: |
71+
if ! git diff --exit-code ./config/kuadrant/custom-resource-state.yaml; then
72+
echo "The generated file ./config/kuadrant/custom-resource-state.yaml has changes."
73+
echo "Please run './hack/gen_kuadrant_custom_resource_state.sh' locally and check in the changes."
74+
exit 1
75+
fi

Diff for: .gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
bin/*
33

44
log/
5-
/vendor/
5+
/vendor/
6+
.vscode/

Diff for: config/default/custom-resource-state.yaml

-212
Original file line numberDiff line numberDiff line change
@@ -459,165 +459,6 @@ spec:
459459
parent_namespace: ["parentRef", "namespace"]
460460
parent_section_name: ["parentRef", "sectionName"]
461461
parent_port: ["parentRef", "port"]
462-
- groupVersionKind:
463-
group: kuadrant.io
464-
kind: "TLSPolicy"
465-
version: "v1alpha1"
466-
metricNamePrefix: gatewayapi_tlspolicy
467-
labelsFromPath:
468-
name:
469-
- metadata
470-
- name
471-
namespace:
472-
- metadata
473-
- namespace
474-
metrics:
475-
- name: "labels"
476-
help: "Kubernetes labels converted to Prometheus labels."
477-
each:
478-
type: Info
479-
info:
480-
path: [metadata]
481-
labelsFromPath:
482-
"*": [labels]
483-
- name: "created"
484-
help: "created timestamp"
485-
each:
486-
type: Gauge
487-
gauge:
488-
path: [metadata, creationTimestamp]
489-
- name: "deleted"
490-
help: "deletion timestamp"
491-
each:
492-
type: Gauge
493-
gauge:
494-
path: [metadata, deletionTimestamp]
495-
- name: "target_info"
496-
help: "Target references that the tlspolicy wants to be attached to"
497-
each:
498-
type: Info
499-
info:
500-
path: [spec, targetRef]
501-
labelsFromPath:
502-
target_group: ["group"]
503-
target_kind: ["kind"]
504-
target_name: ["name"]
505-
target_namespace: ["namespace"]
506-
- name: "status"
507-
help: "status condition"
508-
each:
509-
type: Gauge
510-
gauge:
511-
path: [status, conditions]
512-
labelsFromPath:
513-
type: ["type"]
514-
valueFrom: ["status"]
515-
- groupVersionKind:
516-
group: kuadrant.io
517-
kind: "DNSPolicy"
518-
version: "v1alpha1"
519-
metricNamePrefix: gatewayapi_dnspolicy
520-
labelsFromPath:
521-
name:
522-
- metadata
523-
- name
524-
namespace:
525-
- metadata
526-
- namespace
527-
metrics:
528-
- name: "labels"
529-
help: "Kubernetes labels converted to Prometheus labels."
530-
each:
531-
type: Info
532-
info:
533-
path: [metadata]
534-
labelsFromPath:
535-
"*": [labels]
536-
- name: "created"
537-
help: "created timestamp"
538-
each:
539-
type: Gauge
540-
gauge:
541-
path: [metadata, creationTimestamp]
542-
- name: "deleted"
543-
help: "deletion timestamp"
544-
each:
545-
type: Gauge
546-
gauge:
547-
path: [metadata, deletionTimestamp]
548-
- name: "target_info"
549-
help: "Target references that the dnspolicy wants to be attached to"
550-
each:
551-
type: Info
552-
info:
553-
path: [spec, targetRef]
554-
labelsFromPath:
555-
target_group: ["group"]
556-
target_kind: ["kind"]
557-
target_name: ["name"]
558-
target_namespace: ["namespace"]
559-
- name: "status"
560-
help: "status condition"
561-
each:
562-
type: Gauge
563-
gauge:
564-
path: [status, conditions]
565-
labelsFromPath:
566-
type: ["type"]
567-
valueFrom: ["status"]
568-
- groupVersionKind:
569-
group: kuadrant.io
570-
kind: "RateLimitPolicy"
571-
version: "v1beta2"
572-
metricNamePrefix: gatewayapi_ratelimitpolicy
573-
labelsFromPath:
574-
name:
575-
- metadata
576-
- name
577-
namespace:
578-
- metadata
579-
- namespace
580-
metrics:
581-
- name: "labels"
582-
help: "Kubernetes labels converted to Prometheus labels."
583-
each:
584-
type: Info
585-
info:
586-
path: [metadata]
587-
labelsFromPath:
588-
"*": [labels]
589-
- name: "created"
590-
help: "created timestamp"
591-
each:
592-
type: Gauge
593-
gauge:
594-
path: [metadata, creationTimestamp]
595-
- name: "deleted"
596-
help: "deletion timestamp"
597-
each:
598-
type: Gauge
599-
gauge:
600-
path: [metadata, deletionTimestamp]
601-
- name: "target_info"
602-
help: "Target references that the tlspolicy wants to be attached to"
603-
each:
604-
type: Info
605-
info:
606-
path: [spec, targetRef]
607-
labelsFromPath:
608-
target_group: ["group"]
609-
target_kind: ["kind"]
610-
target_name: ["name"]
611-
target_namespace: ["namespace"]
612-
- name: "status"
613-
help: "status condition"
614-
each:
615-
type: Gauge
616-
gauge:
617-
path: [status, conditions]
618-
labelsFromPath:
619-
type: ["type"]
620-
valueFrom: ["status"]
621462
- groupVersionKind:
622463
group: gateway.networking.k8s.io
623464
kind: "BackendTLSPolicy"
@@ -662,56 +503,3 @@ spec:
662503
target_kind: ["kind"]
663504
target_name: ["name"]
664505
target_namespace: ["namespace"]
665-
- groupVersionKind:
666-
group: kuadrant.io
667-
kind: "AuthPolicy"
668-
version: "v1beta2"
669-
metricNamePrefix: gatewayapi_authpolicy
670-
labelsFromPath:
671-
name:
672-
- metadata
673-
- name
674-
namespace:
675-
- metadata
676-
- namespace
677-
metrics:
678-
- name: "labels"
679-
help: "Kubernetes labels converted to Prometheus labels."
680-
each:
681-
type: Info
682-
info:
683-
path: [metadata]
684-
labelsFromPath:
685-
"*": [labels]
686-
- name: "created"
687-
help: "created timestamp"
688-
each:
689-
type: Gauge
690-
gauge:
691-
path: [metadata, creationTimestamp]
692-
- name: "deleted"
693-
help: "deletion timestamp"
694-
each:
695-
type: Gauge
696-
gauge:
697-
path: [metadata, deletionTimestamp]
698-
- name: "target_info"
699-
help: "Target references that the authpolicy wants to be attached to"
700-
each:
701-
type: Info
702-
info:
703-
path: [spec, targetRef]
704-
labelsFromPath:
705-
target_group: ["group"]
706-
target_kind: ["kind"]
707-
target_name: ["name"]
708-
target_namespace: ["namespace"]
709-
- name: "status"
710-
help: "status condition"
711-
each:
712-
type: Gauge
713-
gauge:
714-
path: [status, conditions]
715-
labelsFromPath:
716-
type: ["type"]
717-
valueFrom: ["status"]

Diff for: config/examples/kube-prometheus/kustomization.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resources:
55
- github.com/prometheus-operator/kube-prometheus?ref=release-0.11
66
# Use the github url instead of the relative path if using this outside the repo
77
# - github.com/kuadrant/gateway-api-state-metrics?ref=<release>
8-
- ../../default
8+
- ../../kuadrant
99
# Include the example dashboars and rules if you want
1010
- ../dashboards
1111
- ../rules

0 commit comments

Comments
 (0)