apiVersion: v1
kind: Secret
metadata:
  name: backend
data:
  REPLICATED_API_TOKEN: '{{repl ConfigOption "api_token" | Base64Encode }}'
  REPLICATED_APP: '{{repl ConfigOption "app_id" | Base64Encode}}'
  REPLICATED_CHANNEL_ID: '{{repl ConfigOption "channel_id" | Base64Encode }}'

  SIGNUP_UI_TITLE: '{{repl ConfigOption "title" | Base64Encode }}'
  SIGNUP_INTRO_MARKDOWN: '{{repl ConfigOption "intro_markdown" | Base64Encode}}'
  SIGNUP_INSTALL_MARKDOWN: '{{repl ConfigOption "install_markdown" | Base64Encode}}'

  SIGNUP_DEFAULT_TRIAL_LENGTH_DAYS: '{{repl ConfigOption "trial_duration"}}'
  SIGNUP_DEFAULT_EXPIRATION_POLICY: '{{repl ConfigOption "expiration_policy"}}'
  SIGNUP_DEFAULT_CLUSTER_ENABLED: '{{repl if (ConfigOptionEquals "enable_clustering" "1") }}{{repl Base64Encode "1"}}{{repl end}}'
  SIGNUP_DEFAULT_REQUIRE_ACTIVATION: '{{repl if (ConfigOptionEquals "require_activation" "1") }}{{repl Base64Encode "1"}}{{repl end}}'
  # todo more optional fields
