public static void main(String[] args) throws InterruptedException {
// ManagedChannel channel = ManagedChannelBuilder.forAddress("172.16.101.200", 44134).usePlaintext(true).build();
ManagedChannel channel = NettyChannelBuilder
.forAddress("172.16.80.151", 44134)
.negotiationType(NegotiationType.PLAINTEXT).build();
ReleaseServiceGrpc.ReleaseServiceBlockingStub blockingStub = ReleaseServiceGrpc
.newBlockingStub(channel).withCallCredentials(new CallCredentials(){
@Override
public void applyRequestMetadata(MethodDescriptor<?, ?> method, Attributes attrs,
Executor appExecutor, MetadataApplier applier) {
// TODO Auto-generated method stub
Metadata metadata = new Metadata();
metadata.put(Metadata.Key.of("x-helm-api-client", Metadata.ASCII_STRING_MARSHALLER), "v2.2.0");
applier.apply(metadata);
}
});
//deployAChart(blockingStub);
//updateDeploy(blockingStub);
//undeploy(blockingStub);
Tiller.GetVersionResponse response = blockingStub.getVersion(Tiller.GetVersionRequest.newBuilder().build());
System.out.println(response.getVersion());