37 Star 411 Fork 76

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config.go 2.45 KB
一键复制 编辑 原始数据 按行查看 历史
package constant
import (
"fmt"
)
const (
AppName = "rancher-logging"
TesterAppName = "rancher-logging-tester"
AppInitVersion = "0.1.1"
systemCatalogName = "system-library"
templateName = "rancher-logging"
)
const (
LoggingNamespace = "cattle-logging"
)
//daemonset, pod, container name
const (
FluentdName = "fluentd"
FluentdHelperName = "fluentd-helper"
LogAggregatorName = "log-aggregator"
FluentdTesterName = "fluentd-test"
FluentdTesterContainerName = "dry-run"
)
//config
const (
LoggingSecretName = "fluentd"
LoggingSSLSecretName = "fluentd-ssl"
LoggingSecretClusterConfigKey = "cluster.conf"
LoggingSecretProjectConfigKey = "project.conf"
)
//target
const (
Elasticsearch = "elasticsearch"
Splunk = "splunk"
Kafka = "kafka"
Syslog = "syslog"
FluentForwarder = "fluentforwarder"
CustomTarget = "customtarget"
)
const (
GoogleKubernetesEngine = "googleKubernetesEngine"
)
//ssl
const (
DefaultCertDir = "/fluentd/etc/config/ssl"
CaFileName = "ca.pem"
ClientCertName = "client-cert.pem"
ClientKeyName = "client-key.pem"
)
const (
ClusterLevel = "cluster"
ProjectLevel = "project"
)
var (
FluentdTesterSelector = map[string]string{"app": "fluentd-tester"}
FluentdSelector = map[string]string{"app": "fluentd"}
LogAggregatorSelector = map[string]string{"app": "log-aggregator"}
)
func SecretDataKeyCa(level, name string) string {
return fmt.Sprintf("%s_%s_%s", level, name, CaFileName)
}
func SecretDataKeyCert(level, name string) string {
return fmt.Sprintf("%s_%s_%s", level, name, ClientCertName)
}
func SecretDataKeyCertKey(level, name string) string {
return fmt.Sprintf("%s_%s_%s", level, name, ClientKeyName)
}
func RancherLoggingTemplateID() string {
return fmt.Sprintf("%s-%s", systemCatalogName, templateName)
}
func RancherLoggingFullVersion() string {
return fmt.Sprintf("%s-%s-%s", systemCatalogName, templateName, AppInitVersion)
}
func RancherLoggingCatalogID(version string) string {
return fmt.Sprintf("catalog://?catalog=%s&template=%s&version=%s", systemCatalogName, templateName, version)
}
func RancherLoggingConfigSecretName() string {
return fmt.Sprintf("%s-%s", AppName, LoggingSecretName)
}
func RancherLoggingSSLSecretName() string {
return fmt.Sprintf("%s-%s", AppName, LoggingSSLSecretName)
}
func GetNamespacePattern(namespace string) string {
return fmt.Sprintf("^%s$", namespace)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rancher/rancher.git
git@gitee.com:rancher/rancher.git
rancher
rancher
rancher
v2.2.4-rc3

搜索帮助

0d507c66 1850385 C8b1a773 1850385