Skip to content

Commit

Permalink
Fix Intersmash#37: eliminated quarkus from naming
Browse files Browse the repository at this point in the history
  • Loading branch information
tommaso-borgato committed Jun 1, 2023
1 parent 9d4e6c3 commit 8b80b74
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 34 deletions.
8 changes: 4 additions & 4 deletions global-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ intersmash.mysql.image=quay.io/centos7/mysql-80-centos7
intersmash.postgresql.image=quay.io/centos7/postgresql-13-centos7

# Keycloak (new Quarkus based version) settings
#intersmash.keycloak.quarks.image=quay.io/keycloak/keycloak:21.1.1
#intersmash.keycloak.quarkus.operators.catalog_source=community-operators
#intersmash.keycloak.quarkus.operators.index_image=registry.redhat.io/redhat/community-operator-index:v4.12
#intersmash.keycloak.quarkus.operators.channel=fast
#intersmash.keycloak.realm_import.image=quay.io/keycloak/keycloak:21.1.1
#intersmash.keycloak.realm_import.operators.catalog_source=community-operators
#intersmash.keycloak.realm_import.operators.index_image=registry.redhat.io/redhat/community-operator-index:v4.12
#intersmash.keycloak.realm_import.operators.channel=fast
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ public class IntersmashConfig {
private static final String PRODUCT_INFINISPAN_OPERATOR_PACKAGE_MANIFEST = "datagrid";
private static final String DEFAULT_INFINISPAN_OPERATOR_PACKAGE_MANIFEST = COMMUNITY_INFINISPAN_OPERATOR_PACKAGE_MANIFEST;
private static final String KEYCLOAK_OPERATOR_CATALOG_SOURCE_NAME = "intersmash.keycloak.operators.catalog_source";
private static final String KEYCLOAK_QUARKUS_OPERATOR_CATALOG_SOURCE_NAME = "intersmash.keycloak.quarkus.operators.catalog_source";
private static final String KEYCLOAK_REALM_IMPORT_OPERATOR_CATALOG_SOURCE_NAME = "intersmash.keycloak.realm_import.operators.catalog_source";

private static final String KEYCLOAK_OPERATOR_INDEX_IMAGE = "intersmash.keycloak.operators.index_image";
private static final String KEYCLOAK_QUARKUS_OPERATOR_INDEX_IMAGE = "intersmash.keycloak.quarkus.operators.index_image";
private static final String KEYCLOAK_REALM_IMPORT_OPERATOR_INDEX_IMAGE = "intersmash.keycloak.realm_import.operators.index_image";
private static final String KEYCLOAK_OPERATOR_CHANNEL = "intersmash.keycloak.operators.channel";
private static final String KEYCLOAK_QUARKUS_OPERATOR_CHANNEL = "intersmash.keycloak.quarkus.operators.channel";
private static final String KEYCLOAK_REALM_IMPORT_OPERATOR_CHANNEL = "intersmash.keycloak.realm_import.operators.channel";
private static final String KEYCLOAK_OPERATOR_PACKAGE_MANIFEST = "intersmash.keycloak.operators.package_manifest";
private static final String KEYCLOAK_QUARKUS_OPERATOR_PACKAGE_MANIFEST = "intersmash.keycloak.quarkus.operators.package_manifest";
private static final String KEYCLOAK_REALM_IMPORT_OPERATOR_PACKAGE_MANIFEST = "intersmash.keycloak.realm_import.operators.package_manifest";
private static final String COMMUNITY_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST = "keycloak-operator";
private static final String PRODUCT_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST = "rhsso-operator";
private static final String DEFAULT_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST = COMMUNITY_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST;
private static final String DEFAULT_KEYCLOAK_QUARKUS_OPERATOR_PACKAGE_MANIFEST = COMMUNITY_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST;
private static final String DEFAULT_KEYCLOAK_REALM_IMPORT_OPERATOR_PACKAGE_MANIFEST = COMMUNITY_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST;
private static final String WILDFLY_OPERATOR_CATALOG_SOURCE_NAME = "intersmash.wildfly.operators.catalog_source";
private static final String WILDFLY_OPERATOR_INDEX_IMAGE = "intersmash.wildfly.operators.index_image";
private static final String WILDFLY_OPERATOR_CHANNEL = "intersmash.wildfly.operators.channel";
Expand Down Expand Up @@ -107,7 +107,7 @@ public class IntersmashConfig {

// KEYCLOAK
private static final String KEYCLOAK_IMAGE_URL = "intersmash.keycloak.image";
private static final String KEYCLOAK_QUARKUS_IMAGE_URL = "intersmash.keycloak.quarks.image";
private static final String KEYCLOAK_REALM_IMPORT_IMAGE_URL = "intersmash.keycloak.realm_import.image";
private static final String KEYCLOAK_TEMPLATES = "intersmash.keycloak.templates";

// ACTIVEMQ
Expand Down Expand Up @@ -169,10 +169,6 @@ public static String keycloakOperatorPackageManifest() {
return XTFConfig.get(KEYCLOAK_OPERATOR_PACKAGE_MANIFEST, DEFAULT_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST);
}

public static String keycloakOperatorQuarkusPackageManifest() {
return XTFConfig.get(KEYCLOAK_OPERATOR_PACKAGE_MANIFEST, DEFAULT_KEYCLOAK_OPERATOR_PACKAGE_MANIFEST);
}

public static String wildflyOperatorCatalogSource() {
return XTFConfig.get(WILDFLY_OPERATOR_CATALOG_SOURCE_NAME, DEFAULT_OPERATOR_CATALOG_SOURCE_NAME);
}
Expand Down Expand Up @@ -283,8 +279,8 @@ public static String keycloakImageURL() {
return XTFConfig.get(KEYCLOAK_IMAGE_URL);
}

public static String keycloakQuarkusImageURL() {
return XTFConfig.get(KEYCLOAK_QUARKUS_IMAGE_URL);
public static String keycloakRealmImportImageURL() {
return XTFConfig.get(KEYCLOAK_REALM_IMPORT_IMAGE_URL);
}

public static String keycloakProductCode() {
Expand Down Expand Up @@ -393,19 +389,20 @@ public static String getWildflyHelmChartsBranch() {
return XTFConfig.get(WILDFLY_HELM_CHARTS_BRANCH);
}

public static String keycloakQuarkusOperatorCatalogSource() {
return XTFConfig.get(KEYCLOAK_QUARKUS_OPERATOR_CATALOG_SOURCE_NAME, DEFAULT_OPERATOR_CATALOG_SOURCE_NAME);
public static String keycloakRealmImportOperatorCatalogSource() {
return XTFConfig.get(KEYCLOAK_REALM_IMPORT_OPERATOR_CATALOG_SOURCE_NAME, DEFAULT_OPERATOR_CATALOG_SOURCE_NAME);
}

public static String keycloakQuarkusOperatorIndexImage() {
return XTFConfig.get(KEYCLOAK_QUARKUS_OPERATOR_INDEX_IMAGE);
public static String keycloakRealmImportOperatorIndexImage() {
return XTFConfig.get(KEYCLOAK_REALM_IMPORT_OPERATOR_INDEX_IMAGE);
}

public static String keycloakQuarkusOperatorChannel() {
return XTFConfig.get(KEYCLOAK_QUARKUS_OPERATOR_CHANNEL);
public static String keycloakRealmImportOperatorChannel() {
return XTFConfig.get(KEYCLOAK_REALM_IMPORT_OPERATOR_CHANNEL);
}

public static String keycloakQuarkusOperatorPackageManifest() {
return XTFConfig.get(KEYCLOAK_QUARKUS_OPERATOR_PACKAGE_MANIFEST, DEFAULT_KEYCLOAK_QUARKUS_OPERATOR_PACKAGE_MANIFEST);
public static String keycloakRealmImportOperatorPackageManifest() {
return XTFConfig.get(KEYCLOAK_REALM_IMPORT_OPERATOR_PACKAGE_MANIFEST,
DEFAULT_KEYCLOAK_REALM_IMPORT_OPERATOR_PACKAGE_MANIFEST);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@
*/
public class KeycloakRealmImportOperatorProvisioner extends OperatorProvisioner<KeycloakRealmImportOperatorApplication> {

//private MixedOperation<KeycloakRealmImport, KubernetesResourceList<KeycloakRealmImport>, Resource<KeycloakRealmImport>> keycloakRealmImportClient;
//private MixedOperation<Keycloak, KubernetesResourceList<Keycloak>, Resource<Keycloak>> keycloakClient;
private static final String OPERATOR_ID = IntersmashConfig.keycloakQuarkusOperatorPackageManifest();
private static final String OPERATOR_ID = IntersmashConfig.keycloakRealmImportOperatorPackageManifest();
protected FailFastCheck ffCheck = () -> false;

public KeycloakRealmImportOperatorProvisioner(@NonNull KeycloakRealmImportOperatorApplication application) {
Expand All @@ -70,22 +68,22 @@ public static String getOperatorId() {

@Override
protected String getOperatorCatalogSource() {
return IntersmashConfig.keycloakQuarkusOperatorCatalogSource();
return IntersmashConfig.keycloakRealmImportOperatorCatalogSource();
}

@Override
protected String getOperatorIndexImage() {
return IntersmashConfig.keycloakQuarkusOperatorIndexImage();
return IntersmashConfig.keycloakRealmImportOperatorIndexImage();
}

@Override
protected String getOperatorChannel() {
return IntersmashConfig.keycloakQuarkusOperatorChannel();
return IntersmashConfig.keycloakRealmImportOperatorChannel();
}

@Override
public void subscribe() {
if (Strings.isNullOrEmpty(IntersmashConfig.keycloakQuarkusImageURL())) {
if (Strings.isNullOrEmpty(IntersmashConfig.keycloakRealmImportImageURL())) {
super.subscribe();
} else {
// RELATED_IMAGE_RHSSO_OPENJ9 and RELATED_IMAGE_RHSSO_OPENJDK, determine the final value for RELATED_IMAGE_RHSSO
Expand All @@ -96,7 +94,7 @@ public void subscribe() {
// Custom Keycloak image to be used: overrides the Keycloak image at the operator level: all
// Keycloak instances will be spun out of this image
// e.g. OPERATOR_KEYCLOAK_IMAGE=quay.io/keycloak/keycloak:21.1.1 --> operator.keycloak.image
"OPERATOR_KEYCLOAK_IMAGE", IntersmashConfig.keycloakQuarkusImageURL()
"OPERATOR_KEYCLOAK_IMAGE", IntersmashConfig.keycloakRealmImportImageURL()
// "PROFILE", "RHSSO"
));
}
Expand All @@ -112,8 +110,8 @@ public void deploy() {

// Custom Keycloak image to be used: overrides the Keycloak image at the Keycloak level: just this Keycloak
// instance will be spun out of this image
if (!Strings.isNullOrEmpty(IntersmashConfig.keycloakQuarkusImageURL())) {
getApplication().getKeycloak().getSpec().setImage(IntersmashConfig.keycloakQuarkusImageURL());
if (!Strings.isNullOrEmpty(IntersmashConfig.keycloakRealmImportImageURL())) {
getApplication().getKeycloak().getSpec().setImage(IntersmashConfig.keycloakRealmImportImageURL());
}

// create keys/certificates and add them to the Keycloak resource:
Expand Down

0 comments on commit 8b80b74

Please sign in to comment.