Configuring the Secrets

To use the Kubernetes secrets in a Flogo app, you must set FLOGO_APP_PROPS_K8S_VOLUME with the volume_path configuration parameter at runtime:

  • The secret key name must match the app property name. For example, if the property is DB_PASS, the secret key name must be DB_PASS. For example:

    echo -n 'flogo123>./DB_PASS.txt
    kubectl create secret generic my-first-secret --from-file=./DB_PASS.txt'

    where DB_PASS.txt contains the password for the database and DB_PASS is set as a property in the Flogo app.

  • If you want to use a hierarchy for your app property, ensure that you use an underscore (_) between each level instead of the dot notation in the name of the secret. For example, for an app property named x.y.z, the name of the secret must be x_y_z.