
// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = 'proto2';

package github.com.openshift.api.webconsole.v1;

import "github.com/openshift/api/config/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "v1";

// ClusterInfo holds information the web console needs to talk to the cluster such as master public URL and
// metrics public URL
message ClusterInfo {
  // ConsolePublicURL is where you can find the web console server (TODO do we really need this?)
  optional string consolePublicURL = 1;

  // MasterPublicURL is how the web console can access the OpenShift v1 server
  optional string masterPublicURL = 2;

  // LoggingPublicURL is the public endpoint for logging (optional)
  optional string loggingPublicURL = 3;

  // MetricsPublicURL is the public endpoint for metrics (optional)
  optional string metricsPublicURL = 4;

  // LogoutPublicURL is an optional, absolute URL to redirect web browsers to after logging out of the web
  // console. If not specified, the built-in logout page is shown.
  optional string logoutPublicURL = 5;

  // AdminConsolePublicURL is an optional, public URL of the OpenShift admin console. If specified, the web
  // console will add a link to the admin console in a context selector in its masthead.
  optional string adminConsolePublicURL = 6;
}

// ExtensionsConfiguration holds custom script, stylesheets, and properties used for web console customization
message ExtensionsConfiguration {
  // ScriptURLs are URLs to load as scripts when the Web Console loads. The URLs must be accessible from
  // the browser.
  repeated string scriptURLs = 1;

  // StylesheetURLs are URLs to load as stylesheets when the Web Console loads. The URLs must be accessible
  // from the browser.
  repeated string stylesheetURLs = 2;

  // Properties are key(string) and value(string) pairs that will be injected into the console under the
  // global variable OPENSHIFT_EXTENSION_PROPERTIES
  map<string, string> properties = 3;
}

// FeaturesConfiguration defines various feature gates for the web console
message FeaturesConfiguration {
  // InactivityTimeoutMinutes is the number of minutes of inactivity before you are automatically logged out of
  // the web console (optional). If set to 0, inactivity timeout is disabled.
  optional int64 inactivityTimeoutMinutes = 1;

  // ClusterResourceOverridesEnabled indicates that the cluster is configured for overcommit. When set to
  // true, the web console will hide the CPU request, CPU limit, and memory request fields in its editors
  // and skip validation on those fields. The memory limit field will still be displayed.
  optional bool clusterResourceOverridesEnabled = 2;
}

// WebConsoleConfiguration holds the necessary configuration options for serving the web console
message WebConsoleConfiguration {
  // ServingInfo is the HTTP serving information for these assets
  optional github.com.openshift.api.config.v1.HTTPServingInfo servingInfo = 1;

  // ClusterInfo holds information the web console needs to talk to the cluster such as master public URL
  // and metrics public URL
  optional ClusterInfo clusterInfo = 2;

  // Features define various feature gates for the web console
  optional FeaturesConfiguration features = 3;

  // Extensions define custom scripts, stylesheets, and properties used for web console customization
  optional ExtensionsConfiguration extensions = 4;
}

