Skip to content

Commit

Permalink
fix(config): remove unused impersonate fields from Config
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa authored Nov 8, 2024
1 parent 1579a3b commit ccdf123
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,27 @@ public class Config {
/**
* fields not used but needed for builder generation.
*/
@SuppressWarnings("unused")
private Integer watchReconnectInterval;
@SuppressWarnings("unused")
private Integer watchReconnectLimit;
@SuppressWarnings("unused")
private Integer uploadRequestTimeout;
@SuppressWarnings("unused")
private Integer requestRetryBackoffLimit;
@SuppressWarnings("unused")
private Integer requestRetryBackoffInterval;
@SuppressWarnings("unused")
private Integer requestTimeout;
@SuppressWarnings("unused")
private Long scaleTimeout;
@SuppressWarnings("unused")
private Integer loggingInterval;
@SuppressWarnings("unused")
private String impersonateUsername;
@SuppressWarnings("unused")
private String[] impersonateGroups;
@SuppressWarnings("unused")
private Map<String, List<String>> impersonateExtras;
/**
* end of fields not used but needed for builder generation.
Expand Down Expand Up @@ -408,19 +419,17 @@ public Config(
this.maxConcurrentRequests = DEFAULT_MAX_CONCURRENT_REQUESTS;
this.maxConcurrentRequestsPerHost = DEFAULT_MAX_CONCURRENT_REQUESTS_PER_HOST;
this.contexts = new ArrayList<>();
this.watchReconnectInterval = DEFAULT_WATCH_RECONNECT_INTERVAL;
this.watchReconnectLimit = -1;
this.uploadRequestTimeout = DEFAULT_UPLOAD_REQUEST_TIMEOUT;
this.requestRetryBackoffInterval = DEFAULT_REQUEST_RETRY_BACKOFFINTERVAL;
this.requestRetryBackoffLimit = DEFAULT_REQUEST_RETRY_BACKOFFLIMIT;
this.requestTimeout = DEFAULT_REQUEST_TIMEOUT;
this.scaleTimeout = DEFAULT_SCALE_TIMEOUT;
this.loggingInterval = DEFAULT_LOGGING_INTERVAL;
this.userAgent = "fabric8-kubernetes-client/" + Version.clientVersion();
this.tlsVersions = new TlsVersion[] { TlsVersion.TLS_1_3, TlsVersion.TLS_1_2 };
this.requestConfig = new RequestConfig(this.watchReconnectLimit, this.watchReconnectInterval,
this.requestTimeout, this.scaleTimeout, this.loggingInterval,
this.requestRetryBackoffLimit, this.requestRetryBackoffInterval, this.uploadRequestTimeout);
this.requestConfig = new RequestConfig(
-1,
DEFAULT_WATCH_RECONNECT_INTERVAL,
DEFAULT_REQUEST_TIMEOUT,
DEFAULT_SCALE_TIMEOUT,
DEFAULT_LOGGING_INTERVAL,
DEFAULT_REQUEST_RETRY_BACKOFFLIMIT,
DEFAULT_REQUEST_RETRY_BACKOFFINTERVAL,
DEFAULT_UPLOAD_REQUEST_TIMEOUT);
} else {
this.requestConfig = new RequestConfig(null, null, null, null, null, null, null, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import static io.fabric8.kubernetes.client.Config.DEFAULT_SCALE_TIMEOUT;
import static io.fabric8.kubernetes.client.Config.DEFAULT_UPLOAD_REQUEST_TIMEOUT;

@SuppressWarnings({ "LombokGetterMayBeUsed", "LombokSetterMayBeUsed" })
public class RequestConfig {

private String impersonateUsername;
Expand Down

0 comments on commit ccdf123

Please sign in to comment.