Can we populate the parameter which is file type with string?


in our deployment we use SSL certficates, which user uploads it through UI. to make a single click deployment we want to upload the SSl certs at the beginning. our deployment is in AWS, where we are managing replicated config through configmap. below is the example:

below is the parameter which we have in replicated settings:

  • name: certs
    title: TLS Configuration
    when: advance_settings=1
    • name: tls-private-key-file
      title: Private Key
      value: private key
      name: ssl_cert
      value_at: 0
      type: file
      affix: left
    • name: tls-certificate-file
      title: Certificate
      value: certificate file
      required: true
      name: ssl_cert
      value_at: 1
      type: file
      affix: right

if we populate above field with string, would that work?

What do you mean by populating a file with string? Are you trying to set a parameter with replicatedctl app-config set?

Generally a good way to do this is by using replicatedctl app-config export to get formatting, and then replicatedctl app-config import to set the desired params on a new installation.

yes, we are using app-config export only. if in app-config we use below:

“tls-private-key-file”: { value: “CONTENT_OF_KEY_FILE_AS_STRING”}

would this work?

not exactly - instead, you’d have something like this:

    "setting-name": {
        "value": "filename.txt",
        "data": "base64-encoded-file-contents"