-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix #4519: correcting how the config refreshes #4528
Conversation
public void setFile(File file) { | ||
this.file = file; | ||
} | ||
|
||
public void setAutoConfigure(boolean autoConfigure) { | ||
this.autoConfigure = autoConfigure; | ||
} |
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.
Why are the setters needed?
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.
So that they will get set when we clone via the builder. We create modified configs in special circumstances, in particular with the withRequestConfig calls.
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.
From the generated io.fabric8.kubernetes.client.ConfigBuilder
:
public Config build() {
Config buildable = new Config(fluent.getMasterUrl(),fluent.getApiVersion(),fluent.getNamespace(),fluent.isTrustCerts(),fluent.isDisableHostnameVerification(),fluent.getCaCertFile(),fluent.getCaCertData(),fluent.getClientCertFile(),fluent.getClientCertData(),fluent.getClientKeyFile(),fluent.getClientKeyData(),fluent.getClientKeyAlgo(),fluent.getClientKeyPassphrase(),fluent.getUsername(),fluent.getPassword(),fluent.getOauthToken(),fluent.getWatchReconnectInterval(),fluent.getWatchReconnectLimit(),fluent.getConnectionTimeout(),fluent.getRequestTimeout(),fluent.getRollingTimeout(),fluent.getScaleTimeout(),fluent.getLoggingInterval(),fluent.getMaxConcurrentRequests(),fluent.getMaxConcurrentRequestsPerHost(),fluent.isHttp2Disable(),fluent.getHttpProxy(),fluent.getHttpsProxy(),fluent.getNoProxy(),fluent.getErrorMessages(),fluent.getUserAgent(),fluent.getTlsVersions(),fluent.getWebsocketTimeout(),fluent.getWebsocketPingInterval(),fluent.getProxyUsername(),fluent.getProxyPassword(),fluent.getTrustStoreFile(),fluent.getTrustStorePassphrase(),fluent.getKeyStoreFile(),fluent.getKeyStorePassphrase(),fluent.getImpersonateUsername(),fluent.getImpersonateGroups(),fluent.getImpersonateExtras(),fluent.getOauthTokenProvider(),fluent.getCustomHeaders(),fluent.getRequestRetryBackoffLimit(),fluent.getRequestRetryBackoffInterval(),fluent.getUploadConnectionTimeout(),fluent.getUploadRequestTimeout());
buildable.setDefaultNamespace(fluent.isDefaultNamespace());
buildable.setAuthProvider(fluent.getAuthProvider());
buildable.setContexts(fluent.getContexts());
buildable.setCurrentContext(fluent.getCurrentContext());
buildable.setAutoConfigure(fluent.isAutoConfigure());
buildable.setFile(fluent.getFile());
return buildable;
}
I'm not sure you linked the correct issue number (at least I don't see their relation) |
83b2f43
to
e58016c
Compare
Sorry transposed the issue numbers. Corrected now. |
e58016c
to
31efb15
Compare
Signed-off-by: Marc Nuri <[email protected]>
SonarCloud Quality Gate failed. |
Description
fix for #4519 - refining how the config refreshes
It seems like a good idea also to always apply the system/env properties after loading the kubeconfig - https://github.com/fabric8io/kubernetes-client/compare/master...shawkins:refresh_config?expand=1#diff-7506ddc44edef04cb34dcde13c56d00ed3b1d35d848ded8f1924ed44c03db953R608
Type of change
test, version modification, documentation, etc.)
Checklist