Skip to content

Commit

Permalink
OCTOPUS-514: update the nfs provisioner to use a supported registry
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
  • Loading branch information
prb112 committed Oct 27, 2023
1 parent 1e76679 commit 03a177d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/7_post/post.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,19 @@ resource "null_resource" "patch_nfs_arch_ppc64le" {
timeout = "${var.connection_timeout}m"
}

# Dev Note: the original nfs-client-provisioner used gcr.io, and should use the supported path see OCTOPUS-514
provisioner "remote-exec" {
inline = [<<EOF
oc patch deployments nfs-client-provisioner -n nfs-provisioner -p '{"spec": {"template": {"spec": {"nodeSelector": {"kubernetes.io/arch": "ppc64le"}}}}}'
if [ $(oc get deployment -n nfs-provisioner -o json | grep -c 'gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0') -eq 1 ]
then
oc patch deployments nfs-client-provisioner -n nfs-provisioner --type "json" -p '[
{"op":"remove","path":"/spec/template/spec/containers/0/image"},
{"op":"add","path":"/spec/template/spec/containers/0/image","value":"registry.k8s.io/sig-storage/nfs-subdir-external-provisioner:v4.0.2"}]'
fi
EOF
]
}
Expand Down

0 comments on commit 03a177d

Please sign in to comment.