Unify the omitempty configuration of YAML annotation
This commit is contained in:
@@ -63,10 +63,10 @@ type Options struct {
|
|||||||
Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
|
Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
|
||||||
|
|
||||||
// RSA private key file used to sign the id token
|
// RSA private key file used to sign the id token
|
||||||
SignKey string `json:"signKey,omitempty" yaml:"signKey"`
|
SignKey string `json:"signKey,omitempty" yaml:"signKey,omitempty"`
|
||||||
|
|
||||||
// Raw RSA private key. Base64 encoded PEM file
|
// Raw RSA private key. Base64 encoded PEM file
|
||||||
SignKeyData string `json:"-,omitempty" yaml:"signKeyData"`
|
SignKeyData string `json:"-,omitempty" yaml:"signKeyData,omitempty"`
|
||||||
|
|
||||||
// Register identity providers.
|
// Register identity providers.
|
||||||
IdentityProviders []IdentityProviderOptions `json:"identityProviders,omitempty" yaml:"identityProviders,omitempty"`
|
IdentityProviders []IdentityProviderOptions `json:"identityProviders,omitempty" yaml:"identityProviders,omitempty"`
|
||||||
@@ -191,7 +191,7 @@ type Token struct {
|
|||||||
type Client struct {
|
type Client struct {
|
||||||
// The name of the OAuth client is used as the client_id parameter when making requests to <master>/oauth/authorize
|
// The name of the OAuth client is used as the client_id parameter when making requests to <master>/oauth/authorize
|
||||||
// and <master>/oauth/token.
|
// and <master>/oauth/token.
|
||||||
Name string `json:"name" yaml:"name,omitempty"`
|
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||||
|
|
||||||
// Secret is the unique secret associated with a client
|
// Secret is the unique secret associated with a client
|
||||||
Secret string `json:"-" yaml:"secret,omitempty"`
|
Secret string `json:"-" yaml:"secret,omitempty"`
|
||||||
|
|||||||
@@ -19,26 +19,24 @@ package config
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"kubesphere.io/kubesphere/pkg/apiserver/authentication"
|
|
||||||
"kubesphere.io/kubesphere/pkg/apiserver/authorization"
|
|
||||||
|
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
|
|
||||||
networkv1alpha1 "kubesphere.io/api/network/v1alpha1"
|
networkv1alpha1 "kubesphere.io/api/network/v1alpha1"
|
||||||
|
|
||||||
|
"kubesphere.io/kubesphere/pkg/apiserver/authentication"
|
||||||
"kubesphere.io/kubesphere/pkg/apiserver/authentication/oauth"
|
"kubesphere.io/kubesphere/pkg/apiserver/authentication/oauth"
|
||||||
|
"kubesphere.io/kubesphere/pkg/apiserver/authorization"
|
||||||
"kubesphere.io/kubesphere/pkg/models/terminal"
|
"kubesphere.io/kubesphere/pkg/models/terminal"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/alerting"
|
"kubesphere.io/kubesphere/pkg/simple/client/alerting"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/auditing"
|
"kubesphere.io/kubesphere/pkg/simple/client/auditing"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/cache"
|
"kubesphere.io/kubesphere/pkg/simple/client/cache"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/devops/jenkins"
|
"kubesphere.io/kubesphere/pkg/simple/client/devops/jenkins"
|
||||||
edgeruntime "kubesphere.io/kubesphere/pkg/simple/client/edgeruntime"
|
"kubesphere.io/kubesphere/pkg/simple/client/edgeruntime"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/events"
|
"kubesphere.io/kubesphere/pkg/simple/client/events"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/gateway"
|
"kubesphere.io/kubesphere/pkg/simple/client/gateway"
|
||||||
"kubesphere.io/kubesphere/pkg/simple/client/gpu"
|
"kubesphere.io/kubesphere/pkg/simple/client/gpu"
|
||||||
@@ -58,7 +56,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func newTestConfig() (*Config, error) {
|
func newTestConfig() (*Config, error) {
|
||||||
|
|
||||||
var conf = &Config{
|
var conf = &Config{
|
||||||
DevopsOptions: &jenkins.Options{
|
DevopsOptions: &jenkins.Options{
|
||||||
Host: "http://ks-devops.kubesphere-devops-system.svc",
|
Host: "http://ks-devops.kubesphere-devops-system.svc",
|
||||||
@@ -87,6 +84,9 @@ func newTestConfig() (*Config, error) {
|
|||||||
ManagerPassword: "P@88w0rd",
|
ManagerPassword: "P@88w0rd",
|
||||||
UserSearchBase: "ou=Users,dc=example,dc=org",
|
UserSearchBase: "ou=Users,dc=example,dc=org",
|
||||||
GroupSearchBase: "ou=Groups,dc=example,dc=org",
|
GroupSearchBase: "ou=Groups,dc=example,dc=org",
|
||||||
|
InitialCap: 10,
|
||||||
|
MaxCap: 100,
|
||||||
|
PoolName: "ldap",
|
||||||
},
|
},
|
||||||
RedisOptions: &cache.Options{
|
RedisOptions: &cache.Options{
|
||||||
Host: "localhost",
|
Host: "localhost",
|
||||||
@@ -96,7 +96,7 @@ func newTestConfig() (*Config, error) {
|
|||||||
},
|
},
|
||||||
S3Options: &s3.Options{
|
S3Options: &s3.Options{
|
||||||
Endpoint: "http://minio.openpitrix-system.svc",
|
Endpoint: "http://minio.openpitrix-system.svc",
|
||||||
Region: "",
|
Region: "us-east-1",
|
||||||
DisableSSL: false,
|
DisableSSL: false,
|
||||||
ForcePathStyle: false,
|
ForcePathStyle: false,
|
||||||
AccessKeyID: "ABCDEFGHIJKLMN",
|
AccessKeyID: "ABCDEFGHIJKLMN",
|
||||||
@@ -167,9 +167,7 @@ func newTestConfig() (*Config, error) {
|
|||||||
AccessTokenInactivityTimeout: 0,
|
AccessTokenInactivityTimeout: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
MultiClusterOptions: &multicluster.Options{
|
MultiClusterOptions: multicluster.NewOptions(),
|
||||||
Enable: false,
|
|
||||||
},
|
|
||||||
EventsOptions: &events.Options{
|
EventsOptions: &events.Options{
|
||||||
Host: "http://elasticsearch-logging-data.kubesphere-logging-system.svc:9200",
|
Host: "http://elasticsearch-logging-data.kubesphere-logging-system.svc:9200",
|
||||||
IndexPrefix: "ks-logstash-events",
|
IndexPrefix: "ks-logstash-events",
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package terminal
|
|||||||
import "github.com/spf13/pflag"
|
import "github.com/spf13/pflag"
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Image string `json:"image,omitempty" yaml:"image"`
|
Image string `json:"image,omitempty" yaml:"image,omitempty"`
|
||||||
Timeout int `json:"timeout,omitempty" yaml:"timeout"`
|
Timeout int `json:"timeout,omitempty" yaml:"timeout,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTerminalOptions() *Options {
|
func NewTerminalOptions() *Options {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ type Options struct {
|
|||||||
BasicAuth bool `json:"basicAuth" yaml:"basicAuth"`
|
BasicAuth bool `json:"basicAuth" yaml:"basicAuth"`
|
||||||
Username string `json:"username" yaml:"username"`
|
Username string `json:"username" yaml:"username"`
|
||||||
Password string `json:"password" yaml:"password"`
|
Password string `json:"password" yaml:"password"`
|
||||||
IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix"`
|
IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix,omitempty"`
|
||||||
Version string `json:"version" yaml:"version"`
|
Version string `json:"version" yaml:"version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
8
pkg/simple/client/cache/options.go
vendored
8
pkg/simple/client/cache/options.go
vendored
@@ -23,10 +23,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Host string `json:"host"`
|
Host string `json:"host" yaml:"host"`
|
||||||
Port int `json:"port"`
|
Port int `json:"port" yaml:"port"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password" yaml:"password"`
|
||||||
DB int `json:"db"`
|
DB int `json:"db" yaml:"db"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRedisOptions returns options points to nowhere,
|
// NewRedisOptions returns options points to nowhere,
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Host string `json:",omitempty" yaml:"host" description:"Jenkins service host address"`
|
Host string `json:",omitempty" yaml:"host,omitempty" description:"Jenkins service host address"`
|
||||||
Username string `json:",omitempty" yaml:"username" description:"Jenkins admin username"`
|
Username string `json:",omitempty" yaml:"username,omitempty" description:"Jenkins admin username"`
|
||||||
Password string `json:",omitempty" yaml:"password" description:"Jenkins admin password"`
|
Password string `json:",omitempty" yaml:"password,omitempty" description:"Jenkins admin password"`
|
||||||
MaxConnections int `json:"maxConnections,omitempty" yaml:"maxConnections" description:"Maximum connections allowed to connect to Jenkins"`
|
MaxConnections int `json:"maxConnections,omitempty" yaml:"maxConnections,omitempty" description:"Maximum connections allowed to connect to Jenkins"`
|
||||||
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint" description:"The endpoint of the ks-devops apiserver"`
|
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty" description:"The endpoint of the ks-devops apiserver"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewDevopsOptions returns a `zero` instance
|
// NewDevopsOptions returns a `zero` instance
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ type Options struct {
|
|||||||
BasicAuth bool `json:"basicAuth" yaml:"basicAuth"`
|
BasicAuth bool `json:"basicAuth" yaml:"basicAuth"`
|
||||||
Username string `json:"username" yaml:"username"`
|
Username string `json:"username" yaml:"username"`
|
||||||
Password string `json:"password" yaml:"password"`
|
Password string `json:"password" yaml:"password"`
|
||||||
IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix"`
|
IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix,omitempty"`
|
||||||
Version string `json:"version" yaml:"version"`
|
Version string `json:"version" yaml:"version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,17 +24,17 @@ import (
|
|||||||
|
|
||||||
// Options contains configuration of the default Gateway
|
// Options contains configuration of the default Gateway
|
||||||
type Options struct {
|
type Options struct {
|
||||||
WatchesPath string `json:"watchesPath,omitempty" yaml:"watchesPath"`
|
WatchesPath string `json:"watchesPath,omitempty" yaml:"watchesPath,omitempty"`
|
||||||
Namespace string `json:"namespace,omitempty" yaml:"namespace"`
|
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||||
Repository string `json:"repository,omitempty" yaml:"repository"`
|
Repository string `json:"repository,omitempty" yaml:"repository,omitempty"`
|
||||||
Tag string `json:"tag,omitempty" yaml:"tag"`
|
Tag string `json:"tag,omitempty" yaml:"tag,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewGatewayOptions creates a default Gateway Option
|
// NewGatewayOptions creates a default Gateway Option
|
||||||
func NewGatewayOptions() *Options {
|
func NewGatewayOptions() *Options {
|
||||||
return &Options{
|
return &Options{
|
||||||
WatchesPath: "",
|
WatchesPath: "",
|
||||||
Namespace: "", //constants.KubeSphereControlNamespace
|
Namespace: "", // constants.KubeSphereControlNamespace
|
||||||
Repository: "",
|
Repository: "",
|
||||||
Tag: "",
|
Tag: "",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ package gpu
|
|||||||
import "github.com/spf13/pflag"
|
import "github.com/spf13/pflag"
|
||||||
|
|
||||||
type GPUKind struct {
|
type GPUKind struct {
|
||||||
ResourceName string `json:"resourceName,omitempty" yaml:"resourceName"`
|
ResourceName string `json:"resourceName,omitempty" yaml:"resourceName,omitempty"`
|
||||||
ResourceType string `json:"resourceType,omitempty" yaml:"resourceType"`
|
ResourceType string `json:"resourceType,omitempty" yaml:"resourceType,omitempty"`
|
||||||
Default bool `json:"default,omitempty" yaml:"default"`
|
Default bool `json:"default,omitempty" yaml:"default,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Kinds []GPUKind `json:"kinds,omitempty" yaml:"kinds"`
|
Kinds []GPUKind `json:"kinds,omitempty" yaml:"kinds,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGPUOptions() *Options {
|
func NewGPUOptions() *Options {
|
||||||
|
|||||||
@@ -36,15 +36,15 @@ type KubernetesOptions struct {
|
|||||||
// kubernetes apiserver public address, used to generate kubeconfig
|
// kubernetes apiserver public address, used to generate kubeconfig
|
||||||
// for downloading, default to host defined in kubeconfig
|
// for downloading, default to host defined in kubeconfig
|
||||||
// +optional
|
// +optional
|
||||||
Master string `json:"master,omitempty" yaml:"master"`
|
Master string `json:"master,omitempty" yaml:"master,omitempty"`
|
||||||
|
|
||||||
// kubernetes clientset qps
|
// kubernetes clientset qps
|
||||||
// +optional
|
// +optional
|
||||||
QPS float32 `json:"qps,omitempty" yaml:"qps"`
|
QPS float32 `json:"qps,omitempty" yaml:"qps,omitempty"`
|
||||||
|
|
||||||
// kubernetes clientset burst
|
// kubernetes clientset burst
|
||||||
// +optional
|
// +optional
|
||||||
Burst int `json:"burst,omitempty" yaml:"burst"`
|
Burst int `json:"burst,omitempty" yaml:"burst,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewKubernetesOptions returns a `zero` instance
|
// NewKubernetesOptions returns a `zero` instance
|
||||||
|
|||||||
@@ -23,14 +23,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Host string `json:"host,omitempty" yaml:"host"`
|
Host string `json:"host,omitempty" yaml:"host,omitempty"`
|
||||||
ManagerDN string `json:"managerDN,omitempty" yaml:"managerDN"`
|
ManagerDN string `json:"managerDN,omitempty" yaml:"managerDN,omitempty"`
|
||||||
ManagerPassword string `json:"managerPassword,omitempty" yaml:"managerPassword"`
|
ManagerPassword string `json:"managerPassword,omitempty" yaml:"managerPassword,omitempty"`
|
||||||
UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase"`
|
UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase,omitempty"`
|
||||||
GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase"`
|
GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase,omitempty"`
|
||||||
InitialCap int `json:"initialCap,omitempty" yaml:"initialCap"`
|
InitialCap int `json:"initialCap,omitempty" yaml:"initialCap,omitempty"`
|
||||||
MaxCap int `json:"maxCap,omitempty" yaml:"maxCap"`
|
MaxCap int `json:"maxCap,omitempty" yaml:"maxCap,omitempty"`
|
||||||
PoolName string `json:"poolName,omitempty" yaml:"poolName"`
|
PoolName string `json:"poolName,omitempty" yaml:"poolName,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOptions return a default option
|
// NewOptions return a default option
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ type Options struct {
|
|||||||
BasicAuth bool `json:"basicAuth" yaml:"basicAuth"`
|
BasicAuth bool `json:"basicAuth" yaml:"basicAuth"`
|
||||||
Username string `json:"username" yaml:"username"`
|
Username string `json:"username" yaml:"username"`
|
||||||
Password string `json:"password" yaml:"password"`
|
Password string `json:"password" yaml:"password"`
|
||||||
IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix"`
|
IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix,omitempty"`
|
||||||
Version string `json:"version" yaml:"version"`
|
Version string `json:"version" yaml:"version"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint"`
|
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewPrometheusOptions() *Options {
|
func NewPrometheusOptions() *Options {
|
||||||
|
|||||||
@@ -31,28 +31,28 @@ const (
|
|||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
// Enable
|
// Enable
|
||||||
Enable bool `json:"enable"`
|
Enable bool `json:"enable" yaml:"enable"`
|
||||||
EnableFederation bool `json:"enableFederation,omitempty"`
|
EnableFederation bool `json:"enableFederation,omitempty" yaml:"enableFederation,omitempty"`
|
||||||
|
|
||||||
// ProxyPublishService is the service name of multicluster component tower.
|
// ProxyPublishService is the service name of multicluster component tower.
|
||||||
// If this field provided, apiserver going to use the ingress.ip of this service.
|
// If this field provided, apiserver going to use the ingress.ip of this service.
|
||||||
// This field will be used when generating agent deployment yaml for joining clusters.
|
// This field will be used when generating agent deployment yaml for joining clusters.
|
||||||
ProxyPublishService string `json:"proxyPublishService,omitempty"`
|
ProxyPublishService string `json:"proxyPublishService,omitempty" yaml:"proxyPublishService,omitempty"`
|
||||||
|
|
||||||
// ProxyPublishAddress is the public address of tower for all cluster agents.
|
// ProxyPublishAddress is the public address of tower for all cluster agents.
|
||||||
// This field takes precedence over field ProxyPublishService.
|
// This field takes precedence over field ProxyPublishService.
|
||||||
// If both field ProxyPublishService and ProxyPublishAddress are empty, apiserver will
|
// If both field ProxyPublishService and ProxyPublishAddress are empty, apiserver will
|
||||||
// return 404 Not Found for all cluster agent yaml requests.
|
// return 404 Not Found for all cluster agent yaml requests.
|
||||||
ProxyPublishAddress string `json:"proxyPublishAddress,omitempty"`
|
ProxyPublishAddress string `json:"proxyPublishAddress,omitempty" yaml:"proxyPublishAddress,omitempty"`
|
||||||
|
|
||||||
// AgentImage is the image used when generating deployment for all cluster agents.
|
// AgentImage is the image used when generating deployment for all cluster agents.
|
||||||
AgentImage string `json:"agentImage,omitempty"`
|
AgentImage string `json:"agentImage,omitempty" yaml:"agentImage,omitempty"`
|
||||||
|
|
||||||
// ClusterControllerResyncPeriod is the resync period used by cluster controller.
|
// ClusterControllerResyncPeriod is the resync period used by cluster controller.
|
||||||
ClusterControllerResyncPeriod time.Duration `json:"clusterControllerResyncPeriod,omitempty" yaml:"clusterControllerResyncPeriod"`
|
ClusterControllerResyncPeriod time.Duration `json:"clusterControllerResyncPeriod,omitempty" yaml:"clusterControllerResyncPeriod,omitempty"`
|
||||||
|
|
||||||
// HostClusterName is the name of the control plane cluster, default set to host.
|
// HostClusterName is the name of the control plane cluster, default set to host.
|
||||||
HostClusterName string `json:"hostClusterName,omitempty" yaml:"hostClusterName"`
|
HostClusterName string `json:"hostClusterName,omitempty" yaml:"hostClusterName,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewOptions returns a default nil options
|
// NewOptions returns a default nil options
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ type NSNPOptions struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
EnableNetworkPolicy bool `json:"enableNetworkPolicy,omitempty" yaml:"enableNetworkPolicy"`
|
EnableNetworkPolicy bool `json:"enableNetworkPolicy,omitempty" yaml:"enableNetworkPolicy,omitempty"`
|
||||||
NSNPOptions NSNPOptions `json:"nsnpOptions,omitempty" yaml:"nsnpOptions,omitempty"`
|
NSNPOptions NSNPOptions `json:"nsnpOptions,omitempty" yaml:"nsnpOptions,omitempty"`
|
||||||
WeaveScopeHost string `json:"weaveScopeHost,omitempty" yaml:"weaveScopeHost,omitempty"`
|
WeaveScopeHost string `json:"weaveScopeHost,omitempty" yaml:"weaveScopeHost,omitempty"`
|
||||||
IPPoolType string `json:"ippoolType,omitempty" yaml:"ippoolType,omitempty"`
|
IPPoolType string `json:"ippoolType,omitempty" yaml:"ippoolType,omitempty"`
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
package notification
|
package notification
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Endpoint string
|
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewNotificationOptions() *Options {
|
func NewNotificationOptions() *Options {
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ import (
|
|||||||
|
|
||||||
// Options contains configuration to access a s3 service
|
// Options contains configuration to access a s3 service
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint"`
|
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||||
Region string `json:"region,omitempty" yaml:"region"`
|
Region string `json:"region,omitempty" yaml:"region,omitempty"`
|
||||||
DisableSSL bool `json:"disableSSL" yaml:"disableSSL"`
|
DisableSSL bool `json:"disableSSL" yaml:"disableSSL"`
|
||||||
ForcePathStyle bool `json:"forcePathStyle" yaml:"forcePathStyle"`
|
ForcePathStyle bool `json:"forcePathStyle" yaml:"forcePathStyle"`
|
||||||
AccessKeyID string `json:"accessKeyID,omitempty" yaml:"accessKeyID"`
|
AccessKeyID string `json:"accessKeyID,omitempty" yaml:"accessKeyID,omitempty"`
|
||||||
SecretAccessKey string `json:"secretAccessKey,omitempty" yaml:"secretAccessKey"`
|
SecretAccessKey string `json:"secretAccessKey,omitempty" yaml:"secretAccessKey,omitempty"`
|
||||||
SessionToken string `json:"sessionToken,omitempty" yaml:"sessionToken"`
|
SessionToken string `json:"sessionToken,omitempty" yaml:"sessionToken,omitempty"`
|
||||||
Bucket string `json:"bucket,omitempty" yaml:"bucket"`
|
Bucket string `json:"bucket,omitempty" yaml:"bucket,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewS3Options creates a default disabled Options(empty endpoint)
|
// NewS3Options creates a default disabled Options(empty endpoint)
|
||||||
|
|||||||
@@ -21,16 +21,16 @@ import "github.com/spf13/pflag"
|
|||||||
type Options struct {
|
type Options struct {
|
||||||
|
|
||||||
// istio pilot discovery service url
|
// istio pilot discovery service url
|
||||||
IstioPilotHost string `json:"istioPilotHost,omitempty" yaml:"istioPilotHost"`
|
IstioPilotHost string `json:"istioPilotHost,omitempty" yaml:"istioPilotHost,omitempty"`
|
||||||
|
|
||||||
// jaeger query service url
|
// jaeger query service url
|
||||||
JaegerQueryHost string `json:"jaegerQueryHost,omitempty" yaml:"jaegerQueryHost"`
|
JaegerQueryHost string `json:"jaegerQueryHost,omitempty" yaml:"jaegerQueryHost,omitempty"`
|
||||||
|
|
||||||
// kiali query service url
|
// kiali query service url
|
||||||
KialiQueryHost string `json:"kialiQueryHost,omitempty" yaml:"kialiQueryHost"`
|
KialiQueryHost string `json:"kialiQueryHost,omitempty" yaml:"kialiQueryHost,omitempty"`
|
||||||
|
|
||||||
// prometheus service url for servicemesh metrics
|
// prometheus service url for servicemesh metrics
|
||||||
ServicemeshPrometheusHost string `json:"servicemeshPrometheusHost,omitempty" yaml:"servicemeshPrometheusHost"`
|
ServicemeshPrometheusHost string `json:"servicemeshPrometheusHost,omitempty" yaml:"servicemeshPrometheusHost,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewServiceMeshOptions returns a `zero` instance
|
// NewServiceMeshOptions returns a `zero` instance
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Options struct {
|
type Options struct {
|
||||||
Host string `json:",omitempty" yaml:"host" description:"SonarQube service host address"`
|
Host string `json:",omitempty" yaml:"host,omitempty" description:"SonarQube service host address"`
|
||||||
Token string `json:",omitempty" yaml:"token" description:"SonarQube service token"`
|
Token string `json:",omitempty" yaml:"token,omitempty" description:"SonarQube service token"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSonarQubeOptions() *Options {
|
func NewSonarQubeOptions() *Options {
|
||||||
|
|||||||
Reference in New Issue
Block a user