-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added csi
- Loading branch information
Showing
10 changed files
with
171 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% from "kubernetes/csi/map.jinja" import kubernetes with context %} | ||
include: | ||
- kubernetes.csi.{{ kubernetes.csi.provider }} |
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 @@ | ||
{% from "kubernetes/csi/map.jinja" import kubernetes with context %} | ||
# common for longhorn and openebs | ||
iscsi_setup: | ||
pkg.latest: | ||
- pkgs: {{ kubernetes.csi.config.pkgs|tojson }} | ||
service.running: | ||
- name: {{ kubernetes.csi.config.service_name }} | ||
- enable: True | ||
- require: | ||
- pkg: iscsi_setup |
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,17 @@ | ||
{% from "kubernetes/csi/map.jinja" import kubernetes with context %} | ||
helm_longhorn_repo: | ||
helm.repo_managed: | ||
- present: | ||
- name: longhorn | ||
url: https://charts.longhorn.io | ||
csi_longhorn_check_requisites: | ||
cmd.script: | ||
- name: {{ kubernetes.csi.config.check }} | ||
#csi_longhorn_install: | ||
# helm.release_present: | ||
# - name: {{ kubernetes.csi.config.release_name }} | ||
# todo incomplete as giving up on longhorn, now using openebs for local PV |
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,34 @@ | ||
{%- from "kubernetes/map.jinja" import kubernetes as kubernetes_defaults with context %} | ||
|
||
{%- set default_csi_provider = "openebs" %} | ||
|
||
{%- set csi_provider = { | ||
'longhorn': { | ||
'check': "https://raw.githubusercontent.com/longhorn/longhorn/v1.6.0/scripts/environment_check.sh", | ||
'release_name': "longhorn", | ||
'release_namespace': "longhorn-system", | ||
'pkgs': [ "open-iscsi" ], | ||
'daemon': "iscsid" | ||
}, | ||
'openebs': { | ||
'helm': { | ||
'name': "openebs", | ||
'namespace': "openebs", | ||
'version': "3.10.0", | ||
'repo': "openebs", | ||
'chart': "openebs", | ||
'url': "https://openebs.github.io/charts", | ||
}, | ||
'pkgs': [ "open-iscsi", "lvm2" ], | ||
'service_name': "iscsid" | ||
} | ||
} %} | ||
|
||
{%- set kubernetes = salt['grains.filter_by']({ | ||
'default': { | ||
'csi': { | ||
'provider': default_csi_provider, | ||
'config': csi_provider[default_csi_provider] | ||
}, | ||
}, | ||
}, merge=kubernetes_defaults) %} |
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,42 @@ | ||
{% from "kubernetes/csi/map.jinja" import kubernetes with context %} | ||
include: | ||
- kubernetes.csi.iscsi | ||
- os.lvm | ||
# openebs is an umbrella: | ||
# LVM sub-chart: https://github.com/openebs/lvm-localpv/tree/develop/deploy/helm/charts | ||
# LVM prereq: https://github.com/openebs/lvm-localpv | ||
kubernetes_csi_openebs_prepare: | ||
helm.repo_managed: | ||
- present: | ||
- name: {{ kubernetes.csi.config.helm.repo }} | ||
url: {{ kubernetes.csi.config.helm.url }} | ||
{% if 'values' in kubernetes.csi.config.helm %} | ||
file.managed: | ||
- name: /tmp/openebs.yaml | ||
- contents: | | ||
{{ kubernetes.csi.config.helm.values|indent(8) }} | ||
- require_in: | ||
- helm: helm_csi_openebs_release | ||
{%- endif %} | ||
helm_csi_openebs_release: | ||
helm.release_present: | ||
- name: {{ kubernetes.csi.config.helm.name }} | ||
- namespace: {{ kubernetes.csi.config.helm.namespace }} | ||
- chart: {{kubernetes.csi.config.helm.repo}}/{{kubernetes.csi.config.helm.chart}} | ||
- version: {{ kubernetes.csi.config.helm.version }} | ||
{%- if 'values' in kubernetes.csi.config.helm %} | ||
- values: /tmp/openebs.yaml | ||
{%- endif %} | ||
- flags: | ||
- "create-namespace" | ||
- "wait" | ||
- kvflags: | ||
kubeconfig: {{ kubernetes.config.locations|join(':') }} | ||
- require: | ||
- helm: kubernetes_csi_openebs_prepare | ||
- sls: kubernetes.csi.iscsi | ||
- sls: os.lvm |
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 |
---|---|---|
|
@@ -13,3 +13,4 @@ include: | |
- kubernetes.distro.k3s.master | ||
{% endif %} | ||
- kubernetes.cni | ||
- kubernetes.csi |
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