Skip to content
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

Add K8S and CF annotations to context object and CF bind resource #658

Merged
103 changes: 103 additions & 0 deletions profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,23 @@ deployment:
"organization_name": "system"
```

- `organization_annotations`

Version: 2.15

The [annotations](http://v3-apidocs.cloudfoundry.org/version/3.69.0/index.html#metadata) attached to the organization that a Service Instance is associated with.
Note that the annotations of an organization in Cloud Foundry MAY be changed.
This OPTIONAL property holds an object with the annotations key/value pairs. If present, this property MUST be an object, with one or more properties as follows:

```
"organization_annotations": { "prefix-here.org/name-here":"value-here" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gberche-orange In the OSBAPI call we’ve realised that CF won’t have the prefixes here.

Is there expectation that the annotation object will always need such prefixes?, or is it only for K8S example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@waterlink

I was hoping that the CF CAPI team would handle cloudfoundry/cloud_controller_ng#1335 bringing planned Cf/K8S consistency and that prefixes could be used to filter out private annotation keys as mentionned in #654 (comment) in a consistent way between CF and K8S:

As a 1st step, we can leverage K8S annotations naming conventions reproduced below to allow users to distinguish between public annotations (shared with all brokers) and private annotations (not shared with brokers):

I'm still waiting for CF CAPI response on this. The CF SAPI team could consider other alternative options for filtering private annotations though, and we could relax the CF examples in OSB API PR

```
For example:
```
"organization_annotations": { "myprovider.com/send-alerts-to-email":"me@mycompany.com" }
```


- `space_guid`

Version: 2.11
Expand Down Expand Up @@ -224,6 +241,23 @@ deployment:
"space_name": "development"
```

- `space_annotations`

Version: 2.15

The [annotations](http://v3-apidocs.cloudfoundry.org/version/3.69.0/index.html#metadata) attached to the space that a Service Instance is associated with.
Note that the annotations of a space in Cloud Foundry MAY be changed.
This OPTIONAL property holds an object with the annotations key/value pairs. If present, this property MUST be an object, with one or more properties as follows:

```
"space_annotations": { "prefix-here.org/name-here":"value-here" }
```
For example:
```
"space_annotations": { "myprovider.com/send-alerts-to-email":"me@mycompany.com" }
```


- `instance_name`

Version: 2.15
Expand Down Expand Up @@ -261,6 +295,23 @@ Cloud Foundry API call:
}
```

- `instance_annotations`

Version: 2.15

The [annotations](http://v3-apidocs.cloudfoundry.org/version/3.69.0/index.html#metadata) attached to the Service Instance.
Note that the annotations of a Service Instance in Cloud Foundry MAY be changed.
This OPTIONAL property holds an object with the annotations key/value pairs. If present, this property MUST be an object, with one or more properties as follows:

```
"instance_annotations": { "prefix-here.org/name-here":"value-here" }
```
For example:
```
"instance_annotations": { "myprovider.com/send-alerts-to-email":"me@mycompany.com" }
```


### Kubernetes Context Object

*`platform` Property Value*: `kubernetes`
Expand All @@ -283,6 +334,39 @@ The following properties are defined for usage within a Kubernetes deployment:
"namespace": "testing"
```

- `namespace_annotations`

Version: 2.15

The [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) attached to the namespace in which the Service Instance will be visible.
Note that the annotations of a namespace in Kubernetes MAY be changed.
This OPTIONAL property holds an object with the annotations key/value pairs. If present, this property MUST be an object, with one or more properties as follows:

```
"namespace_annotations": { "prefix-here.org/name-here":"value-here" }
```
For example:
```
"namespace_annotations": { "myprovider.com/send-alerts-to-email":"me@mycompany.com" }
```

- `instance_annotations`

Version: 2.15

The [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) attached to the Service Instance.
Note that the annotations of a Service Instance in Kubernetes MAY be changed.
This OPTIONAL property holds an object with the annotations key/value pairs. If present, this property MUST be an object, with one or more properties as follows:

```
"instance_annotations": { "prefix-here.org/name-here":"value-here" }
```
For example:
```
"instance_annotations": { "myprovider.com/send-alerts-to-email":"me@mycompany.com" }
```



- `clusterid`

Expand Down Expand Up @@ -350,6 +434,25 @@ deployment:
"space_guid": "15823972-c216-4ba5-9f3f-e75b0b891297"
```

- `app_annotations`

Version: 2.15
gberche-orange marked this conversation as resolved.
Show resolved Hide resolved

The [annotations](http://v3-apidocs.cloudfoundry.org/version/3.69.0/index.html#metadata) attached to the application that a Service Binding is associated with.
Note that the annotations of an application in Cloud Foundry MAY be changed.
This OPTIONAL property holds an object with the annotations key/value pairs. If present, this property MUST be an object, with one or more properties as follows:
gberche-orange marked this conversation as resolved.
Show resolved Hide resolved

```
"app_annotations": { "prefix-here.org/name-here":"value-here" }
```
For example:
```
"app_annotations": { "myprovider.com/send-alerts-to-email":"me@mycompany.com" }
```




The following example shows a `bind_resource` object that might appear as part
of a Cloud Foundry API call:
```
Expand Down