@intentius/chant-lexicon-k8s 0.13.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/index.d.ts +14 -0
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/integrity.json +4 -4
- package/dist/lint/audit-catalog.d.ts +7 -0
- package/dist/lint/audit-catalog.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/meta.json +112 -14
- package/dist/plugin.d.ts.map +1 -1
- package/dist/spec/fetch.d.ts +1 -1
- package/dist/types/index.d.ts +251 -71
- package/package.json +2 -2
- package/src/describe-resources.ts +3 -3
- package/src/generated/index.d.ts +251 -71
- package/src/generated/index.ts +14 -0
- package/src/generated/lexicon-k8s.json +112 -14
- package/src/import/live-export.ts +2 -2
- package/src/lint/audit-catalog.ts +37 -0
- package/src/plugin.ts +10 -0
- package/src/serializer.ts +2 -2
- package/src/spec/fetch.ts +1 -1
package/src/generated/index.ts
CHANGED
|
@@ -22,6 +22,8 @@ export const ClusterRole = createResource("K8s::Rbac::ClusterRole", "k8s", {"nam
|
|
|
22
22
|
export const ClusterRoleBinding = createResource("K8s::Rbac::ClusterRoleBinding", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
23
23
|
export const ClusterRoleBindingList = createResource("K8s::Rbac::ClusterRoleBindingList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
24
24
|
export const ClusterRoleList = createResource("K8s::Rbac::ClusterRoleList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
25
|
+
export const ClusterTrustBundle = createResource("K8s::Certificates::ClusterTrustBundle", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
26
|
+
export const ClusterTrustBundleList = createResource("K8s::Certificates::ClusterTrustBundleList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
25
27
|
export const CM = createResource("K8s::Core::ConfigMap", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
26
28
|
export const ComponentStatus = createResource("K8s::Core::ComponentStatus", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
27
29
|
export const ComponentStatusList = createResource("K8s::Core::ComponentStatusList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
@@ -49,6 +51,8 @@ export const Deployment = createResource("K8s::Apps::Deployment", "k8s", {"name"
|
|
|
49
51
|
export const DeploymentList = createResource("K8s::Apps::DeploymentList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
50
52
|
export const DeviceClass = createResource("K8s::Resource::DeviceClass", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
51
53
|
export const DeviceClassList = createResource("K8s::Resource::DeviceClassList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
54
|
+
export const DeviceTaintRule = createResource("K8s::Resource::DeviceTaintRule", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
55
|
+
export const DeviceTaintRuleList = createResource("K8s::Resource::DeviceTaintRuleList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
52
56
|
export const DS = createResource("K8s::Apps::DaemonSet", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
53
57
|
export const Endpoints = createResource("K8s::Core::Endpoints", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
54
58
|
export const EndpointSlice = createResource("K8s::Discovery::EndpointSlice", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
@@ -78,10 +82,16 @@ export const Issuer = createResource("K8s::CertManager::Issuer", "k8s", {"name":
|
|
|
78
82
|
export const Job = createResource("K8s::Batch::Job", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
79
83
|
export const JobList = createResource("K8s::Batch::JobList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
80
84
|
export const Lease = createResource("K8s::Coordination::Lease", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
85
|
+
export const LeaseCandidate = createResource("K8s::Coordination::LeaseCandidate", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
86
|
+
export const LeaseCandidateList = createResource("K8s::Coordination::LeaseCandidateList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
81
87
|
export const LeaseList = createResource("K8s::Coordination::LeaseList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
82
88
|
export const LimitRange = createResource("K8s::Core::LimitRange", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
83
89
|
export const LimitRangeList = createResource("K8s::Core::LimitRangeList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
84
90
|
export const LocalSubjectAccessReview = createResource("K8s::Authorization::LocalSubjectAccessReview", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
91
|
+
export const MutatingAdmissionPolicy = createResource("K8s::Admissionregistration::MutatingAdmissionPolicy", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
92
|
+
export const MutatingAdmissionPolicyBinding = createResource("K8s::Admissionregistration::MutatingAdmissionPolicyBinding", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
93
|
+
export const MutatingAdmissionPolicyBindingList = createResource("K8s::Admissionregistration::MutatingAdmissionPolicyBindingList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
94
|
+
export const MutatingAdmissionPolicyList = createResource("K8s::Admissionregistration::MutatingAdmissionPolicyList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
85
95
|
export const MutatingWebhookConfiguration = createResource("K8s::Admissionregistration::MutatingWebhookConfiguration", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
86
96
|
export const MutatingWebhookConfigurationList = createResource("K8s::Admissionregistration::MutatingWebhookConfigurationList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
87
97
|
export const Namespace = createResource("K8s::Core::Namespace", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
@@ -99,6 +109,8 @@ export const PersistentVolumeClaim = createResource("K8s::Core::PersistentVolume
|
|
|
99
109
|
export const PersistentVolumeClaimList = createResource("K8s::Core::PersistentVolumeClaimList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
100
110
|
export const PersistentVolumeList = createResource("K8s::Core::PersistentVolumeList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
101
111
|
export const Pod = createResource("K8s::Core::Pod", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
112
|
+
export const PodCertificateRequest = createResource("K8s::Certificates::PodCertificateRequest", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
113
|
+
export const PodCertificateRequestList = createResource("K8s::Certificates::PodCertificateRequestList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
102
114
|
export const PodDisruptionBudget = createResource("K8s::Policy::PodDisruptionBudget", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
103
115
|
export const PodDisruptionBudgetList = createResource("K8s::Policy::PodDisruptionBudgetList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
104
116
|
export const PodList = createResource("K8s::Core::PodList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
@@ -153,6 +165,8 @@ export const StatefulSetList = createResource("K8s::Apps::StatefulSetList", "k8s
|
|
|
153
165
|
export const Status = createResource("K8s::Core::Status", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
154
166
|
export const StorageClass = createResource("K8s::Storage::StorageClass", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
155
167
|
export const StorageClassList = createResource("K8s::Storage::StorageClassList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
168
|
+
export const StorageVersionMigration = createResource("K8s::Storagemigration::StorageVersionMigration", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
169
|
+
export const StorageVersionMigrationList = createResource("K8s::Storagemigration::StorageVersionMigrationList", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
156
170
|
export const STS = createResource("K8s::Apps::StatefulSet", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
157
171
|
export const SubjectAccessReview = createResource("K8s::Authorization::SubjectAccessReview", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
158
172
|
export const TokenRequest = createResource("K8s::Authentication::TokenRequest", "k8s", {"name":"name","namespace":"namespace","uid":"uid"});
|
|
@@ -425,6 +425,20 @@
|
|
|
425
425
|
"apiVersion": "rbac.authorization.k8s.io/v1",
|
|
426
426
|
"gvkKind": "ClusterRoleList"
|
|
427
427
|
},
|
|
428
|
+
"ClusterTrustBundle": {
|
|
429
|
+
"resourceType": "K8s::Certificates::ClusterTrustBundle",
|
|
430
|
+
"kind": "resource",
|
|
431
|
+
"lexicon": "k8s",
|
|
432
|
+
"apiVersion": "certificates.k8s.io/v1beta1",
|
|
433
|
+
"gvkKind": "ClusterTrustBundle"
|
|
434
|
+
},
|
|
435
|
+
"ClusterTrustBundleList": {
|
|
436
|
+
"resourceType": "K8s::Certificates::ClusterTrustBundleList",
|
|
437
|
+
"kind": "resource",
|
|
438
|
+
"lexicon": "k8s",
|
|
439
|
+
"apiVersion": "certificates.k8s.io/v1beta1",
|
|
440
|
+
"gvkKind": "ClusterTrustBundleList"
|
|
441
|
+
},
|
|
428
442
|
"ComponentStatus": {
|
|
429
443
|
"resourceType": "K8s::Core::ComponentStatus",
|
|
430
444
|
"kind": "resource",
|
|
@@ -650,16 +664,30 @@
|
|
|
650
664
|
"resourceType": "K8s::Resource::DeviceClass",
|
|
651
665
|
"kind": "resource",
|
|
652
666
|
"lexicon": "k8s",
|
|
653
|
-
"apiVersion": "resource.k8s.io/
|
|
667
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
654
668
|
"gvkKind": "DeviceClass"
|
|
655
669
|
},
|
|
656
670
|
"DeviceClassList": {
|
|
657
671
|
"resourceType": "K8s::Resource::DeviceClassList",
|
|
658
672
|
"kind": "resource",
|
|
659
673
|
"lexicon": "k8s",
|
|
660
|
-
"apiVersion": "resource.k8s.io/
|
|
674
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
661
675
|
"gvkKind": "DeviceClassList"
|
|
662
676
|
},
|
|
677
|
+
"DeviceTaintRule": {
|
|
678
|
+
"resourceType": "K8s::Resource::DeviceTaintRule",
|
|
679
|
+
"kind": "resource",
|
|
680
|
+
"lexicon": "k8s",
|
|
681
|
+
"apiVersion": "resource.k8s.io/v1beta2",
|
|
682
|
+
"gvkKind": "DeviceTaintRule"
|
|
683
|
+
},
|
|
684
|
+
"DeviceTaintRuleList": {
|
|
685
|
+
"resourceType": "K8s::Resource::DeviceTaintRuleList",
|
|
686
|
+
"kind": "resource",
|
|
687
|
+
"lexicon": "k8s",
|
|
688
|
+
"apiVersion": "resource.k8s.io/v1beta2",
|
|
689
|
+
"gvkKind": "DeviceTaintRuleList"
|
|
690
|
+
},
|
|
663
691
|
"Endpoint": {
|
|
664
692
|
"resourceType": "K8s::Monitoring::ServiceMonitor.endpoints",
|
|
665
693
|
"kind": "property",
|
|
@@ -908,14 +936,14 @@
|
|
|
908
936
|
"resourceType": "K8s::Networking::IPAddress",
|
|
909
937
|
"kind": "resource",
|
|
910
938
|
"lexicon": "k8s",
|
|
911
|
-
"apiVersion": "networking.k8s.io/
|
|
939
|
+
"apiVersion": "networking.k8s.io/v1",
|
|
912
940
|
"gvkKind": "IPAddress"
|
|
913
941
|
},
|
|
914
942
|
"IPAddressList": {
|
|
915
943
|
"resourceType": "K8s::Networking::IPAddressList",
|
|
916
944
|
"kind": "resource",
|
|
917
945
|
"lexicon": "k8s",
|
|
918
|
-
"apiVersion": "networking.k8s.io/
|
|
946
|
+
"apiVersion": "networking.k8s.io/v1",
|
|
919
947
|
"gvkKind": "IPAddressList"
|
|
920
948
|
},
|
|
921
949
|
"IgnoreApplicationDifference": {
|
|
@@ -1076,6 +1104,20 @@
|
|
|
1076
1104
|
"apiVersion": "coordination.k8s.io/v1",
|
|
1077
1105
|
"gvkKind": "Lease"
|
|
1078
1106
|
},
|
|
1107
|
+
"LeaseCandidate": {
|
|
1108
|
+
"resourceType": "K8s::Coordination::LeaseCandidate",
|
|
1109
|
+
"kind": "resource",
|
|
1110
|
+
"lexicon": "k8s",
|
|
1111
|
+
"apiVersion": "coordination.k8s.io/v1beta1",
|
|
1112
|
+
"gvkKind": "LeaseCandidate"
|
|
1113
|
+
},
|
|
1114
|
+
"LeaseCandidateList": {
|
|
1115
|
+
"resourceType": "K8s::Coordination::LeaseCandidateList",
|
|
1116
|
+
"kind": "resource",
|
|
1117
|
+
"lexicon": "k8s",
|
|
1118
|
+
"apiVersion": "coordination.k8s.io/v1beta1",
|
|
1119
|
+
"gvkKind": "LeaseCandidateList"
|
|
1120
|
+
},
|
|
1079
1121
|
"LeaseList": {
|
|
1080
1122
|
"resourceType": "K8s::Coordination::LeaseList",
|
|
1081
1123
|
"kind": "resource",
|
|
@@ -1119,6 +1161,34 @@
|
|
|
1119
1161
|
"kind": "property",
|
|
1120
1162
|
"lexicon": "k8s"
|
|
1121
1163
|
},
|
|
1164
|
+
"MutatingAdmissionPolicy": {
|
|
1165
|
+
"resourceType": "K8s::Admissionregistration::MutatingAdmissionPolicy",
|
|
1166
|
+
"kind": "resource",
|
|
1167
|
+
"lexicon": "k8s",
|
|
1168
|
+
"apiVersion": "admissionregistration.k8s.io/v1",
|
|
1169
|
+
"gvkKind": "MutatingAdmissionPolicy"
|
|
1170
|
+
},
|
|
1171
|
+
"MutatingAdmissionPolicyBinding": {
|
|
1172
|
+
"resourceType": "K8s::Admissionregistration::MutatingAdmissionPolicyBinding",
|
|
1173
|
+
"kind": "resource",
|
|
1174
|
+
"lexicon": "k8s",
|
|
1175
|
+
"apiVersion": "admissionregistration.k8s.io/v1",
|
|
1176
|
+
"gvkKind": "MutatingAdmissionPolicyBinding"
|
|
1177
|
+
},
|
|
1178
|
+
"MutatingAdmissionPolicyBindingList": {
|
|
1179
|
+
"resourceType": "K8s::Admissionregistration::MutatingAdmissionPolicyBindingList",
|
|
1180
|
+
"kind": "resource",
|
|
1181
|
+
"lexicon": "k8s",
|
|
1182
|
+
"apiVersion": "admissionregistration.k8s.io/v1",
|
|
1183
|
+
"gvkKind": "MutatingAdmissionPolicyBindingList"
|
|
1184
|
+
},
|
|
1185
|
+
"MutatingAdmissionPolicyList": {
|
|
1186
|
+
"resourceType": "K8s::Admissionregistration::MutatingAdmissionPolicyList",
|
|
1187
|
+
"kind": "resource",
|
|
1188
|
+
"lexicon": "k8s",
|
|
1189
|
+
"apiVersion": "admissionregistration.k8s.io/v1",
|
|
1190
|
+
"gvkKind": "MutatingAdmissionPolicyList"
|
|
1191
|
+
},
|
|
1122
1192
|
"MutatingWebhookConfiguration": {
|
|
1123
1193
|
"resourceType": "K8s::Admissionregistration::MutatingWebhookConfiguration",
|
|
1124
1194
|
"kind": "resource",
|
|
@@ -1340,6 +1410,20 @@
|
|
|
1340
1410
|
"apiVersion": "v1",
|
|
1341
1411
|
"gvkKind": "Pod"
|
|
1342
1412
|
},
|
|
1413
|
+
"PodCertificateRequest": {
|
|
1414
|
+
"resourceType": "K8s::Certificates::PodCertificateRequest",
|
|
1415
|
+
"kind": "resource",
|
|
1416
|
+
"lexicon": "k8s",
|
|
1417
|
+
"apiVersion": "certificates.k8s.io/v1beta1",
|
|
1418
|
+
"gvkKind": "PodCertificateRequest"
|
|
1419
|
+
},
|
|
1420
|
+
"PodCertificateRequestList": {
|
|
1421
|
+
"resourceType": "K8s::Certificates::PodCertificateRequestList",
|
|
1422
|
+
"kind": "resource",
|
|
1423
|
+
"lexicon": "k8s",
|
|
1424
|
+
"apiVersion": "certificates.k8s.io/v1beta1",
|
|
1425
|
+
"gvkKind": "PodCertificateRequestList"
|
|
1426
|
+
},
|
|
1343
1427
|
"PodDisruptionBudget": {
|
|
1344
1428
|
"resourceType": "K8s::Policy::PodDisruptionBudget",
|
|
1345
1429
|
"kind": "resource",
|
|
@@ -1637,28 +1721,28 @@
|
|
|
1637
1721
|
"resourceType": "K8s::Resource::ResourceClaim",
|
|
1638
1722
|
"kind": "resource",
|
|
1639
1723
|
"lexicon": "k8s",
|
|
1640
|
-
"apiVersion": "resource.k8s.io/
|
|
1724
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
1641
1725
|
"gvkKind": "ResourceClaim"
|
|
1642
1726
|
},
|
|
1643
1727
|
"ResourceClaimList": {
|
|
1644
1728
|
"resourceType": "K8s::Resource::ResourceClaimList",
|
|
1645
1729
|
"kind": "resource",
|
|
1646
1730
|
"lexicon": "k8s",
|
|
1647
|
-
"apiVersion": "resource.k8s.io/
|
|
1731
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
1648
1732
|
"gvkKind": "ResourceClaimList"
|
|
1649
1733
|
},
|
|
1650
1734
|
"ResourceClaimTemplate": {
|
|
1651
1735
|
"resourceType": "K8s::Resource::ResourceClaimTemplate",
|
|
1652
1736
|
"kind": "resource",
|
|
1653
1737
|
"lexicon": "k8s",
|
|
1654
|
-
"apiVersion": "resource.k8s.io/
|
|
1738
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
1655
1739
|
"gvkKind": "ResourceClaimTemplate"
|
|
1656
1740
|
},
|
|
1657
1741
|
"ResourceClaimTemplateList": {
|
|
1658
1742
|
"resourceType": "K8s::Resource::ResourceClaimTemplateList",
|
|
1659
1743
|
"kind": "resource",
|
|
1660
1744
|
"lexicon": "k8s",
|
|
1661
|
-
"apiVersion": "resource.k8s.io/
|
|
1745
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
1662
1746
|
"gvkKind": "ResourceClaimTemplateList"
|
|
1663
1747
|
},
|
|
1664
1748
|
"ResourceQuota": {
|
|
@@ -1684,14 +1768,14 @@
|
|
|
1684
1768
|
"resourceType": "K8s::Resource::ResourceSlice",
|
|
1685
1769
|
"kind": "resource",
|
|
1686
1770
|
"lexicon": "k8s",
|
|
1687
|
-
"apiVersion": "resource.k8s.io/
|
|
1771
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
1688
1772
|
"gvkKind": "ResourceSlice"
|
|
1689
1773
|
},
|
|
1690
1774
|
"ResourceSliceList": {
|
|
1691
1775
|
"resourceType": "K8s::Resource::ResourceSliceList",
|
|
1692
1776
|
"kind": "resource",
|
|
1693
1777
|
"lexicon": "k8s",
|
|
1694
|
-
"apiVersion": "resource.k8s.io/
|
|
1778
|
+
"apiVersion": "resource.k8s.io/v1",
|
|
1695
1779
|
"gvkKind": "ResourceSliceList"
|
|
1696
1780
|
},
|
|
1697
1781
|
"Resources": {
|
|
@@ -1882,14 +1966,14 @@
|
|
|
1882
1966
|
"resourceType": "K8s::Networking::ServiceCIDR",
|
|
1883
1967
|
"kind": "resource",
|
|
1884
1968
|
"lexicon": "k8s",
|
|
1885
|
-
"apiVersion": "networking.k8s.io/
|
|
1969
|
+
"apiVersion": "networking.k8s.io/v1",
|
|
1886
1970
|
"gvkKind": "ServiceCIDR"
|
|
1887
1971
|
},
|
|
1888
1972
|
"ServiceCIDRList": {
|
|
1889
1973
|
"resourceType": "K8s::Networking::ServiceCIDRList",
|
|
1890
1974
|
"kind": "resource",
|
|
1891
1975
|
"lexicon": "k8s",
|
|
1892
|
-
"apiVersion": "networking.k8s.io/
|
|
1976
|
+
"apiVersion": "networking.k8s.io/v1",
|
|
1893
1977
|
"gvkKind": "ServiceCIDRList"
|
|
1894
1978
|
},
|
|
1895
1979
|
"ServiceList": {
|
|
@@ -1999,6 +2083,20 @@
|
|
|
1999
2083
|
"apiVersion": "storage.k8s.io/v1",
|
|
2000
2084
|
"gvkKind": "StorageClassList"
|
|
2001
2085
|
},
|
|
2086
|
+
"StorageVersionMigration": {
|
|
2087
|
+
"resourceType": "K8s::Storagemigration::StorageVersionMigration",
|
|
2088
|
+
"kind": "resource",
|
|
2089
|
+
"lexicon": "k8s",
|
|
2090
|
+
"apiVersion": "storagemigration.k8s.io/v1beta1",
|
|
2091
|
+
"gvkKind": "StorageVersionMigration"
|
|
2092
|
+
},
|
|
2093
|
+
"StorageVersionMigrationList": {
|
|
2094
|
+
"resourceType": "K8s::Storagemigration::StorageVersionMigrationList",
|
|
2095
|
+
"kind": "resource",
|
|
2096
|
+
"lexicon": "k8s",
|
|
2097
|
+
"apiVersion": "storagemigration.k8s.io/v1beta1",
|
|
2098
|
+
"gvkKind": "StorageVersionMigrationList"
|
|
2099
|
+
},
|
|
2002
2100
|
"Strategy": {
|
|
2003
2101
|
"resourceType": "K8s::Argo::ApplicationSet.strategy",
|
|
2004
2102
|
"kind": "property",
|
|
@@ -2153,14 +2251,14 @@
|
|
|
2153
2251
|
"resourceType": "K8s::Storage::VolumeAttributesClass",
|
|
2154
2252
|
"kind": "resource",
|
|
2155
2253
|
"lexicon": "k8s",
|
|
2156
|
-
"apiVersion": "storage.k8s.io/
|
|
2254
|
+
"apiVersion": "storage.k8s.io/v1",
|
|
2157
2255
|
"gvkKind": "VolumeAttributesClass"
|
|
2158
2256
|
},
|
|
2159
2257
|
"VolumeAttributesClassList": {
|
|
2160
2258
|
"resourceType": "K8s::Storage::VolumeAttributesClassList",
|
|
2161
2259
|
"kind": "resource",
|
|
2162
2260
|
"lexicon": "k8s",
|
|
2163
|
-
"apiVersion": "storage.k8s.io/
|
|
2261
|
+
"apiVersion": "storage.k8s.io/v1",
|
|
2164
2262
|
"gvkKind": "VolumeAttributesClassList"
|
|
2165
2263
|
},
|
|
2166
2264
|
"VolumeMount": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExportedTemplate, ResourceSelector } from "@intentius/chant/lexicon";
|
|
2
|
-
import { hasOwnershipMarker } from "@intentius/chant/ownership";
|
|
2
|
+
import { hasOwnershipMarker, LABEL_OWNERSHIP_KEYS } from "@intentius/chant/ownership";
|
|
3
3
|
import { K8sParser } from "./parser";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -61,7 +61,7 @@ export function buildExportFromObjects(
|
|
|
61
61
|
? objects.filter((o) => {
|
|
62
62
|
if (!isRecord(o)) return false;
|
|
63
63
|
const labels = isRecord(o.metadata) ? (o.metadata.labels as Record<string, unknown>) : undefined;
|
|
64
|
-
return hasOwnershipMarker(labels,
|
|
64
|
+
return hasOwnershipMarker(labels, LABEL_OWNERSHIP_KEYS);
|
|
65
65
|
})
|
|
66
66
|
: objects;
|
|
67
67
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The k8s lexicon's chant audit catalog — metadata for its post-synth rules
|
|
3
|
+
* (WK8 and ARGO Kubernetes-manifest rules). Contributed via k8sPlugin.auditCatalog() (#687).
|
|
4
|
+
*/
|
|
5
|
+
import { auditRule, K8S_PSS, K8S_SECRETS, SCORECARD_PINNED, type RuleMeta } from "@intentius/chant/audit/catalog";
|
|
6
|
+
|
|
7
|
+
export const k8sAuditCatalog: Record<string, RuleMeta> = {
|
|
8
|
+
ARGO002: auditRule("ARGO002", "merge-worthy", "guidance", "Argo Application references an undeclared AppProject", "Declare the named AppProject or reference an existing project.", { category: "correctness" }),
|
|
9
|
+
ARGO003: auditRule("ARGO003", "merge-worthy", "guidance", "Argo Application targets an unregistered cluster", "Point spec.destination at a registered cluster or the in-cluster target.", { category: "correctness" }),
|
|
10
|
+
ARGO005: auditRule("ARGO005", "report-only", "guidance", "Argo source.path may not resolve", "Ensure the source path exists under the build root.", { category: "best-practice" }),
|
|
11
|
+
WK8005: auditRule("WK8005", "merge-worthy", "guidance", "Hardcoded secret in env var", "Use a secretKeyRef instead of a literal value, and rotate the secret.", { authority: [K8S_SECRETS] }),
|
|
12
|
+
WK8006: auditRule("WK8006", "merge-worthy", "guidance", "Image uses :latest or no tag", "Pin the image to an explicit version tag (ideally a digest).", { authority: [SCORECARD_PINNED] }),
|
|
13
|
+
WK8041: auditRule("WK8041", "merge-worthy", "guidance", "Hardcoded API key in env var", "Move the key to a Secret and rotate it.", { authority: [K8S_SECRETS] }),
|
|
14
|
+
WK8042: auditRule("WK8042", "merge-worthy", "guidance", "Private key stored in a ConfigMap", "Store private keys in a Secret, not a ConfigMap.", { authority: [K8S_SECRETS] }),
|
|
15
|
+
WK8101: auditRule("WK8101", "merge-worthy", "guidance", "Deployment selector does not match template labels", "Align spec.selector with the pod template labels.", { category: "best-practice" }),
|
|
16
|
+
WK8102: auditRule("WK8102", "report-only", "guidance", "Resource missing metadata labels", "Add metadata labels for filtering and tooling.", { category: "best-practice" }),
|
|
17
|
+
WK8103: auditRule("WK8103", "merge-worthy", "guidance", "Container missing name", "Add the required container `name`.", { category: "best-practice" }),
|
|
18
|
+
WK8104: auditRule("WK8104", "report-only", "guidance", "Container ports not named", "Name ports for clearer Service/NetworkPolicy config.", { category: "best-practice" }),
|
|
19
|
+
WK8105: auditRule("WK8105", "report-only", "guidance", "imagePullPolicy not explicit", "Set imagePullPolicy explicitly to avoid surprising defaults.", { category: "best-practice" }),
|
|
20
|
+
WK8201: auditRule("WK8201", "report-only", "guidance", "Container missing resource limits", "Set CPU and memory limits.", { category: "best-practice" }),
|
|
21
|
+
WK8202: auditRule("WK8202", "merge-worthy", "guidance", "Privileged container", "Remove privileged: true; grant only the specific capabilities needed.", { authority: [K8S_PSS] }),
|
|
22
|
+
WK8203: auditRule("WK8203", "merge-worthy", "guidance", "Root filesystem is writable", "Set readOnlyRootFilesystem: true.", { authority: [K8S_PSS] }),
|
|
23
|
+
WK8204: auditRule("WK8204", "merge-worthy", "guidance", "Container may run as root", "Set runAsNonRoot: true (and a non-zero runAsUser).", { authority: [K8S_PSS] }),
|
|
24
|
+
WK8205: auditRule("WK8205", "merge-worthy", "guidance", "Capabilities not dropped", "drop: [ALL] and add back only what is required.", { authority: [K8S_PSS] }),
|
|
25
|
+
WK8207: auditRule("WK8207", "merge-worthy", "guidance", "Pod uses host network", "Remove hostNetwork; it bypasses network isolation.", { authority: [K8S_PSS] }),
|
|
26
|
+
WK8208: auditRule("WK8208", "merge-worthy", "guidance", "Pod shares host PID namespace", "Remove hostPID.", { authority: [K8S_PSS] }),
|
|
27
|
+
WK8209: auditRule("WK8209", "merge-worthy", "guidance", "Pod shares host IPC namespace", "Remove hostIPC.", { authority: [K8S_PSS] }),
|
|
28
|
+
WK8301: auditRule("WK8301", "report-only", "guidance", "Container missing probes", "Add liveness and readiness probes.", { category: "best-practice" }),
|
|
29
|
+
WK8302: auditRule("WK8302", "report-only", "guidance", "Deployment has a single replica", "Use replicas >= 2 for availability.", { category: "best-practice" }),
|
|
30
|
+
WK8303: auditRule("WK8303", "report-only", "guidance", "No PodDisruptionBudget for an HA Deployment", "Add a PDB to protect availability during disruptions.", { category: "best-practice" }),
|
|
31
|
+
WK8304: auditRule("WK8304", "report-only", "guidance", "SSL redirect without a certificate", "Provide a certificate and HTTPS listen-ports for the ssl-redirect annotation.", { category: "best-practice" }),
|
|
32
|
+
WK8305: auditRule("WK8305", "merge-worthy", "guidance", "Ingress backend port does not match the Service", "Point the Ingress backend at a declared Service port.", { category: "best-practice" }),
|
|
33
|
+
WK8306: auditRule("WK8306", "merge-worthy", "guidance", "Container command starts with a flag", "The first command element should be a binary, not a flag.", { category: "best-practice" }),
|
|
34
|
+
WK8401: auditRule("WK8401", "merge-worthy", "guidance", "shmSize exceeds the container memory limit", "Lower shmSize or raise the memory limit so the pod can schedule.", { category: "best-practice" }),
|
|
35
|
+
WK8402: auditRule("WK8402", "report-only", "guidance", "RayCluster missing spec.rayVersion", "Set spec.rayVersion so KubeRay picks the right autoscaler image.", { category: "best-practice" }),
|
|
36
|
+
WK8403: auditRule("WK8403", "report-only", "guidance", "rayVersion does not match the head image tag", "Align spec.rayVersion with the Ray version in the head container image.", { category: "best-practice" }),
|
|
37
|
+
};
|
package/src/plugin.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { LexiconPlugin, InitTemplateSet, ResourceMetadata } from "@intentiu
|
|
|
9
9
|
import { detectTemplate } from "./detect";
|
|
10
10
|
import type { LintRule } from "@intentius/chant/lint/rule";
|
|
11
11
|
import { postSynthChecks as postSynthCheckList } from "./lint/post-synth";
|
|
12
|
+
import { k8sAuditCatalog } from "./lint/audit-catalog";
|
|
12
13
|
import { createSkillsLoader, createDiffTool, createCatalogResource } from "@intentius/chant/lexicon-plugin-helpers";
|
|
13
14
|
import { join, dirname } from "path";
|
|
14
15
|
import { fileURLToPath } from "url";
|
|
@@ -25,7 +26,16 @@ import { K8sGenerator } from "./import/generator";
|
|
|
25
26
|
|
|
26
27
|
export const k8sPlugin: LexiconPlugin = {
|
|
27
28
|
name: "k8s",
|
|
29
|
+
auditCatalog: () => k8sAuditCatalog,
|
|
28
30
|
serializer: k8sSerializer,
|
|
31
|
+
// Self-upgrade: where the pinned Kubernetes schema version lives + its upstream (#685).
|
|
32
|
+
upstreamPin: {
|
|
33
|
+
file: "src/spec/fetch.ts",
|
|
34
|
+
pattern: /export const K8S_SCHEMA_VERSION\s*=\s*"([^"]+)"/,
|
|
35
|
+
replace: (v, line) =>
|
|
36
|
+
line.replace(/export const K8S_SCHEMA_VERSION\s*=\s*"[^"]+"/, `export const K8S_SCHEMA_VERSION = "${v}"`),
|
|
37
|
+
upstream: { owner: "kubernetes", repo: "kubernetes", kind: "releases" },
|
|
38
|
+
},
|
|
29
39
|
|
|
30
40
|
lintRules(): LintRule[] {
|
|
31
41
|
return [
|
package/src/serializer.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { createRequire } from "module";
|
|
|
9
9
|
import type { Declarable } from "@intentius/chant/declarable";
|
|
10
10
|
import { isPropertyDeclarable } from "@intentius/chant/declarable";
|
|
11
11
|
import type { Serializer, SerializerResult, SerializeContext } from "@intentius/chant/serializer";
|
|
12
|
-
import { ownershipEntries } from "@intentius/chant/ownership";
|
|
12
|
+
import { ownershipEntries, LABEL_OWNERSHIP_KEYS } from "@intentius/chant/ownership";
|
|
13
13
|
import type { LexiconOutput } from "@intentius/chant/lexicon-output";
|
|
14
14
|
import { walkValue, type SerializerVisitor } from "@intentius/chant/serializer-walker";
|
|
15
15
|
import { emitYAML } from "@intentius/chant/yaml";
|
|
@@ -165,7 +165,7 @@ export const k8sSerializer: Serializer = {
|
|
|
165
165
|
// labels, so they seed defaultLabelEntries and flow through the same merge
|
|
166
166
|
// (explicit resource labels still win).
|
|
167
167
|
let defaultLabelEntries: Record<string, unknown> = context?.ownership
|
|
168
|
-
? { ...ownershipEntries(
|
|
168
|
+
? { ...ownershipEntries(LABEL_OWNERSHIP_KEYS, context.ownership) }
|
|
169
169
|
: {};
|
|
170
170
|
let defaultAnnotationEntries: Record<string, unknown> = {};
|
|
171
171
|
|
package/src/spec/fetch.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { fetchWithCache, clearCacheFile } from "@intentius/chant/codegen/fetch";
|
|
|
10
10
|
/**
|
|
11
11
|
* Pinned Kubernetes version for schema download.
|
|
12
12
|
*/
|
|
13
|
-
export const K8S_SCHEMA_VERSION = "v1.
|
|
13
|
+
export const K8S_SCHEMA_VERSION = "v1.36.2";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Build the schema URL for a given version.
|