use of io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding in project syndesis-qe by syndesisio.
the class Jaeger method processResources.
private void processResources() {
for (String jaegerResource : JAEGER_RESOURCES) {
// version 1.20.0 ==> repo v1.20.0
jaegerResource = String.format(jaegerResource, "v" + TestConfiguration.jaegerVersion());
log.info("Processing " + jaegerResource);
try (InputStream is = new URL(jaegerResource).openStream()) {
List<HasMetadata> resources = OpenShiftUtils.getInstance().load(is).get();
// Change the namespace in the resources to the current
for (HasMetadata resource : resources) {
if (resource instanceof ClusterRoleBinding) {
for (Subject subject : ((ClusterRoleBinding) resource).getSubjects()) {
subject.setNamespace(TestConfiguration.openShiftNamespace());
}
}
resource.getMetadata().setNamespace(TestConfiguration.openShiftNamespace());
processedResources.add(resource);
// change docker image to quay
if (resource instanceof Deployment) {
((Deployment) resource).getSpec().getTemplate().getSpec().getContainers().get(0).setImage("quay.io/jaegertracing/jaeger-operator:" + TestConfiguration.jaegerVersion());
}
}
} catch (IOException e) {
fail("Unable to process Jaeger resource " + jaegerResource, e);
}
}
}
use of io.fabric8.kubernetes.api.model.rbac.ClusterRoleBinding in project jointware by isdream.
the class KubernetesKeyValueStyleGeneratorTest method testOpenShiftWithAllKind.
protected static void testOpenShiftWithAllKind() throws Exception {
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new Policy());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new Group());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new User());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new OAuthClient());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new ClusterRoleBinding());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new ImageStreamTag());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new ImageStream());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new Build());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new BuildConfig());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new RoleBinding());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new Route());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new PolicyBinding());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new OAuthAuthorizeToken());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new Role());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new Project());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new OAuthAccessToken());
info(OPENSHIFT_KIND, OpenShiftDocumentKeyValueStyleGenerator.class.getName(), new DeploymentConfig());
}
Aggregations