Search in sources :

Example 1 with KeycloakSpec

use of org.keycloak.operator.v2alpha1.crds.KeycloakSpec 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();
}
Also used : KeycloakDeployment(org.keycloak.operator.v2alpha1.KeycloakDeployment) KeycloakDeployment(org.keycloak.operator.v2alpha1.KeycloakDeployment) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) Unsupported(org.keycloak.operator.v2alpha1.crds.keycloakspec.Unsupported) KeycloakSpec(org.keycloak.operator.v2alpha1.crds.KeycloakSpec) Keycloak(org.keycloak.operator.v2alpha1.crds.Keycloak)

Aggregations

Deployment (io.fabric8.kubernetes.api.model.apps.Deployment)1 KeycloakDeployment (org.keycloak.operator.v2alpha1.KeycloakDeployment)1 Keycloak (org.keycloak.operator.v2alpha1.crds.Keycloak)1 KeycloakSpec (org.keycloak.operator.v2alpha1.crds.KeycloakSpec)1 Unsupported (org.keycloak.operator.v2alpha1.crds.keycloakspec.Unsupported)1