forked from openebs/openebs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add snapshot controller to helm (openebs#1646)
* sample yaml to creaet snap and clone for percona pvc Signed-off-by: kmova <kiran.mova@openebs.io> * rename snapshot controller to operator Signed-off-by: kmova <kiran.mova@openebs.io> * add snapshot operator yaml files Signed-off-by: kmova <kiran.mova@openebs.io> * Incorporate review comments and update version tags Signed-off-by: kmova <kiran.mova@openebs.io> * Update the tags to 0.6.0-RC4 Signed-off-by: kmova <kiran.mova@openebs.io> * Update readme with 0.6.0-RC4 Signed-off-by: kmova <kiran.mova@openebs.io> * Update with 0.6.0-RC5 tags Signed-off-by: kmova <kiran.mova@openebs.io> * Update with 0.6 Signed-off-by: kmova <kiran.mova@openebs.io>
- Loading branch information
Showing
10 changed files
with
193 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
k8s/charts/openebs/templates/deployment-maya-snapshot-operator.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
apiVersion: apps/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "openebs.fullname" . }}-snapshot-operator | ||
labels: | ||
app: {{ template "openebs.name" . }} | ||
chart: {{ template "openebs.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
component: snapshot-operator | ||
spec: | ||
replicas: {{ .Values.snapshotOperator.replicas }} | ||
strategy: | ||
type: {{ .Values.snapshotOperator.upgradeStrategy }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "openebs.name" . }} | ||
release: {{ .Release.Name }} | ||
component: snapshot-operator | ||
spec: | ||
serviceAccountName: {{ template "openebs.serviceAccountName" . }} | ||
containers: | ||
- name: {{ template "openebs.name" . }}-snapshot-controller | ||
image: "{{ .Values.snapshotOperator.controller.image }}:{{ .Values.snapshotOperator.controller.imageTag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
# OPENEBS_IO_K8S_MASTER enables openebs snapshot controller to connect to K8s | ||
# based on this address. This is ignored if empty. | ||
# This is supported for openebs snapshot controller version 0.6-RC1 onwards | ||
#- name: OPENEBS_IO_K8S_MASTER | ||
# value: "http://10.128.0.12:8080" | ||
# OPENEBS_IO_KUBE_CONFIG enables openebs snapshot controller to connect to K8s | ||
# based on this config. This is ignored if empty. | ||
# This is supported for openebs snapshot controller version 0.6-RC1 onwards | ||
#- name: OPENEBS_IO_KUBE_CONFIG | ||
# value: "/home/ubuntu/.kube/config" | ||
# OPENEBS_NAMESPACE is the namespace that this snapshot controller will | ||
# lookup to find maya api service | ||
- name: OPENEBS_NAMESPACE | ||
value: "{{ .Release.Namespace }}" | ||
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
# OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name, | ||
# that snapshot controller should forward the volume snapshot requests. | ||
# If not present, "maya-apiserver-service" will be used for lookup. | ||
# This is supported for openebs snapshot controller version 0.6-RC1 onwards | ||
- name: OPENEBS_MAYA_SERVICE_NAME | ||
value: "{{ template "openebs.fullname" . }}-apiservice" | ||
- name: {{ template "openebs.name" . }}-snapshot-provisioner | ||
image: "{{ .Values.snapshotOperator.provisioner.image }}:{{ .Values.snapshotOperator.provisioner.imageTag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
# OPENEBS_IO_K8S_MASTER enables openebs snapshot provisioner to connect to K8s | ||
# based on this address. This is ignored if empty. | ||
# This is supported for openebs snapshot provisioner version 0.6-RC1 onwards | ||
#- name: OPENEBS_IO_K8S_MASTER | ||
# value: "http://10.128.0.12:8080" | ||
# OPENEBS_IO_KUBE_CONFIG enables openebs snapshot provisioner to connect to K8s | ||
# based on this config. This is ignored if empty. | ||
# This is supported for openebs snapshot provisioner version 0.6-RC1 onwards | ||
#- name: OPENEBS_IO_KUBE_CONFIG | ||
# value: "/home/ubuntu/.kube/config" | ||
# OPENEBS_NAMESPACE is the namespace that this snapshot provisioner will | ||
# lookup to find maya api service | ||
- name: OPENEBS_NAMESPACE | ||
value: "{{ .Release.Namespace }}" | ||
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
# OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name, | ||
# that snapshot provisioner should forward the volume snapshot PV requests. | ||
# If not present, "maya-apiserver-service" will be used for lookup. | ||
# This is supported for openebs snapshot provisioner version 0.6-RC1 onwards | ||
- name: OPENEBS_MAYA_SERVICE_NAME | ||
value: "{{ template "openebs.fullname" . }}-apiservice" | ||
{{- if .Values.snapshotOperator.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml .Values.snapshotOperator.nodeSelector | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.snapshotOperator.tolerations }} | ||
tolerations: | ||
{{ toYaml .Values.snapshotOperator.tolerations | indent 8 }} | ||
{{- end }} | ||
{{- if .Values.snapshotOperator.affinity }} | ||
tolerations: | ||
{{ toYaml .Values.snapshotOperator.affinity | indent 8 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Define a storage classes supported by OpenEBS | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: openebs-snapshot-promoter | ||
labels: | ||
app: {{ template "openebs.name" . }} | ||
chart: {{ template "openebs.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
provisioner: volumesnapshot.external-storage.k8s.io/snapshot-promoter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: volumesnapshot.external-storage.k8s.io/v1 | ||
kind: VolumeSnapshot | ||
metadata: | ||
name: snapshot-demo | ||
namespace: default | ||
spec: | ||
persistentVolumeClaimName: demo-vol1-claim |
13 changes: 13 additions & 0 deletions
13
k8s/demo/percona/percona-openebs-deployment-promote-snap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: demo-snap-vol-claim | ||
namespace: default | ||
annotations: | ||
snapshot.alpha.kubernetes.io/snapshot: snapshot-demo | ||
spec: | ||
storageClassName: openebs-snapshot-promoter | ||
accessModes: [ "ReadWriteOnce" ] | ||
resources: | ||
requests: | ||
storage: 5Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters