-
Notifications
You must be signed in to change notification settings - Fork 137
Feature/some refactoring #1
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
Conversation
|
@guusvw rebase please Has this been tested? |
|
(Rebase )Will do it and I will also write an test for |
|
We indeed are missing some tests |
b021721 to
575f3a3
Compare
| AddToScheme(scheme) | ||
| } | ||
|
|
||
| // AddToScheme adds all types of this clientset into the given scheme. This allows composition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything under pkg/client is generated code
876c43c to
2cdd19c
Compare
| func EnsureSSHKeypairSecret(client kubernetes.Interface) (*rsa.PrivateKey, error) { | ||
| if client == nil { | ||
| return nil, fmt.Errorf("got an nil k8s client") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really wan to do a nil check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes ;) make the code more stable
| return nil, fmt.Errorf("key data not found in secret '%s/%s' (secret.data['%s']). remove it and a new one will be created", secret.Namespace, secret.Name, privateKeyDataIndex) | ||
| } | ||
| if len(b) == 0 { | ||
| return nil, fmt.Errorf("key data not found in secret '%s/%s' (secret.data['%s']). remove it and a new one will be created", secret.Namespace, secret.Name, privateKeyDataIndex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would rather state something like invalid key data found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
c953e3d to
d8c491c
Compare
No description provided.