-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove managed fields from raw output
this change was a little tricky and required marshaling the data out of the source yaml, removing the managed field section, and then unmarshaling back to a string. a new test file was added to account for the serialization choices that yaml-rust2 makes.
- Loading branch information
Showing
3 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 101 additions & 0 deletions
101
testdata/ip-10-0-0-1.control.plane.no-managed-fields.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Node | ||
metadata: | ||
annotations: | ||
machine.openshift.io/machine: openshift-machine-api/control-plane1 | ||
machineconfiguration.openshift.io/controlPlaneTopology: HighlyAvailable | ||
machineconfiguration.openshift.io/currentConfig: rendered-master-0 | ||
machineconfiguration.openshift.io/desiredConfig: rendered-master-0 | ||
machineconfiguration.openshift.io/reason: "" | ||
machineconfiguration.openshift.io/state: Done | ||
nfd.node.kubernetes.io/master.version: "1.16" | ||
volumes.kubernetes.io/controller-managed-attach-detach: "true" | ||
creationTimestamp: "2022-01-01T00:00:00Z" | ||
labels: | ||
beta.kubernetes.io/arch: amd64 | ||
beta.kubernetes.io/instance-type: xlarge | ||
beta.kubernetes.io/os: linux | ||
failure-domain.beta.kubernetes.io/region: region-1 | ||
failure-domain.beta.kubernetes.io/zone: zone-1 | ||
kubernetes.io/arch: amd64 | ||
kubernetes.io/hostname: ip-10-0-0-1.control.plane | ||
kubernetes.io/os: linux | ||
node-role.kubernetes.io/master: "" | ||
node.kubernetes.io/instance-type: xlarge | ||
node.openshift.io/os_id: rhcos | ||
topology.kubernetes.io/region: region-1 | ||
topology.kubernetes.io/zone: zone-1 | ||
name: ip-10-0-0-1.control.plane | ||
resourceVersion: "89485" | ||
uid: 00000000-0000-0000-0000-000000000000 | ||
spec: | ||
providerID: "fake://ip-10-0-0-1.control.plane" | ||
taints: | ||
- effect: NoSchedule | ||
key: node-role.kubernetes.io/master | ||
status: | ||
addresses: | ||
- address: 10.0.0.1 | ||
type: InternalIP | ||
- address: ip-10-0-0-1.control.plane | ||
type: Hostname | ||
- address: ip-10-0-0-1.control.plane | ||
type: InternalDNS | ||
allocatable: | ||
cpu: 3500m | ||
ephemeral-storage: "115470533646" | ||
hugepages-1Gi: "0" | ||
hugepages-2Mi: "0" | ||
memory: 14955324Ki | ||
pods: "250" | ||
capacity: | ||
cpu: "4" | ||
ephemeral-storage: 125293548Ki | ||
hugepages-1Gi: "0" | ||
hugepages-2Mi: "0" | ||
memory: 16106300Ki | ||
pods: "250" | ||
conditions: | ||
- lastHeartbeatTime: "2022-01-01T00:00:00Z" | ||
lastTransitionTime: "2022-01-01T00:00:00Z" | ||
message: kubelet has sufficient memory available | ||
reason: KubeletHasSufficientMemory | ||
status: "False" | ||
type: MemoryPressure | ||
- lastHeartbeatTime: "2022-01-01T00:00:00Z" | ||
lastTransitionTime: "2022-01-01T00:00:00Z" | ||
message: kubelet has no disk pressure | ||
reason: KubeletHasNoDiskPressure | ||
status: "False" | ||
type: DiskPressure | ||
- lastHeartbeatTime: "2022-01-01T00:00:00Z" | ||
lastTransitionTime: "2022-01-01T00:00:00Z" | ||
message: kubelet has sufficient PID available | ||
reason: KubeletHasSufficientPID | ||
status: "False" | ||
type: PIDPressure | ||
- lastHeartbeatTime: "2022-01-01T00:00:00Z" | ||
lastTransitionTime: "2022-01-01T00:00:00Z" | ||
message: kubelet is posting ready status | ||
reason: KubeletReady | ||
status: "True" | ||
type: Ready | ||
daemonEndpoints: | ||
kubeletEndpoint: | ||
Port: 10250 | ||
images: | ||
- names: | ||
- quay.io/openshift-release-dev/ocp-v4.0-art-dev | ||
sizeBytes: 1139449201 | ||
nodeInfo: | ||
architecture: amd64 | ||
bootID: 00000000-0000-0000-0000-000000000000 | ||
containerRuntimeVersion: "cri-o://1.24.alpha.fake" | ||
kernelVersion: 5.fake | ||
kubeProxyVersion: v1.24 | ||
kubeletVersion: v1.24 | ||
machineID: 493810f75ca55b6099ceec0c9373f2fe | ||
operatingSystem: linux | ||
osImage: Linux | ||
systemUUID: 00000000-0000-0000-0000-000000000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters