ceph-csi/internal/util
Humble Chirammal b49bf4b987 rbd: parse migration secret and set it for controller server operations
This commit adds a couple of helper functions to parse the migration
request secret and set it for further csi driver operations.

More details:

The intree secret has a data field called "key" which is the base64
admin secret key. The ceph CSI driver currently expect the secret to
contain data field "UserKey" for the equivalant. The CSI driver also
expect the "UserID" field which is not available in the in-tree secret
by deafult. This missing userID will be filled (if the username differ
than 'admin') in the migration secret as 'adminId' field in the
migration request, this commit adds the logic to parse this migration
secret as below:

"key" field value will be picked up from the migraion secret to "UserKey"
field.
"adminId" field value will be picked up from the migration secret to "UserID"
field

if `adminId` field is nil or not set, `UserID` field will be filled with
default value ie `admin`.The above logic get activated only when the secret
is a migration secret, otherwise skipped to the normal workflow as we have
today.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-10-27 18:35:00 +00:00
..
k8s util: NewK8sClient() should not panic on non-Kubernetes clusters 2021-09-02 11:22:14 +00:00
log util: add gzip helper function 2021-09-16 13:55:15 +00:00
cephcmds.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
cephconf.go util: create ceph configuration files if not present 2021-09-03 14:14:43 +00:00
cluster_mapping_test.go rbd: check for clusterid mapping in RegenerateJournal() 2021-08-31 14:30:06 +00:00
cluster_mapping.go rbd: check for clusterid mapping in RegenerateJournal() 2021-08-31 14:30:06 +00:00
conn_pool_test.go cleanup: modifies the error caused due to merged PRs 2021-07-22 18:15:48 +00:00
conn_pool.go util: read ceph.conf by calling conn.ReadConfigFile(CephConfigPath) 2021-09-07 16:50:12 +00:00
connection.go rbd: copy creds when copying the connection 2021-08-09 07:28:43 +00:00
credentials.go rbd: parse migration secret and set it for controller server operations 2021-10-27 18:35:00 +00:00
crypto_test.go cleanup: move KMS functionality into its own package 2021-08-30 16:31:40 +00:00
crypto.go cleanup: move KMS functionality into its own package 2021-08-30 16:31:40 +00:00
cryptsetup.go rbd: add support to expand encrypted volume 2021-07-23 10:00:23 +00:00
csiconfig_test.go rbd: use clusterID from volumeContext at nodestage 2021-10-11 10:06:30 +00:00
csiconfig.go rbd: use clusterID from volumeContext at nodestage 2021-10-11 10:06:30 +00:00
errors_test.go cleanup: addresses paralleltest linter 2021-06-25 11:55:12 +00:00
errors.go rbd: fill clusterID if its a migration nodestage request 2021-09-20 09:54:54 +00:00
httpserver.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
idlocker_test.go util: remove deleteLock test as it is enforced by the controller 2021-07-22 15:07:49 +00:00
idlocker.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
pidlimit_test.go cleanup: resolves gofumpt issues of internal codes 2021-07-14 19:50:56 +00:00
pidlimit.go util: getCgroupPidsFile produces striped path when extra : present 2021-08-03 06:03:10 +00:00
stripsecrets.go cleanup: resolve nlreturn linter issues 2021-07-22 06:05:01 +00:00
topology_test.go cleanup: resolve nlreturn linter issues 2021-07-22 06:05:01 +00:00
topology.go util: NewK8sClient() should not panic on non-Kubernetes clusters 2021-09-02 11:22:14 +00:00
util_test.go cleanup: resolves gofumpt issues of internal codes 2021-07-14 19:50:56 +00:00
util.go cleanup: move KMS functionality into its own package 2021-08-30 16:31:40 +00:00
validate.go cleanup: resolve nlreturn linter issues 2021-07-22 06:05:01 +00:00
volid_test.go cleanup: addresses paralleltest linter 2021-06-25 11:55:12 +00:00
volid.go cleanup: resolves gofumpt issues of internal codes 2021-07-14 19:50:56 +00:00