public class OperatorController extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
protected String |
name |
protected io.fabric8.openshift.client.OpenShiftClient |
ocp |
protected OpenShiftUtils |
ocpUtils |
protected io.fabric8.kubernetes.api.model.apps.Deployment |
operator |
protected Map<String,String> |
podLabels |
protected String |
project |
| Constructor and Description |
|---|
OperatorController(io.fabric8.kubernetes.api.model.apps.Deployment operator,
Map<String,String> podLabels,
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 |
setNumberOfReplicas(int replicas)
Sets number of replicas
|
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
protected final io.fabric8.openshift.client.OpenShiftClient ocp
protected final OpenShiftUtils ocpUtils
protected String project
protected io.fabric8.kubernetes.api.model.apps.Deployment operator
protected String name
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 setAlwaysPullPolicy()
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 © 2021 JBoss by Red Hat. All rights reserved.