Skip to content

Commit 32820b3

Browse files
authored
Merge pull request #190 from redhat-developer/explicit-env
fix: add explicit env variable pointing to the environment
2 parents b82e940 + 4396215 commit 32820b3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

olm/olm-template/manifests/rhoas-operator.clusterserviceversion.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ spec:
105105
spec:
106106
containers:
107107
- image: quay.io/{{organization}}/service-operator:{{version}}
108+
env:
109+
- name: CLOUD_SERVICES_API
110+
value: https://api.openshift.com
108111
imagePullPolicy: Always
109112
name: rhoas-operator
110113
resources:

source/rhoas/src/main/java/com/openshift/cloud/RHOASOperator.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import io.quarkus.runtime.QuarkusApplication;
1111
import io.quarkus.runtime.annotations.QuarkusMain;
1212
import javax.inject.Inject;
13+
14+
import org.eclipse.microprofile.config.inject.ConfigProperty;
1315
import org.jboss.logging.Logger;
1416

1517
@QuarkusMain
@@ -25,15 +27,20 @@ public class RHOASOperator implements QuarkusApplication {
2527

2628
@Inject CloudServiceAccountRequestController serviceAccountRequestController;
2729

30+
@ConfigProperty(name = "rhoas.client.apiBasePath")
31+
String clientBasePath;
32+
2833
private static final Logger LOG = Logger.getLogger(RHOASOperator.class);
2934

3035
public static void main(String... args) {
31-
LOG.info("Autoupdating RHOAS Operator starting");
36+
LOG.info("RHOAS Operator starting");
3237
Quarkus.run(RHOASOperator.class, args);
3338
}
3439

3540
@Override
3641
public int run(String... args) throws Exception {
42+
LOG.info("Using API URL: " + clientBasePath);
43+
3744
ControllerConfiguration<?> config = configuration.getConfigurationFor(connectionController);
3845
LOG.info("CR class: " + config.getCustomResourceClass());
3946

0 commit comments

Comments
 (0)