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
9 changes: 7 additions & 2 deletions ci-operator/populate-secrets-from-bitwarden.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ update_secret generic "ci-pull-credentials" --type=kubernetes.io/dockerconfigjso
target_cloud="aws"
update_secret generic "cluster-secrets-${target_cloud}" \
"$( format_attachment "quay.io" pull-secret )" \
"$( format_attachment "insights-ci-account" insights-live.yaml )" \
"$( format_attachment "jenkins-ci-iam" .awscred )" \
"$( format_attachment "jenkins-ci-iam" ssh-privatekey )" \
"$( format_attachment "mirror.openshift.com" cert-key.pem ops-mirror.pem )" \
Expand All @@ -203,6 +204,7 @@ update_secret generic "cluster-secrets-${target_cloud}"
target_cloud="gcp"
update_secret generic "cluster-secrets-${target_cloud}" \
"$( format_attachment "quay.io" pull-secret )" \
"$( format_attachment "insights-ci-account" insights-live.yaml )" \
"$( format_attachment "jenkins-ci-provisioner" credentials.json gce.json )" \
"$( format_attachment "jenkins-ci-provisioner" ssh-privatekey )" \
"$( format_attachment "jenkins-ci-provisioner" ssh-publickey )" \
Expand All @@ -213,12 +215,14 @@ target_cloud="openstack"
update_secret generic "cluster-secrets-${target_cloud}" \
--from-literal=pull-secret="$(merge_pull_secrets)" \
"$( format_attachment "openstack" clouds.yaml )" \
"$( format_attachment "insights-ci-account" insights-live.yaml )" \
"$( format_attachment "jenkins-ci-provisioner" ssh-privatekey )" \
"$( format_attachment "jenkins-ci-provisioner" ssh-publickey )"

target_cloud="vsphere"
update_secret generic "cluster-secrets-${target_cloud}" \
"$( format_attachment "quay.io" pull-secret )" \
"$( format_attachment "insights-ci-account" insights-live.yaml )" \
"$( format_attachment "jenkins-ci-iam" .awscred )" \
"$( format_attachment "jenkins-ci-iam" ssh-privatekey )" \
"$( format_attachment "jenkins-ci-iam" ssh-publickey )" \
Expand All @@ -227,6 +231,7 @@ update_secret generic "cluster-secrets-${target_cloud}" \
target_cloud="metal"
update_secret generic "cluster-secrets-${target_cloud}" \
"$( format_attachment "quay.io" pull-secret )" \
"$( format_attachment "insights-ci-account" insights-live.yaml )" \
"$( format_attachment "jenkins-ci-iam" .awscred )" \
"$( format_attachment "jenkins-ci-iam" ssh-privatekey )" \
"$( format_attachment "jenkins-ci-iam" ssh-publickey )" \
Expand All @@ -246,5 +251,5 @@ update_secret generic "sentry-dsn" "$( format_field_value "sentry" "ci-operator"

# Configuration for the .git-credentials used by the release controller to clone
# private repositories to generate changelogs
oc -n "ci-release" create secret generic "git-credentials" "--from-literal=.git-credentials=https://openshift-bot:$( field_value "openshift-bot" "GitHub OAuth Token" "oauth" )@github.com"
oc -n "ci-release" label secret "git-credentials" "ci.openshift.io/managed=true"
oc -n "ci-release" create secret generic "git-credentials" "--from-literal=.git-credentials=https://openshift-bot:$( field_value "openshift-bot" "GitHub OAuth Token" "oauth" )@github.com" --dry-run -o yaml | oc apply -f -
oc -n "ci-release" label secret "git-credentials" "ci.openshift.io/managed=true" --overwrite
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ objects:
break
done

until oc --insecure-skip-tls-verify wait clusterversion/version --for condition=available 2>/dev/null; do
sleep 10 & wait
done
# if the cluster profile included an insights secret, install it to the cluster to
# report support data from the support-operator
if [[ -f /tmp/cluster/insights-live.yaml ]]; then
oc create -f /tmp/cluster/insights-live.yaml || true
fi

# set up cloud-provider-specific env vars
export KUBE_SSH_BASTION="$( oc --insecure-skip-tls-verify get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ objects:
break
done

until oc --insecure-skip-tls-verify wait clusterversion/version --for condition=available 2>/dev/null; do
sleep 10 & wait
done
# if the cluster profile included an insights secret, install it to the cluster to
# report support data from the support-operator
if [[ -f /tmp/cluster/insights-live.yaml ]]; then
oc create -f /tmp/cluster/insights-live.yaml || true
fi

# set up cloud-provider-specific env vars
export KUBE_SSH_BASTION="$( oc --insecure-skip-tls-verify get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ objects:
break
done

until oc --insecure-skip-tls-verify wait clusterversion/version --for condition=available 2>/dev/null; do
sleep 10 & wait
done
# if the cluster profile included an insights secret, install it to the cluster to
# report support data from the support-operator
if [[ -f /tmp/cluster/insights-live.yaml ]]; then
oc create -f /tmp/cluster/insights-live.yaml || true
fi

# set up cloud-provider-specific env vars
export KUBE_SSH_BASTION="$( oc --insecure-skip-tls-verify get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ objects:
break
done

until oc --insecure-skip-tls-verify wait clusterversion/version --for condition=available 2>/dev/null; do
sleep 10 & wait
done
# if the cluster profile included an insights secret, install it to the cluster to
# report support data from the support-operator
if [[ -f /tmp/cluster/insights-live.yaml ]]; then
oc create -f /tmp/cluster/insights-live.yaml || true
fi

# set up env vars
export KUBE_SSH_BASTION="$( oc --insecure-skip-tls-verify get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ objects:
break
done

until oc --insecure-skip-tls-verify wait clusterversion/version --for condition=available 2>/dev/null; do
sleep 10 & wait
done
# if the cluster profile included an insights secret, install it to the cluster to
# report support data from the support-operator
if [[ -f /tmp/cluster/insights-live.yaml ]]; then
oc create -f /tmp/cluster/insights-live.yaml || true
fi

# set up cloud-provider-specific env vars
export KUBE_SSH_BASTION="$( oc --insecure-skip-tls-verify get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@ objects:
break
done

# if the cluster profile included an insights secret, install it to the cluster to
# report support data from the support-operator
if [[ -f /tmp/cluster/insights-live.yaml ]]; then
oc create -f /tmp/cluster/insights-live.yaml || true
fi

# set up cloud-provider-specific env vars
export KUBE_SSH_BASTION="$( oc --insecure-skip-tls-verify get node -l node-role.kubernetes.io/master -o 'jsonpath={.items[0].status.addresses[?(@.type=="ExternalIP")].address}' ):22"
export KUBE_SSH_KEY_PATH=/tmp/cluster/ssh-privatekey
Expand Down