* Copyright (c) 2024 Huawei Technologies Co., Ltd.
* openFuyao is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
Package constant
contains constant for console-service
*/
package constant
const (
ResourcesPluralCluster = "clusters"
ConsoleServiceDefaultNamespace = "openfuyao-system"
ConsoleServiceDefaultHost = "console"
ConsolePluginDefaultHost = "console/plugin"
ConsoleServiceDefaultAPIVersion = "v1beta1"
ConsoleServiceDefaultOrgName = "openfuyao.com"
)
const (
MetadataNameRegExPattern = "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
)
const (
Success = 200
FileCreated = 201
NoContent = 204
ClientError = 400
ExceedChartUploadLimit = 4001
ResourceNotFound = 404
ServerError = 500
)
const (
ConsoleServiceConfigmap = "console-service-config"
ConsoleServiceTokenKey = "console-service-token-key"
ConsoleServiceSecretKey = "console-service-secret-key"
SymmetricKey = "console-service-symmetric-key"
)
const (
SearchParamLengthLimit = 53
BaseTen = 10
SixtyFourBits = 64
DefaultHttpRequestSeconds = 30
)
const (
CAPath = "/ssl/ca.pem"
TLSCertPath = "/ssl/server.crt"
TLSKeyPath = "/ssl/server.key"
AlertCAPath = "/ssl/alert/ca.pem"
AlertTLSCertPath = "/ssl/alert/server.crt"
AlertTLSKeyPath = "/ssl/alert/server.key"
K8sServiceAccountRootCAPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
)
const (
KaramdaNamespace = "karmada-system"
KaramdaAPIServer = "karmada-apiserver"
KaramadaAPIServerPort = "5443"
MultiClusterProxyScheme = "https"
MultiClusterProxyHost = KaramdaAPIServer + "." + KaramdaNamespace + ".svc.cluster.local:" + KaramadaAPIServerPort
MultiClusterProxyURL = "/apis/cluster.karmada.io/v1alpha1/clusters/{cluster}/proxy"
MultiClusterPluginName = "multicluster"
SingleClusterProxyScheme = "https"
SingleClusterProxyHost = "kubernetes.default.svc.cluster.local:443"
)
const (
ServiceProxyURL = "/api/v1/namespaces/{namespace}/services/{service}:{port}/proxy"
DefaultHttpPort = 80
DefaultHttpsPort = 443
)
const (
OpenFuyaoAuthHeader = "X-OpenFuyao-Authorization"
)
const (
CookieNameReferrer = "X-OpenFuyao-Referrer"
)
const (
OnlyAccessTokenExpiredErrorStr = "the access-token has expired"
)