@intentius/chant-lexicon-k8s 0.41.20 → 0.42.1
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/deep-observe-hooks.d.ts +8 -0
- package/dist/deep-observe-hooks.d.ts.map +1 -1
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/dist/okf/index.md +250 -0
- package/dist/okf/rules/ARGO001.md +16 -0
- package/dist/okf/rules/ARGO002.md +16 -0
- package/dist/okf/rules/ARGO003.md +15 -0
- package/dist/okf/rules/ARGO004.md +17 -0
- package/dist/okf/rules/ARGO005.md +15 -0
- package/dist/okf/rules/WK8001.md +16 -0
- package/dist/okf/rules/WK8002.md +20 -0
- package/dist/okf/rules/WK8003.md +19 -0
- package/dist/okf/rules/WK8005.md +11 -0
- package/dist/okf/rules/WK8006.md +11 -0
- package/dist/okf/rules/WK8041.md +11 -0
- package/dist/okf/rules/WK8042.md +11 -0
- package/dist/okf/rules/WK8101.md +11 -0
- package/dist/okf/rules/WK8102.md +11 -0
- package/dist/okf/rules/WK8103.md +11 -0
- package/dist/okf/rules/WK8104.md +15 -0
- package/dist/okf/rules/WK8105.md +11 -0
- package/dist/okf/rules/WK8201.md +11 -0
- package/dist/okf/rules/WK8202.md +11 -0
- package/dist/okf/rules/WK8203.md +11 -0
- package/dist/okf/rules/WK8204.md +11 -0
- package/dist/okf/rules/WK8205.md +11 -0
- package/dist/okf/rules/WK8207.md +11 -0
- package/dist/okf/rules/WK8208.md +11 -0
- package/dist/okf/rules/WK8209.md +11 -0
- package/dist/okf/rules/WK8301.md +16 -0
- package/dist/okf/rules/WK8302.md +11 -0
- package/dist/okf/rules/WK8303.md +15 -0
- package/dist/okf/rules/WK8304.md +15 -0
- package/dist/okf/rules/WK8305.md +15 -0
- package/dist/okf/rules/WK8306.md +11 -0
- package/dist/okf/rules/WK8401.md +15 -0
- package/dist/okf/rules/WK8402.md +15 -0
- package/dist/okf/rules/WK8403.md +15 -0
- package/dist/okf/types/APIGroup.md +16 -0
- package/dist/okf/types/APIGroupList.md +13 -0
- package/dist/okf/types/APIResourceList.md +14 -0
- package/dist/okf/types/APIService.md +14 -0
- package/dist/okf/types/APIServiceList.md +14 -0
- package/dist/okf/types/APIVersions.md +14 -0
- package/dist/okf/types/Alert.md +14 -0
- package/dist/okf/types/AppProject.md +19 -0
- package/dist/okf/types/Application.md +23 -0
- package/dist/okf/types/ApplicationSet.md +18 -0
- package/dist/okf/types/Backup.md +14 -0
- package/dist/okf/types/BatchJob.md +14 -0
- package/dist/okf/types/Binding.md +14 -0
- package/dist/okf/types/Bucket.md +14 -0
- package/dist/okf/types/CM.md +16 -0
- package/dist/okf/types/CSIDriver.md +14 -0
- package/dist/okf/types/CSIDriverList.md +14 -0
- package/dist/okf/types/CSINode.md +14 -0
- package/dist/okf/types/CSINodeList.md +14 -0
- package/dist/okf/types/CSIStorageCapacity.md +17 -0
- package/dist/okf/types/CSIStorageCapacityList.md +14 -0
- package/dist/okf/types/Certificate.md +18 -0
- package/dist/okf/types/CertificateRequest.md +14 -0
- package/dist/okf/types/CertificateSigningRequest.md +14 -0
- package/dist/okf/types/CertificateSigningRequestList.md +14 -0
- package/dist/okf/types/Challenge.md +14 -0
- package/dist/okf/types/Cluster.md +14 -0
- package/dist/okf/types/ClusterIssuer.md +14 -0
- package/dist/okf/types/ClusterRole.md +15 -0
- package/dist/okf/types/ClusterRoleBinding.md +15 -0
- package/dist/okf/types/ClusterRoleBindingList.md +14 -0
- package/dist/okf/types/ClusterRoleList.md +14 -0
- package/dist/okf/types/ClusterTrustBundle.md +14 -0
- package/dist/okf/types/ClusterTrustBundleList.md +14 -0
- package/dist/okf/types/ComponentStatus.md +14 -0
- package/dist/okf/types/ComponentStatusList.md +14 -0
- package/dist/okf/types/ConfigMapList.md +14 -0
- package/dist/okf/types/ControllerRevision.md +15 -0
- package/dist/okf/types/ControllerRevisionList.md +14 -0
- package/dist/okf/types/CoreEventList.md +14 -0
- package/dist/okf/types/CrdbCluster.md +14 -0
- package/dist/okf/types/CronJob.md +20 -0
- package/dist/okf/types/CronJobList.md +14 -0
- package/dist/okf/types/CustomResourceDefinition.md +14 -0
- package/dist/okf/types/CustomResourceDefinitionList.md +14 -0
- package/dist/okf/types/DaemonSet.md +19 -0
- package/dist/okf/types/DaemonSetList.md +14 -0
- package/dist/okf/types/DeleteOptions.md +18 -0
- package/dist/okf/types/Deploy.md +14 -0
- package/dist/okf/types/DeploymentList.md +14 -0
- package/dist/okf/types/DeviceClass.md +14 -0
- package/dist/okf/types/DeviceClassList.md +14 -0
- package/dist/okf/types/DeviceTaintRule.md +14 -0
- package/dist/okf/types/DeviceTaintRuleList.md +14 -0
- package/dist/okf/types/EndpointSlice.md +16 -0
- package/dist/okf/types/EndpointSliceList.md +14 -0
- package/dist/okf/types/Endpoints.md +14 -0
- package/dist/okf/types/EndpointsList.md +14 -0
- package/dist/okf/types/Event.md +27 -0
- package/dist/okf/types/EventsEvent.md +27 -0
- package/dist/okf/types/EventsEventList.md +14 -0
- package/dist/okf/types/Eviction.md +14 -0
- package/dist/okf/types/FlowSchema.md +14 -0
- package/dist/okf/types/FlowSchemaList.md +14 -0
- package/dist/okf/types/FluxInstance.md +14 -0
- package/dist/okf/types/FluxReport.md +14 -0
- package/dist/okf/types/GRPCRoute.md +14 -0
- package/dist/okf/types/Gateway.md +14 -0
- package/dist/okf/types/GatewayClass.md +14 -0
- package/dist/okf/types/GitRepository.md +14 -0
- package/dist/okf/types/HTTPRoute.md +14 -0
- package/dist/okf/types/HelmChart.md +14 -0
- package/dist/okf/types/HelmRelease.md +14 -0
- package/dist/okf/types/HelmRepository.md +14 -0
- package/dist/okf/types/HorizontalPodAutoscaler.md +14 -0
- package/dist/okf/types/HorizontalPodAutoscalerList.md +14 -0
- package/dist/okf/types/IPAddress.md +14 -0
- package/dist/okf/types/IPAddressList.md +14 -0
- package/dist/okf/types/ImagePolicy.md +14 -0
- package/dist/okf/types/ImageRepository.md +14 -0
- package/dist/okf/types/ImageUpdateAutomation.md +14 -0
- package/dist/okf/types/InfisicalDynamicSecret.md +14 -0
- package/dist/okf/types/InfisicalPushSecret.md +14 -0
- package/dist/okf/types/InfisicalSecret.md +14 -0
- package/dist/okf/types/Ing.md +14 -0
- package/dist/okf/types/IngressClass.md +14 -0
- package/dist/okf/types/IngressClassList.md +14 -0
- package/dist/okf/types/IngressList.md +14 -0
- package/dist/okf/types/IngressRoute.md +14 -0
- package/dist/okf/types/IngressRouteTCP.md +14 -0
- package/dist/okf/types/IngressRouteUDP.md +14 -0
- package/dist/okf/types/Issuer.md +14 -0
- package/dist/okf/types/JobList.md +14 -0
- package/dist/okf/types/Kustomization.md +14 -0
- package/dist/okf/types/Lease.md +14 -0
- package/dist/okf/types/LeaseCandidate.md +14 -0
- package/dist/okf/types/LeaseCandidateList.md +14 -0
- package/dist/okf/types/LeaseList.md +14 -0
- package/dist/okf/types/LimitRange.md +14 -0
- package/dist/okf/types/LimitRangeList.md +14 -0
- package/dist/okf/types/LocalSubjectAccessReview.md +14 -0
- package/dist/okf/types/MicroVM.md +14 -0
- package/dist/okf/types/MicroVMClass.md +14 -0
- package/dist/okf/types/MicroVMImage.md +14 -0
- package/dist/okf/types/MicroVMNetwork.md +14 -0
- package/dist/okf/types/MicroVMReplicaSet.md +14 -0
- package/dist/okf/types/Middleware.md +14 -0
- package/dist/okf/types/MiddlewareTCP.md +14 -0
- package/dist/okf/types/MutatingAdmissionPolicy.md +14 -0
- package/dist/okf/types/MutatingAdmissionPolicyBinding.md +14 -0
- package/dist/okf/types/MutatingAdmissionPolicyBindingList.md +14 -0
- package/dist/okf/types/MutatingAdmissionPolicyList.md +14 -0
- package/dist/okf/types/MutatingWebhookConfiguration.md +14 -0
- package/dist/okf/types/MutatingWebhookConfigurationList.md +14 -0
- package/dist/okf/types/Namespace.md +18 -0
- package/dist/okf/types/NamespaceList.md +14 -0
- package/dist/okf/types/NetPol.md +14 -0
- package/dist/okf/types/NetworkPolicyList.md +14 -0
- package/dist/okf/types/Node.md +21 -0
- package/dist/okf/types/NodeList.md +14 -0
- package/dist/okf/types/OCIRepository.md +14 -0
- package/dist/okf/types/ObjectStore.md +14 -0
- package/dist/okf/types/Order.md +14 -0
- package/dist/okf/types/PDB.md +18 -0
- package/dist/okf/types/PersistentVolume.md +14 -0
- package/dist/okf/types/PersistentVolumeClaim.md +14 -0
- package/dist/okf/types/PersistentVolumeClaimList.md +14 -0
- package/dist/okf/types/PersistentVolumeList.md +14 -0
- package/dist/okf/types/Pod.md +18 -0
- package/dist/okf/types/PodCertificateRequest.md +14 -0
- package/dist/okf/types/PodCertificateRequestList.md +14 -0
- package/dist/okf/types/PodDisruptionBudgetList.md +14 -0
- package/dist/okf/types/PodList.md +14 -0
- package/dist/okf/types/PodTemplate.md +14 -0
- package/dist/okf/types/PodTemplateList.md +14 -0
- package/dist/okf/types/Pooler.md +14 -0
- package/dist/okf/types/PriorityClass.md +17 -0
- package/dist/okf/types/PriorityClassList.md +14 -0
- package/dist/okf/types/PriorityLevelConfiguration.md +14 -0
- package/dist/okf/types/PriorityLevelConfigurationList.md +14 -0
- package/dist/okf/types/PrometheusRule.md +14 -0
- package/dist/okf/types/Provider.md +14 -0
- package/dist/okf/types/RayCluster.md +20 -0
- package/dist/okf/types/RayJob.md +14 -0
- package/dist/okf/types/RayService.md +14 -0
- package/dist/okf/types/Receiver.md +14 -0
- package/dist/okf/types/ReferenceGrant.md +14 -0
- package/dist/okf/types/ReplicaSet.md +19 -0
- package/dist/okf/types/ReplicaSetList.md +14 -0
- package/dist/okf/types/ReplicationController.md +14 -0
- package/dist/okf/types/ReplicationControllerList.md +14 -0
- package/dist/okf/types/ResourceClaim.md +14 -0
- package/dist/okf/types/ResourceClaimList.md +14 -0
- package/dist/okf/types/ResourceClaimTemplate.md +14 -0
- package/dist/okf/types/ResourceClaimTemplateList.md +14 -0
- package/dist/okf/types/ResourceQuota.md +14 -0
- package/dist/okf/types/ResourceQuotaList.md +14 -0
- package/dist/okf/types/ResourceSet.md +14 -0
- package/dist/okf/types/ResourceSetInputProvider.md +14 -0
- package/dist/okf/types/ResourceSlice.md +14 -0
- package/dist/okf/types/ResourceSliceList.md +14 -0
- package/dist/okf/types/Role.md +14 -0
- package/dist/okf/types/RoleBinding.md +15 -0
- package/dist/okf/types/RoleBindingList.md +14 -0
- package/dist/okf/types/RoleList.md +14 -0
- package/dist/okf/types/RuntimeClass.md +16 -0
- package/dist/okf/types/RuntimeClassList.md +14 -0
- package/dist/okf/types/SA.md +16 -0
- package/dist/okf/types/Scale.md +14 -0
- package/dist/okf/types/ScheduledBackup.md +14 -0
- package/dist/okf/types/Sec.md +17 -0
- package/dist/okf/types/SecretList.md +14 -0
- package/dist/okf/types/SelfSubjectAccessReview.md +14 -0
- package/dist/okf/types/SelfSubjectReview.md +13 -0
- package/dist/okf/types/SelfSubjectRulesReview.md +14 -0
- package/dist/okf/types/ServersTransport.md +14 -0
- package/dist/okf/types/ServersTransportTCP.md +14 -0
- package/dist/okf/types/Service.md +20 -0
- package/dist/okf/types/ServiceAccountList.md +14 -0
- package/dist/okf/types/ServiceCIDR.md +14 -0
- package/dist/okf/types/ServiceCIDRList.md +14 -0
- package/dist/okf/types/ServiceList.md +14 -0
- package/dist/okf/types/ServiceMonitor.md +14 -0
- package/dist/okf/types/StatefulSet.md +19 -0
- package/dist/okf/types/StatefulSetList.md +14 -0
- package/dist/okf/types/Status.md +17 -0
- package/dist/okf/types/StorageClass.md +20 -0
- package/dist/okf/types/StorageClassList.md +14 -0
- package/dist/okf/types/StorageVersionMigration.md +14 -0
- package/dist/okf/types/StorageVersionMigrationList.md +14 -0
- package/dist/okf/types/SubjectAccessReview.md +14 -0
- package/dist/okf/types/TLSOption.md +14 -0
- package/dist/okf/types/TLSStore.md +14 -0
- package/dist/okf/types/TokenRequest.md +14 -0
- package/dist/okf/types/TokenReview.md +14 -0
- package/dist/okf/types/TraefikService.md +14 -0
- package/dist/okf/types/ValidatingAdmissionPolicy.md +14 -0
- package/dist/okf/types/ValidatingAdmissionPolicyBinding.md +14 -0
- package/dist/okf/types/ValidatingAdmissionPolicyBindingList.md +14 -0
- package/dist/okf/types/ValidatingAdmissionPolicyList.md +14 -0
- package/dist/okf/types/ValidatingWebhookConfiguration.md +14 -0
- package/dist/okf/types/ValidatingWebhookConfigurationList.md +14 -0
- package/dist/okf/types/VolumeAttachment.md +14 -0
- package/dist/okf/types/VolumeAttachmentList.md +14 -0
- package/dist/okf/types/VolumeAttributesClass.md +15 -0
- package/dist/okf/types/VolumeAttributesClassList.md +14 -0
- package/dist/okf/types/WatchEvent.md +14 -0
- package/package.json +2 -2
- package/src/deep-observe-hooks.ts +60 -0
- package/src/deep-observe.test.ts +114 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: Status
|
|
4
|
+
description: k8s resource type K8s::Core::Status
|
|
5
|
+
name: Status
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Core::Status
|
|
8
|
+
---
|
|
9
|
+
`K8s::Core::Status`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `code` (`number`, optional): Suggested HTTP return code for this status, 0 if not set.
|
|
14
|
+
- `details` (`Record<string, unknown>`, optional): Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
|
|
15
|
+
- `message` (`string`, optional): A human-readable description of the status of this operation.
|
|
16
|
+
- `metadata` (`Record<string, unknown>`, optional): Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
17
|
+
- `reason` (`string`, optional): A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: StorageClass
|
|
4
|
+
description: k8s resource type K8s::Storage::StorageClass
|
|
5
|
+
name: StorageClass
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storage::StorageClass
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storage::StorageClass`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `provisioner` (`string`, required): provisioner indicates the type of the provisioner.
|
|
14
|
+
- `allowedTopologies` (`Record<string, unknown>[]`, optional): allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
|
|
15
|
+
- `allowVolumeExpansion` (`boolean`, optional): allowVolumeExpansion shows whether the storage class allow volume expand.
|
|
16
|
+
- `metadata` (`ObjectMeta`, optional): Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
17
|
+
- `mountOptions` (`string[]`, optional): mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid.
|
|
18
|
+
- `parameters` (`Record<string, string>`, optional): parameters holds the parameters for the provisioner that should create volumes of this storage class.
|
|
19
|
+
- `reclaimPolicy` (`string`, optional): reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete.
|
|
20
|
+
- `volumeBindingMode` (`string`, optional): volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: StorageClassList
|
|
4
|
+
description: k8s resource type K8s::Storage::StorageClassList
|
|
5
|
+
name: StorageClassList
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storage::StorageClassList
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storage::StorageClassList`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `items` (`Record<string, unknown>[]`, required): items is the list of StorageClasses
|
|
14
|
+
- `metadata` (`Record<string, unknown>`, optional): Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: StorageVersionMigration
|
|
4
|
+
description: k8s resource type K8s::Storagemigration::StorageVersionMigration
|
|
5
|
+
name: StorageVersionMigration
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storagemigration::StorageVersionMigration
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storagemigration::StorageVersionMigration`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `metadata` (`ObjectMeta`, optional): Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
14
|
+
- `spec` (`Record<string, unknown>`, optional): Specification of the migration.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: StorageVersionMigrationList
|
|
4
|
+
description: k8s resource type K8s::Storagemigration::StorageVersionMigrationList
|
|
5
|
+
name: StorageVersionMigrationList
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storagemigration::StorageVersionMigrationList
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storagemigration::StorageVersionMigrationList`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `items` (`Record<string, unknown>[]`, required): Items is the list of StorageVersionMigration
|
|
14
|
+
- `metadata` (`Record<string, unknown>`, optional): Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: SubjectAccessReview
|
|
4
|
+
description: k8s resource type K8s::Authorization::SubjectAccessReview
|
|
5
|
+
name: SubjectAccessReview
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Authorization::SubjectAccessReview
|
|
8
|
+
---
|
|
9
|
+
`K8s::Authorization::SubjectAccessReview`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `spec` (`Record<string, unknown>`, required): spec holds information about the request being evaluated
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: TLSOption
|
|
4
|
+
description: k8s resource type K8s::Traefik::TLSOption
|
|
5
|
+
name: TLSOption
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Traefik::TLSOption
|
|
8
|
+
---
|
|
9
|
+
`K8s::Traefik::TLSOption`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `spec` (`Record<string, unknown>`, required): TLSOptionSpec defines the desired state of a TLSOption.
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): Standard object's metadata.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: TLSStore
|
|
4
|
+
description: k8s resource type K8s::Traefik::TLSStore
|
|
5
|
+
name: TLSStore
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Traefik::TLSStore
|
|
8
|
+
---
|
|
9
|
+
`K8s::Traefik::TLSStore`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `spec` (`Record<string, unknown>`, required): TLSStoreSpec defines the desired state of a TLSStore.
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): Standard object's metadata.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: TokenRequest
|
|
4
|
+
description: k8s resource type K8s::Authentication::TokenRequest
|
|
5
|
+
name: TokenRequest
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Authentication::TokenRequest
|
|
8
|
+
---
|
|
9
|
+
`K8s::Authentication::TokenRequest`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `metadata` (`ObjectMeta`, optional): metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
14
|
+
- `spec` (`Record<string, unknown>`, optional): spec holds information about the request being evaluated
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: TokenReview
|
|
4
|
+
description: k8s resource type K8s::Authentication::TokenReview
|
|
5
|
+
name: TokenReview
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Authentication::TokenReview
|
|
8
|
+
---
|
|
9
|
+
`K8s::Authentication::TokenReview`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `spec` (`Record<string, unknown>`, required): spec holds information about the request being evaluated
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: TraefikService
|
|
4
|
+
description: k8s resource type K8s::Traefik::TraefikService
|
|
5
|
+
name: TraefikService
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Traefik::TraefikService
|
|
8
|
+
---
|
|
9
|
+
`K8s::Traefik::TraefikService`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `spec` (`Record<string, unknown>`, required): TraefikServiceSpec defines the desired state of a TraefikService.
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): Standard object's metadata.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ValidatingAdmissionPolicy
|
|
4
|
+
description: k8s resource type K8s::Admissionregistration::ValidatingAdmissionPolicy
|
|
5
|
+
name: ValidatingAdmissionPolicy
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Admissionregistration::ValidatingAdmissionPolicy
|
|
8
|
+
---
|
|
9
|
+
`K8s::Admissionregistration::ValidatingAdmissionPolicy`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `metadata` (`ObjectMeta`, optional): metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
14
|
+
- `spec` (`Record<string, unknown>`, optional): spec defines the desired behavior of the ValidatingAdmissionPolicy.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ValidatingAdmissionPolicyBinding
|
|
4
|
+
description: k8s resource type K8s::Admissionregistration::ValidatingAdmissionPolicyBinding
|
|
5
|
+
name: ValidatingAdmissionPolicyBinding
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Admissionregistration::ValidatingAdmissionPolicyBinding
|
|
8
|
+
---
|
|
9
|
+
`K8s::Admissionregistration::ValidatingAdmissionPolicyBinding`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `spec` (`Record<string, unknown>`, required): spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ValidatingAdmissionPolicyBindingList
|
|
4
|
+
description: k8s resource type K8s::Admissionregistration::ValidatingAdmissionPolicyBindingList
|
|
5
|
+
name: ValidatingAdmissionPolicyBindingList
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Admissionregistration::ValidatingAdmissionPolicyBindingList
|
|
8
|
+
---
|
|
9
|
+
`K8s::Admissionregistration::ValidatingAdmissionPolicyBindingList`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `items` (`Record<string, unknown>[]`, required): List of PolicyBinding.
|
|
14
|
+
- `metadata` (`Record<string, unknown>`, optional): metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ValidatingAdmissionPolicyList
|
|
4
|
+
description: k8s resource type K8s::Admissionregistration::ValidatingAdmissionPolicyList
|
|
5
|
+
name: ValidatingAdmissionPolicyList
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Admissionregistration::ValidatingAdmissionPolicyList
|
|
8
|
+
---
|
|
9
|
+
`K8s::Admissionregistration::ValidatingAdmissionPolicyList`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `items` (`Record<string, unknown>[]`, required): List of ValidatingAdmissionPolicy.
|
|
14
|
+
- `metadata` (`Record<string, unknown>`, optional): metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ValidatingWebhookConfiguration
|
|
4
|
+
description: k8s resource type K8s::Admissionregistration::ValidatingWebhookConfiguration
|
|
5
|
+
name: ValidatingWebhookConfiguration
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Admissionregistration::ValidatingWebhookConfiguration
|
|
8
|
+
---
|
|
9
|
+
`K8s::Admissionregistration::ValidatingWebhookConfiguration`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `metadata` (`ObjectMeta`, optional): metadata is the standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
|
|
14
|
+
- `webhooks` (`Record<string, unknown>[]`, optional): webhooks is a list of webhooks and the affected resources and operations.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ValidatingWebhookConfigurationList
|
|
4
|
+
description: k8s resource type K8s::Admissionregistration::ValidatingWebhookConfigurationList
|
|
5
|
+
name: ValidatingWebhookConfigurationList
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Admissionregistration::ValidatingWebhookConfigurationList
|
|
8
|
+
---
|
|
9
|
+
`K8s::Admissionregistration::ValidatingWebhookConfigurationList`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `items` (`Record<string, unknown>[]`, required): List of ValidatingWebhookConfiguration.
|
|
14
|
+
- `metadata` (`Record<string, unknown>`, optional): metadata is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: VolumeAttachment
|
|
4
|
+
description: k8s resource type K8s::Storage::VolumeAttachment
|
|
5
|
+
name: VolumeAttachment
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storage::VolumeAttachment
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storage::VolumeAttachment`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `spec` (`Record<string, unknown>`, required): spec represents specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: VolumeAttachmentList
|
|
4
|
+
description: k8s resource type K8s::Storage::VolumeAttachmentList
|
|
5
|
+
name: VolumeAttachmentList
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storage::VolumeAttachmentList
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storage::VolumeAttachmentList`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `items` (`Record<string, unknown>[]`, required): items is the list of VolumeAttachments
|
|
14
|
+
- `metadata` (`Record<string, unknown>`, optional): Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: VolumeAttributesClass
|
|
4
|
+
description: k8s resource type K8s::Storage::VolumeAttributesClass
|
|
5
|
+
name: VolumeAttributesClass
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storage::VolumeAttributesClass
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storage::VolumeAttributesClass`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `driverName` (`string`, required): Name of the CSI driver This field is immutable.
|
|
14
|
+
- `metadata` (`ObjectMeta`, optional): Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
15
|
+
- `parameters` (`Record<string, string>`, optional): parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass. This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an "Infeasible" state in the modifyVolumeStatus field.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: VolumeAttributesClassList
|
|
4
|
+
description: k8s resource type K8s::Storage::VolumeAttributesClassList
|
|
5
|
+
name: VolumeAttributesClassList
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Storage::VolumeAttributesClassList
|
|
8
|
+
---
|
|
9
|
+
`K8s::Storage::VolumeAttributesClassList`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `items` (`Record<string, unknown>[]`, required): items is the list of VolumeAttributesClass objects.
|
|
14
|
+
- `metadata` (`Record<string, unknown>`, optional): Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: WatchEvent
|
|
4
|
+
description: k8s resource type K8s::Core::WatchEvent
|
|
5
|
+
name: WatchEvent
|
|
6
|
+
lexicon: k8s
|
|
7
|
+
resource_type: K8s::Core::WatchEvent
|
|
8
|
+
---
|
|
9
|
+
`K8s::Core::WatchEvent`, a resource type of the k8s lexicon.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
- `object` (`Record<string, unknown>`, required): Object is: If Type is Added or Modified: the new state of the object. If Type is Deleted: the state of the object immediately before deletion. If Type is Error: *Status is recommended; other types may make sense depending on context.
|
|
14
|
+
- `type` (`string`, required)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-k8s",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.1",
|
|
4
4
|
"description": "Kubernetes lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"zod": "^4.3.6",
|
|
87
|
-
"@intentius/chant": "^0.
|
|
87
|
+
"@intentius/chant": "^0.42.1",
|
|
88
88
|
"typescript": "^5.9.3"
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
import { createRequire } from "module";
|
|
45
45
|
import type { DeepArrayElement, DeepNode, DeepNormalizationHooks } from "@intentius/chant/lexicon";
|
|
46
46
|
import { K8S_OBJECT_ENVELOPE_PRUNE_PATTERNS, k8sListMapOrderKey } from "@intentius/chant/managed-fields";
|
|
47
|
+
import { LABEL_OWNERSHIP_KEYS, OWNERSHIP_MANAGED_BY_VALUE } from "@intentius/chant/ownership";
|
|
47
48
|
|
|
48
49
|
// This module ships as ESM (tsx strips types from src/ directly), where a bare
|
|
49
50
|
// `require` is not defined — the same reason serializer.ts and the LSP modules
|
|
@@ -86,13 +87,64 @@ export const K8S_SERVICE_DEFAULTS: Record<string, Record<string, unknown>> = {
|
|
|
86
87
|
"spec.template.spec.restartPolicy": "Always",
|
|
87
88
|
"spec.template.spec.terminationGracePeriodSeconds": 30,
|
|
88
89
|
"spec.template.spec.schedulerName": "default-scheduler",
|
|
90
|
+
// Widened on the CC canonical estate (#1214): a container declaring an
|
|
91
|
+
// httpGet probe, a named port, or nothing about termination gets exactly
|
|
92
|
+
// these from the API server. SSA attributes a server-defaulted field to no
|
|
93
|
+
// manager, so the managed-fields prune deliberately leaves them diffable
|
|
94
|
+
// (see ./deep-observe.ts) — this table is where they subtract.
|
|
95
|
+
"spec.template.spec.containers[].livenessProbe.failureThreshold": 3,
|
|
96
|
+
"spec.template.spec.containers[].livenessProbe.periodSeconds": 10,
|
|
97
|
+
"spec.template.spec.containers[].livenessProbe.successThreshold": 1,
|
|
98
|
+
"spec.template.spec.containers[].livenessProbe.timeoutSeconds": 1,
|
|
99
|
+
"spec.template.spec.containers[].livenessProbe.httpGet.scheme": "HTTP",
|
|
100
|
+
"spec.template.spec.containers[].readinessProbe.failureThreshold": 3,
|
|
101
|
+
"spec.template.spec.containers[].readinessProbe.periodSeconds": 10,
|
|
102
|
+
"spec.template.spec.containers[].readinessProbe.successThreshold": 1,
|
|
103
|
+
"spec.template.spec.containers[].readinessProbe.timeoutSeconds": 1,
|
|
104
|
+
"spec.template.spec.containers[].readinessProbe.httpGet.scheme": "HTTP",
|
|
105
|
+
"spec.template.spec.containers[].ports[].protocol": "TCP",
|
|
106
|
+
"spec.template.spec.containers[].terminationMessagePath": "/dev/termination-log",
|
|
107
|
+
"spec.template.spec.containers[].terminationMessagePolicy": "File",
|
|
108
|
+
"spec.template.spec.securityContext": {},
|
|
89
109
|
},
|
|
90
110
|
"K8s::Core::Service": {
|
|
91
111
|
"spec.sessionAffinity": "None",
|
|
92
112
|
"spec.type": "ClusterIP",
|
|
113
|
+
"spec.internalTrafficPolicy": "Cluster",
|
|
114
|
+
"spec.ipFamilyPolicy": "SingleStack",
|
|
115
|
+
"spec.ports[].protocol": "TCP",
|
|
93
116
|
},
|
|
94
117
|
};
|
|
95
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Server-ASSIGNED fields — populated by the API server with a value that
|
|
121
|
+
* varies per object (an allocated ClusterIP, the resolved IP family list), so
|
|
122
|
+
* unlike {@link K8S_SERVICE_DEFAULTS} there is no fixed value to compare
|
|
123
|
+
* against. Counterpart-gated like the defaults table: a declared `clusterIP`
|
|
124
|
+
* is still compared, only the purely server-filled appearance is noise.
|
|
125
|
+
*/
|
|
126
|
+
export const K8S_SERVER_ASSIGNED_PATTERNS: Record<string, ReadonlySet<string>> = {
|
|
127
|
+
"K8s::Core::Service": new Set(["spec.clusterIP", "spec.clusterIPs", "spec.ipFamilies"]),
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* chant's own ownership marker, as label paths (#1214 — the k8s edition of
|
|
132
|
+
* azure's #1213 rule). The build stamps `app.kubernetes.io/managed-by` +
|
|
133
|
+
* `chant.intentius.io/{stack,env}` into every manifest it emits, so a managed
|
|
134
|
+
* object always carries them live while the declared *source* the diff
|
|
135
|
+
* compares does not — chant reading its own signature back as drift. The
|
|
136
|
+
* managed-fields prune cannot subtract them: they are in the applied config,
|
|
137
|
+
* so chant's field manager owns them, and chant-owned is always diffable.
|
|
138
|
+
* Counterpart-gated at the call site; managed-by is additionally gated on the
|
|
139
|
+
* value `"chant"`, so `managed-by: helm` appearing out of band still surfaces.
|
|
140
|
+
*/
|
|
141
|
+
const K8S_OWNERSHIP_LABEL_PATTERNS: ReadonlySet<string> = new Set([
|
|
142
|
+
`metadata.labels.${LABEL_OWNERSHIP_KEYS.stack}`,
|
|
143
|
+
`metadata.labels.${LABEL_OWNERSHIP_KEYS.env}`,
|
|
144
|
+
]);
|
|
145
|
+
|
|
146
|
+
const K8S_MANAGED_BY_LABEL_PATTERN = `metadata.labels.${LABEL_OWNERSHIP_KEYS.managedBy}`;
|
|
147
|
+
|
|
96
148
|
/** Stable JSON with sorted keys — the fallback ordering key for a set-like array without a natural identity field. */
|
|
97
149
|
function canonicalJson(value: unknown): string {
|
|
98
150
|
return (
|
|
@@ -206,6 +258,14 @@ export const k8sDeepNormalizationHooks: DeepNormalizationHooks = {
|
|
|
206
258
|
if (K8S_OBJECT_ENVELOPE_PRUNE_PATTERNS.has(node.pattern)) return true;
|
|
207
259
|
|
|
208
260
|
if (node.side !== "live" || node.counterpart !== "absent") return false;
|
|
261
|
+
|
|
262
|
+
// chant's own ownership marker is not drift (see the sets' docs).
|
|
263
|
+
if (K8S_OWNERSHIP_LABEL_PATTERNS.has(node.pattern)) return true;
|
|
264
|
+
if (node.pattern === K8S_MANAGED_BY_LABEL_PATTERN && node.value === OWNERSHIP_MANAGED_BY_VALUE) return true;
|
|
265
|
+
|
|
266
|
+
// A server-assigned value nobody declared is allocation, not drift.
|
|
267
|
+
if (K8S_SERVER_ASSIGNED_PATTERNS[node.entityType]?.has(node.pattern)) return true;
|
|
268
|
+
|
|
209
269
|
const defaults = K8S_SERVICE_DEFAULTS[node.entityType];
|
|
210
270
|
if (!defaults || !Object.prototype.hasOwnProperty.call(defaults, node.pattern)) return false;
|
|
211
271
|
return canonicalJson(defaults[node.pattern]) === canonicalJson(node.value);
|
package/src/deep-observe.test.ts
CHANGED
|
@@ -96,6 +96,120 @@ describe("k8sDeepNormalizationHooks — the static rules", () => {
|
|
|
96
96
|
expect(declaredExplicit).toEqual({ spec: { strategy: strategyDefault, replicas: 3 } });
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
+
test("chant's own stamped labels are not drift; a foreign managed-by and a user label still are", () => {
|
|
100
|
+
const live = {
|
|
101
|
+
metadata: {
|
|
102
|
+
name: "web",
|
|
103
|
+
labels: {
|
|
104
|
+
"app.kubernetes.io/managed-by": "chant",
|
|
105
|
+
"chant.intentius.io/stack": "cc-azure-canonical",
|
|
106
|
+
"chant.intentius.io/env": "local",
|
|
107
|
+
team: "platform",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
const out = normalizeDeepProperties(live, {
|
|
112
|
+
entityType: "K8s::Apps::Deployment",
|
|
113
|
+
side: "live",
|
|
114
|
+
hooks: k8sDeepNormalizationHooks,
|
|
115
|
+
counterpartPaths: new Set(["metadata", "metadata.name"]),
|
|
116
|
+
});
|
|
117
|
+
expect(out).toEqual({ metadata: { name: "web", labels: { team: "platform" } } });
|
|
118
|
+
|
|
119
|
+
const foreign = normalizeDeepProperties(
|
|
120
|
+
{ metadata: { name: "web", labels: { "app.kubernetes.io/managed-by": "helm" } } },
|
|
121
|
+
{
|
|
122
|
+
entityType: "K8s::Apps::Deployment",
|
|
123
|
+
side: "live",
|
|
124
|
+
hooks: k8sDeepNormalizationHooks,
|
|
125
|
+
counterpartPaths: new Set(["metadata", "metadata.name"]),
|
|
126
|
+
},
|
|
127
|
+
);
|
|
128
|
+
expect(foreign).toEqual({ metadata: { name: "web", labels: { "app.kubernetes.io/managed-by": "helm" } } });
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
test("a server-assigned ClusterIP nobody declared subtracts; a declared one is compared", () => {
|
|
132
|
+
const undeclared = normalizeDeepProperties(
|
|
133
|
+
{ spec: { clusterIP: "10.43.201.161", clusterIPs: ["10.43.201.161"], ipFamilies: ["IPv4"], selector: { app: "web" } } },
|
|
134
|
+
{
|
|
135
|
+
entityType: "K8s::Core::Service",
|
|
136
|
+
side: "live",
|
|
137
|
+
hooks: k8sDeepNormalizationHooks,
|
|
138
|
+
counterpartPaths: new Set(["spec", "spec.selector", "spec.selector.app"]),
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
expect(undeclared).toEqual({ spec: { selector: { app: "web" } } });
|
|
142
|
+
|
|
143
|
+
const declared = normalizeDeepProperties(
|
|
144
|
+
{ spec: { clusterIP: "10.43.0.10" } },
|
|
145
|
+
{
|
|
146
|
+
entityType: "K8s::Core::Service",
|
|
147
|
+
side: "live",
|
|
148
|
+
hooks: k8sDeepNormalizationHooks,
|
|
149
|
+
counterpartPaths: new Set(["spec", "spec.clusterIP"]),
|
|
150
|
+
},
|
|
151
|
+
);
|
|
152
|
+
expect(declared).toEqual({ spec: { clusterIP: "10.43.0.10" } });
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
test("probe and termination defaults subtract inside a declared container", () => {
|
|
156
|
+
const out = normalizeDeepProperties(
|
|
157
|
+
{
|
|
158
|
+
spec: {
|
|
159
|
+
template: {
|
|
160
|
+
spec: {
|
|
161
|
+
securityContext: {},
|
|
162
|
+
containers: [
|
|
163
|
+
{
|
|
164
|
+
name: "api",
|
|
165
|
+
image: "example:1",
|
|
166
|
+
terminationMessagePath: "/dev/termination-log",
|
|
167
|
+
terminationMessagePolicy: "File",
|
|
168
|
+
livenessProbe: { httpGet: { path: "/", port: 8080, scheme: "HTTP" }, failureThreshold: 3, periodSeconds: 10, successThreshold: 1, timeoutSeconds: 1 },
|
|
169
|
+
ports: [{ containerPort: 8080, name: "http", protocol: "TCP" }],
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
entityType: "K8s::Apps::Deployment",
|
|
178
|
+
side: "live",
|
|
179
|
+
hooks: k8sDeepNormalizationHooks,
|
|
180
|
+
counterpartPaths: new Set([
|
|
181
|
+
"spec", "spec.template", "spec.template.spec",
|
|
182
|
+
"spec.template.spec.containers", "spec.template.spec.containers[]",
|
|
183
|
+
"spec.template.spec.containers[].name", "spec.template.spec.containers[].image",
|
|
184
|
+
"spec.template.spec.containers[].livenessProbe",
|
|
185
|
+
"spec.template.spec.containers[].livenessProbe.httpGet",
|
|
186
|
+
"spec.template.spec.containers[].livenessProbe.httpGet.path",
|
|
187
|
+
"spec.template.spec.containers[].livenessProbe.httpGet.port",
|
|
188
|
+
"spec.template.spec.containers[].ports",
|
|
189
|
+
"spec.template.spec.containers[].ports[]",
|
|
190
|
+
"spec.template.spec.containers[].ports[].containerPort",
|
|
191
|
+
"spec.template.spec.containers[].ports[].name",
|
|
192
|
+
]),
|
|
193
|
+
},
|
|
194
|
+
);
|
|
195
|
+
expect(out).toEqual({
|
|
196
|
+
spec: {
|
|
197
|
+
template: {
|
|
198
|
+
spec: {
|
|
199
|
+
containers: [
|
|
200
|
+
{
|
|
201
|
+
name: "api",
|
|
202
|
+
image: "example:1",
|
|
203
|
+
livenessProbe: { httpGet: { path: "/", port: 8080 } },
|
|
204
|
+
ports: [{ containerPort: 8080, name: "http" }],
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
|
|
99
213
|
test("a one-sided pass never subtracts defaults — the reader has no declared tree yet", () => {
|
|
100
214
|
const out = normalizeDeepProperties(
|
|
101
215
|
{ spec: { strategy: { type: "RollingUpdate", rollingUpdate: { maxSurge: "25%", maxUnavailable: "25%" } } } },
|