Skip to content

Commit d9709b2

Browse files
committed
[ci] Set values for params that were not defaulted correctly
databaseaccount, rabbitmqInstsance, memcachedInstance, serviceAccount and servicePassword were defaulted to "" when left out from the CR definition. This patch sets the expected values
1 parent b3bb8ab commit d9709b2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

ci/cloudkitty-post_deploy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,25 @@
1313
# The defaulting will not be done in the webhook until CK is added to the openstack-operator.
1414
# If I change the name of the CK, I can just configure using the CK CRD.
1515
# If I don't change the name, and disable it in telemetry, then the telemetry-operator will delete the telemetry telemetry.
16+
# WORKAROUND
17+
# The databaseAccount, databaseInstance, memcachedInstance, rabbitMqClusterName and serviceUser do not set default values
18+
# They should, IINM, since these are also defaulted/set for ceilometer, autoscaling, etc
19+
# The databaseInstance needs to be created..
20+
# The databaseAccount needs to be created...
21+
# I am re-using the existing memcached and rabbitmq instances
22+
# The serviceuser should be cloudkitty, and that needs to be configured/created as well.
23+
# databaseAccount defaults to cloudkitty, according to api/bases/openstack.org_cloudkittyes.yaml
24+
# BUG: cloudkitty.databaseAccount is not defaulting correctly
25+
# databaseInstance defaults to openstack, according to api/bases/openstack.org_cloudkittyes.yaml
26+
# BUG: databaseInstance is not defaulting to the right value
27+
# memcachedInstance is supposed to default to memcached, but does not
28+
# serviceUser is optional
29+
# NOTE: The failure to set the default might be some issue between the Telemetry CR and CloudKitty, since cloudkitty_types.go defines a default for memcachedInstance, rabbitmqInstance, databaseInstance.
30+
# HOWEVER, the fact that they are all optional could be why they are not defaulting when created via telemetry CR
31+
# They are not set to omitEmpty, which is why the empty values are propogating.
32+
# Since the memcached instance is not omitted when empty, CK tries to resolve it and connect.
33+
# The serviceUser should not be omitted when it is unset, since the values is used to create the cloudkitty.conf file.
34+
# BUG: serviceUser value is not being defaulted correctly when it is omitted from the CR: expected "cloudkitty", got "" (same for the other config values mentioned above, all were set to "".
1635
- name: Patch telemetry CR
1736
ansible.builtin.shell:
1837
cmd: |
@@ -34,6 +53,11 @@
3453
containerImage: "{{ cloudkitty_api_image }}"
3554
cloudKittyProc:
3655
containerImage: "{{ cloudkitty_proc_image }}"
56+
databaseAccount: "cloudkitty"
57+
databaseInstance: "openstack"
58+
memcachedInstance: "memcached"
59+
rabbitMqClusterName: "rabbitmq"
60+
serviceUser: "cloudkitty"
3761
EOF
3862
register: output
3963
- name: wait for the update to telemetry

0 commit comments

Comments
 (0)