Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 0e390fa

Browse files
committed
Add service binding operator helm chart
Signed-off-by: Kartikey Mamgain <[email protected]>
1 parent 9b3a8ec commit 0e390fa

22 files changed

+1381
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: service-binding-operator
3+
description: A Helm chart to deploy service binding operator
4+
type: application
5+
version: 1.0.0
6+
appVersion: "1.0.1"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
This helm chart defines Service Binding Operator. When the chart is installed it will provide the user with the oportunity to provide the image tag for service binding operator. The following are the values that can be customized when the chart is installed:
2+
3+
- PullPolicy
4+
- Tag
5+
- is_openshift
6+
7+
The is_openshift value signifies whether installing the operator on openshift or non openshift cluster. The value is set to true for openshift and false for non openshift.
8+
9+
The chart installation will result in the creation of three Custom Resource Definitions(CRDs) :
10+
- bindablekinds.binding.operators.coreos.com
11+
- servicebindings.binding.operators.coreos.com
12+
- servicebindings.servicebinding.io
13+
The resources required for service binding operator will also be installed. The chart creates a service-binding-operator namespace and installs the required resources in that namespace.
14+
15+
You can check whether the chart is succesfully installed by running the following command
16+
17+
```
18+
kubectl get pods -n service-binding-operator
19+
20+
```
21+
22+
A user can define values for the Tag and PullPolicy. A User can obtain tag from https://github.com/redhat-developer/service-binding-operator/tags to get the desired version of service binding operator. The image tag can be obtained from quay.io/redhat-developer/servicebinding-operator using the tag mentioned above. For example , search quay.io/redhat-developer/servicebinding-operator using 31151ab (release tag of v1.0.1) to obtain image tag 31151ab8. By default the chart points out to the latest version.
23+
24+
Helm test
25+
26+
In order to test the chart the user is expected to create a secret, named my-k-config from his kubeconfig .
27+
28+
kubectl create secret generic my-k-config --from-file=<PATH to your kubeconfig>
29+
30+
Run the helm test using :
31+
helm test <release-name>
32+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.8.0
7+
creationTimestamp: null
8+
name: bindablekinds.binding.operators.coreos.com
9+
spec:
10+
group: binding.operators.coreos.com
11+
names:
12+
kind: BindableKinds
13+
listKind: BindableKindsList
14+
plural: bindablekinds
15+
singular: bindablekinds
16+
scope: Cluster
17+
versions:
18+
- name: v1alpha1
19+
schema:
20+
openAPIV3Schema:
21+
description: BindableKinds is the Schema for the bindablekinds API
22+
properties:
23+
apiVersion:
24+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
25+
type: string
26+
kind:
27+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
28+
type: string
29+
metadata:
30+
type: object
31+
status:
32+
items:
33+
description: BindableKindsStatus defines the observed state of BindableKinds
34+
properties:
35+
group:
36+
type: string
37+
kind:
38+
type: string
39+
version:
40+
type: string
41+
required:
42+
- group
43+
- kind
44+
- version
45+
type: object
46+
type: array
47+
type: object
48+
served: true
49+
storage: true
50+
status:
51+
acceptedNames:
52+
kind: ""
53+
plural: ""
54+
conditions: []
55+
storedVersions: []
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
cert-manager.io/inject-ca-from: service-binding-operator/service-binding-service-cert
7+
controller-gen.kubebuilder.io/version: v0.8.0
8+
name: servicebindings.binding.operators.coreos.com
9+
spec:
10+
group: binding.operators.coreos.com
11+
names:
12+
kind: ServiceBinding
13+
listKind: ServiceBindingList
14+
plural: servicebindings
15+
shortNames:
16+
- sbr
17+
- sbrs
18+
singular: servicebinding
19+
scope: Namespaced
20+
versions:
21+
- additionalPrinterColumns:
22+
- jsonPath: .status.conditions[?(@.type=="Ready")].status
23+
name: Ready
24+
type: string
25+
- jsonPath: .status.conditions[?(@.type=="Ready")].reason
26+
name: Reason
27+
type: string
28+
- jsonPath: .metadata.creationTimestamp
29+
name: Age
30+
type: date
31+
name: v1alpha1
32+
schema:
33+
openAPIV3Schema:
34+
properties:
35+
apiVersion:
36+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
37+
type: string
38+
kind:
39+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
40+
type: string
41+
metadata:
42+
type: object
43+
spec:
44+
description: ServiceBindingSpec defines the desired state of ServiceBinding.
45+
properties:
46+
application:
47+
description: Application identifies the application connecting to the backing service.
48+
properties:
49+
bindingPath:
50+
description: BindingPath refers to the paths in the application workload's schema where the binding workload would be referenced. If BindingPath is not specified, then the default path locations are used. The default location for ContainersPath is "spec.template.spec.containers". If SecretPath is not specified, then the name of the secret object does not need to be specified.
51+
properties:
52+
containersPath:
53+
description: ContainersPath defines the path to the corev1.Containers reference. If BindingPath is not specified, the default location is "spec.template.spec.containers".
54+
type: string
55+
secretPath:
56+
description: 'SecretPath defines the path to a string field where the name of the secret object is going to be assigned. Note: The name of the secret object is same as that of the name of service binding custom resource (metadata.name).'
57+
type: string
58+
type: object
59+
group:
60+
description: Group of the referent.
61+
type: string
62+
kind:
63+
description: Kind of the referent.
64+
type: string
65+
labelSelector:
66+
description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
67+
properties:
68+
matchExpressions:
69+
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
70+
items:
71+
description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
72+
properties:
73+
key:
74+
description: key is the label key that the selector applies to.
75+
type: string
76+
operator:
77+
description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
78+
type: string
79+
values:
80+
description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
81+
items:
82+
type: string
83+
type: array
84+
required:
85+
- key
86+
- operator
87+
type: object
88+
type: array
89+
matchLabels:
90+
additionalProperties:
91+
type: string
92+
description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
93+
type: object
94+
type: object
95+
name:
96+
description: Name of the referent.
97+
type: string
98+
resource:
99+
description: Resource of the referent.
100+
type: string
101+
version:
102+
description: Version of the referent.
103+
type: string
104+
required:
105+
- group
106+
- version
107+
type: object
108+
bindAsFiles:
109+
default: true
110+
description: BindAsFiles makes the binding values available as files in the application's container. By default, values are mounted under the path "/bindings"; this can be changed by setting the SERVICE_BINDING_ROOT environment variable.
111+
type: boolean
112+
detectBindingResources:
113+
description: DetectBindingResources is a flag that, when set to true, will cause SBO to search for binding information in the owned resources of the specified services. If this binding information exists, then the application is bound to these subresources.
114+
type: boolean
115+
mappings:
116+
description: Mappings specifies custom mappings.
117+
items:
118+
description: ServiceBindingMapping defines a new binding from a set of existing bindings.
119+
properties:
120+
name:
121+
description: Name is the name of new binding.
122+
type: string
123+
value:
124+
description: Value specificies a go template that will be rendered and injected into the application.
125+
type: string
126+
required:
127+
- name
128+
- value
129+
type: object
130+
type: array
131+
name:
132+
description: Name is the name of the service as projected into the workload container. Defaults to .metadata.name.
133+
maxLength: 253
134+
pattern: ^[a-z0-9\-\.]*$
135+
type: string
136+
namingStrategy:
137+
description: 'NamingStrategy defines custom string template for preparing binding names. It can be set to pre-defined strategies: `none`, `lowercase`, or `uppercase`. Otherwise, it is treated as a custom go template, and it is handled accordingly.'
138+
type: string
139+
services:
140+
description: Services indicates the backing services to be connected to by an application. At least one service must be specified.
141+
items:
142+
description: Service defines the selector based on resource name, version, and resource kind.
143+
properties:
144+
group:
145+
description: Group of the referent.
146+
type: string
147+
id:
148+
type: string
149+
kind:
150+
description: Kind of the referent.
151+
type: string
152+
name:
153+
description: Name of the referent.
154+
type: string
155+
namespace:
156+
description: Namespace of the referent. If unspecified, assumes the same namespace as ServiceBinding.
157+
type: string
158+
resource:
159+
description: Resource of the referent.
160+
type: string
161+
version:
162+
description: Version of the referent.
163+
type: string
164+
required:
165+
- group
166+
- version
167+
type: object
168+
minItems: 1
169+
type: array
170+
required:
171+
- application
172+
- services
173+
type: object
174+
status:
175+
description: ServiceBindingStatus defines the observed state of ServiceBinding.
176+
properties:
177+
conditions:
178+
description: Conditions describes the state of the operator's reconciliation functionality.
179+
items:
180+
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
181+
properties:
182+
lastTransitionTime:
183+
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
184+
format: date-time
185+
type: string
186+
message:
187+
description: message is a human readable message indicating details about the transition. This may be an empty string.
188+
maxLength: 32768
189+
type: string
190+
observedGeneration:
191+
description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
192+
format: int64
193+
minimum: 0
194+
type: integer
195+
reason:
196+
description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
197+
maxLength: 1024
198+
minLength: 1
199+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
200+
type: string
201+
status:
202+
description: status of the condition, one of True, False, Unknown.
203+
enum:
204+
- "True"
205+
- "False"
206+
- Unknown
207+
type: string
208+
type:
209+
description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
210+
maxLength: 316
211+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
212+
type: string
213+
required:
214+
- lastTransitionTime
215+
- message
216+
- reason
217+
- status
218+
- type
219+
type: object
220+
type: array
221+
x-kubernetes-list-map-keys:
222+
- type
223+
x-kubernetes-list-type: map
224+
secret:
225+
description: Secret indicates the name of the binding secret.
226+
type: string
227+
required:
228+
- secret
229+
type: object
230+
required:
231+
- spec
232+
type: object
233+
served: true
234+
storage: true
235+
subresources:
236+
status: {}
237+
status:
238+
acceptedNames:
239+
kind: ""
240+
plural: ""
241+
conditions: []
242+
storedVersions: []

0 commit comments

Comments
 (0)