client

package
v0.4.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 19 Imported by: 19

Documentation

Index

Constants

View Source
const (
	SettingAdminPasswordHashKey = "admin.password"
	// SettingAdminPasswordMtimeKey designates the key for a root password mtime inside a Kubernetes secret.
	SettingAdminPasswordMtimeKey = "admin.passwordMtime"
	SettingAdminEnabledKey       = "admin.enabled"
	SettingAdminTokensKey        = "admin.tokens"

	SettingServerSignatureKey = "server.secretkey"

	ArgoCDConfigMapName = "argocd-cm"
	ArgoCDSecretName    = "argocd-secret"
	ArgocdNamespaceName = "devtroncd"
)

argocd specific conf

Variables

This section is empty.

Functions

func GetOidcClient

func GetOidcClient(conf *DexConfig, userVerifier oidc.UserVerifier, RedirectUrlSanitiser oidc.RedirectUrlSanitiser) (*oidc.ClientApp, func(writer http.ResponseWriter, request *http.Request), error)

func GetSettings

func GetSettings(conf *DexConfig) (*oidc.Settings, error)

Types

type DexConfig

type DexConfig struct {
	DexHost          string `env:"DEX_HOST" envDefault:"http://localhost"`
	DexPort          string `env:"DEX_PORT" envDefault:"5556"`
	DexClientID      string `env:"DEX_CLIENT_ID" envDefault:"argo-cd"`
	DexServerAddress string
	Url              string
	DexClientSecret  string
	ServerSecret     string
	// Specifies token expiration duration
	UserSessionDurationSeconds int       `env:"USER_SESSION_DURATION_SECONDS" envDefault:"86400"`
	AdminPasswordMtime         time.Time `json:"ADMIN_PASSWORD_MTIME"`
}

func BuildDexConfig

func BuildDexConfig(k8sClient *K8sClient) (*DexConfig, error)

type K8sClient

type K8sClient struct {
	// contains filtered or unexported fields
}

func NewK8sClient

func NewK8sClient(runtimeConfig *RuntimeConfig) (*K8sClient, error)

func (*K8sClient) GetArgoConfig

func (impl *K8sClient) GetArgoConfig() (secret *v1.Secret, cm *v1.ConfigMap, err error)

func (*K8sClient) GetServerSettings

func (impl *K8sClient) GetServerSettings() (*DexConfig, error)

type LocalDevMode

type LocalDevMode bool

type RuntimeConfig added in v0.4.20

type RuntimeConfig struct {
	LocalDevMode LocalDevMode `env:"RUNTIME_CONFIG_LOCAL_DEV" envDefault:"false"`
}

func GetRuntimeConfig added in v0.4.20

func GetRuntimeConfig() (*RuntimeConfig, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL