use of org.keycloak.operator.v2alpha1.KeycloakDeployment 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