Commit 3d22ac2
Add support for configuration profiles, managed by
* Implement `GetProfile` (#309)
* Extract file utils and implement readFileIfExists
* Write unit tests for file utils
* Implement GetProfile
* Fix test
* Fix typo
* Remove unnecesary condition
* Fix lint
* Adjustments after review
* Choose config folder based on profile in InitConfig (#310)
* Implement `stackit config profile` commands (#312)
* Implement config profile set
* Implement config profile unset
* Extend config list to show active profile
* Adjustments after review
* Improvements to profiles functionality (#315)
* 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
* Add table title to config list
* Fixes and improvements to profiles functionality
---------
Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
* Implement profiles for auth settings (#326)
* add profiles for auth settings
* adapt unit tests
* Use filepath.Join for keyring path too
---------
Co-authored-by: João Palet <joao.palet@freiheit.com>
* Add warnings when set/unset profile with no auth (#327)
* initial implementation for auth warning on new profiles
* add debug logs
* simplify code, improve messages
* address acceptance comments (#328)
* Rework active profile handling in auth (#329)
* move reading profile to caller functions
* adapt unit tests
* adapt unit tests
* adapt unit tests
* 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 <renovate@whitesourcesoftware.com>
* 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 <joao.palet@outlook.com>
* change error log
---------
Co-authored-by: João Palet <joao.palet@outlook.com>
* Add yaml output to lb commands (#321)
* update docs
* add yaml output
* fix(deps): update stackit sdk modules (#318)
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
* Add SKE login command (#157)
* Add SKE login command
Co-authored-by: Maximilian Geberl <48486938+dergeberl@users.noreply.github.com>
* 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 <48486938+dergeberl@users.noreply.github.com>
* 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 <joao.palet@outlook.com>
* edit README.md
* edit README.md
* Update README.md
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
* Update README.md
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
---------
Co-authored-by: João Palet <joao.palet@outlook.com>
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
* change marshal function to add indentation (#323)
* upgrade dependency to fix high vulnerability (#324)
* Replace createFolderIfNotExists with MkdirAll
---------
Co-authored-by: Diogo Ferrão <diogo.ferrao@freiheit.com>
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
Co-authored-by: stackit-pipeline <142982727+stackit-pipeline@users.noreply.github.com>
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-authored-by: GokceGK <161626272+GokceGK@users.noreply.github.com>
Co-authored-by: Kumm-Kai <70690427+Kumm-Kai@users.noreply.github.com>
Co-authored-by: Maximilian Geberl <48486938+dergeberl@users.noreply.github.com>
* Fix encoded file path for profiles (#333)
* Fix file path for the encoded text file
* fix unit test
* move config/fileutils to new package
* Add `stackit profile create` command and refactor `set` command (#351)
* new create command, refactor set command
* change flag name, improve create behaviour
* better error handling, make argument option in set
* address PR comments, improve testing for file utils copy file
* check for command existance in set and get profile
* always check if profile exists in get profile
* remove debug print
* fix formatting in error
* fix profile existence check (#356)
* fix issues in acceptance (#357)
* fix issues in acceptance
* fix storage auth file
* add debug logs
* support duplication of empty profile
* fix auth storage tests
* add debug logs, improve documentation
* fix GetConfiguredProfile
* improve debug logs
* improve set profile error message (#362)
* Add `stackit config profile list/delete` commands (#359)
* better error handling, make argument option in set
* address PR comments, improve testing for file utils copy file
* check for command existance in set and get profile
* initial implementation
* get email
* list command done
* finish list, add delete
* force profile names to be lowercase
* adapt testing for lowercase profile names
* generate docs
* add testing to delete
* update regex to not allow starting with hyphen
* generate docs
* add testing for new storage methods
* address PR comments
* address PR comments
* remove unused test logic
* delete profile removes keyring entries
* address PR comments
* add test for keyring failure
* Don't allow deleting the default configuration profile (#363)
* dont allow deleting default profile
* adapt testing
* address acceptance issues (#365)
---------
Co-authored-by: João Palet <joao.palet@outlook.com>
Co-authored-by: Vicente Pinto <vicente.pinto@freiheit.com>
Co-authored-by: GokceGK <161626272+GokceGK@users.noreply.github.com>
Co-authored-by: João Palet <joao.palet@freiheit.com>
Co-authored-by: stackit-pipeline <142982727+stackit-pipeline@users.noreply.github.com>
Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-authored-by: Kumm-Kai <70690427+Kumm-Kai@users.noreply.github.com>
Co-authored-by: Maximilian Geberl <48486938+dergeberl@users.noreply.github.com>stackit config profile (#366)1 parent 1bcf5a7 commit 3d22ac2
File tree
37 files changed
+2845
-119
lines changed- docs
- internal
- cmd
- config
- list
- profile
- create
- delete
- list
- set
- unset
- pkg
- auth
- cache
- config
- errors
- fileutils
- test-data
- folder-exists
- print
37 files changed
+2845
-119
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
38 | 40 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| |||
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
68 | | - | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| |||
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
| 95 | + | |
86 | 96 | | |
87 | 97 | | |
88 | 98 | | |
| |||
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
94 | 107 | | |
95 | 108 | | |
96 | 109 | | |
| |||
0 commit comments