forked from openshift/release
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openshift#7935 from wking/vsphere-deprovision-deco…
…mposition ci-operator/step-registry/ipi/deprovision/vsphere: Decompose into sub-steps
- Loading branch information
Showing
13 changed files
with
73 additions
and
42 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
approvers: | ||
- abhinavdahiya | ||
- jcpowermac | ||
- patrickdillon |
13 changes: 13 additions & 0 deletions
13
...perator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-commands.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
|
||
cluster_profile=/var/run/secrets/ci.openshift.io/cluster-profile | ||
export AWS_SHARED_CREDENTIALS_FILE=${cluster_profile}/.awscred | ||
|
||
HOSTED_ZONE_ID="$(cat "${SHARED_DIR}/hosted-zone.txt")" | ||
|
||
echo "Deleting Route53 DNS records..." | ||
aws route53 change-resource-record-sets --hosted-zone-id "${HOSTED_ZONE_ID}" --change-batch "file:///${SHARED_DIR}/dns-delete.json" |
10 changes: 10 additions & 0 deletions
10
ci-operator/step-registry/ipi/deprovision/vsphere/dns/ipi-deprovision-vsphere-dns-ref.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ref: | ||
as: ipi-deprovision-vsphere-dns | ||
from: upi-installer | ||
commands: ipi-deprovision-vsphere-dns-commands.sh | ||
resources: | ||
requests: | ||
cpu: 1000m | ||
memory: 100Mi | ||
documentation: >- | ||
Releases DNS records via `${SHARED_DIR}/hosted-zone.txt` and `${SHARED_DIR}/dns-delete.json`. The IP addresses were allocated with the ipi-conf-vsphere-dns step. |
7 changes: 0 additions & 7 deletions
7
ci-operator/step-registry/ipi/deprovision/vsphere/ipi-deprovision-vsphere-chain.yaml
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
ci-operator/step-registry/ipi/deprovision/vsphere/ipi-deprovision-vsphere-commands.sh
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
ci-operator/step-registry/ipi/deprovision/vsphere/ipi-deprovision-vsphere-commands.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../deprovision/ipi-deprovision-deprovision-commands.sh |
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
4 changes: 4 additions & 0 deletions
4
ci-operator/step-registry/ipi/deprovision/vsphere/vips/OWNERS
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
approvers: | ||
- abhinavdahiya | ||
- jcpowermac | ||
- patrickdillon |
19 changes: 19 additions & 0 deletions
19
...rator/step-registry/ipi/deprovision/vsphere/vips/ipi-deprovision-vsphere-vips-commands.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
|
||
cluster_profile=/var/run/secrets/ci.openshift.io/cluster-profile | ||
tfvars_path="${cluster_profile}/secret.auto.tfvars" | ||
cluster_name="${NAMESPACE}-${JOB_NAME_HASH}" | ||
ipam_token=$(grep -oP 'ipam_token="\K[^"]+' "${tfvars_path}") | ||
|
||
export AWS_SHARED_CREDENTIALS_FILE="${cluster_profile}/.awscred" | ||
|
||
# FIXME: should this be using ${SHARED_DIR}/vips.txt ? | ||
echo "Releasing IP addresses from IPAM server..." | ||
for i in {0..2} | ||
do | ||
curl "http://139.178.89.254/api/removeHost.php?apiapp=address&apitoken=${ipam_token}&host=${cluster_name}-$i" | ||
done |
10 changes: 10 additions & 0 deletions
10
ci-operator/step-registry/ipi/deprovision/vsphere/vips/ipi-deprovision-vsphere-vips-ref.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ref: | ||
as: ipi-deprovision-vsphere-vips | ||
from: upi-installer | ||
commands: ipi-deprovision-vsphere-vips-commands.sh | ||
resources: | ||
requests: | ||
cpu: 1000m | ||
memory: 100Mi | ||
documentation: >- | ||
Releases IP addresses from the IPAM server. The IP addresses were allocated with the ipi-conf-vsphere-vips step. |
5 changes: 4 additions & 1 deletion
5
ci-operator/step-registry/ipi/vsphere/post/ipi-vsphere-post-chain.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
chain: | ||
as: ipi-vsphere-post | ||
steps: | ||
- chain: ipi-deprovision | ||
- chain: gather | ||
- ref: ipi-deprovision-vsphere | ||
- ref: ipi-deprovision-vsphere-vips | ||
- ref: ipi-deprovision-vsphere-dns | ||
documentation: |- | ||
The IPI cleanup step contains all steps that deprovision an OpenShift | ||
cluster on vSphere, provisioned by the `ipi-vsphere-pre` chain. |