aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-08-17 07:21:28 +0000
committerGerrit Code Review <review@openstack.org>2023-08-17 07:21:28 +0000
commita34f1cd7e627493174e68c5d36c90e9a283f8fef (patch)
tree24ceb48dd3ba75468c56f94a585162d484ce123a /tools
parent01a911b27d53d449f5a45d781fb83a5294ce319f (diff)
parentd9451f49f36f6851f2d10cc2abe31e3fdfd84ab6 (diff)
downloadkolla-ansible-a34f1cd7e627493174e68c5d36c90e9a283f8fef.tar.gz
kolla-ansible-a34f1cd7e627493174e68c5d36c90e9a283f8fef.zip
Merge "Add support for checking Octavia cert expiration"
Diffstat (limited to 'tools')
-rwxr-xr-xtools/kolla-ansible12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index f9cb791d0..1bf6d8fbd 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -197,6 +197,7 @@ Commands:
stop Stop Kolla containers
certificates Generate self-signed certificate for TLS *For Development Only*
octavia-certificates Generate certificates for octavia deployment
+ --check-expiry <days> to check if certificates expire within that many days
upgrade Upgrades existing OpenStack Environment
upgrade-bifrost Upgrades an existing bifrost container
genconfig Generate configuration files for enabled OpenStack services
@@ -263,7 +264,7 @@ function version {
check_environment_coherence
SHORT_OPTS="hi:p:t:k:e:CD:v"
-LONG_OPTS="help,version,inventory:,playbook:,skip-tags:,tags:,key:,extra:,check,diff,verbose,configdir:,passwords:,limit:,forks:,vault-id:,ask-vault-pass,vault-password-file:,yes-i-really-really-mean-it,include-images,include-dev:,full,incremental"
+LONG_OPTS="help,version,inventory:,playbook:,skip-tags:,tags:,key:,extra:,check,diff,verbose,configdir:,passwords:,limit:,forks:,vault-id:,ask-vault-pass,vault-password-file:,yes-i-really-really-mean-it,include-images,include-dev:,full,incremental,check-expiry:"
RAW_ARGS="$*"
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
@@ -281,6 +282,7 @@ DANGER_CONFIRM=
INCLUDE_IMAGES=
INCLUDE_DEV=
BACKUP_TYPE="full"
+OCTAVIA_CERTS_EXPIRY=
# Serial is not recommended and disabled by default. Users can enable it by
# configuring ANSIBLE_SERIAL variable.
ANSIBLE_SERIAL=${ANSIBLE_SERIAL:-0}
@@ -398,6 +400,11 @@ while [ "$#" -gt 0 ]; do
shift 1
;;
+ (--check-expiry)
+ OCTAVIA_CERTS_EXPIRY="$2"
+ shift 2
+ ;;
+
(--version)
version
exit 0
@@ -532,6 +539,9 @@ EOF
(octavia-certificates)
ACTION="Generate octavia Certificates"
PLAYBOOK="${BASEDIR}/ansible/octavia-certificates.yml"
+ if [[ ! -z "${OCTAVIA_CERTS_EXPIRY}" ]]; then
+ EXTRA_OPTS="$EXTRA_OPTS -e octavia_certs_check_expiry=yes -e octavia_certs_expiry_limit=${OCTAVIA_CERTS_EXPIRY}"
+ fi
;;
(genconfig)
ACTION="Generate configuration files for enabled OpenStack services"