Skip to content

Commit c00666a

Browse files
authored
Feature: add a Helm Chart (#79)
Create helm chart Co-authored-by: Denis GERMAIN <dgermain@deezer.com>
1 parent a109e7b commit c00666a

14 files changed

+768
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ or
8484
$ kubectl apply -f deployments/kubernetes/v1.21.0
8585
```
8686

87+
#### From the helm chart
88+
89+
You can also use the available Helm chart. Configure the values.yaml file in `deployments/kubernetes/helm` with your own values, then run:
90+
91+
```console
92+
$ helm install clever-operator -n clever-operator --create-namespace -f values.yaml .
93+
```
94+
8795
### From dockerhub
8896

8997
The docker image will be provided by the dockerhub account of Clever-Cloud and you only need to apply the deployment
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: clever-operator
3+
description: A kubernetes operator that expose clever cloud's resources through custom resource definition
4+
type: application
5+
version: 0.1.0
6+
appVersion: "0.5.0"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
You can now deploy add-ons on Clever Cloud by creating CRDs in Kubernetes.
2+
3+
apiVersion: api.clever-cloud.com/v1
4+
kind: MySql
5+
metadata:
6+
namespace: default
7+
name: mysql
8+
spec:
9+
organisation: orga_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
10+
options:
11+
version: 80
12+
encryption: false
13+
instance:
14+
region: par
15+
plan: dev
16+
17+
See https://github.com/CleverCloud/clever-operator/blob/main/docs/40-custom-resources.md for more information and configuration options
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{/*
2+
Define the cleveroperator.namespace template if set with forceNamespace or .Release.Namespace is set
3+
*/}}
4+
{{- define "cleveroperator.namespace" -}}
5+
{{- if .Values.forceNamespace -}}
6+
{{ printf "namespace: %s" .Values.forceNamespace }}
7+
{{- else -}}
8+
{{ printf "namespace: %s" .Release.Namespace }}
9+
{{- end -}}
10+
{{- end -}}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
labels:
6+
app: clever-operator
7+
name: system:clever-operator
8+
rules:
9+
- apiGroups:
10+
- ""
11+
resources:
12+
- secrets
13+
- events
14+
verbs:
15+
- get
16+
- list
17+
- watch
18+
- create
19+
- update
20+
- patch
21+
- delete
22+
- apiGroups:
23+
- api.clever-cloud.com
24+
resources:
25+
- pulsars
26+
- pulsars/status
27+
- mysqls
28+
- mysqls/status
29+
- postgresqls
30+
- postgresqls/status
31+
- redis
32+
- redis/status
33+
- mongodbs
34+
- mongodbs/status
35+
verbs:
36+
- get
37+
- list
38+
- watch
39+
- create
40+
- update
41+
- patch
42+
- delete
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRoleBinding
4+
metadata:
5+
labels:
6+
app: clever-operator
7+
name: system:clever-operator
8+
roleRef:
9+
apiGroup: rbac.authorization.k8s.io
10+
kind: ClusterRole
11+
name: system:clever-operator
12+
subjects:
13+
- kind: ServiceAccount
14+
name: clever-operator
15+
{{ include "cleveroperator.namespace" . | indent 2 }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
{{ include "cleveroperator.namespace" . | indent 2 }}
6+
name: clever-operator-configuration
7+
data:
8+
config.toml: |
9+
[api]
10+
token = "{{ .Values.config.token }}"
11+
secret = "{{ .Values.config.secret }}"
12+
consumerKey = "{{ .Values.config.consumerKey }}"
13+
consumerSecret = "{{ .Values.config.consumerSecret }}"

0 commit comments

Comments
 (0)