1
0
mirror of https://github.com/rancher/types.git synced 2025-09-25 04:12:02 +00:00

cluster auth token type changes

This commit is contained in:
Erik Wilson
2018-10-25 09:56:31 -07:00
committed by Craig Jellick
parent 918e3096ba
commit 8cac937266
8 changed files with 75 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ type Token struct {
Expired bool `json:"expired"`
ExpiresAt string `json:"expiresAt"`
Current bool `json:"current"`
ClusterName string `json:"clusterName,omitempty" norman:"noupdate,type=reference[cluster]"`
Enabled *bool `json:"enabled,omitempty" norman:"default=true"`
}

View File

@@ -77,6 +77,7 @@ type ClusterSpec struct {
Description string `json:"description"`
Internal bool `json:"internal" norman:"nocreate,noupdate"`
DesiredAgentImage string `json:"desiredAgentImage"`
DesiredAuthImage string `json:"desiredAuthImage"`
ImportedConfig *ImportedConfig `json:"importedConfig,omitempty" norman:"nocreate,noupdate"`
GoogleKubernetesEngineConfig *MapStringInterface `json:"googleKubernetesEngineConfig,omitempty"`
AzureKubernetesServiceConfig *MapStringInterface `json:"azureKubernetesServiceConfig,omitempty"`
@@ -89,6 +90,9 @@ type ClusterSpec struct {
EnableNetworkPolicy *bool `json:"enableNetworkPolicy" norman:"default=false"`
EnableClusterAlerting bool `json:"enableClusterAlerting" norman:"default=false"`
EnableClusterMonitoring bool `json:"enableClusterMonitoring" norman:"default=false"`
EnableClusterAuth bool `json:"enableClusterAuth" norman:"default=false"`
ClusterEndpointFQDN string `json:"clusterEndpointFQDN,omitempty"`
ClusterEndpointFQDNCaCert string `json:"clusterEndpointFQDNCaCert,omitempty"`
}
type ImportedConfig struct {
@@ -103,6 +107,7 @@ type ClusterStatus struct {
// https://kubernetes.io/docs/api-reference/v1.8/#componentstatus-v1-core
Driver string `json:"driver"`
AgentImage string `json:"agentImage"`
AuthImage string `json:"authImage"`
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty"`
APIEndpoint string `json:"apiEndpoint,omitempty"`
ServiceAccountToken string `json:"serviceAccountToken,omitempty"`
@@ -116,6 +121,7 @@ type ClusterStatus struct {
Version *version.Info `json:"version,omitempty"`
AppliedPodSecurityPolicyTemplateName string `json:"appliedPodSecurityPolicyTemplateId"`
AppliedEnableNetworkPolicy bool `json:"appliedEnableNetworkPolicy" norman:"nocreate,noupdate,default=false"`
AppliedEnableClusterAuth bool `json:"appliedEnableAuth"`
Capabilities Capabilities `json:"capabilities,omitempty"`
MonitoringStatus *MonitoringStatus `json:"monitoringStatus,omitempty" norman:"nocreate,noupdate"`
}

View File

@@ -256,13 +256,20 @@ type NetworkConfig struct {
WeaveNetworkProvider *WeaveNetworkProvider `yaml:",omitempty" json:"weaveNetworkProvider,omitempty"`
}
type AuthWebhookConfig struct {
// ConfigFile is a multiline string that represent a custom webhook config file
ConfigFile string `yaml:"config_file" json:"configFile,omitempty"`
// CacheTimeout controls how long to cache authentication decisions
CacheTimeout string `yaml:"cache_timeout" json:"cacheTimeout,omitempty"`
}
type AuthnConfig struct {
// Authentication strategy that will be used in kubernetes cluster
Strategy string `yaml:"strategy" json:"strategy,omitempty" norman:"default=x509"`
// Authentication options
Options map[string]string `yaml:"options" json:"options,omitempty"`
// List of additional hostnames and IPs to include in the api server PKI cert
SANs []string `yaml:"sans" json:"sans,omitempty"`
// Webhook configuration options
Webhook *AuthWebhookConfig `yaml:"webhook" json:"webhook,omitempty"`
}
type AuthzConfig struct {