Documentation ¶
Index ¶
- Constants
- func CleanupOssfsCredentialSecret(ctx context.Context, clientset kubernetes.Interface, node, volumeId string) error
- func GetArn(provider, accountId, roleName string) (oidcProviderArn, roleArn string)
- func GetOIDCProvider(clusterId string) string
- func NewConnectorMounter(inner mountutils.Interface, mounterPath string) mountutils.Interface
- func SetupOssfsCredentialSecret(ctx context.Context, clientset kubernetes.Interface, ...) error
- func SplitMountOptions(s string) []string
- func ValidateAnnotations(annotations map[string]string) error
- func ValidateAnnotationsSize(annotations map[string]string) error
- func ValidateKey(k string) error
- func ValidateLabelValue(k, v string) error
- func ValidateLabels(labels map[string]string) error
- type AuthConfig
- type ConnectorMounter
- type ContainerizedFuseMounter
- type ContainerizedFuseMounterFactory
- type FuseContainerConfig
- type FuseMounterType
- type RrsaConfig
Constants ¶
const ( FuseTypeLabelKey = "csi.alibabacloud.com/fuse-type" FuseVolumeIdLabelKey = "csi.alibabacloud.com/volume-id" FuseMountPathHashLabelKey = "csi.alibabacloud.com/mount-path-hash" FuseMountPathAnnoKey = "csi.alibabacloud.com/mount-path" FuseSafeToEvictAnnoKey = "cluster-autoscaler.kubernetes.io/safe-to-evict" )
const ( AuthTypeSTS = "sts" AuthTypeRRSA = "rrsa" AuthTypeCSS = "csi-secret-store" )
const ( OssfsCredentialSecretName = "csi-ossfs-credentials" OssfsDefMimeTypesFilePath = "/etc/mime.types" OssfsCsiMimeTypesFilePath = "/etc/csi-mime.types" CsiSecretStoreDriver = "secrets-store.csi.k8s.io" SecretProviderClassKey = "secretProviderClass" )
const TotalAnnotationSizeLimitB int = 128 * (1 << 10) // 128 kB
https://github.com/kubernetes/kubernetes/blob/b5ba7bc4f5f49760c821cae2f152a8000922e72e/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go#L36 TotalAnnotationSizeLimitB only takes 128 kB here, and the rest is reserved for the default annotations.
Variables ¶
This section is empty.
Functions ¶
func GetOIDCProvider ¶ added in v1.4.0
GetOIDCProvider get OIDC provider from env or ACK clusterId for RRSA
func NewConnectorMounter ¶
func NewConnectorMounter(inner mountutils.Interface, mounterPath string) mountutils.Interface
func SplitMountOptions ¶
func ValidateAnnotations ¶ added in v1.4.0
Copy from https://github.com/kubernetes/kubernetes/blob/b5ba7bc4f5f49760c821cae2f152a8000922e72e/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go#L43 ValidateAnnotations validates that a set of annotations are correctly defined.
func ValidateAnnotationsSize ¶ added in v1.4.0
func ValidateKey ¶ added in v1.4.0
func ValidateLabelValue ¶ added in v1.4.0
func ValidateLabels ¶ added in v1.4.0
Copy from https://github.com/kubernetes/kubernetes/blob/b5ba7bc4f5f49760c821cae2f152a8000922e72e/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go#L105 ValidateLabels validates that a set of labels are correctly defined.
Types ¶
type AuthConfig ¶ added in v1.4.0
type AuthConfig struct { AuthType string // for RRSA RrsaConfig *RrsaConfig // for csi-secret-store SecretProviderClassName string }
type ConnectorMounter ¶
type ConnectorMounter struct { mountutils.Interface // contains filtered or unexported fields }
type ContainerizedFuseMounter ¶
type ContainerizedFuseMounter struct { FuseMounterType mountutils.Interface // contains filtered or unexported fields }
func (*ContainerizedFuseMounter) Unmount ¶
func (mounter *ContainerizedFuseMounter) Unmount(target string) error
type ContainerizedFuseMounterFactory ¶
type ContainerizedFuseMounterFactory struct {
// contains filtered or unexported fields
}
func NewContainerizedFuseMounterFactory ¶
func NewContainerizedFuseMounterFactory( fuseType FuseMounterType, client kubernetes.Interface, nodeName string, ) *ContainerizedFuseMounterFactory
func (*ContainerizedFuseMounterFactory) NewFuseMounter ¶
func (fac *ContainerizedFuseMounterFactory) NewFuseMounter( ctx context.Context, volumeId string, authCfg *AuthConfig, atomic bool) *ContainerizedFuseMounter
NewFuseMounter creates a mounter for the volume id. When atomic is true, mount operations are responsible for cleaning up inflight fuse pods in case a timeout error occurs. This implies that mount operations will either succeed when the fuse pod is ready, or fail and ensure that no fuse pods are left behind.
type FuseContainerConfig ¶
type FuseMounterType ¶
type FuseMounterType interface {
// contains filtered or unexported methods
}
func NewFuseOssfs ¶
func NewFuseOssfs(configmap *corev1.ConfigMap, m metadata.MetadataProvider) FuseMounterType