mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
deploy: API for CSI Config Struct
This commit exposes CSI ConfigMap over an API. This will allow projects like Rook to consume CSI configMap directly from Ceph-CSI. Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
"text/template"
|
||||
|
||||
"github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
"github.com/ghodss/yaml"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
@ -30,11 +31,13 @@ import (
|
||||
var csiConfigMap string
|
||||
|
||||
type CSIConfigMapValues struct {
|
||||
Name string
|
||||
Name string
|
||||
ClusterInfo []kubernetes.ClusterInfo
|
||||
}
|
||||
|
||||
var CSIConfigMapDefaults = CSIConfigMapValues{
|
||||
Name: "ceph-csi-config",
|
||||
Name: "ceph-csi-config",
|
||||
ClusterInfo: []kubernetes.ClusterInfo{},
|
||||
}
|
||||
|
||||
// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces
|
||||
|
@ -5,4 +5,4 @@ metadata:
|
||||
name: "{{ .Name }}"
|
||||
data:
|
||||
config.json: |-
|
||||
[]
|
||||
{{ .ClusterInfo }}
|
||||
|
@ -6,4 +6,5 @@ metadata:
|
||||
spec:
|
||||
attachRequired: true
|
||||
podInfoOnMount: false
|
||||
seLinuxMount: true
|
||||
fsGroupPolicy: File
|
||||
|
Reference in New Issue
Block a user