Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Feature/streampoolid #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

[1.5.2]

- Adding support for Santiago (SCL) region

[1.5.1]

- Adding support for Chiyoda (NJA) and Dubai (DXB) regions
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ See the [Documentation](charts/oci-service-broker/README.md#oci-service-broker)
The OCI Service Broker is packaged as Helm chart for making it easy to install in Kubernetes Clusters. The chart can be downloaded from below URL.

```
https://github.com/oracle/oci-service-broker/releases/download/v1.5.1/oci-service-broker-1.5.1.tgz
https://github.com/oracle/oci-service-broker/releases/download/v1.5.2/oci-service-broker-1.5.2.tgz
```

## Samples
Expand Down
2 changes: 1 addition & 1 deletion charts/oci-service-broker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
apiVersion: v1
description: A Helm chart for installing OCI Service Broker into a Kubernetes cluster
name: oci-service-broker
version: 1.5.1
version: 1.5.2
12 changes: 6 additions & 6 deletions charts/oci-service-broker/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ brew update && brew install kubernetes-service-catalog-client
The OCI Service Broker is packaged as Helm chart for making it easy to install in Kubernetes. The chart is available at [charts/oci-service-broker](../) directory.

```plain
https://github.com/oracle/oci-service-broker/releases/download/v1.5.1/oci-service-broker-1.5.1.tgz
https://github.com/oracle/oci-service-broker/releases/download/v1.5.2/oci-service-broker-1.5.2.tgz
```

### OCI credentials
Expand Down Expand Up @@ -114,15 +114,15 @@ For quickly testing out OCI Service Broker, TLS can be disabled and an embedded

Helm 3.x syntax:
```bash
helm install oci-service-broker https://github.com/oracle/oci-service-broker/releases/download/v1.5.1/oci-service-broker-1.5.1.tgz \
helm install oci-service-broker https://github.com/oracle/oci-service-broker/releases/download/v1.5.2/oci-service-broker-1.5.2.tgz \
--set ociCredentials.secretName=ocicredentials \
--set storage.etcd.useEmbedded=true \
--set tls.enabled=false
```

Helm 2.x syntax:
```bash
helm install https://github.com/oracle/oci-service-broker/releases/download/v1.5.1/oci-service-broker-1.5.1.tgz --name oci-service-broker \
helm install https://github.com/oracle/oci-service-broker/releases/download/v1.5.2/oci-service-broker-1.5.2.tgz --name oci-service-broker \
--set ociCredentials.secretName=ocicredentials \
--set storage.etcd.useEmbedded=true \
--set tls.enabled=false
Expand Down Expand Up @@ -226,15 +226,15 @@ Replace the values of --set arguments with your appropriate values to install th

Helm 3.x syntax:
```bash
helm install oci-service-broker https://github.com/oracle/oci-service-broker/releases/download/v1.5.1/oci-service-broker-1.5.1.tgz \
helm install oci-service-broker https://github.com/oracle/oci-service-broker/releases/download/v1.5.2/oci-service-broker-1.5.2.tgz \
--set ociCredentials.secretName=ocicredentials \
--set tls.secretName=certsecret \
--set storage.etcd.servers=<comma separated list of etcd servers>
```

Helm 2.x syntax:
```bash
helm install https://github.com/oracle/oci-service-broker/releases/download/v1.5.1/oci-service-broker-1.5.1.tgz --name oci-service-broker \
helm install https://github.com/oracle/oci-service-broker/releases/download/v1.5.2/oci-service-broker-1.5.2.tgz --name oci-service-broker \
--set ociCredentials.secretName=ocicredentials \
--set tls.secretName=certsecret \
--set storage.etcd.servers=<comma separated list of etcd servers>
Expand Down Expand Up @@ -288,7 +288,7 @@ Refer [Restrict access to Service Catalog resources using RBAC](security.md#rest
Sample files for various services are available under [`oci-service-broker/samples`](../samples) directory inside the charts. The below command extracts chart that contains the sample files.

```bash
curl -LO https://github.com/oracle/oci-service-broker/releases/download/v1.5.1/oci-service-broker-1.5.1.tgz | tar xz
curl -LO https://github.com/oracle/oci-service-broker/releases/download/v1.5.2/oci-service-broker-1.5.2.tgz | tar xz
```

Create a `ClusterServiceBroker` resource with OCI Service Broker URL to register the broker. Use the below register yaml file after updating the namespace of the OCI Service Broker.
Expand Down
2 changes: 1 addition & 1 deletion charts/oci-service-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ image:
repository: iad.ocir.io/oracle/oci-service-broker

# Tag of the image
tag: 1.5.1
tag: 1.5.2

# The image pull policy
pullPolicy: Always
Expand Down
10 changes: 5 additions & 5 deletions oci-service-broker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ apply plugin: 'maven-publish'
archivesBaseName = 'oci-service-broker'

// Sometimes, the version has to be overridden from command line
version = project.hasProperty('version_num') ? project.getProperty('version_num') : '1.5.1'
version = project.hasProperty('version_num') ? project.getProperty('version_num') : '1.5.2'
ext.dockerGroup = 'iad.ocir.io/oci-cnp-dev'
mainClassName = 'com.oracle.oci.osb.Broker'

sourceCompatibility = 10

ext {
ociSdkVersion = "1.26.0"
jerseyVersion = "2.27"
ociSdkVersion = "1.28.0"
jerseyVersion = "2.32"
hk2Version = "2.5.0-b42"
hamcrestVersion = "1.3"
jacksonVersion = "2.10.1";
jacksonDatabindVersion = "2.10.1";
jacksonVersion = "2.11.3";
jacksonDatabindVersion = "2.11.3";
javaxwsrsVersion = "2.1.1"
bedrockVersion = "5.0.7"
jetcdVersion = "0.3.0"
Expand Down
4 changes: 2 additions & 2 deletions oci-service-broker/download_SDK_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
#sdk jars and their dependency jars. The jars are written to libs directory.

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SDK_VERSION="1.26.0"
SDK_VERSION="1.28.0"
TEMP_DIR="/tmp/oci-java-sdk"
rm -rf ${TEMP_DIR}
mkdir -p ${TEMP_DIR}
mkdir -p ${SCRIPT_DIR}/libs
echo "Downloading oci-java-sdk version v${SDK_VERSION} and the dependent libraries..."
curl -sSL https://github.com/oracle/oci-java-sdk/releases/download/v${SDK_VERSION}/oci-java-sdk-${SDK_VERSION}.zip -o ${TEMP_DIR}/oci-java-sdk.zip
unzip -qq ${TEMP_DIR}/oci-java-sdk.zip -d ${TEMP_DIR}
cp ${TEMP_DIR}/lib/oci-java-sdk-full-1.26.0.jar ${SCRIPT_DIR}/libs/
cp ${TEMP_DIR}/lib/oci-java-sdk-full-1.28.0.jar ${SCRIPT_DIR}/libs/
cp ${TEMP_DIR}/third-party/lib/*.jar ${SCRIPT_DIR}/libs/
rm -rf ${TEMP_DIR}
echo "oci-java-sdk and the dependent libraries are downloaded to ${SCRIPT_DIR}/libs directory"
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class OSSServiceAdapter implements ServiceAdapter {
public static final String PARTITIONS = "partitions";
private static final String STREAM_ID = "streamId";
private static final String MESSAGE_ENDPOINT = "messageEndpoint";
private static final String STREAMPOOL_ID = "streamPoolId";

private StreamAdminClient streamAdminClient;

Expand Down Expand Up @@ -315,6 +316,7 @@ public ServiceBinding bindToService(String instanceId, String bindingId,
.put(STREAM_ID, svcData.getOcid());
//Adding the message endpoint to credentails for each bind request
getStreamMessageEndpoint(svcData.getOcid(), credentials);
getStreamStreamPoolId(svcData.getOcid(), credentials);
binding.setCredentials(credentials);
binding.setStatusCode(Response.Status.CREATED.getStatusCode());

Expand Down Expand Up @@ -392,4 +394,10 @@ private void getStreamMessageEndpoint(String ocid, Map<String, String> credMap)
credMap.put(MESSAGE_ENDPOINT, stream.getMessagesEndpoint());
}
}
private void getStreamStreamPoolId(String ocid, Map<String, String> credMap) {
Stream stream = streamAdminClient.getStream(GetStreamRequest.builder().streamId(ocid).build()).getStream();
if (stream != null) {
credMap.put(STREAMPOOL_ID, stream.getStreamPoolId());
}
}
}