public class OperatorController extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private String |
name |
private io.fabric8.openshift.client.OpenShiftClient |
ocp |
private OpenShiftUtils |
ocpUtils |
private io.fabric8.kubernetes.api.model.apps.Deployment |
operator |
private String |
project |
| Constructor and Description |
|---|
OperatorController(io.fabric8.kubernetes.api.model.apps.Deployment operator,
io.fabric8.openshift.client.OpenShiftClient ocp) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Disables Strimzi cluster operator by scaling it to ZERO
|
void |
enable()
Enables Strimzi cluster operator by scaling it to ONE
|
void |
setAlwaysPullPolicy()
Sets pull policy of the operator to 'Always'
|
void |
setEnvVar(String name,
String val)
Set environment variable on all containers of operator's deployment
|
void |
setImagePullSecret(String secret)
Sets image pull secret for operator's
Deployment resource |
void |
setLogLevel(String level)
Sets operator log level
|
void |
setNumberOfReplicas(int replicas)
Sets number of replicas
|
void |
setOperandAlwaysPullPolicy()
Sets pull policy of operands to 'Always'
|
void |
setOperandImagePullSecrets(String names)
Sets image pull secrets for operands by setting STRIMZI_IMAGE_PULL_SECRETS environment variable
|
void |
setSingleReplica()
Semantic shortcut for calling
setNumberOfReplicas(int) with 1 as value |
io.fabric8.kubernetes.api.model.apps.Deployment |
updateOperator()
Updates Operator's
Deployment resource |
private io.fabric8.kubernetes.api.model.apps.Deployment |
waitForAvailable() |
private static final org.slf4j.Logger LOGGER
private final io.fabric8.openshift.client.OpenShiftClient ocp
private final OpenShiftUtils ocpUtils
private String project
private io.fabric8.kubernetes.api.model.apps.Deployment operator
private String name
public OperatorController(io.fabric8.kubernetes.api.model.apps.Deployment operator,
io.fabric8.openshift.client.OpenShiftClient ocp)
public void disable()
public void enable()
throws InterruptedException
InterruptedExceptionpublic void setNumberOfReplicas(int replicas)
replicas - number of replicaspublic void setSingleReplica()
setNumberOfReplicas(int) with 1 as valuepublic void setImagePullSecret(String secret)
Deployment resourcesecret - name of the secretpublic void setOperandImagePullSecrets(String names)
public void setLogLevel(String level)
level - log leelpublic void setAlwaysPullPolicy()
public void setOperandAlwaysPullPolicy()
public void setEnvVar(String name, String val)
name - variable's nameval - variable's valuepublic io.fabric8.kubernetes.api.model.apps.Deployment updateOperator()
throws InterruptedException
Deployment resourceDeployment resource of the operatorInterruptedExceptionprivate io.fabric8.kubernetes.api.model.apps.Deployment waitForAvailable()
throws InterruptedException
InterruptedExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.