Skip to content

Commit 3c536f7

Browse files
committed
Support post gen edpm kustomize scripts
This patch introduces a mechanism to run an arbitrary script on the `edpm_deploy_prep` target after the `kustomization.yaml` file has been created by the `gen-edpm-kustomize.sh` script. This provides a flexible mechanism to modify things in the kustomization that are not currently possible. An example is to use a different ansible host for deployment than the IP that will be used as the `ctlplane` network IP. The variable used to define the location of the script is `EDPM_POST_GEN_SCRIPT`. Example of usage: ``` $ make edpm_deploy \ DATAPLANE_POST_GEN_SCRIPT="$(realpath ./scripts/change-ansible-hosts.sh)" ``` And the contents of `change-ansible-hosts.sh` are: ``` sed -i "s/value: 192.168.122.100/value: 192.168.1.13/" kustomization.yaml ```
1 parent f137573 commit 3c536f7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ edpm_deploy_prep: export BRANCH=${OPENSTACK_BRANCH}
832832
edpm_deploy_prep: export HASH=${OPENSTACK_COMMIT_HASH}
833833
edpm_deploy_prep: export EDPM_TLS_ENABLED=${DATAPLANE_TLS_ENABLED}
834834
edpm_deploy_prep: export EDPM_NOVA_NFS_PATH=${DATAPLANE_NOVA_NFS_PATH}
835+
edpm_deploy_prep: export EDPM_POST_GEN_SCRIPT=${DATAPLANE_POST_GEN_SCRIPT}
835836
ifeq ($(NETWORK_BGP), true)
836837
ifeq ($(BGP_OVN_ROUTING), true)
837838
edpm_deploy_prep: export BGP=ovn

scripts/gen-edpm-kustomize.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,8 @@ fi
222222

223223
kustomization_add_resources
224224

225+
if [ -n "${EDPM_POST_GEN_SCRIPT}" ]; then
226+
. "${EDPM_POST_GEN_SCRIPT}"
227+
fi
228+
225229
popd

0 commit comments

Comments
 (0)