service

package
v2.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Overview

Copyright (c) 2019-2025 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019-2026 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019-2025 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019-2025 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2019-2026 Dell Inc, or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	MaxRetries                    = 10
	RetrySleepTime                = 1000 * time.Millisecond
	AccessZoneParam               = "AccessZone"
	ExportPathParam               = "Path"
	IsiPathParam                  = "IsiPath"
	IsiVolumePathPermissionsParam = "IsiVolumePathPermissions"
	AzServiceIPParam              = "AzServiceIP"
	AzNetwork                     = "AzNetwork"
	RootClientEnabledParam        = "RootClientEnabled"
	RootClientEnabledParamDefault = "false"
	DeleteSnapshotMarker          = "DELETE_SNAPSHOT"
	IgnoreDotAndDotDotSubDirs     = 2
	ClusterNameParam              = "ClusterName"
	SoftLimitParam                = "SoftLimit"
	SoftLimitParamDefault         = ""
	AdvisoryLimitParam            = "AdvisoryLimit"
	AdvisoryLimitParamDefault     = ""
	SoftGracePrdParam             = "SoftGracePrd"
	SoftGracePrdParamDefault      = ""

	// Parameters to set quota limit from pvc
	PVCSoftLimitParam     = "pvcSoftLimit"
	PVCAdvisoryLimitParam = "pvcAdvisoryLimit"
	PVCSoftGracePrdParam  = "pvcSoftGracePrd"
	// KeyCSIPVCName represents key for csi pvc name
	KeyCSIPVCName = "csi.storage.k8s.io/pvc/name"
	// KeyReplicationEnabled represents key for replication enabled
	KeyReplicationEnabled = "isReplicationEnabled"

	// KeyReplicationVGPrefix represents key for replication vg prefix
	KeyReplicationVGPrefix = "volumeGroupPrefix"
	// KeyReplicationRemoteSystem represents key for replication remote system
	KeyReplicationRemoteSystem = "remoteSystem"
	// KeyReplicationRemoteAccessZone represents key for replication remote access zone
	KeyReplicationRemoteAccessZone = "remoteAccessZone"
	// KeyReplicationRemoteAccessZoneNetwork represents key for replication remote access zone network
	KeyReplicationRemoteAccessZoneNetwork = "remoteAzNetwork"
	// KeyReplicationRemoteAzServiceIP represents key for replication remote AzServiceIP
	KeyReplicationRemoteAzServiceIP = "remoteAzServiceIP"
	// KeyReplicationRemoteRootClientEnabled represents key for replication remote root client enabled
	KeyReplicationRemoteRootClientEnabled = "remoteRootClientEnabled"
	// KeyReplicationIgnoreNamespaces represents key for replication ignore namespaces
	KeyReplicationIgnoreNamespaces = "ignoreNamespaces"
	// KeyCSIPVCNamespace represents key for csi pvc namespace
	KeyCSIPVCNamespace = "csi.storage.k8s.io/pvc/namespace"
	// KeyReplicationRPO represents key for replication RPO
	KeyReplicationRPO         = "rpo"
	RpoFiveMinutes    RPOEnum = "Five_Minutes"
	RpoFifteenMinutes RPOEnum = "Fifteen_Minutes"
	RpoThirtyMinutes  RPOEnum = "Thirty_Minutes"
	RpoOneHour        RPOEnum = "One_Hour"
	RpoSixHours       RPOEnum = "Six_Hours"
	RpoTwelveHours    RPOEnum = "Twelve_Hours"
	RpoOneDay         RPOEnum = "One_Day"
)

constants

View Source
const (
	PolicySchedulingManual    = ""
	PolicySchedulingAutomatic = "when-source-modified"
	WritesEnabled             = "writes_enabled"
	WritesDisabled            = "writes_disabled"
	ResyncPolicyCreated       = "resync_policy_created"
)

constants for ease of understanding

Variables

View Source
var (
	GetHTTPNewRequestWithContext = http.NewRequestWithContext
	GetIoReadAll                 = io.ReadAll
)
View Source
var (

	// DriverConfigParamsFile is the name of the input driver config params file
	DriverConfigParamsFile string

	// Update when the manifest version changes.
	ManifestSemver string

	Manifest = map[string]string{
		"semver": ManifestSemver,
		"formed": core.CommitTime.Format(time.RFC1123),
	}
)
View Source
var MarshalSyncMapToJSON = func(m *sync.Map) ([]byte, error) {
	tmpMap := make(map[string]ArrayConnectivityStatus)
	m.Range(func(k, v interface{}) bool {

		if status, ok := v.(ArrayConnectivityStatus); ok {
			tmpMap[k.(string)] = status
		}
		return true
	})
	log.Debugf("map value is %+v", tmpMap)
	return json.Marshal(tmpMap)
}

MarshalSyncMapToJSON marshal the sync Map to Json

Functions

func GetMessageWithReqID

func GetMessageWithReqID(ReqID string, format string, args ...interface{}) string

GetMessageWithReqID returns message with reqID information

func LogMap

func LogMap(ctx context.Context, mapName string, m map[string]string)

LogMap logs the key-value entries of a given map

Types

type ArrayConnectivityStatus

type ArrayConnectivityStatus struct {
	LastSuccess int64 `json:"lastSuccess"` // connectivity status
	LastAttempt int64 `json:"lastAttempt"` // last timestamp attempted to check connectivity
}

ArrayConnectivityStatus Status of the array probe

type IsilonClusterConfig

type IsilonClusterConfig struct {
	ClusterName   string `yaml:"clusterName"`
	Endpoint      string `yaml:"endpoint"`
	EndpointPort  string `yaml:"endpointPort,omitempty"`
	MountEndpoint string `yaml:"mountEndpoint,omitempty"` // This field is used to retain the orignal Endpoint after CSM-Authorization has been injected
	EndpointURL   string

	User                      string `yaml:"username"`
	Password                  string `yaml:"password"`
	SkipCertificateValidation *bool  `yaml:"skipCertificateValidation,omitempty"`
	IsiPath                   string `yaml:"isiPath,omitempty"`
	IsiVolumePathPermissions  string `yaml:"isiVolumePathPermissions,omitempty"`
	IsDefault                 *bool  `yaml:"isDefault,omitempty"`
	ReplicationCertificateID  string `yaml:"replicationCertificateID,omitempty"`
	IgnoreUnresolvableHosts   *bool  `yaml:"ignoreUnresolvableHosts,omitempty"`
	// contains filtered or unexported fields
}

IsilonClusterConfig To hold config details of a isilon cluster

func (IsilonClusterConfig) String

func (s IsilonClusterConfig) String() string

To display the IsilonClusterConfig of a cluster

type IsilonClusters

type IsilonClusters struct {
	IsilonClusters []IsilonClusterConfig `yaml:"isilonClusters"`
}

IsilonClusters To unmarshal secret.yaml file

type Opts

type Opts struct {
	Port                      string
	AccessZone                string
	Path                      string
	IsiVolumePathPermissions  string
	SkipCertificateValidation bool
	AutoProbe                 bool
	QuotaEnabled              bool
	Verbose                   uint
	CustomTopologyEnabled     bool
	KubeConfigPath            string

	MaxVolumesPerNode int64

	IsHealthMonitorEnabled  bool
	IgnoreUnresolvableHosts bool
	// contains filtered or unexported fields
}

Opts defines service configuration options.

type RPOEnum

type RPOEnum string

RPOEnum represents valid rpo values

func (RPOEnum) IsValid

func (rpo RPOEnum) IsValid() error

IsValid - checks valid RPO

func (RPOEnum) ToInt

func (rpo RPOEnum) ToInt() (int, error)

ToInt - converts to seconds

type Service

type Service interface {
	csi.ControllerServer
	csi.IdentityServer
	csi.NodeServer
	BeforeServe(context.Context, *gocsi.StoragePlugin, net.Listener) error
	RegisterAdditionalServers(server *grpc.Server)
}

Service is the CSI service provider.

func New

func New() Service

New returns a new Service.

Directories

Path Synopsis
mock
k8s

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL