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

Add exoscale and kubernetes support #9

Merged
merged 3 commits into from
Sep 23, 2022
Merged

Add exoscale and kubernetes support #9

merged 3 commits into from
Sep 23, 2022

Conversation

zugao
Copy link
Contributor

@zugao zugao commented Sep 20, 2022

Summary

  • Added improvements to the CLI
  • Updated the k8s client to work with typed objects
  • Simplified the business logic
  • Fixed logging setup

This PR is configured to be merged into invoice branch which means it's easier to review what changes have been done to the latest version of this POC. Ultimately this PR will be merged into master.

Test:

  • A manual test can be done, just add cluster file with as may entries server=token as you want.

Later:

  • Documentation will be added in a subsequent PR
  • Writing to the DB will be done in a subsequent PR

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

David Gubler and others added 2 commits September 1, 2022 15:55
@zugao zugao added the enhancement New feature or request label Sep 20, 2022
@zugao zugao requested a review from Kidswiss September 20, 2022 07:03
@zugao zugao marked this pull request as draft September 20, 2022 07:04
pkg/sos/kubernetes.go Outdated Show resolved Hide resolved
@zugao zugao marked this pull request as ready for review September 21, 2022 08:05
@zugao zugao changed the title WIP: Refactored and updated the business logic Refactored and updated the business logic Sep 21, 2022
Copy link
Contributor

@Kidswiss Kidswiss left a comment

Choose a reason for hiding this comment

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

Something is weird with the logging configuration.

Most log calls use V(1) or V(2), but the default seems to be running with 0. It currently only prints errors. Also the log-level flag isn't actually used, but there's a debug flag in the code that can't be set.

sos_command.go Outdated Show resolved Hide resolved
src/exoscale.go Outdated Show resolved Hide resolved
src/exoscale.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ccremer ccremer left a comment

Choose a reason for hiding this comment

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

I'm not sure I spotted all the locations, but I suggest you have a look at error handling again

src/exoscale.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/sos/objectstorage.go Outdated Show resolved Hide resolved
src/sos/objectstorage.go Outdated Show resolved Hide resolved
src/sos/objectstorage.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/kubernetes.go Outdated Show resolved Hide resolved
src/sos/objectstorage.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
sos_command.go Outdated Show resolved Hide resolved
src/kubernetes/kubernetes.go Outdated Show resolved Hide resolved
src/kubernetes/kubernetes.go Outdated Show resolved Hide resolved
src/sos/objectstorage.go Show resolved Hide resolved
src/sos/objectstorage.go Outdated Show resolved Hide resolved
src/sos/objectstorage.go Outdated Show resolved Hide resolved
@zugao zugao changed the base branch from invoice to master September 23, 2022 13:31
@zugao zugao changed the title Refactored and updated the business logic Add exoscale and kubernetes support Sep 23, 2022
@zugao zugao merged commit 5f02563 into master Sep 23, 2022
@zugao zugao deleted the refactor-code branch September 23, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants