From c475cc0c275141c5e56b98b59de072afdf83bb75 Mon Sep 17 00:00:00 2001 From: Aiwantaozi Date: Tue, 12 Jun 2018 09:37:13 +0800 Subject: [PATCH] add logging ssl --- apis/management.cattle.io/v3/k8s_defaults.go | 2 +- apis/management.cattle.io/v3/logging_types.go | 38 ++++++++++++------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/apis/management.cattle.io/v3/k8s_defaults.go b/apis/management.cattle.io/v3/k8s_defaults.go index bf01215f..a8115be3 100644 --- a/apis/management.cattle.io/v3/k8s_defaults.go +++ b/apis/management.cattle.io/v3/k8s_defaults.go @@ -300,7 +300,7 @@ var ( PluginsDocker: m("plugins/docker:17.12"), }, LoggingSystemImages: LoggingSystemImages{ - Fluentd: m("rancher/fluentd:v0.1.7"), + Fluentd: m("rancher/fluentd:v0.1.8"), FluentdHelper: m("rancher/fluentd-helper:v0.1.2"), LogAggregatorFlexVolumeDriver: m("rancher/log-aggregator:v0.1.3"), Elaticsearch: m("quay.io/pires/docker-elasticsearch-kubernetes:5.6.2"), diff --git a/apis/management.cattle.io/v3/logging_types.go b/apis/management.cattle.io/v3/logging_types.go index b90d4ea3..8422dc35 100644 --- a/apis/management.cattle.io/v3/logging_types.go +++ b/apis/management.cattle.io/v3/logging_types.go @@ -40,9 +40,9 @@ type ProjectLogging struct { type LoggingCommonSpec struct { DisplayName string `json:"displayName,omitempty"` - OutputFlushInterval int `json:"outputFlushInterval,omitempty" norman:"default=3"` - OutputTags map[string]string `json:"outputTags,omitempty"` - + OutputFlushInterval int `json:"outputFlushInterval,omitempty" norman:"default=3"` + OutputTags map[string]string `json:"outputTags,omitempty"` + DockerRootDir string `json:"dockerRootDir" norman:"default=/var/lib/docker/containers"` ElasticsearchConfig *ElasticsearchConfig `json:"elasticsearchConfig,omitempty"` SplunkConfig *SplunkConfig `json:"splunkConfig,omitempty"` KafkaConfig *KafkaConfig `json:"kafkaConfig,omitempty"` @@ -94,19 +94,28 @@ type LoggingCondition struct { } type ElasticsearchConfig struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - IndexPrefix string `json:"indexPrefix,omitempty" norman:"required"` - DateFormat string `json:"dateFormat,omitempty" norman:"required,type=enum,options=YYYY-MM-DD|YYYY-MM|YYYY,default=YYYY-MM-DD"` - AuthUserName string `json:"authUsername,omitempty"` //secret - AuthPassword string `json:"authPassword,omitempty"` //secret - SSLVerify bool `json:"sslVerify,omitempty" norman:"required,default=true"` + Endpoint string `json:"endpoint,omitempty" norman:"required"` + IndexPrefix string `json:"indexPrefix,omitempty" norman:"required"` + DateFormat string `json:"dateFormat,omitempty" norman:"required,type=enum,options=YYYY-MM-DD|YYYY-MM|YYYY,default=YYYY-MM-DD"` + AuthUserName string `json:"authUsername,omitempty"` //secret + AuthPassword string `json:"authPassword,omitempty"` //secret + Certificate string `json:"certificate"` + ClientCert string `json:"clientCert"` + ClientKey string `json:"clientKey"` + ClientKeyPass string `json:"clientKeyPass"` + SSLVerify bool `json:"sslVerify"` } type SplunkConfig struct { - Endpoint string `json:"endpoint,omitempty" norman:"required"` - Source string `json:"source,omitempty"` - Token string `json:"token,omitempty" norman:"required"` //secret - SSLVerify bool `json:"sslVerify,omitempty" norman:"required,default=true"` + Endpoint string `json:"endpoint,omitempty" norman:"required"` + Source string `json:"source,omitempty"` + Token string `json:"token,omitempty" norman:"required"` //secret + Certificate string `json:"certificate"` + ClientCert string `json:"clientCert"` + ClientKey string `json:"clientKey"` + ClientKeyPass string `json:"clientKeyPass"` + SSLVerify bool `json:"sslVerify"` + Index string `json:"index"` } type EmbeddedConfig struct { @@ -124,6 +133,9 @@ type KafkaConfig struct { ZookeeperEndpoint string `json:"zookeeperEndpoint,omitempty"` BrokerEndpoints []string `json:"brokerEndpoints,omitempty"` Topic string `json:"topic,omitempty" norman:"required"` + Certificate string `json:"certificate"` + ClientCert string `json:"clientCert"` + ClientKey string `json:"clientKey"` } type SyslogConfig struct {