Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add documentation for changes to import/export functionality #124

Merged
merged 7 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion operations/import-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ For convenience, you can supply `--create-namespace` in order for Flipt to autom
flipt import --namespace production --create-namespace flipt.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if we should just remove the section on --create-namespace and the section about how the namespace must exist now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markphelps Yeah I battled with this. I am for it, just was curious how many people are version upgrade averse.

```

<Note>
In [v1.28.0](https://github.com/flipt-io/flipt/releases/tag/v1.28.0), we introduced some breaking changes to `import`.

You no longer have to use the `--namespace` or `--create-namespace` flags to import resources into a specific namespace.

The namespaces are now inferred from the YAML documents themselves. If a namespace your document refers to does not exist in the database, it will be created.

</Note>

This command supports the `--drop` flag that will drop all data in your
Flipt database tables before importing. This is to ensure that no data
collisions occur during the import.
Expand Down Expand Up @@ -76,7 +85,6 @@ flags:
name: Blue
- key: green
name: Green

```

You can also export to a file using the `-o filename` or `--output filename`
Expand All @@ -92,3 +100,14 @@ Use the flag `--namespace` to export from a different namespace.
```yaml
flipt export --namespace production
```

<Note>
In [v1.28.0](https://github.com/flipt-io/flipt/releases/tag/v1.28.0), we have extended this functionality to support exporting state from multiple namespaces to a single YAML file.

The `--namespace` flag is now deprecated.

The `--namespaces` flag will accept a comma-delimited list of namespaces from which you would like to export from.

The `--all-namespaces flag is a boolean flag that tells export to export all namespaces to the single file you specify, or to standard out by default.

</Note>