Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ rules:
- get
- list
- watch
- apiGroups:
- objectbucket.io
resources:
- objectbucketclaims
verbs:
- get
- list
- watch
- apiGroups:
- sources.functions.dev
resources:
Expand Down
40 changes: 20 additions & 20 deletions rook-kafka-connection-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,29 @@ oc wait --for=condition=Ready kafkauser/objectbucket-notifications-adapter-user
# --from-literal=user.key="${rgw_kafka_userkey}"

# Patch the cephObjectStores reconcileStrategy to Init so that it allows us adding the additionalVolumeMounts
oc patch storagecluster ocs-storagecluster -n openshift-storage \
--type=merge \
-p '{"spec":{"managedResources":{"cephObjectStores":{"reconcileStrategy":"init"}}}}'
#oc patch storagecluster ocs-storagecluster -n openshift-storage \
# --type=merge \
# -p '{"spec":{"managedResources":{"cephObjectStores":{"reconcileStrategy":"init"}}}}'

echo "Sleeping for 10s to let the StorageCluster update the reconcileStrategy"
sleep 10
#echo "Sleeping for 10s to let the StorageCluster update the reconcileStrategy"
#sleep 10

# Mount the Kafka Secret
cat <<EOF | oc apply -f -
apiVersion: ceph.rook.io/v1
kind: CephObjectStore
metadata:
name: ocs-storagecluster-cephobjectstore
namespace: openshift-storage
spec:
gateway:
additionalVolumeMounts:
- subPath: ${notification_kafka_user}-kafka
volumeSource:
secret:
secretName: ${notification_kafka_user}-kafka
defaultMode: 0644
EOF
#cat <<EOF | oc apply -f -
#apiVersion: ceph.rook.io/v1
#kind: CephObjectStore
#metadata:
# name: ocs-storagecluster-cephobjectstore
# namespace: openshift-storage
#spec:
# gateway:
# additionalVolumeMounts:
# - subPath: ${notification_kafka_user}-kafka
# volumeSource:
# secret:
# secretName: ${notification_kafka_user}-kafka
# defaultMode: 0644
#EOF

#oc delete secret --namespace openshift-storage "${notification_kafka_user}" 2>/dev/null || true
#oc create secret --namespace openshift-storage generic "${notification_kafka_user}" \
Expand Down
Loading