Skip to content

Conversation

@danj-replicated
Copy link
Contributor

@danj-replicated danj-replicated commented Sep 5, 2023

This PR:

  • creates a new logging package to control the default logrus writer
  • sets up hooks to:
    • allow selective writing of logs to stdout
    • write all logs to a file regardless of level
  • uses the above to tidy up messages presented to the user at install / upgrade time.
  • adds a -d / --debug flag to enable printing all loglevels to stdout

the result of this is:

k0s:~# ./helmvm install
Processing cluster configuration
✓  [ssh] 192.168.0.8:22: executing `[ "$(id -u)" = 0 ]` 
Applying cluster configuration
✓  Running k0sctl apply 
✓  Kubernetes API server is ready. 
? Enter a new Admin Console password: ************
✓  Post apply process finished 
Cluster configuration has been applied
Kubeconfig file has been placed at at /root/.helmvm/etc/kubeconfig
Cluster configuration file has been placed at /root/.helmvm/etc/k0sctl.yaml
You can now access your cluster with kubectl by running:
  ./helmvm shell
k0s:~# ls
helmvm	helmvm-20230905114958.log

@ricardomaraschini ricardomaraschini changed the title Chore: tidy up install output feat: tidy up install output Sep 5, 2023
Copy link
Contributor

@ricardomaraschini ricardomaraschini left a comment

Choose a reason for hiding this comment

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

Excellent job Dan, this is lovely. I have left a few comments.

@danj-replicated danj-replicated merged commit c3ab895 into main Sep 7, 2023
@danj-replicated danj-replicated deleted the danj/tidy-logging branch September 7, 2023 12:40
emosbaugh pushed a commit that referenced this pull request Aug 26, 2024
when we first create a new installation object its status is empty
therefore it is different from the status after the first reconcile.

on this scenarios we don't want to report back to our metric system as
an upgrade succeess.
emosbaugh pushed a commit that referenced this pull request Aug 30, 2024
…unctions-here

do not use generic types for ConvertTo and ConvertFrom as the k0s type will always have the same import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants