-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CAMEL-21451] Migrate to JKube generated resources for all runtimes #16290
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove the quarkus way of generating the manifests then this code should be removed as well :
Lines 123 to 170 in 9df896a
public void applyRuntimeSpecificProperties(Traits traitConfig, TraitContext context, RuntimeType runtimeType) { | |
List<String> routeProperties = new ArrayList<>(); | |
if (runtimeType == RuntimeType.quarkus) { | |
Route routeTrait = Optional.ofNullable(traitConfig.getRoute()).orElseGet(Route::new); | |
Container containerTrait = Optional.ofNullable(traitConfig.getContainer()).orElseGet(Container::new); | |
routeProperties.add("quarkus.openshift.route.expose=true"); | |
if (routeTrait.getAnnotations() != null) { | |
routeTrait.getAnnotations().forEach((name, value) -> routeProperties | |
.add("quarkus.openshift.route.annotations.\"%s\"=%s".formatted(name, value))); | |
} | |
if (routeTrait.getHost() != null) { | |
routeProperties.add("quarkus.openshift.route.host=%s".formatted(routeTrait.getHost())); | |
} | |
routeProperties.add("quarkus.openshift.route.target-port=%s" | |
.formatted(Optional.ofNullable(containerTrait.getServicePortName()).orElse(DEFAULT_CONTAINER_PORT_NAME))); | |
if (routeTrait.getTlsTermination() != null) { | |
routeProperties | |
.add("quarkus.openshift.route.tls.termination=%s".formatted(routeTrait.getTlsTermination().getValue())); | |
} | |
if (routeTrait.getTlsCertificate() != null) { | |
routeProperties.add( | |
"quarkus.openshift.route.tls.certificate=%s" | |
.formatted(getContent(routeTrait.getTlsCertificate()).replaceAll("\n", "\\\\n"))); | |
} | |
if (routeTrait.getTlsKey() != null) { | |
routeProperties.add("quarkus.openshift.route.tls.key=%s" | |
.formatted(getContent(routeTrait.getTlsKey()).replaceAll("\n", "\\\\n"))); | |
} | |
if (routeTrait.getTlsCACertificate() != null) { | |
routeProperties | |
.add("quarkus.openshift.route.tls.ca-certificate=%s" | |
.formatted(getContent(routeTrait.getTlsCACertificate()).replaceAll("\n", "\\\\n"))); | |
} | |
if (routeTrait.getTlsDestinationCACertificate() != null) { | |
routeProperties.add("quarkus.openshift.route.tls.destination-ca-certificate=%s" | |
.formatted(getContent(routeTrait.getTlsDestinationCACertificate()).replaceAll("\n", "\\\\n"))); | |
} | |
if (routeTrait.getTlsInsecureEdgeTerminationPolicy() != null) { | |
routeProperties.add("quarkus.openshift.route.tls.insecure-edge-termination-policy=%s" | |
.formatted(routeTrait.getTlsInsecureEdgeTerminationPolicy())); | |
} | |
} | |
context.addOrAppendConfigurationResource("application.properties", | |
routeProperties.stream().collect(Collectors.joining(System.lineSeparator()))); | |
} |
It was used to generate the openshift CRD Route using the quarkus openshift plugin.
...etes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java
Outdated
Show resolved
Hide resolved
218060d
to
4c397e3
Compare
4c397e3
to
085e8ae
Compare
please test this again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
https://issues.apache.org/jira/browse/CAMEL-21451