-
-
Save ralvares/f498ccc70e823af94501d8982c5c5bc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOCKER_CONFIG_JSON=`oc extract secret/pull-secret -n openshift-config --to=-` | |
oc create secret generic multiclusterhub-operator-pull-secret \ | |
-n open-cluster-management-observability \ | |
--from-literal=.dockerconfigjson="$DOCKER_CONFIG_JSON" \ | |
--type=kubernetes.io/dockerconfigjson | |
ACCESS_KEY="" | |
SECRET_KEY="" | |
while [[ z$ACCESS_KEY == z ]]; do | |
echo "Wait for acm-observability bucket to be created, sleep 3 seconds" | |
sleep 3 | |
ACCESS_KEY=$(oc get secret acm-observability -n open-cluster-management-observability --template={{.data.AWS_ACCESS_KEY_ID}} | base64 -d) | |
SECRET_KEY=$(oc get secret acm-observability -n open-cluster-management-observability --template={{.data.AWS_SECRET_ACCESS_KEY}} | base64 -d) | |
done; | |
BUCKET_NAME=$(oc get ObjectBucketClaim acm-observability -n open-cluster-management-observability --template={{.spec.bucketName}}) | |
oc get secret thanos-object-storage -n open-cluster-management-observability | |
echo "--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: thanos-object-storage | |
namespace: open-cluster-management-observability | |
type: Opaque | |
stringData: | |
thanos.yaml: | | |
type: s3 | |
config: | |
bucket: $BUCKET_NAME | |
endpoint: s3.openshift-storage.svc | |
insecure: true | |
access_key: $ACCESS_KEY | |
secret_key: $SECRET_KEY" | oc create -f - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment