Skip to content

Commit

Permalink
Merge pull request #226 from scothis/v1
Browse files Browse the repository at this point in the history
Promote API servicebinding.io/v1beta1 -> v1
  • Loading branch information
scothis authored Mar 12, 2024
2 parents 35e6314 + e920e5a commit 4cc68ab
Show file tree
Hide file tree
Showing 9 changed files with 310 additions and 713 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ rules:

# Service Binding

A Service Binding describes the connection between a [Provisioned Service](#provisioned-service) and a [Workload Projection](#workload-projection). It **MUST** be codified as a concrete resource type with API version `servicebinding.io/v1beta1` and kind `ServiceBinding`. An implementation **MAY** support other versions of this specification which define additional API versions. Multiple `ServiceBinding` objects can refer to the same service. Multiple `ServiceBinding` objects can refer to the same workload. For portability, the schema **MUST** comply to the exemplar CRD found [here][sb-crd].
A Service Binding describes the connection between a [Provisioned Service](#provisioned-service) and a [Workload Projection](#workload-projection). It **MUST** be codified as a concrete resource type with API version `servicebinding.io/v1` and kind `ServiceBinding`. An implementation **MAY** support other versions of this specification which define additional API versions. Multiple `ServiceBinding` objects can refer to the same service. Multiple `ServiceBinding` objects can refer to the same workload. For portability, the schema **MUST** comply to the exemplar CRD found [here][sb-crd].

> Note: Restricting service binding to resources within the same namespace is strongly recommended. Implementations that choose to support cross-namespace service binding must provide a security model that prevents attacks like privilege escalation and secret enumeration, as well as a deterministic way to declare target namespaces.

Expand All @@ -278,7 +278,7 @@ When updating the status of the `ServiceBinding`, the controller **MUST** set th
## Resource Type Schema

```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ServiceBinding
metadata:
name: # string
Expand Down Expand Up @@ -312,7 +312,7 @@ status:
## Minimal Example Resource
```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ServiceBinding
metadata:
name: account-service
Expand All @@ -337,7 +337,7 @@ status:
## Label Selector Example Resource
```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ServiceBinding
metadata:
name: online-banking-frontend-to-account-service
Expand Down Expand Up @@ -366,7 +366,7 @@ status:
## Environment Variables Example Resource
```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ServiceBinding
metadata:
name: account-service
Expand Down Expand Up @@ -428,7 +428,7 @@ When the `.spec.service.kind` attribute is `Secret` and `.spec.service.apiVersio
## Direct Secret Reference Example Resource

```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ServiceBinding
metadata:
name: account-service
Expand All @@ -455,7 +455,7 @@ status:

# Workload Resource Mapping

A workload resource mapping describes how to apply [service binding](#service-binding) transformations to a [workload projection](#workload-projection). It **MUST** be codified as a concrete resource type (cluster scoped resource) with API version `servicebinding.io/v1beta1` and kind `ClusterWorkloadResourceMapping`. An implementation **MAY** support other versions of this specification which define additional API versions. For portability, the schema **MUST** comply to the exemplar CRD found [here][cwrm-crd].
A workload resource mapping describes how to apply [service binding](#service-binding) transformations to a [workload projection](#workload-projection). It **MUST** be codified as a concrete resource type (cluster scoped resource) with API version `servicebinding.io/v1` and kind `ClusterWorkloadResourceMapping`. An implementation **MAY** support other versions of this specification which define additional API versions. For portability, the schema **MUST** comply to the exemplar CRD found [here][cwrm-crd].

A workload resource mapping **MUST** define its name using [CRD syntax][crd-syntax] (`<plural>.<group>`) for the resource that it defines a mapping for. A workload resource mapping **MUST** define a `.spec.versions` which is an array of `MappingTemplate` fragments.

Expand Down Expand Up @@ -499,7 +499,7 @@ All other types and operators are disallowed, including but not limited to:
## Resource Type Schema

```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ClusterWorkloadResourceMapping
metadata:
name: # string
Expand All @@ -520,7 +520,7 @@ spec:
## Example Resource

```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ClusterWorkloadResourceMapping
metadata:
name: cronjobs.batch
Expand All @@ -543,7 +543,7 @@ spec:
## `PodSpec`-able (Default) Example Resource

```yaml
apiVersion: servicebinding.io/v1beta1
apiVersion: servicebinding.io/v1
kind: ClusterWorkloadResourceMapping
metadata:
name: deployments.apps
Expand Down
39 changes: 35 additions & 4 deletions internal/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
module github.com/servicebinding/spec/internal

go 1.14
go 1.21

require (
k8s.io/apimachinery v0.20.0
sigs.k8s.io/controller-runtime v0.7.0
sigs.k8s.io/controller-tools v0.3.0
k8s.io/apimachinery v0.29.1
sigs.k8s.io/controller-runtime v0.17.1
sigs.k8s.io/controller-tools v0.14.0
)

require (
github.com/fatih/color v1.16.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.16.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.29.0 // indirect
k8s.io/apiextensions-apiserver v0.29.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 4cc68ab

Please sign in to comment.