Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced config map usage with, omaps and volume ID generation #288

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
0d0b224
Added Helm chart for RBD plugin
plnordquist Dec 10, 2018
ccf5f49
Changed version to 0.1
plnordquist Dec 11, 2018
27fa8a2
Merge pull request #108 from plnordquist/rbd-chart
rootfs Dec 12, 2018
0f9c906
rbd: refuse to create block volumes
pohly Dec 5, 2018
12e6881
cm metadata persist for rbd and cephfs
Dec 19, 2018
8ee6bc4
added vendors
Dec 19, 2018
1497bfe
modified cephfs deployment
Dec 19, 2018
51485ff
gofmt
Dec 19, 2018
65a50f2
edit cephfs docs
Dec 19, 2018
95f35c7
remove useless comment
Dec 19, 2018
f2fa690
add POD_NAMESPACE doc
Dec 20, 2018
a0f923f
make k8s_configmap default metadatastorage for k8s deployments
Jan 7, 2019
101b15e
Merge pull request #113 from mickymiek/metadata-cm
rootfs Jan 7, 2019
36c5100
Added docs for deploying rbd driver with Helm
plnordquist Jan 7, 2019
2ed1126
Merge pull request #114 from plnordquist/rbd-chart-docs
rootfs Jan 7, 2019
60ea2b2
fix rbac rules for configmaps
Jan 8, 2019
a099834
Merge pull request #116 from mickymiek/rbac-cm-issue
rootfs Jan 8, 2019
3170ec4
Merge pull request #110 from pohly/block-volume-mode-check
gman0 Jan 9, 2019
1a6ee71
added snapshotter yamls, doc
Jan 9, 2019
7a063be
add hyperlink to snapshotter yamls
Jan 9, 2019
87dd362
Merge pull request #118 from mickymiek/add-snapshotter-yamls
rootfs Jan 9, 2019
a0600d2
fix cache persistent default
rootfs Jan 9, 2019
c029072
Merge pull request #120 from rootfs/dev
rootfs Jan 9, 2019
0459c94
fix cache persistent default for cephfs
rootfs Jan 9, 2019
52cf4aa
Merge pull request #121 from rootfs/dev
gman0 Jan 9, 2019
dda983e
use dep ensure -vendor-only
Madhu-1 Jan 15, 2019
227dec6
Fix golint issues
Madhu-1 Jan 15, 2019
b10ba18
vendor cleanup: remove unused,non-go and test files
Madhu-1 Jan 15, 2019
7b5b977
Merge pull request #124 from Madhu-1/fix-eff
rootfs Jan 15, 2019
07d26e6
Merge pull request #125 from Madhu-1/update-toml
rootfs Jan 15, 2019
2f1317f
Merge pull request #126 from Madhu-1/dep-vendor
rootfs Jan 15, 2019
8e0e184
update Make clean
Madhu-1 Jan 16, 2019
2888640
update readme and correct linter errors.
humblec Jan 16, 2019
2f0595a
Remove unwanted else block and add comments about some exported funct…
humblec Jan 16, 2019
8f4f42d
reject block volume creation in cephfs
Madhu-1 Jan 16, 2019
cf38555
Merge pull request #127 from humblec/clean
rootfs Jan 16, 2019
c7c682b
Merge pull request #129 from Madhu-1/update-make
rootfs Jan 16, 2019
07dbea7
Merge pull request #130 from Madhu-1/fix-block
rootfs Jan 16, 2019
b9a9840
Merge pull request #128 from humblec/readme
rootfs Jan 17, 2019
f9b009b
add mergify as a merge engine
leseb Jan 31, 2019
8baae02
Merge pull request #155 from ceph/add-mergify
rootfs Jan 31, 2019
3b6d4fa
add support matrix
rootfs Feb 4, 2019
3ef6776
Update issue templates
rootfs Feb 5, 2019
38ca446
Update issue templates
rootfs Feb 5, 2019
2dec412
Chart repository
kfox1111 Feb 6, 2019
1585c0d
Update wrong repo name
kfox1111 Feb 6, 2019
13e030a
Use rbd subdirectory
kfox1111 Feb 6, 2019
902d57f
Fix package check. Remove extra files.
kfox1111 Feb 6, 2019
409eda5
Merge pull request #176 from kfox1111/fixes
rootfs Feb 6, 2019
35c021d
Revert release script
kfox1111 Feb 6, 2019
1d7c1ef
Merge pull request #177 from kfox1111/fixes
rootfs Feb 6, 2019
20b4554
Update README.md
rootfs Feb 11, 2019
8cf1b24
Update deploy-rbd.md
shtripat Feb 13, 2019
020ad61
Update deploy-cephfs.md
shtripat Feb 13, 2019
6faaf8b
Remove requirement for ceph config and keyring files
rollandf Feb 19, 2019
75d212e
Merge pull request #212 from rollandf/doc
gman0 Feb 19, 2019
3b74bff
Add RBD block example
rollandf Feb 25, 2019
ea5d9df
Fix driver name as per CSI spec
Madhu-1 Mar 14, 2019
76a647d
Merge pull request #262 from Madhu-1/fix-driver-name
Madhu-1 Mar 18, 2019
a5d2abb
Merge branch 'master' into csi-v1.0
Madhu-1 Apr 2, 2019
891daa9
Replaces the references to the Kubernete Authors with the Ceph-CSI au…
wilmardo Apr 3, 2019
426bf67
Merge pull request #297 from Madhu-1/master
mergify[bot] Apr 3, 2019
3ef11e0
deploy attacher sidecar in rbd provisioner sts
Madhu-1 Mar 27, 2019
5c600a1
update rbd helm chats to deploy attacher as sidecar container in prov…
Madhu-1 Mar 27, 2019
72d1520
update readme to deploy attacher as a sidecar continer in provisioner…
Madhu-1 Mar 27, 2019
168468a
deploy cssi-attacher as sidecar container in provisioner
Madhu-1 Mar 27, 2019
94f7ac3
update cephfs helm template to deploy attacher sidecar container in p…
Madhu-1 Mar 27, 2019
88bb36a
remove controller publish and unpublish call
Madhu-1 Mar 27, 2019
54d52bb
update attacher endpoint
Madhu-1 Mar 28, 2019
c6b4e47
add if condition for attacher
Madhu-1 Apr 2, 2019
e4d830a
remove extra node rules in provisioner
Madhu-1 Apr 2, 2019
3767375
Add csidriver CRD
Madhu-1 Apr 3, 2019
849de00
updated helm chat version
Madhu-1 Apr 4, 2019
a4ea40c
add go-report card and travis status
Madhu-1 Apr 4, 2019
776cb3c
Default to 2 approvals for a patch to get in.
humblec Apr 4, 2019
1bc39ab
Merge pull request #300 from wilmardo/fixes-272
Madhu-1 Apr 4, 2019
ac9b656
Merge pull request #306 from Madhu-1/update-rep
leseb Apr 4, 2019
4b0ffda
Merge pull request #290 from Madhu-1/fix-att
Madhu-1 Apr 5, 2019
885da4d
Replaced config map usage with, omaps and volume ID generation
ShyamsundarR Mar 26, 2019
da455ee
Addressed initial set of review comments
ShyamsundarR Apr 4, 2019
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
2 changes: 1 addition & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pull_request_rules:
- name: automatic merge
conditions:
- label!=DNM
- '#approved-reviews-by>=1'
- '#approved-reviews-by>=2'
- 'status-success=continuous-integration/travis-ci/pr'
actions:
merge:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 The Kubernetes Authors.
# Copyright 2018 The Ceph-CSI Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Ceph CSI 1.0.0

[![Go Report
Card](https://goreportcard.com/badge/github.com/ceph/ceph-csi)](https://goreportcard.com/report/github.com/ceph/ceph-csi)
[![Build
Status](https://travis-ci.org/ceph/ceph-csi.svg?branch=master)](https://travis-ci.org/ceph/ceph-csi)

[Container Storage Interface
(CSI)](https://github.com/container-storage-interface/) driver, provisioner,
and attacher for Ceph RBD and CephFS.
Expand Down
2 changes: 1 addition & 1 deletion cmd/cephfs/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2018 The Kubernetes Authors.
Copyright 2018 The Ceph-CSI Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
23 changes: 9 additions & 14 deletions cmd/rbd/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2018 The Kubernetes Authors.
Copyright 2018 The Ceph-CSI Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,13 +26,14 @@ import (
)

var (
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint")
driverName = flag.String("drivername", "rbd.csi.ceph.com", "name of the driver")
nodeID = flag.String("nodeid", "", "node id")
containerized = flag.Bool("containerized", true, "whether run as containerized")
metadataStorage = flag.String("metadatastorage", "", "metadata persistence method [node|k8s_configmap]")
configRoot = flag.String("configroot", "/etc/csi-config", "directory in which CSI specific Ceph"+
endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint")
driverName = flag.String("drivername", "csi-rbdplugin", "name of the driver")
nodeID = flag.String("nodeid", "", "node id")
containerized = flag.Bool("containerized", true, "whether run as containerized")
configRoot = flag.String("configroot", "/etc/csi-config", "directory in which CSI specific Ceph"+
" cluster configurations are present, OR the value \"k8s_objects\" if present as kubernetes secrets")
instanceID = flag.String("instanceid", "", "Unique ID distinguishing this instance of Ceph CSI among other"+
ShyamsundarR marked this conversation as resolved.
Show resolved Hide resolved
" instances, when sharing Ceph clusters across CSI instances for provisioning")
)

func init() {
Expand All @@ -44,21 +45,15 @@ func init() {
}

func main() {

err := util.ValidateDriverName(*driverName)
if err != nil {
klog.Fatalln(err)
}
//update plugin name
rbd.PluginFolder = rbd.PluginFolder + *driverName

cp, err := util.CreatePersistanceStorage(rbd.PluginFolder, *metadataStorage, *driverName)
if err != nil {
os.Exit(1)
}

driver := rbd.NewDriver()
driver.Run(*driverName, *nodeID, *endpoint, *configRoot, *containerized, cp)
driver.Run(*driverName, *nodeID, *endpoint, *configRoot, *instanceID, *containerized)

os.Exit(0)
}
2 changes: 1 addition & 1 deletion deploy/cephfs/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ appVersion: "1.0.0"
description: "Container Storage Interface (CSI) driver,
provisioner, and attacher for Ceph cephfs"
name: ceph-csi-cephfs
version: 0.5.1
version: 0.5.2
keywords:
- ceph
- cephfs
Expand Down
29 changes: 0 additions & 29 deletions deploy/cephfs/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,6 @@ If release name contains chart name it will be used as a full name.
{{- end -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "ceph-csi-cephfs.attacher.fullname" -}}
{{- if .Values.attacher.fullnameOverride -}}
{{- .Values.attacher.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- printf "%s-%s" .Release.Name .Values.attacher.name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s-%s" .Release.Name $name .Values.attacher.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Expand Down Expand Up @@ -85,17 +67,6 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "ceph-csi-cephfs.serviceAccountName.attacher" -}}
{{- if .Values.serviceAccounts.attacher.create -}}
{{ default (include "ceph-csi-cephfs.attacher.fullname" .) .Values.serviceAccounts.attacher.name }}
{{- else -}}
{{ default "default" .Values.serviceAccounts.attacher.name }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
Expand Down
28 changes: 0 additions & 28 deletions deploy/cephfs/helm/templates/attacher-clusterrole.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions deploy/cephfs/helm/templates/attacher-clusterrolebinding.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions deploy/cephfs/helm/templates/attacher-service.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions deploy/cephfs/helm/templates/attacher-serviceaccount.yaml

This file was deleted.

60 changes: 0 additions & 60 deletions deploy/cephfs/helm/templates/attacher-statefulset.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions deploy/cephfs/helm/templates/csidriver-crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
{{ if not .Values.attacher.enabled }}
apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
name: {{ .Values.driverName }}
spec:
attachRequired: false
podInfoOnMount: false
{{ end }}
8 changes: 5 additions & 3 deletions deploy/cephfs/helm/templates/provisioner-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "create", "delete"]
- apiGroups: ["csi.storage.k8s.io"]
resources: ["csinodeinfos"]
verbs: ["get", "list", "watch"]
{{ if .Values.attacher.enabled }}
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update"]
{{ end }}
{{- end -}}
16 changes: 15 additions & 1 deletion deploy/cephfs/helm/templates/provisioner-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ spec:
mountPath: {{ .Values.socketDir }}
resources:
{{ toYaml .Values.provisioner.resources | indent 12 }}
{{ if .Values.attacher.enabled }}
- name: csi-attacher
image: "{{ .Values.attacher.image.repository }}:{{ .Values.attacher.image.tag }}"
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
env:
- name: ADDRESS
value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}"
imagePullPolicy: {{ .Values.attacher.image.pullPolicy }}
volumeMounts:
- name: socket-dir
mountPath: {{ .Values.socketDir }}
{{ end }}
- name: csi-cephfsplugin
securityContext:
privileged: true
Expand Down Expand Up @@ -79,7 +93,7 @@ spec:
#FIXME this seems way too much. Why is it needed at all for this?
- name: host-rootfs
hostPath:
path: /
path: /
{{- if .Values.provisioner.affinity -}}
affinity:
{{ toYaml .Values.provisioner.affinity . | indent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/cephfs/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ volumeDevicesDir: /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices
driverName: cephfs.csi.ceph.com
attacher:
name: attacher

enabled: true
replicaCount: 1

image:
Expand Down
38 changes: 0 additions & 38 deletions deploy/cephfs/kubernetes/csi-attacher-rbac.yaml

This file was deleted.

Loading