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

improved main #4

Merged

Conversation

synarete
Copy link
Contributor

@synarete synarete commented Mar 9, 2023

Align main conventions with samba-operator.

  1. Log version and git-revision early on.
  2. Helper function to create clientset.

Log general info early on upon process boot; in particular, version and
git-revision info. Useful for debugging.

Fixed also minor revive warn: have comment to top-level main package.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
@synarete synarete force-pushed the ss-main-improved branch 2 times, most recently from 5b84d63 to 529bb31 Compare March 9, 2023 10:09
main.go Show resolved Hide resolved
Use helper function to create clientset for communication with k8s api
server. Try first to use in-cluster config, and only if fails use
out-of-cluster mode.

If user did not provide explicit KUBECONFIG, try to use the default
well-known location at "$HOME/.kube/config".

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Use different exit-codes for failures upon boot sequence, so that
container failure cause may be detected quickly by its exit code.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Make revive happy or else CI will fail.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Copy link
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

LGTM

@phlogistonjohn phlogistonjohn merged commit 8fda30b into samba-in-kubernetes:master Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants