Class KubernetesClientConfiguration.ServiceAccount
java.lang.Object
io.micronaut.kubernetes.client.openapi.config.KubernetesClientConfiguration.ServiceAccount
- Enclosing class:
- KubernetesClientConfiguration
@ConfigurationProperties("service-account")
public static class KubernetesClientConfiguration.ServiceAccount
extends Object
Service account authentication configuration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPath to the certificate authority file.Path to the token file.Token reload interval.boolean
Enable/disable service account authentication.void
setCertificateAuthorityPath
(String certificateAuthorityPath) Sets path to the certificate authority file.void
setEnabled
(boolean enabled) Enable/disable service account authentication.void
setTokenPath
(String tokenPath) Sets path to the token file.void
setTokenReloadInterval
(Duration tokenReloadInterval) Sets token reload interval.
-
Constructor Details
-
ServiceAccount
public ServiceAccount()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Enable/disable service account authentication. Default:true
.- Returns:
true
if service account authentication enabled,false
otherwise
-
setEnabled
public void setEnabled(boolean enabled) Enable/disable service account authentication.- Parameters:
enabled
-true
to enable service account authentication
-
getCertificateAuthorityPath
Path to the certificate authority file. Default:file:/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
.- Returns:
- path to the certificate authority file
-
setCertificateAuthorityPath
Sets path to the certificate authority file.- Parameters:
certificateAuthorityPath
- path to the certificate authority file
-
getTokenPath
Path to the token file. Default:file:/var/run/secrets/kubernetes.io/serviceaccount/token
.- Returns:
- path to the token file
-
setTokenPath
Sets path to the token file.- Parameters:
tokenPath
- path to the token file
-
getTokenReloadInterval
Token reload interval. Default:60s
.- Returns:
- token reload interval
-
setTokenReloadInterval
Sets token reload interval.- Parameters:
tokenReloadInterval
- token reload interval
-