Find Das Schiff resources that have to move to Sylva
io.moderne.kubernetes.sylva.migrate.dasschiff.FindDasSchiffMigrationWorkorg.openrewrite.recipe:rewrite-kubernetesDefinition
Recipes7
- Find legacy T-CaaS network resources
- Find
VRFRouteConfigurationandLayer2NetworkConfigurationto migrate - Find Das Schiff traffic mirror configuration
- Find what blocks a Das Schiff
BGPPeeringfrom moving to the Sylva network connector API - Find drift between Das Schiff and Sylva intent network resources
- Find unclassified Das Schiff export ranges
- Find Das Schiff network operator
ConfigMaps
Examples
yaml
- yaml
- Diff
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: VRFRouteConfiguration
metadata:
name: mirror-test-vrf
spec:
vrf: mirror
vni: 2002099
routeTarget: "65188:2099"
seq: 20
import: []
export: []
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: Layer2NetworkConfiguration
metadata:
name: vlan590
spec:
id: 590
mtu: 1500
vni: 4000090
vrf: mirror
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: MirrorTarget
metadata:
name: collector-prod
spec:
type: l3gre
destinationIP: 10.250.90.100
destinationVrf: mirror
sourceLoopback: lo.mir
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: MirrorSelector
metadata:
name: example-mirror
spec:
direction: ingress
mirrorTarget:
kind: MirrorTarget
name: collector-prod
mirrorSource:
kind: Layer2NetworkConfiguration
name: vlan590
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: BGPPeering
metadata:
name: peering
spec:
peeringVlan:
name: vlan590
remoteASN: 65100
import: []
export:
- action: permit
cidr: 10.102.0.0/24
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: NodeNetworkConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: NodeNetplanConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: NetworkConfigRevision
metadata:
name: 4f2a1c9de0
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by VRF, Destination, Inbound and Outbound)~~>~~(becomes `VRF` and `Destination`)~~>kind: VRFRouteConfiguration
metadata:
name: mirror-test-vrf
spec:
vrf: mirror
vni: 2002099
routeTarget: "65188:2099"
seq: 20
import: []
export: []
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by Network and Layer2Attachment)~~>~~(becomes `Network` and `Layer2Attachment`)~~>kind: Layer2NetworkConfiguration
metadata:
name: vlan590
spec:
id: 590
mtu: 1500
vni: 4000090
vrf: mirror
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by Collector)~~>~~(sources the tunnel from loopback `lo.mir`, which `VRFRouteConfiguration` `mirror-test-vrf` declares no `spec.loopbacks` entry for, and `spec.mirrorVRF.loopback.subnet` has nowhere else to come from)~~>kind: MirrorTarget
metadata:
name: collector-prod
spec:
type: l3gre
destinationIP: 10.250.90.100
destinationVrf: mirror
sourceLoopback: lo.mir
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by TrafficMirror)~~>~~(sends to `MirrorTarget` collector-prod, which stays on the legacy group, so the `Collector` this would name does not exist)~~>kind: MirrorSelector
metadata:
name: example-mirror
spec:
direction: ingress
mirrorTarget:
kind: MirrorTarget
name: collector-prod
mirrorSource:
kind: Layer2NetworkConfiguration
name: vlan590
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by BGPPeering in the Sylva group, which shares the name and four fields; the rest of the spec is references the legacy one does not carry, and no export filter survives, so this one moves by hand)~~>~~(peers on `vlan590`, and this manifest holds no intent `Layer2Attachment` of that name for `spec.ref.attachmentRef` to point at. `MigrateLowLevelNetworkConfigToIntent` names the attachment it generates after the `Layer2NetworkConfiguration` it replaces, so run it first)~~>kind: BGPPeering
metadata:
name: peering
spec:
peeringVlan:
name: vlan590
remoteASN: 65100
import: []
export:
- action: permit
cidr: 10.102.0.0/24
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(generated by the operator, not authored)~~>kind: NodeNetworkConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(generated by the operator, not authored)~~>kind: NodeNetplanConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(generated by the operator, not authored)~~>kind: NetworkConfigRevision
metadata:
name: 4f2a1c9de0
@@ -2,1 +2,1 @@
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: VRFRouteConfiguration
+~~(replaced by VRF, Destination, Inbound and Outbound)~~>~~(becomes `VRF` and `Destination`)~~>kind: VRFRouteConfiguration
metadata:
@@ -14,1 +14,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: Layer2NetworkConfiguration
+~~(replaced by Network and Layer2Attachment)~~>~~(becomes `Network` and `Layer2Attachment`)~~>kind: Layer2NetworkConfiguration
metadata:
@@ -24,1 +24,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: MirrorTarget
+~~(replaced by Collector)~~>~~(sources the tunnel from loopback `lo.mir`, which `VRFRouteConfiguration` `mirror-test-vrf` declares no `spec.loopbacks` entry for, and `spec.mirrorVRF.loopback.subnet` has nowhere else to come from)~~>kind: MirrorTarget
metadata:
@@ -34,1 +34,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: MirrorSelector
+~~(replaced by TrafficMirror)~~>~~(sends to `MirrorTarget` collector-prod, which stays on the legacy group, so the `Collector` this would name does not exist)~~>kind: MirrorSelector
metadata:
@@ -47,1 +47,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: BGPPeering
+~~(replaced by BGPPeering in the Sylva group, which shares the name and four fields; the rest of the spec is references the legacy one does not carry, and no export filter survives, so this one moves by hand)~~>~~(peers on `vlan590`, and this manifest holds no intent `Layer2Attachment` of that name for `spec.ref.attachmentRef` to point at. `MigrateLowLevelNetworkConfigToIntent` names the attachment it generates after the `Layer2NetworkConfiguration` it replaces, so run it first)~~>kind: BGPPeering
metadata:
@@ -60,1 +60,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: NodeNetworkConfig
+~~(generated by the operator, not authored)~~>kind: NodeNetworkConfig
metadata:
@@ -65,1 +65,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: NodeNetplanConfig
+~~(generated by the operator, not authored)~~>kind: NodeNetplanConfig
metadata:
@@ -70,1 +70,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: NetworkConfigRevision
+~~(generated by the operator, not authored)~~>kind: NetworkConfigRevision
metadata:
yaml
- yaml
- Diff
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: VRFRouteConfiguration
metadata:
name: mirror-test-vrf
spec:
vrf: mirror
vni: 2002099
routeTarget: "65188:2099"
seq: 20
import: []
export: []
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: Layer2NetworkConfiguration
metadata:
name: vlan590
spec:
id: 590
mtu: 1500
vni: 4000090
vrf: mirror
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: MirrorTarget
metadata:
name: collector-prod
spec:
type: l3gre
destinationIP: 10.250.90.100
destinationVrf: mirror
sourceLoopback: lo.mir
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: MirrorSelector
metadata:
name: example-mirror
spec:
direction: ingress
mirrorTarget:
kind: MirrorTarget
name: collector-prod
mirrorSource:
kind: Layer2NetworkConfiguration
name: vlan590
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: BGPPeering
metadata:
name: peering
spec:
peeringVlan:
name: vlan590
remoteASN: 65100
import: []
export:
- action: permit
cidr: 10.102.0.0/24
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: NodeNetworkConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: NodeNetplanConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
kind: NetworkConfigRevision
metadata:
name: 4f2a1c9de0
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by VRF, Destination, Inbound and Outbound)~~>~~(becomes `VRF` and `Destination`)~~>kind: VRFRouteConfiguration
metadata:
name: mirror-test-vrf
spec:
vrf: mirror
vni: 2002099
routeTarget: "65188:2099"
seq: 20
import: []
export: []
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by Network and Layer2Attachment)~~>~~(becomes `Network` and `Layer2Attachment`)~~>kind: Layer2NetworkConfiguration
metadata:
name: vlan590
spec:
id: 590
mtu: 1500
vni: 4000090
vrf: mirror
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by Collector)~~>~~(sources the tunnel from loopback `lo.mir`, which `VRFRouteConfiguration` `mirror-test-vrf` declares no `spec.loopbacks` entry for, and `spec.mirrorVRF.loopback.subnet` has nowhere else to come from)~~>kind: MirrorTarget
metadata:
name: collector-prod
spec:
type: l3gre
destinationIP: 10.250.90.100
destinationVrf: mirror
sourceLoopback: lo.mir
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by TrafficMirror)~~>~~(sends to `MirrorTarget` collector-prod, which stays on the legacy group, so the `Collector` this would name does not exist)~~>kind: MirrorSelector
metadata:
name: example-mirror
spec:
direction: ingress
mirrorTarget:
kind: MirrorTarget
name: collector-prod
mirrorSource:
kind: Layer2NetworkConfiguration
name: vlan590
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(replaced by BGPPeering in the Sylva group, which shares the name and four fields; the rest of the spec is references the legacy one does not carry, and no export filter survives, so this one moves by hand)~~>~~(peers on `vlan590`, and this manifest holds no intent `Layer2Attachment` of that name for `spec.ref.attachmentRef` to point at. `MigrateLowLevelNetworkConfigToIntent` names the attachment it generates after the `Layer2NetworkConfiguration` it replaces, so run it first)~~>kind: BGPPeering
metadata:
name: peering
spec:
peeringVlan:
name: vlan590
remoteASN: 65100
import: []
export:
- action: permit
cidr: 10.102.0.0/24
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(generated by the operator, not authored)~~>kind: NodeNetworkConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(generated by the operator, not authored)~~>kind: NodeNetplanConfig
metadata:
name: worker-1
---
apiVersion: network.t-caas.telekom.com/v1alpha1
~~(generated by the operator, not authored)~~>kind: NetworkConfigRevision
metadata:
name: 4f2a1c9de0
@@ -2,1 +2,1 @@
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: VRFRouteConfiguration
+~~(replaced by VRF, Destination, Inbound and Outbound)~~>~~(becomes `VRF` and `Destination`)~~>kind: VRFRouteConfiguration
metadata:
@@ -14,1 +14,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: Layer2NetworkConfiguration
+~~(replaced by Network and Layer2Attachment)~~>~~(becomes `Network` and `Layer2Attachment`)~~>kind: Layer2NetworkConfiguration
metadata:
@@ -24,1 +24,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: MirrorTarget
+~~(replaced by Collector)~~>~~(sources the tunnel from loopback `lo.mir`, which `VRFRouteConfiguration` `mirror-test-vrf` declares no `spec.loopbacks` entry for, and `spec.mirrorVRF.loopback.subnet` has nowhere else to come from)~~>kind: MirrorTarget
metadata:
@@ -34,1 +34,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: MirrorSelector
+~~(replaced by TrafficMirror)~~>~~(sends to `MirrorTarget` collector-prod, which stays on the legacy group, so the `Collector` this would name does not exist)~~>kind: MirrorSelector
metadata:
@@ -47,1 +47,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: BGPPeering
+~~(replaced by BGPPeering in the Sylva group, which shares the name and four fields; the rest of the spec is references the legacy one does not carry, and no export filter survives, so this one moves by hand)~~>~~(peers on `vlan590`, and this manifest holds no intent `Layer2Attachment` of that name for `spec.ref.attachmentRef` to point at. `MigrateLowLevelNetworkConfigToIntent` names the attachment it generates after the `Layer2NetworkConfiguration` it replaces, so run it first)~~>kind: BGPPeering
metadata:
@@ -60,1 +60,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: NodeNetworkConfig
+~~(generated by the operator, not authored)~~>kind: NodeNetworkConfig
metadata:
@@ -65,1 +65,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: NodeNetplanConfig
+~~(generated by the operator, not authored)~~>kind: NodeNetplanConfig
metadata:
@@ -70,1 +70,1 @@
---
apiVersion: network.t-caas.telekom.com/v1alpha1
-kind: NetworkConfigRevision
+~~(generated by the operator, not authored)~~>kind: NetworkConfigRevision
metadata:
Usage
Run this recipe
This recipe has no required configuration options. Users of Moderne can run it via the Moderne CLI.
You will need to have configured the Moderne CLI on your machine before you can run the following command.
mod run . --recipe FindDasSchiffMigrationWork
If the recipe is not available locally, then you can install it using:
RELEASE resolves to the newest release and LATEST to the newest build of any kind, including snapshots. Either one lets mod config recipes upgrade pull in later versions without editing this command; a pinned version stays where you put it.
- RELEASE
- LATEST
- Pinned version
mod config recipes jar install org.openrewrite.recipe:rewrite-kubernetes:RELEASE
mod config recipes jar install org.openrewrite.recipe:rewrite-kubernetes:LATEST
mod config recipes jar install org.openrewrite.recipe:rewrite-kubernetes:3.18.0
Data tables
Low level network configurations
io.moderne.kubernetes.sylva.migrate.dasschiff.table.LowLevelNetworkConfigsDeutsche Telekom network.t-caas.telekom.com resources that the network-connector.sylvaproject.org intent group replaces, and whether each one can be moved mechanically.
| Column | Description |
|---|---|
| Source path | The path to the manifest. |
| Kind | The legacy kind. |
| Name | The metadata.name of the legacy resource. |
| VRF | The VRF the resource declares or attaches to, empty when it names none. |
| Migration | automatic when io.moderne.kubernetes.sylva.MigrateLowLevelNetworkConfigToIntent rewrites this resource, manual otherwise. |
| Intent kinds | The intent resources it becomes, empty when it has to be moved by hand. |
| Detail | Why the resource cannot be moved mechanically, empty when it can. |
| Manual follow-up | Legacy fields with no intent field to hold them, which the operator derives or assigns instead. Empty when the move loses nothing. |
Traffic mirror configurations
io.moderne.kubernetes.sylva.migrate.dasschiff.table.MirrorConfigsDeutsche Telekom MirrorTarget and MirrorSelector resources that the network-connector.sylvaproject.org Collector and TrafficMirror replace, and whether each one can be moved mechanically.
| Column | Description |
|---|---|
| Source path | The path to the manifest. |
| Kind | The legacy kind. |
| Name | The metadata.name of the legacy resource. |
| Reference | The VRF a MirrorTarget tunnels through, or the MirrorTarget a MirrorSelector sends to. Empty when it names none. |
| Migration | automatic when io.moderne.kubernetes.sylva.migrate.dasschiff.MigrateMirrorConfigToIntent rewrites this resource, manual otherwise. |
| Intent kinds | The intent resource it becomes, empty when it has to be moved by hand. |
| Detail | Why the resource cannot be moved mechanically, empty when it can. |
| Manual follow-up | What still has to be done by hand once the resource has moved, which is mostly the resources it names that the intent group has not generated yet. Empty when the move leaves nothing behind. |
BGP peerings
io.moderne.kubernetes.sylva.migrate.dasschiff.table.BgpPeeringsDeutsche Telekom network.t-caas.telekom.com BGPPeering resources, and what each one needs decided before it can be written against the network-connector.sylvaproject.org BGPPeering that shares its name.
| Column | Description |
|---|---|
| Source path | The path to the manifest. |
| Name | The metadata.name of the legacy resource. |
| Mode | The intent spec.mode this peering maps onto: listenRange when it sets spec.peeringVlan, loopbackPeer when it sets spec.loopbackPeer, empty when neither is readable. |
| Blocker | What has to be decided before this peering can be written against the intent group. Checks run narrowest first, so a peering reported against spec.export is one whose every other field and reference already resolves. |
Intent drift
io.moderne.kubernetes.sylva.migrate.dasschiff.table.IntentDriftWhere the network-connector.sylvaproject.org resources in a repository do not say what the network.t-caas.telekom.com resources beside them said.
| Column | Description |
|---|---|
| Source path | The path to the manifest holding the legacy resource. |
| Kind | The legacy kind the comparison is anchored on. |
| Name | The metadata.name of the legacy resource. |
| Intent resource | The intent resource compared against, as kind name. Empty when none was found. |
| Field | The legacy field compared, empty when the finding is about the resource as a whole. |
| Legacy value | What the legacy resource says. Empty when only the intent side says anything. |
| Intent value | What the intent resources say. Empty when they say nothing. |
| Verdict | differs when both groups express the field and disagree, dropped when the intent group has nowhere to put the legacy value, unverifiable when the intent group leaves it to the operator, unpaired when no counterpart was found, and ambiguous when more than one counterpart was. |
| Detail | What the difference does to the network. |
Exported ranges
io.moderne.kubernetes.sylva.migrate.dasschiff.table.ExportRangesEvery spec.export range of a Deutsche Telekom VRFRouteConfiguration, and whether it is classified as the load balancer pool or the egress NAT pool the network-connector.sylvaproject.org intent group needs it to be.
| Column | Description |
|---|---|
| Source path | The path to the manifest. |
| Name | The metadata.name of the VRFRouteConfiguration exporting the range. |
| VRF | The VRF the range is exported into. |
| CIDR | The exported range. |
| Classification key | The key that classifies this range, to be supplied as <key>=<role>:<networkRef>. Empty when no classification would help. |
| Status | generated when an Inbound or Outbound was produced, unclassified when the range needs a role, not expressible when no intent resource can hold it, and templated when the resource renders through a Helm expression. |
| Role | The supplied role: inbound-bgp, inbound-l2 or outbound. Empty when unclassified. |
| Network | The Network the supplied classification allocates from. Empty when unclassified. |
| Generated | The intent resource this range landed in, empty when none was generated. |
| Detail | What has to be decided, why the range cannot move, or what generating it adds beyond the export the legacy resource performed. |
Das Schiff network operator ConfigMaps
io.moderne.kubernetes.sylva.migrate.dasschiff.table.NetworkOperatorConfigMapsOne row per data key of every ConfigMap that configures Deutsche Telekom's das-schiff-network-operator, describing where it lives and what shape it is in. A ConfigMap that declares no keys still gets a row, so that the inventory is of ConfigMaps and not only of keys.
| Column | Description |
|---|---|
| Source path | The path to the manifest. |
| Namespace | The metadata.namespace, empty when the manifest leaves it to the applying context, as a Kustomize overlay or a Helm release does. |
| Name | The metadata.name of the ConfigMap. A Kustomize namePrefix is not applied here, so the name in the cluster may carry a prefix this one does not. |
| Key | One key of data, or of binaryData. Empty when the ConfigMap declares neither. |
| Style | How the value is written: block for a literal block scalar (|), folded (>), plain, single quoted, double quoted, or binary for a binaryData key. A mapping or sequence is malformed, because every ConfigMap value is a string. |
| Size | Characters in the value, block scalars dedented, so that the number is the size of the embedded document rather than of its indentation. For binaryData, the length of the base64 text. |
| Matched by | Which signals identified this as a network operator ConfigMap: name, label for app.kubernetes.io/name: network-operator, data key for a base-config.yaml key. Listed so that a row can be judged rather than trusted. |
| Templated | yes when the document contains a Helm expression, in which case the keys and sizes here are those of the template and not of what the cluster receives. |
Source files that had results
org.openrewrite.table.SourcesFileResultsSource files that were modified by the recipe run.
| Column | Description |
|---|---|
| Source path before the run | The source path of the file before the run. null when a source file was created during the run. |
| Source path after the run | A recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run. |
| Parent of the recipe that made changes | In a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all. |
| Recipe that made changes | The specific recipe that made a change. |
| Estimated time saving | An estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds. |
| Cycle | The recipe cycle in which the change was made. |
Source files that had search results
org.openrewrite.table.SearchResultsSearch results that were found during the recipe run.
| Column | Description |
|---|---|
| Source path of search result before the run | The source path of the file with the search result markers present. |
| Source path of search result after run the run | A recipe may modify the source path. This is the path after the run. null when a source file was deleted during the run. |
| Result | The trimmed printed tree of the LST element that the marker is attached to. |
| Description | The content of the description of the marker. |
| Recipe that added the search marker | The specific recipe that added the Search marker. |
Source files that errored on a recipe
org.openrewrite.table.SourcesFileErrorsThe details of all errors produced by a recipe run.
| Column | Description |
|---|---|
| Source path | The file that failed to parse. |
| Recipe that made changes | The specific recipe that made a change. |
| Stack trace | The stack trace of the failure. |
Recipe performance
org.openrewrite.table.RecipeRunStatsStatistics used in analyzing the performance of recipes.
| Column | Description |
|---|---|
| The recipe | The recipe whose stats are being measured both individually and cumulatively. |
| Source file count | The number of source files the recipe ran over. |
| Source file changed count | The number of source files which were changed in the recipe run. Includes files created, deleted, and edited. |
| Cumulative scanning time (ns) | The total time spent across the scanning phase of this recipe. |
| Max scanning time (ns) | The max time scanning any one source file. |
| Cumulative edit time (ns) | The total time spent across the editing phase of this recipe. |
| Max edit time (ns) | The max time editing any one source file. |