Skip to content

Commit

Permalink
Merge pull request openshift#17378 from jpeeler/sc-rebase-0.1.3
Browse files Browse the repository at this point in the history
Rebase service catalog to v0.1.3
  • Loading branch information
stevekuznetsov authored Jan 4, 2018
2 parents dc73150 + b0324ee commit 188906e
Show file tree
Hide file tree
Showing 1,317 changed files with 348,295 additions and 8,046 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: catalog
description: service-catalog API server and controller-manager helm chart
version: 0.1.2
version: 0.1.3
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ chart and their default values.

| Parameter | Description | Default |
|-----------|-------------|---------|
| `image` | apiserver image to use | `quay.io/kubernetes-service-catalog/service-catalog:v0.1.2` |
| `image` | apiserver image to use | `quay.io/kubernetes-service-catalog/service-catalog:v0.1.3` |
| `imagePullPolicy` | `imagePullPolicy` for the service catalog | `Always` |
| `apiserver.tls.requestHeaderCA` | Base64-encoded CA used to validate request-header authentication, when receiving delegated authentication from an aggregator. If not set, the service catalog API server will inherit this CA from the `extension-apiserver-authentication` ConfigMap if available. | `nil` |
| `apiserver.service.type` | Type of service; valid values are `LoadBalancer` and `NodePort` | `NodePort` |
Expand All @@ -55,6 +55,7 @@ chart and their default values.
| `controllerManager.brokerRelistInterval` | How often the controller should relist the catalogs of ready brokers; duration format (`20m`, `1h`, etc) | `24h` |
| `useAggregator` | whether or not to set up the controller-manager to go through the main Kubernetes API server's API aggregator | `true` |
| `rbacEnable` | If true, create & use RBAC resources | `true` |
| `asyncBindingOperationsEnabled` | Whether or not alpha support for async binding operations is enabled | `false` |

Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ spec:
- --feature-gates
- OriginatingIdentity=true
{{- end }}
{{- if .Values.asyncBindingOperationsEnabled }}
- --feature-gates
- AsyncBindingOperations=true
{{- end }}
ports:
- containerPort: 8080
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ items:
resources: ["clusterservicebrokers","serviceinstances","servicebindings"]
verbs: ["get","list","watch"]
- apiGroups: ["servicecatalog.k8s.io"]
resources: ["clusterservicebrokers/status","serviceinstances/status","serviceinstances/reference","servicebindings/status"]
resources: ["clusterservicebrokers/status","clusterserviceclasses/status","clusterserviceplans/status","serviceinstances/status","serviceinstances/reference","servicebindings/status"]
verbs: ["update"]
# give the controller-manager service account access to whats defined in its role.
- apiVersion: {{template "rbacApiVersion" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Default values for Service Catalog
# service-catalog image to use
image: quay.io/kubernetes-service-catalog/service-catalog:v0.1.2
image: quay.io/kubernetes-service-catalog/service-catalog:v0.1.3
# imagePullPolicy for the service-catalog; valid values are "IfNotPresent",
# "Never", and "Always"
imagePullPolicy: Always
Expand Down Expand Up @@ -91,3 +91,5 @@ controllerManager:
apiserverSkipVerify: true
# Whether the OriginatingIdentity alpha feature should be enabled
originatingIdentityEnabled: false
# Whether the AsyncBindingOperations alpha feature should be enabled
asyncBindingOperationsEnabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Service Broker

| Parameter | Description | Default |
|-----------|-------------|---------|
| `image` | Image to use | `quay.io/kubernetes-service-catalog/user-broker:v0.1.2` |
| `image` | Image to use | `quay.io/kubernetes-service-catalog/user-broker:v0.1.3` |
| `imagePullPolicy` | `imagePullPolicy` for the ups-broker | `Always` |

Specify each parameter using the `--set key=value[,key=value]` argument to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Default values for User-Provided Service Broker
# Image to use
image: quay.io/kubernetes-service-catalog/user-broker:v0.1.2
image: quay.io/kubernetes-service-catalog/user-broker:v0.1.3
# ImagePullPolicy; valid values are "IfNotPresent", "Never", and "Always"
imagePullPolicy: Always
# Certificate details to use for TLS. Leave blank to not use TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
set -o nounset
set -o errexit

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
. "${ROOT}/contrib/hack/utilities.sh" || { echo 'Cannot load utilities.'; exit 1; }

function usage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,30 @@ func (c *userProvidedController) Catalog() (*brokerapi.Catalog, error) {
ID: "86064792-7ea2-467b-af93-ac9694d96d52",
Description: "Sample plan description",
Free: true,
}, {
Name: "premium",
ID: "cc0d7529-18e8-416d-8946-6f7456acd589",
Description: "Premium plan",
Free: false,
},
},
Bindable: true,
Bindable: true,
PlanUpdateable: true,
},
{
Name: "user-provided-service-single-plan",
ID: "5f6e6cf6-ffdd-425f-a2c7-3c9258ad2468",
Description: "A user provided service",
Plans: []brokerapi.ServicePlan{
{
Name: "default",
ID: "96064792-7ea2-467b-af93-ac9694d96d52",
Description: "Sample plan description",
Free: true,
},
},
Bindable: true,
PlanUpdateable: true,
},
},
}, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,25 @@ If you don't already have an appropriate Helm version, see the

### Helm Charts

You need to download the
[charts/catalog](https://github.com/kubernetes-incubator/service-catalog/tree/master/charts/catalog)
directory to your local machine. Please refer to
[this guide](https://github.com/kubernetes-incubator/service-catalog/blob/master/docs/devguide.md#2-clone-fork-to-local-storage).
You need to add the service-catalog Helm repository to your local machine.
Execute the following to do so:

```console
helm repo add svc-cat https://svc-catalog-charts.storage.googleapis.com
```

To ensure that it worked, execute the following:

```console
helm search service-catalog
```

You should see the following output:

```console
NAME VERSION DESCRIPTION
svc-cat/catalog 0.0.1 service-catalog API server and controller-manag...
```

## RBAC

Expand Down Expand Up @@ -114,6 +129,6 @@ executable.
Use Helm to install the Service Catalog. From the root of this repository:

```console
helm install charts/catalog \
helm install svc-cat/catalog \
--name catalog --namespace catalog
```
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,34 @@ We should see something like:
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ClusterServiceBroker
metadata:
creationTimestamp: 2017-03-03T04:11:17Z
creationTimestamp: 2017-11-01T14:11:29Z
finalizers:
- kubernetes-incubator/service-catalog
generation: 1
name: ups-broker
resourceVersion: "6"
selfLink: /apis/servicecatalog.k8s.io/v1beta1/clusterservicebrokers/ups-broker
uid: 72fa629b-ffc7-11e6-b111-0242ac110005
uid: 8df4e501-bf0e-11e7-9e29-0242ac110004
spec:
relistBehavior: Duration
relistDuration: 15m0s
relistRequests: 0
url: http://ups-broker-ups-broker.ups-broker.svc.cluster.local
status:
conditions:
- message: Successfully fetched catalog entries from broker.
- lastTransitionTime: 2017-11-01T14:12:30Z
message: Successfully fetched catalog entries from broker.
reason: FetchedCatalog
status: "True"
type: Ready
reconciledGeneration: 1
```
Notice that the `status` field has been set to reflect that the broker server's
catalog of service offerings has been successfully added to our cluster's
service catalog.

# Step 3 - Viewing `ClusterServiceClass`es
# Step 3 - Viewing `ClusterServiceClass`es and `ClusterServicePlan`s

The controller created a `ClusterServiceClass` for each service that the UPS broker
provides. We can view the `ClusterServiceClass` resources available in the cluster by
Expand All @@ -106,7 +112,7 @@ NAME EXTERNAL NAME
```

**NOTE:** The above command uses a custom set of columns. The `NAME` field is
the Kubernetes name of the ClusterServiceClass and the `EXTERNAL NAME` field is the
the Kubernetes name of the `ClusterServiceClass` and the `EXTERNAL NAME` field is the
human-readable name for the service that the broker returns.

The UPS broker provides a service with the external name
Expand All @@ -123,19 +129,69 @@ We should see something like:
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ClusterServiceClass
metadata:
creationTimestamp: 2017-03-03T04:11:17Z
name: user-provided-service
resourceVersion: "7"
selfLink: /apis/servicecatalog.k8s.io/v1beta1/clusterserviceclasses/user-provided-service
uid: 72fef5ce-ffc7-11e6-b111-0242ac110005
brokerName: ups-broker
externalID: 4F6E6CF6-FFDD-425F-A2C7-3C9258AD2468
bindable: false
planUpdatable: false
plans:
- name: default
free: true
creationTimestamp: 2017-11-01T14:12:29Z
name: 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468
resourceVersion: "4"
selfLink: /apis/servicecatalog.k8s.io/v1beta1/clusterserviceclasses/4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468
uid: b1e764ba-bf0e-11e7-9e29-0242ac110004
spec:
bindable: true
clusterServiceBrokerName: ups-broker
description: A user provided service
externalID: 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468
externalName: user-provided-service
planUpdatable: false
status:
removedFromBrokerCatalog: false
```

Additionally, the controller created a `ClusterServicePlan` for each of the
plans for the broker's services. We can view the `ClusterServicePlan`
resources available in the cluster by executing:

```console
$ kubectl get clusterserviceplans -o=custom-columns=NAME:.metadata.name,EXTERNAL\ NAME:.spec.externalName
```

We should see something like:

```console
NAME EXTERNAL NAME
86064792-7ea2-467b-af93-ac9694d96d52 default
```

**NOTE:** Just like in the command above, we used a custom set of columns.
The `NAME` field is the Kubernetes name of the `ClusterServicePlan` and the
`EXTERNAL NAME` field is the human-readable name for the service that the
broker returns.

You can view the details of this `ClusterServicePlan` with this command:

```console
kubectl get clusterserviceplans 86064792-7ea2-467b-af93-ac9694d96d52 -o yaml
```

We should see something like:

```yaml
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ClusterServicePlan
metadata:
creationTimestamp: 2017-11-01T14:12:29Z
name: 86064792-7ea2-467b-af93-ac9694d96d52
resourceVersion: "5"
selfLink: /apis/servicecatalog.k8s.io/v1beta1/clusterserviceplans/86064792-7ea2-467b-af93-ac9694d96d52
uid: b1e7f049-bf0e-11e7-9e29-0242ac110004
spec:
clusterServiceBrokerName: ups-broker
clusterServiceClassRef:
name: 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468
description: Sample plan description
externalID: 86064792-7ea2-467b-af93-ac9694d96d52
externalName: default
free: true
status:
removedFromBrokerCatalog: false
```

# Step 4 - Creating a New `ServiceInstance`
Expand Down Expand Up @@ -178,31 +234,37 @@ We should see something like:
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
creationTimestamp: 2017-10-02T14:50:28Z
creationTimestamp: 2017-11-01T14:21:46Z
finalizers:
- kubernetes-incubator/service-catalog
generation: 1
name: ups-instance
namespace: test-ns
resourceVersion: "12"
selfLink: /apis/servicecatalog.k8s.io/v1beta1/namespaces/test-ns/serviceinstances/ups-instance
uid: 07ecf19d-a781-11e7-8b18-0242ac110005
uid: fe143fee-bf0f-11e7-9e29-0242ac110004
spec:
externalID: 7f2c176a-ae67-4b5e-a826-58591d85a1d7
clusterServiceClassExternalName: user-provided-service
clusterServiceClassRef:
name: 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468
clusterServicePlanExternalName: default
clusterServicePlanRef:
name: 86064792-7ea2-467b-af93-ac9694d96d52
externalID: 10ca3610-8200-4b5d-b788-897365f191fa
parameters:
credentials:
param-1: value-1
param-2: value-2
updateRequests: 0
status:
asyncOpInProgress: false
conditions:
- lastTransitionTime: 2017-10-02T14:50:28Z
- lastTransitionTime: 2017-11-01T14:21:46Z
message: The instance was provisioned successfully
reason: ProvisionedSuccessfully
status: "True"
type: Ready
deprovisionStatus: Required
externalProperties:
clusterServicePlanExternalName: default
parameterChecksum: e65c764db8429f9afef45f1e8f71bcbf9fdbe9a13306b86fd5dcc3c5d11e5dd3
Expand All @@ -212,7 +274,6 @@ status:
param-2: value-2
orphanMitigationInProgress: false
reconciledGeneration: 1
```

# Step 5 - Requesting a `ServiceBinding` to use the `ServiceInstance`
Expand Down Expand Up @@ -247,26 +308,30 @@ We should see something like:
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceBinding
metadata:
creationTimestamp: 2017-03-07T01:44:36Z
creationTimestamp: 2017-11-01T14:26:29Z
finalizers:
- kubernetes-incubator/service-catalog
generation: 1
name: ups-binding
namespace: test-ns
resourceVersion: "29"
resourceVersion: "16"
selfLink: /apis/servicecatalog.k8s.io/v1beta1/namespaces/test-ns/servicebindings/ups-binding
uid: 9eb2cdce-02d7-11e7-8edb-0242ac110005
uid: a6823f15-bf10-11e7-9e29-0242ac110004
spec:
externalID: a8bb795a-711d-4854-adbb-5654428274f9
instanceRef:
name: ups-instance
externalID: b041db94-a5a0-41a2-87ae-1025ba760918
secretName: ups-binding
status:
conditions:
- lastTransitionTime: 2017-03-03T01:44:37Z
- lastTransitionTime: 2017-11-01T14:26:29Z
message: Injected bind result
reason: InjectedBindResult
status: "True"
type: Ready
externalProperties: {}
orphanMitigationInProgress: false
reconciledGeneration: 1
```

Notice that the status has a `Ready` condition set. This means our binding is
Expand Down
Loading

0 comments on commit 188906e

Please sign in to comment.