GoogleCloudPlatform / marketplace-k8s-app-example

Apache License 2.0
24 stars 19 forks source link

Support password generation #48

Closed huyhg closed 6 years ago

huyhg commented 6 years ago
huyhg commented 6 years ago

The password env variables should be defined and used in the same manner as other parameters. Specifically, they would be defined in the schema file and have special annotation:

properties:
  myPassword:
    type: string
    x-googleProperty:
      type: GENERATED_PASSWORD
      generatedPassword:
        length: 10

Because parameters are being passed to the deployer container as mounted volume, the UI can create a Secret (instead of a ConfigMap) containing the generated password values and mount it onto the deployer container. The UI, however, does not need to generate these properties as they are handled by the deployer if not explicitly specified.

On a related note, if the deployer is handling generation of passwords, it makes sense for it to be capable of handling default values.

huyhg commented 6 years ago

@deustis @trironkk @vcanaa @khajduczenia