Bug 2055767

Summary: ocs-to-ocs: update key in secret according to health checker
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Subham Rai <srai>
Component: ocs-operatorAssignee: Subham Rai <srai>
Status: CLOSED CURRENTRELEASE QA Contact: suchita <sgatfane>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.10CC: madam, muagarwa, nberry, ocs-bugs, odf-bz-bot, rperiyas, sgatfane, sostapov
Target Milestone: ---   
Target Release: ODF 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.10.0-163 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-21 09:12:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Subham Rai 2022-02-17 15:55:06 UTC
Update key and value in one of the data fields in the secret
according to the health checker, name.

Comment 4 suchita 2022-03-02 15:03:49 UTC
Verified on  ocs-operator.v4.10.0  full_version:"4.10.0-171"
======================================================================================================================
$ oc get csv
NAME                                               DISPLAY                           VERSION           REPLACES                                           PHASE
configure-alertmanager-operator.v0.1.408-a047eaa   configure-alertmanager-operator   0.1.408-a047eaa   configure-alertmanager-operator.v0.1.406-7952da9   Succeeded
mcg-operator.v4.10.0                               NooBaa Operator                   4.10.0                                                               Succeeded
ocs-operator.v4.10.0                               OpenShift Container Storage       4.10.0                                                               Succeeded
odf-operator.v4.10.0                               OpenShift Data Foundation         4.10.0                                                               Succeeded
route-monitor-operator.v0.1.402-706964f            Route Monitor Operator            0.1.402-706964f   route-monitor-operator.v0.1.399-91f142a            Succeeded

$ oc get csv -n openshift-storage -o json ocs-operator.v4.10.0 | jq '.metadata.labels["full_version"]'
"4.10.0-171"

$oc get secret/rook-ceph-mon -o yaml
apiVersion: v1
data:
  ceph-secret: QVFETTBCMWkzbzRRS2hBQU1SOWR5MThleXJNbUdxcXY4SXA1OEE9PQ==
  ceph-username: Y2xpZW50LmFkbWlu
  fsid: MjExNmY5MDctMWUzNy00NTY4LTkxMTUtNWQ3YjdiNDI2ZDEw
  mon-secret: QVFETTBCMWlxbDVUS0JBQVdFOHBpTG1tS01CdkY3bllTaFByS1E9PQ==
kind: Secret
metadata:
  creationTimestamp: "2022-03-01T07:52:44Z"
  finalizers:
  - ceph.rook.io/disaster-protection
  name: rook-ceph-mon
  namespace: openshift-storage
  ownerReferences:
  - apiVersion: ceph.rook.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: CephCluster
    name: ocs-storagecluster-cephcluster
    uid: 7b51fc81-30aa-4581-a614-e4096bde0519
  resourceVersion: "100096"
  uid: 058b755d-2e5c-4a07-830f-64260679d944
type: kubernetes.io/rook
========================================================================
encrypted key and value present in secrete file 
ceph-secret: QVFETTBCMWkzbzRRS2hBQU1SOWR5MThleXJNbUdxcXY4SXA1OEE9PQ==
ceph-username: Y2xpZW50LmFkbWlu

Hence marking this BZ as verified