Skip to content

[WORKBENCH] Reading license from secret not working properly #383

@TheisFerre

Description

@TheisFerre

I am trying to read the license from a secret object created in Kubernetes. However, i am not able to succesfully do so (my rstudio container does not start)

The following config for the license is being used:

license:
  # -- key is the license to use
  key: "" 
  # -- server is the <hostname>:<port> for a license server
  server: false
  # -- the file section is used for licensing with a license file
  file:
    # -- contents is an in-line license file
    contents: false
    # -- mountPath is the place the license file will be mounted into the container
    mountPath: "/etc/rstudio-licensing"
    # -- mountSubPath is whether to mount the subPath for the file secret.
    # -- It can be preferable _not_ to enable this, because then updates propagate automatically
    mountSubPath: false
    # -- secretKey is the key for the secret to use for the license file
    secretKey: "license"
    # -- secret is an existing secret with a license file in it
    secret: "rsw-license-key"

I have ensured that my secret exists and contains the license as i expect by running k get secret rsw-license-key --template {{.data.license}} | base64 -d.

I see the following when reading the logs:

+ /usr/lib/rstudio-server/bin/license-manager activate-file /etc/rstudio-licensing/license
{"result":40,"action":"reading license file","message":"The file specified does not appear to be an RStudio license file."}
+ deactivate
== Exiting ==
+ echo '== Exiting =='
+ rstudio-server stop
Deactivating license ...
+ echo 'Deactivating license ...'
+ is_deactivated=0

If i put in the license directly in my helm chart under the license.key value, i can succesfully deploy Workbench.

Can you please help me solve this - maybe by an example of how i read the license from a secret.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions