Change default provisioner name from rawfile.hamravesh.com to rawfile.csi.openebs.io

This commit is contained in:
Mehran Kholdi 2020-08-15 01:24:55 +04:30
parent 13a16e70f6
commit 848d87453f
9 changed files with 17 additions and 8 deletions

View File

@ -3,7 +3,7 @@ StorageClass:
SnapshotClass: SnapshotClass:
FromName: true FromName: true
DriverInfo: DriverInfo:
Name: rawfile.hamravesh.com Name: rawfile.csi.openebs.io
SupportedFsType: SupportedFsType:
ext4: ext4:
btrfs: btrfs:

View File

@ -19,7 +19,7 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass kind: StorageClass
metadata: metadata:
name: my-sc name: my-sc
provisioner: rawfile.hamravesh.com provisioner: rawfile.csi.openebs.io
reclaimPolicy: Delete reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true allowVolumeExpansion: true

View File

@ -1,3 +1,6 @@
PROVISIONER_VERSION = "0.3.0" import os
PROVISIONER_NAME = os.getenv("PROVISIONER_NAME", "rawfile.csi.openebs.io")
PROVISIONER_VERSION = "0.4.0"
DATA_DIR = "/data" DATA_DIR = "/data"
CONFIG = {} CONFIG = {}

View File

@ -2,4 +2,4 @@ apiVersion: v2
name: rawfile-csi name: rawfile-csi
description: RawFile Driver Container Storage Interface description: RawFile Driver Container Storage Interface
type: application type: application
version: 0.3.0 version: 0.4.0

View File

@ -1,7 +1,7 @@
apiVersion: storage.k8s.io/v1beta1 apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver kind: CSIDriver
metadata: metadata:
name: rawfile.hamravesh.com name: {{ .Values.provisionerName }}
spec: spec:
attachRequired: false attachRequired: false
podInfoOnMount: true podInfoOnMount: true

View File

@ -42,6 +42,8 @@ spec:
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}"
imagePullPolicy: {{ .Values.controller.image.pullPolicy }} imagePullPolicy: {{ .Values.controller.image.pullPolicy }}
env: env:
- name: PROVISIONER_NAME
value: "{{ .Values.provisionerName }}"
- name: CSI_ENDPOINT - name: CSI_ENDPOINT
value: unix:///csi/csi.sock value: unix:///csi/csi.sock
- name: IMAGE_REPOSITORY - name: IMAGE_REPOSITORY

View File

@ -60,6 +60,8 @@ spec:
securityContext: securityContext:
privileged: true privileged: true
env: env:
- name: PROVISIONER_NAME
value: "{{ .Values.provisionerName }}"
- name: CSI_ENDPOINT - name: CSI_ENDPOINT
value: unix:///csi/csi.sock value: unix:///csi/csi.sock
- name: IMAGE_REPOSITORY - name: IMAGE_REPOSITORY

View File

@ -1,7 +1,9 @@
provisionerName: "rawfile.csi.openebs.io"
defaults: &defaults defaults: &defaults
image: image:
repository: docker.io/openebs/rawfile-localpv repository: docker.io/openebs/rawfile-localpv
tag: 0.3.0 tag: 0.4.0
pullPolicy: Always pullPolicy: Always
resources: resources:
limits: limits:

View File

@ -4,7 +4,7 @@ import grpc
from google.protobuf.wrappers_pb2 import BoolValue from google.protobuf.wrappers_pb2 import BoolValue
import rawfile_util import rawfile_util
from consts import PROVISIONER_VERSION from consts import PROVISIONER_VERSION, PROVISIONER_NAME
from csi import csi_pb2, csi_pb2_grpc from csi import csi_pb2, csi_pb2_grpc
from declarative import be_mounted, be_unmounted, be_symlink, be_absent from declarative import be_mounted, be_unmounted, be_symlink, be_absent
from metrics import volume_stats from metrics import volume_stats
@ -20,7 +20,7 @@ class RawFileIdentityServicer(csi_pb2_grpc.IdentityServicer):
@log_grpc_request @log_grpc_request
def GetPluginInfo(self, request, context): def GetPluginInfo(self, request, context):
return csi_pb2.GetPluginInfoResponse( return csi_pb2.GetPluginInfoResponse(
name="rawfile.hamravesh.com", vendor_version=PROVISIONER_VERSION name=PROVISIONER_NAME, vendor_version=PROVISIONER_VERSION
) )
@log_grpc_request @log_grpc_request