Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 69 additions & 2 deletions mysql-operator/templates/01-resources.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,70 @@
{{ if .Values.operator.register_crd }}
{{- if .Values.operator.register_crd -}}
{{- if hasPrefix "0.1" .Values.image.tag -}}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: mysqlclusters.mysql.oracle.com
labels:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
spec:
group: mysql.oracle.com
version: v1
scope: Namespaced
names:
kind: MySQLCluster
singular: mysqlcluster
plural: mysqlclusters
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: mysqlbackups.mysql.oracle.com
labels:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
spec:
group: mysql.oracle.com
version: v1
scope: Namespaced
names:
kind: MySQLBackup
singular: mysqlbackup
plural: mysqlbackups
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: mysqlrestores.mysql.oracle.com
labels:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
spec:
group: mysql.oracle.com
version: v1
scope: Namespaced
names:
kind: MySQLRestore
singular: mysqlrestore
plural: mysqlrestores
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: mysqlbackupschedules.mysql.oracle.com
labels:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
spec:
group: mysql.oracle.com
version: v1
scope: Namespaced
names:
kind: MySQLBackupSchedule
singular: mysqlbackupschedule
plural: mysqlbackupschedules
{{- else -}}
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -63,4 +129,5 @@ spec:
kind: BackupSchedule
singular: mysqlbackupschedule
plural: mysqlbackupschedules
{{ end }}
{{- end -}}
{{- end -}}
5 changes: 4 additions & 1 deletion mysql-operator/templates/02-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
namespace: {{ if .Values.operator.global }}default{{ else }}{{ .Values.operator.namespace}}{{ end }}

---
{{- if .Values.rbac.enabled }}
{{- if .Values.rbac.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: {{ if .Values.operator.global }}Cluster{{ end }}Role
metadata:
Expand Down Expand Up @@ -42,6 +42,9 @@ rules:
- ""
resources:
- services
{{- if hasPrefix "0.1" .Values.image.tag }}
- configmaps
{{- end }}
verbs:
- create
- get
Expand Down