Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
add jq magic to explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Morsing committed Nov 14, 2019
1 parent 0cf7dba commit 5836d34
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/5_migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,24 @@ be needed for running later versions of Faros
# kubectl apply -f /tmp/newcgtos.json
```

You can check that all ClusterGitTrackObjects are unowned with the following jq expression

```
# kubectl get clustergittrackobject -o json | jq '.items[].metadata | select(.ownerReferences == null) | .name' -r
```

4. For every `GitTrack` which previously owned a `ClusterGitTrackObject`,
create a `ClusterGitTrack` that matches its target. If you used the
`namespacecheck` tool to check for `ClusterGitTracks`, it should have written
a file with all the required `ClusterGitTracks` to apply.
5. Create a new deployment of Faros with the flags `--gittrack-mode=Disabled`
and `--clustergittrack-mode=ExcludeNamespaced`
6. Check that ClusterGitTrackObjects are now owned by ClusterGitTracks
and `--clustergittrack-mode=ExcludeNamespaced`. This should adopt all ClusterGitTrackObjects so they are owned by ClusterGitTracks
6. Check that ClusterGitTrackObjects are now owned by ClusterGitTracks. This can be done with the following jq expression

```
# kubectl get clustergittrackobject -o json | jq '.items[].metadata | select(.ownerReferences != null and .ownerReferences[].kind != "ClusterGitTrack") | .name' -r
```


A Faros deployment must handle ClusterGitTracks. If you have one faros for the entire cluster, you can add the `--clustergittrack-mode=IncludeNamespaced` flag to it.[^1]

Expand Down

0 comments on commit 5836d34

Please sign in to comment.