Skip to content

Commit 919fe7a

Browse files
joaopaletDiogoFerraovicentepinto98stackit-pipelinerenovate-bot
authored
Merge latest updates from main into feature/multi-config (#330)
* Add --used and --unused flags to `load-balancer list` (#308) * initial implementation * add testing, finish functionality * generate docs, minor improvements * more testing * refactor implementation, simplify RunE * remove unused func * address PR comments * generate-docs * change filtercredentials to use enum for operation type * address PR comments * Onboard `load-balancer observability-credentials cleanup` (#311) * command implementation, add testing * rename var, generate docs * address PR comments * fix no credentials listing (#313) * Integrate WinGet distribution in release pipeline (#305) * Integrate WinGet distribution in release pipeline * Add comment regarding skipping prereleases * Fix link * Configure table titles (#314) * Update tables * Configure colors in the less pager * Fix title wrapping, add titles to lb * Re-add -w argument and add titles to mongodb and pgflex options * fix(deps): update stackit sdk modules to v0.14.0 (#317) Co-authored-by: Renovate Bot <[email protected]> * MongoDB backup list, describe, restore-jobs (#307) * Draft implementation mongodb backup list, describe, restore-jobs * Fix descriptions * Add expire date§ g * Add docs * Fix examples * Add restore status * Refactor getRestoreStatus * Sort restore jobs array * Add another date format to unit test§ * Implement YAML output format (#298) * initial implementation yamlOutputFormal * sort imports * change yaml library * add yaml output format * tidy up imports * tidy up imports * update docs * add yaml output for project and organization role lists * extend contribution.md * change yaml library * Mongodb backup schedule, update-schedule, restore (#316) * initial update schedule implementation * implement update and list schedule commands, add testing * restore command and testing * add waiters * generate docs * merge changes * address PR comments * add custom error, fix restore examples * Add yaml output format to mongodbflex backup commands (#319) * add yaml output to mongodbflex commands * update docs * Update internal/cmd/mongodbflex/backup/describe/describe.go Co-authored-by: João Palet <[email protected]> * change error log --------- Co-authored-by: João Palet <[email protected]> * Add yaml output to lb commands (#321) * update docs * add yaml output * fix(deps): update stackit sdk modules (#318) Co-authored-by: Renovate Bot <[email protected]> * Add SKE login command (#157) * Add SKE login command Co-authored-by: Maximilian Geberl <[email protected]> * Different improvement from code review * remove unused function * rearrange functions and improve error messages * Add tests for cache pkg * Extend kubeconfig create command with flag to retrieve login kubeconfig * small extension to the kubeconfig login description * improve descriptions and examples * fix yaml output * codereview: use os.UserCacheDir instead of external lib * codereview: drop parseInput and use parseClusterConfig directly; move cacheKey into clusterConfig * codereview: add one nil check * codereview: print user facing error that explains that the login command should not be used directly * fixup! codereview: use os.UserCacheDir instead of external lib * codereview: first try at improving the description * generate-docs * Add tests for login (buildRequest & parseKubeConfigToExecCredential * cache: call Init func directly and return err * use p.Outputf instead of cmd.Print --------- Co-authored-by: Maximilian Geberl <[email protected]> * Fix outputF call (#322) * Add custom pager handling (#299) * add custom pager handling * ignore linter temporarily * change condition * add debug line * add debug log * add pager infos to README * Update README.md Co-authored-by: João Palet <[email protected]> * edit README.md * edit README.md * Update README.md Co-authored-by: Vicente Pinto <[email protected]> * Update README.md Co-authored-by: Vicente Pinto <[email protected]> --------- Co-authored-by: João Palet <[email protected]> Co-authored-by: Vicente Pinto <[email protected]> * change marshal function to add indentation (#323) * upgrade dependency to fix high vulnerability (#324) * Replace createFolderIfNotExists with MkdirAll --------- Co-authored-by: Diogo Ferrão <[email protected]> Co-authored-by: Vicente Pinto <[email protected]> Co-authored-by: stackit-pipeline <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: GokceGK <[email protected]> Co-authored-by: Kumm-Kai <[email protected]> Co-authored-by: Maximilian Geberl <[email protected]>
1 parent 74c5fa3 commit 919fe7a

File tree

400 files changed

+5429
-401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+5429
-401
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dist/
44

55
# IDE
66
.vscode
7+
.idea
78

89
# OS generated files
910
.DS_Store

CONTRIBUTION.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ func outputResult(p *print.Printer, cmd *cobra.Command, outputFormat string, res
173173
}
174174
p.Outputln(string(details))
175175
return nil
176+
case print.YAMLOutputFormat:
177+
details, err := yaml.Marshal(resources)
178+
if err != nil {
179+
return fmt.Errorf("marshal resource list: %w", err)
180+
}
181+
p.Outputln(string(details))
182+
return nil
176183
default:
177184
table := tables.NewTable()
178185
table.SetHeader("ID", "NAME", "STATE")

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,33 @@ stackit config list
130130

131131
You can also edit the configuration file manually.
132132

133+
## Customization
134+
135+
### Pager
136+
137+
To specify a custom pager, use the `PAGER` environment variable.
138+
139+
If the variable is not set, STACKIT CLI uses the `less` as default pager.
140+
141+
When using `less` as a pager, STACKIT CLI will automatically pass following options
142+
- -F, --quit-if-one-screen - Less will automatically exit if the entire file can be displayed on the first screen.
143+
- -S, --chop-long-lines - Lines longer than the screen width will be chopped rather than being folded.
144+
- -w, --hilite-unread - Temporarily highlights the first "new" line after a forward movement of a full page.
145+
- -R, --RAW-CONTROL-CHARS - ANSI color and style sequences will be interpreted.
146+
147+
> These options will not be added automatically if a custom pager is defined.
148+
>
149+
> In that case, users can define the parameters by using the specific environment variable required by the `PAGER` (if supported).
150+
151+
>
152+
> For example, if user sets the `PAGER` environment variable to `less` and would like to pass some arguments, `LESS` environment variable must be used as following:
153+
154+
>
155+
> export PAGER="less"
156+
>
157+
> export LESS="-R"
158+
159+
133160
## Autocompletion
134161

135162
If you wish to set up command autocompletion in your shell for the STACKIT CLI, please refer to our [autocompletion guide](./AUTOCOMPLETION.md).

docs/stackit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ stackit [flags]
1818
-y, --assume-yes If set, skips all confirmation prompts
1919
--async If set, runs the command asynchronously
2020
-h, --help Help for "stackit"
21-
-o, --output-format string Output format, one of ["json" "pretty" "none"]
21+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
2222
-p, --project-id string Project ID
2323
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
2424
-v, --version Show "stackit" version

docs/stackit_argus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stackit argus [flags]
2121
```
2222
-y, --assume-yes If set, skips all confirmation prompts
2323
--async If set, runs the command asynchronously
24-
-o, --output-format string Output format, one of ["json" "pretty" "none"]
24+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
2525
-p, --project-id string Project ID
2626
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
2727
```

docs/stackit_argus_credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stackit argus credentials [flags]
2121
```
2222
-y, --assume-yes If set, skips all confirmation prompts
2323
--async If set, runs the command asynchronously
24-
-o, --output-format string Output format, one of ["json" "pretty" "none"]
24+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
2525
-p, --project-id string Project ID
2626
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
2727
```

docs/stackit_argus_credentials_create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ stackit argus credentials create [flags]
3030
```
3131
-y, --assume-yes If set, skips all confirmation prompts
3232
--async If set, runs the command asynchronously
33-
-o, --output-format string Output format, one of ["json" "pretty" "none"]
33+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
3434
-p, --project-id string Project ID
3535
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
3636
```

docs/stackit_argus_credentials_delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ stackit argus credentials delete USERNAME [flags]
2929
```
3030
-y, --assume-yes If set, skips all confirmation prompts
3131
--async If set, runs the command asynchronously
32-
-o, --output-format string Output format, one of ["json" "pretty" "none"]
32+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
3333
-p, --project-id string Project ID
3434
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
3535
```

docs/stackit_argus_credentials_list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ stackit argus credentials list [flags]
3636
```
3737
-y, --assume-yes If set, skips all confirmation prompts
3838
--async If set, runs the command asynchronously
39-
-o, --output-format string Output format, one of ["json" "pretty" "none"]
39+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
4040
-p, --project-id string Project ID
4141
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
4242
```

docs/stackit_argus_grafana.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stackit argus grafana [flags]
2121
```
2222
-y, --assume-yes If set, skips all confirmation prompts
2323
--async If set, runs the command asynchronously
24-
-o, --output-format string Output format, one of ["json" "pretty" "none"]
24+
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
2525
-p, --project-id string Project ID
2626
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
2727
```

0 commit comments

Comments
 (0)