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:
Praveen M
2023-11-22 19:59:25 +05:30
committed by mergify[bot]
parent 7e262515a8
commit 878eef803e
22 changed files with 181 additions and 18 deletions

View File

@ -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

View File

@ -5,4 +5,4 @@ metadata:
name: "{{ .Name }}"
data:
config.json: |-
[]
{{ .ClusterInfo }}

View File

@ -7,3 +7,4 @@ spec:
attachRequired: false
podInfoOnMount: false
fsGroupPolicy: File
seLinuxMount: true