use of org.keycloak.operator.v2alpha1.crds.Keycloak in project keycloak by keycloak.
the class KeycloakController method updateErrorStatus.
@Override
public Optional<Keycloak> updateErrorStatus(Keycloak kc, RetryInfo retryInfo, RuntimeException e) {
Log.error("--- Error reconciling", e);
KeycloakStatus status = new KeycloakStatusBuilder().addErrorMessage("Error performing operations:\n" + e.getMessage()).build();
kc.setStatus(status);
return Optional.of(kc);
}
use of org.keycloak.operator.v2alpha1.crds.Keycloak in project keycloak by keycloak.
the class PodTemplateTest method getDeployment.
Deployment getDeployment(PodTemplateSpec podTemplate) {
var config = new Config() {
@Override
public Keycloak keycloak() {
return new Keycloak() {
@Override
public String image() {
return "dummy-image";
}
@Override
public String imagePullPolicy() {
return "Never";
}
@Override
public String initContainerImage() {
return "quay.io/keycloak/keycloak-init-container:legacy";
}
@Override
public String initContainerImagePullPolicy() {
return "Always";
}
};
}
};
var kc = new Keycloak();
var spec = new KeycloakSpec();
spec.setUnsupported(new Unsupported(podTemplate));
kc.setSpec(spec);
var deployment = new KeycloakDeployment(null, config, kc, new Deployment());
return (Deployment) deployment.getReconciledResource().get();
}
Aggregations