Documentation ¶
Index ¶
- func ReplaceStringSecret(val string, secretValues map[string]string) string
- type ArgoCDSettings
- func (a *ArgoCDSettings) DexOAuth2ClientSecret() string
- func (a *ArgoCDSettings) IsDexConfigured() bool
- func (a *ArgoCDSettings) IsSSOConfigured() bool
- func (a *ArgoCDSettings) IssuerURL() string
- func (a *ArgoCDSettings) OAuth2ClientID() string
- func (a *ArgoCDSettings) OAuth2ClientSecret() string
- func (a *ArgoCDSettings) OIDCConfig() *OIDCConfig
- func (a *ArgoCDSettings) RedirectURL() string
- func (a *ArgoCDSettings) TLSConfig() *tls.Config
- type HelmRepoCredentials
- type OIDCConfig
- type RepoCredentials
- type SettingsManager
- func (mgr *SettingsManager) GetSettings() (*ArgoCDSettings, error)
- func (mgr *SettingsManager) MigrateLegacyRepoSettings(settings *ArgoCDSettings) error
- func (mgr *SettingsManager) SaveSettings(settings *ArgoCDSettings) error
- func (mgr *SettingsManager) StartNotifier(ctx context.Context, a *ArgoCDSettings)
- func (mgr *SettingsManager) Subscribe(subCh chan<- struct{})
- func (mgr *SettingsManager) Unsubscribe(subCh chan<- struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArgoCDSettings ¶
type ArgoCDSettings struct { // URL is the externally facing URL users will visit to reach Argo CD. // The value here is used when configuring SSO. Omitting this value will disable SSO. URL string `json:"url,omitempty"` // Admin superuser password storage AdminPasswordHash string `json:"adminPasswordHash,omitempty"` AdminPasswordMtime time.Time `json:"adminPasswordMtime,omitempty"` // DexConfig contains portions of a dex config yaml DexConfig string `json:"dexConfig,omitempty"` // OIDCConfigRAW holds OIDC configuration as a raw string OIDCConfigRAW string `json:"oidcConfig,omitempty"` // ServerSignature holds the key used to generate JWT tokens. ServerSignature []byte `json:"serverSignature,omitempty"` // Certificate holds the certificate/private key for the Argo CD API server. // If nil, will run insecure without TLS. Certificate *tls.Certificate `json:"-"` // WebhookGitLabSecret holds the shared secret for authenticating GitHub webhook events WebhookGitHubSecret string `json:"webhookGitHubSecret,omitempty"` // WebhookGitLabSecret holds the shared secret for authenticating GitLab webhook events WebhookGitLabSecret string `json:"webhookGitLabSecret,omitempty"` // WebhookBitbucketUUID holds the UUID for authenticating Bitbucket webhook events WebhookBitbucketUUID string `json:"webhookBitbucketUUID,omitempty"` // Secrets holds all secrets in argocd-secret as a map[string]string Secrets map[string]string `json:"secrets,omitempty"` // Repositories holds list of configured git repositories Repositories []RepoCredentials // Repositories holds list of configured helm repositories HelmRepositories []HelmRepoCredentials }
ArgoCDSettings holds in-memory runtime configuration options.
func UpdateSettings ¶ added in v0.6.0
func UpdateSettings(defaultPassword string, settingsMgr *SettingsManager, updateSignature bool, updateSuperuser bool, Namespace string) (*ArgoCDSettings, error)
UpdateSettings is used to update the admin password, signature, certificate etc
func (*ArgoCDSettings) DexOAuth2ClientSecret ¶ added in v0.11.0
func (a *ArgoCDSettings) DexOAuth2ClientSecret() string
DexOAuth2ClientSecret calculates an arbitrary, but predictable OAuth2 client secret string derived from the server secret. This is called by the dex startup wrapper (argocd-util rundex), as well as the API server, such that they both independently come to the same conclusion of what the OAuth2 shared client secret should be.
func (*ArgoCDSettings) IsDexConfigured ¶ added in v0.11.0
func (a *ArgoCDSettings) IsDexConfigured() bool
func (*ArgoCDSettings) IsSSOConfigured ¶
func (a *ArgoCDSettings) IsSSOConfigured() bool
IsSSOConfigured returns whether or not single-sign-on is configured
func (*ArgoCDSettings) IssuerURL ¶ added in v0.4.0
func (a *ArgoCDSettings) IssuerURL() string
func (*ArgoCDSettings) OAuth2ClientID ¶ added in v0.11.0
func (a *ArgoCDSettings) OAuth2ClientID() string
func (*ArgoCDSettings) OAuth2ClientSecret ¶ added in v0.4.0
func (a *ArgoCDSettings) OAuth2ClientSecret() string
func (*ArgoCDSettings) OIDCConfig ¶ added in v0.11.0
func (a *ArgoCDSettings) OIDCConfig() *OIDCConfig
func (*ArgoCDSettings) RedirectURL ¶ added in v0.4.0
func (a *ArgoCDSettings) RedirectURL() string
func (*ArgoCDSettings) TLSConfig ¶ added in v0.4.0
func (a *ArgoCDSettings) TLSConfig() *tls.Config
TLSConfig returns a tls.Config with the configured certificates
type HelmRepoCredentials ¶ added in v0.11.0
type HelmRepoCredentials struct { URL string `json:"url,omitempty"` Name string `json:"name,omitempty"` UsernameSecret *apiv1.SecretKeySelector `json:"usernameSecret,omitempty"` PasswordSecret *apiv1.SecretKeySelector `json:"passwordSecret,omitempty"` CASecret *apiv1.SecretKeySelector `json:"caSecret,omitempty"` CertSecret *apiv1.SecretKeySelector `json:"certSecret,omitempty"` KeySecret *apiv1.SecretKeySelector `json:"keySecret,omitempty"` }
type OIDCConfig ¶ added in v0.11.0
type RepoCredentials ¶ added in v0.11.0
type RepoCredentials struct { URL string `json:"url,omitempty"` UsernameSecret *apiv1.SecretKeySelector `json:"usernameSecret,omitempty"` PasswordSecret *apiv1.SecretKeySelector `json:"passwordSecret,omitempty"` SshPrivateKeySecret *apiv1.SecretKeySelector `json:"sshPrivateKeySecret,omitempty"` }
type SettingsManager ¶
type SettingsManager struct {
// contains filtered or unexported fields
}
SettingsManager holds config info for a new manager with which to access Kubernetes ConfigMaps.
func NewSettingsManager ¶
func NewSettingsManager(clientset kubernetes.Interface, namespace string) *SettingsManager
NewSettingsManager generates a new SettingsManager pointer and returns it
func (*SettingsManager) GetSettings ¶
func (mgr *SettingsManager) GetSettings() (*ArgoCDSettings, error)
GetSettings retrieves settings from the ArgoCDConfigMap and secret.
func (*SettingsManager) MigrateLegacyRepoSettings ¶ added in v0.11.0
func (mgr *SettingsManager) MigrateLegacyRepoSettings(settings *ArgoCDSettings) error
MigrateLegacyRepoSettings migrates legacy (v0.10 and below) repo secrets into the v0.11 configmap
func (*SettingsManager) SaveSettings ¶
func (mgr *SettingsManager) SaveSettings(settings *ArgoCDSettings) error
SaveSettings serializes ArgoCDSettings and upserts it into K8s secret/configmap
func (*SettingsManager) StartNotifier ¶ added in v0.4.4
func (mgr *SettingsManager) StartNotifier(ctx context.Context, a *ArgoCDSettings)
StartNotifier starts background goroutines to update the supplied settings instance with new updates
func (*SettingsManager) Subscribe ¶ added in v0.4.4
func (mgr *SettingsManager) Subscribe(subCh chan<- struct{})
Subscribe registers a channel in which to subscribe to settings updates
func (*SettingsManager) Unsubscribe ¶ added in v0.4.4
func (mgr *SettingsManager) Unsubscribe(subCh chan<- struct{})
Unsubscribe unregisters a channel from receiving of settings updates