@@ -35,11 +35,11 @@ cat <<EOF | oc apply -f -
35
35
apiVersion: objectbucket.io/v1alpha1
36
36
kind: ObjectBucketClaim
37
37
metadata:
38
- name: rgwtest
38
+ name: rgwbucket
39
39
namespace: openshift-storage <1>
40
40
spec:
41
41
storageClassName: ocs-storagecluster-ceph-rgw
42
- generateBucketName: rgwtest
42
+ generateBucketName: rgwbucket
43
43
EOF
44
44
----
45
45
<1> Alternatively, you can use the `openshift-image-registry` namespace.
48
48
+
49
49
[source,terminal]
50
50
----
51
- $ bucket_name=$(oc get obc -n openshift-storage rgwtest -o jsonpath='{.spec.bucketName}' )
51
+ $ bucket_name=$(oc get obc -n openshift-storage rgwbucket -o jsonpath='{.spec.bucketName}' )
52
52
----
53
53
54
54
. Get the AWS credentials by entering the following commands:
55
55
+
56
56
[source,terminal]
57
57
----
58
- $ AWS_ACCESS_KEY_ID=$(oc get secret -n openshift-storage rgwtest -o yaml | grep -w "AWS_ACCESS_KEY_ID:" | head -n1 | awk '{print $2 }' | base64 -- decode)
58
+ $ AWS_ACCESS_KEY_ID=$(oc get secret -n openshift-storage rgwbucket -o jsonpath= '{.data.AWS_ACCESS_KEY_ID }' | base64 -- decode)
59
59
----
60
60
+
61
61
[source,terminal]
62
62
----
63
- $ AWS_SECRET_ACCESS_KEY=$(oc get secret -n openshift-storage rgwtest -o yaml | grep -w "AWS_SECRET_ACCESS_KEY:" | head -n1 | awk '{print $2 }' | base64 --decode)
63
+ $ AWS_SECRET_ACCESS_KEY=$(oc get secret -n openshift-storage rgwbucket -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY }' | base64 --decode)
64
64
----
65
65
66
66
. Create the secret `image-registry-private-configuration-user` with the AWS credentials for the new bucket under `openshift-image-registry project` by entering the following command:
@@ -70,19 +70,14 @@ $ AWS_SECRET_ACCESS_KEY=$(oc get secret -n openshift-storage rgwtest -o yaml | g
70
70
$ oc create secret generic image-registry-private-configuration-user -- from-literal=REGISTRY_STORAGE_S3_ACCESSKEY=${AWS_ACCESS_KEY_ID} -- from-literal=REGISTRY_STORAGE_S3_SECRETKEY=${AWS_SECRET_ACCESS_KEY} -- namespace openshift-image-registry
71
71
----
72
72
73
- . Create a encryption route for Ceph RGW by entering the following command:
73
+ . Get the `buckethost` value by entering the following command:
74
74
+
75
75
[source,terminal]
76
76
----
77
- $ oc create route reencrypt < route _name > -- service=rook-ceph-rgw-ocs-storagecluster-cephobjectstore -- port=https - n openshift-storage
77
+ $ route_host=$( oc get objectbucket $bucket_name - n openshift-storage -o=jsonpath= '{.spec.endpoint.bucketHost}' )
78
78
----
79
79
+
80
- .. Get the route host by entering the following command:
81
- +
82
- [source,terminal]
83
- ----
84
- $ route_host=$(oc get route <route_name> -n openshift-storage -o=jsonpath='{.spec.host}')
85
- ----
80
+
86
81
. Create a config map that uses an ingress certificate by entering the following commands:
87
82
+
88
83
[source,terminal]
0 commit comments