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

Commit 0e8de4e

Browse files
committed
Add Service Binding Operator Helm Chart
Signed-off-by: Kartikey Mamgain <[email protected]>
1 parent be7e252 commit 0e8de4e

25 files changed

+1564
-2
lines changed

Dockerfile.sboHelmChart

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM registry.access.redhat.com/ubi8:8.5
2+
3+
ENV SBO_REPO https://github.com/redhat-developer/service-binding-operator
4+
ENV SBO_REPO_COMMIT master
5+
6+
ENV SBO_DIR /tmp/sbo.git
7+
ENV KUBECONFIG_DIR /tmp
8+
ENV KUBECONFIG ${KUBECONFIG_DIR}/kubeconfig
9+
ENV TEST_NAMESPACE default
10+
ENV TEST_ACCEPTANCE_START_SBO remote
11+
12+
RUN yum -y --nodocs install git python3-virtualenv python3 make jq python3-pip && \
13+
yum clean all
14+
RUN pip3 install --upgrade pip
15+
RUN pip3 --no-cache-dir install --upgrade awscli
16+
RUN yum clean all
17+
RUN curl -SL -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz && \
18+
tar -xvf oc.tar.gz && \
19+
chmod +x oc && \
20+
chmod +x kubectl && \
21+
mv -vf oc /usr/bin/oc && \
22+
mv -vf kubectl /usr/bin/kubectl && \
23+
rm -rf oc.tar.gz
24+
25+
WORKDIR ${SBO_DIR}
26+
27+
ENV EXTRA_BEHAVE_ARGS '--tags=@smoke --tags=@spec'
28+
ENV PWD ${SBO_DIR}
29+
30+
COPY test-chart-entrypoint.sh /test-chart-entrypoint.sh
31+
32+
ENTRYPOINT [ "/test-chart-entrypoint.sh" ]
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: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
# Service Binding Operator Helm Chart
3+
4+
This helm chart defines the Service Binding Operator. This provides an option for users to install service binding operators using helm chart.
5+
6+
The chart installation will result in the creation of three Custom Resource Definitions(CRDs):
7+
- bindablekinds.binding.operators.coreos.com
8+
- servicebindings.binding.operators.coreos.com
9+
- servicebindings.servicebinding.io
10+
11+
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.
12+
13+
## Introduction
14+
15+
The following are the values that can be customized when the chart is installed:
16+
17+
- image.pullPolicy
18+
- image.tag
19+
- is_openshift
20+
21+
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.
22+
23+
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.
24+
25+
## Helm Chart Installation
26+
27+
The helm chart installation involves the following steps:
28+
- Add the helm chart repository
29+
- Install the chart
30+
- Helm test
31+
32+
Note: If service binding operator is not installed through OLM, the operator requires that cert-manager is available on the cluster. It can be installed by:
33+
34+
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.0/cert-manager.yaml
35+
36+
### Add the helm chart repository
37+
You need to add our helm repository to your local repository. Name the repository as per your convenience.
38+
39+
```
40+
helm repo add service-binding-operator https://redhat-developer.github.io/service-binding-operator-helm-chart/
41+
```
42+
43+
### Install the helm chart
44+
```
45+
helm install service-binding-operator https://redhat-developer.github.io/service-binding-operator-helm-chart/service-binding-operator
46+
```
47+
You can check whether the chart is succesfully installed by running the following command
48+
49+
```
50+
kubectl get pods -n service-binding-operator
51+
52+
```
53+
54+
### Helm test
55+
56+
In order to test the chart the user is expected to create a secret (specify the namespace if applicable), named my-k-config from his kubeconfig .
57+
58+
NOTE:
59+
In case you are installing the chart on AWS eks cluster then you need to modify the aws-auth configmap.
60+
```
61+
kubectl edit -n kube-system cm/aws-auth
62+
```
63+
Please add -system:masters to mapRoles and save.
64+
After editing the config map you need to update the eks kubeconfig
65+
```
66+
aws eks update-kubeconfig --name <cluster-name>
67+
```
68+
Then Continue with the following steps.
69+
70+
```
71+
kubectl create secret generic my-k-config --from-file=<PATH to your kubeconfig>
72+
```
73+
74+
Run the helm test (specify the namespace if applicable) using :
75+
76+
```
77+
helm test service-binding-operator
78+
```
79+
80+
Please ensure to delete the secret (specify the namespace if applicable) created :
81+
```
82+
kubectl delete secret my-k-config
83+
```
84+
85+
## Additional Help
86+
Please reach out to us for any additional queries by creating an issue on https://github.com/redhat-developer/service-binding-operator/issues.
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: []

0 commit comments

Comments
 (0)