Refactoring of tests due to kafka refactoring

HVVES

Historically hvves is relying on hardcoded config parameters retrieved from the robot configmap.

This test could not work anymore with Kafka evolutions.

In fact the kafka credentials will be created at installation and available in a secret. As a consequence, they cannot be harcoded in the test.



Current processing

Future processing

The hvves test is launched as follows:

So the evolution of the use case could be done according to the following procedure:

  1. add an ansible task to retrieve the secret and decode it to create 2 var dmaap_login and dmaap_pwd – need to know the secret name..


  2. The secret that is created by strimzi for hv-ves to use will be {{ include "common.release" . }}-dcae-hv-ves-kafka-user 

    apiVersion: v1 data: password: cXNUbGNQR3dsSEtG sasl.jaas.config: b3JnLmFwYWNoZS5rYWZrYS5jb21tb24uc2VjdXJpdHkuc2NyYW0uU2NyYW1Mb2dpbk1vZHVsZSByZXF1aXJlZCB1c2VybmFtZT0ib25hcC1kY2FlLWh2LXZlcy1rYWZrYS11c2VyIiBwYXNzd29yZD0icXNUbGNQR3dsSEtGIjs= kind: Secret metadata: creationTimestamp: "2022-03-04T13:13:54Z" labels: app.kubernetes.io/instance: onap-dcae-hv-ves-kafka-user app.kubernetes.io/managed-by: strimzi-user-operator app.kubernetes.io/name: strimzi-user-operator app.kubernetes.io/part-of: strimzi-onap-dcae-hv-ves-kafka-user strimzi.io/cluster: onap-strimzi strimzi.io/kind: KafkaUser name: onap-dcae-hv-ves-kafka-user namespace: onap ownerReferences: - apiVersion: kafka.strimzi.io/v1beta2 blockOwnerDeletion: false controller: false kind: KafkaUser name: onap-dcae-hv-ves-kafka-user uid: 7d9bc95f-7696-4c85-8971-8a47c35f4463 resourceVersion: "26371408" selfLink: /api/v1/namespaces/onap/secrets/onap-dcae-hv-ves-kafka-user uid: b184566a-d5c1-48f7-9642-42d94376c586

    Can we just reuse this one or should we create a dedicated user for robot to use?

    Another potential issue we have is the bootstrap service name will be:

    onap-strimzi-kafka-bootstrap:9092

    Strimzi prefixes the svc name with the release and cannot be over ridden. How can we handle this?

    Currently these are also passed from the robot_props file

    GLOBAL_DMAAP_KAFKA_SERVER_NAME = '{{include "robot.ingress.svchost" (dict "root" . "hostname" "message-router-kafka") }}'
    GLOBAL_DMAAP_KAFKA_SERVER_PORT = '{{include "robot.ingress.port" (dict "root" . "hostname" "message-router-kafka" "port" 9092) }}'



    https://gitlab.com/Orange-OpenSource/lfn/onap/xtesting-onap/-/blob/master/roles/xtesting-healthcheck/tasks/prepare.yaml

  3. Improve the manifest file to give these variables to the test: https://gitlab.com/Orange-OpenSource/lfn/onap/xtesting-onap/-/blob/master/roles/xtesting-healthcheck/defaults/main.yaml

    I think it would be best to remove any reference to dmaap when referring to kafka

  - name: GLOBAL_DMAAP_KAFKA_JAAS_USERNAME

value: "{{ dmaap_login }}"

- name: GLOBAL_DMAAP_KAFKA_JAAS_PASSWORD

value: "{{ dmaap_pwd }}"

  1. Cleanup the OOM config file (remove GLOBAL_DMAAP_KAFKA_JAAS_USERNAME and GLOBAL_DMAAP_KAFKA_JAAS_PASSWORD)

It should be transparent for the test...