-
Notifications
You must be signed in to change notification settings - Fork 350
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
Resolving Dependency Automatically -- aws-s3 #419
Labels
status/waiting-for-feedback
Needs some feedback
Comments
lburgazzoli
added a commit
to lburgazzoli/apache-camel-k
that referenced
this issue
Feb 11, 2019
it.yamlapiVersion: camel.apache.org/v1alpha1
kind: Integration
metadata:
creationTimestamp: 2019-02-11T16:50:39Z
generation: 1
name: file-organizer
namespace: cookbook
resourceVersion: "40155"
selfLink: /apis/camel.apache.org/v1alpha1/namespaces/cookbook/integrations/file-organizer
uid: 29658d87-2e1d-11e9-97f5-42010aa00009
spec:
configuration:
- type: secret
value: s3config
dependencies:
- camel:aws
sources:
- content: |
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.aws.s3.S3Component;
/**
* FileOrganizer
*/
public class FileOrganizer extends RouteBuilder {
@Override
public void configure() throws Exception {
S3Component s3Component = getContext().getComponent("aws-s3", S3Component.class);
s3Component.getConfiguration().setAmazonS3Client(amazonS3Client());
from("aws-s3://data").to("log:message");
}
AmazonS3 amazonS3Client() throws Exception {
final String s3EndpointUrl = getContext().resolvePropertyPlaceholders("{{s3EndpointUrl}}");
final String minioAccessKey =
getContext().resolvePropertyPlaceholders("{{minioAccessKey}}");
final String minioSecretKey =
getContext().resolvePropertyPlaceholders("{{minioSecretKey}}");
EndpointConfiguration endpointConfiguration =
new EndpointConfiguration(s3EndpointUrl, null);
AWSCredentials credentials = new BasicAWSCredentials(minioAccessKey, minioSecretKey);
AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials);
AmazonS3ClientBuilder clientBuilder =
AmazonS3ClientBuilder.standard().withCredentials(credentialsProvider)
.withEndpointConfiguration(endpointConfiguration);
return clientBuilder.build();
}
}
name: FileOrganizer.java
status:
context: ctx-bhgpqgg938dlliepild0
dependencies:
- camel:aws
- camel:core
- runtime:jvm
digest: vZpVeIJMmQaAvwhJH-QeVMRYwR4m2atgps6Zm7VychIw
image: docker-registry.default.svc:5000/cookbook/camel-k-ctx-bhgpqgg938dlliepild0:34798
phase: Running
|
I did try with camel-k from master and I'm unable to reproduce the issue:
The failure here is expected as I have not configured any property but component is properly resolved |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When creating a route using
aws-s3
(http://camel.apache.org/aws-s3.html) , the deployment fails with errorRoute
The text was updated successfully, but these errors were encountered: