Documentation ¶
Index ¶
- Constants
- func FilePath(path string) configFunction
- type ArgoCD
- type ArgoEvents
- type Config
- func NewConfig(cfgString string) (*Config, error)
- func NewConfigInstanceForK8s(namespace, configMap string, kubeconfig string) (*Config, error)
- func NewNautesConfigFromFile(opts ...configFunction) (*Config, error)
- func NewNautesConfigFromKubernetes(ctx context.Context, k8sClient client.Client, opts ...configFunction) (*Config, error)
- type DeployApp
- type DeployAppType
- type EventBus
- type EventBusType
- type GitRepo
- type GitType
- type Kustomize
- type KustomizeDefaultPath
- type Nautes
- type NautesConfigs
- type OAuth
- type OAuthType
- type Pipeline
- type PipelineType
- type SecretRepo
- type SecretStoreType
- type Vault
Constants ¶
View Source
const ( ENV_CFG_NAMESPACE = "NATUESCFGNAMESPACE" ENV_CFG_NAME = "NATUESCFGNAME" DEFAULT_CFG_NAMESPACE = "nautes" DEFAULT_CFG_NAME = "nautes-configs" DefaultConfigName = "nautes" DefaultConfigNamespace = "nautes-configs" )
View Source
const DefaultNautesConfigPath = "/opt/nautes/config/config"
View Source
const EnvNautesConfigPath = "NAUTESCONFIGPATH"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArgoCD ¶
type ArgoCD struct { URL string `yaml:"url"` Namespace string `yaml:"namespace"` Kustomize Kustomize `yaml:"kubestomize"` }
ArgoCD stores argocd configs
type ArgoEvents ¶
type Config ¶
type Config struct { Deploy DeployApp `yaml:"deploy"` EventBus EventBus `yaml:"eventbus"` Git GitRepo `yaml:"git"` Nautes Nautes `yaml:"nautes"` OAuth OAuth `yaml:"OAuth"` Pipeline Pipeline `yaml:"pipeline"` Secret SecretRepo `yaml:"secret"` }
func NewConfigInstanceForK8s ¶
func NewNautesConfigFromFile ¶
NewNautesConfigFromFile will return a nautes config from specify path If path is empty. It will try to find files based on environment variables and default values
type DeployApp ¶
type DeployApp struct { DefaultApp map[string]DeployAppType `yaml:"defaultApp"` ArgoCD ArgoCD `yaml:"argocd"` }
type DeployAppType ¶
type DeployAppType string
const (
DEPLOY_APP_TYPE_ARGOCD DeployAppType = "argocd"
)
type EventBus ¶
type EventBus struct { DefaultApp map[string]EventBusType `yaml:"defaultApp"` ArgoEvents ArgoEvents `yaml:"argoEvents"` }
type EventBusType ¶
type EventBusType string
const (
EventBusTypeArgoEvent EventBusType = "argo-events"
)
type Kustomize ¶
type Kustomize struct {
DefaultPath KustomizeDefaultPath `yaml:"defaultPath"`
}
Kustomize stores configurations of kustomize
type KustomizeDefaultPath ¶
type KustomizeDefaultPath struct {
DefaultProject string `yaml:"defaultProject"`
}
KustomizeDefaultPath stores default path of kustomize
type NautesConfigs ¶
func (*NautesConfigs) GetConfigByClient ¶
func (nc *NautesConfigs) GetConfigByClient(client client.Client) (*Config, error)
func (*NautesConfigs) GetConfigByRest ¶
func (nc *NautesConfigs) GetConfigByRest(cfg *rest.Config) (*Config, error)
func (*NautesConfigs) GetNamespacedName ¶
func (nc *NautesConfigs) GetNamespacedName() types.NamespacedName
type Pipeline ¶
type Pipeline struct {
DefaultApp map[string]PipelineType `yaml:"defaultApp"`
}
type SecretRepo ¶
type SecretRepo struct { RepoType SecretStoreType `yaml:"repoType"` Vault Vault `yaml:"vault"` OperatorName map[string]string `yaml:"operatorName"` }
type SecretStoreType ¶
type SecretStoreType string
const (
SECRET_STORE_VAULT SecretStoreType = "vault"
)
type Vault ¶
type Vault struct { Addr string `yaml:"addr"` // Url for vault proxy ProxyAddr string `yaml:"proxyAddr"` CABundle string `yaml:"CABundle"` PKIPath string `yaml:"PKIPath"` // The auth name of current cluster MountPath string `yaml:"mountPath"` // Specify the token connect to vault, this use for debug, do not use it in product Token string `yaml:"token"` // Valut kubernetes auth service account namespace Namesapce string `yaml:"namespace"` // The service account name when create kubernetes auth in vault ServiceAccount string `yaml:"serviceAccount"` }
Click to show internal directories.
Click to hide internal directories.