Documentation ¶
Index ¶
- func ReadAndConfirmPassword() string
- type ArgoCDSettings
- type SettingsManager
- func (mgr *SettingsManager) GetSettings() (*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 ¶
func ReadAndConfirmPassword ¶ added in v0.6.0
func ReadAndConfirmPassword() string
Types ¶
type ArgoCDSettings ¶
type ArgoCDSettings struct { // URL is the externally facing URL users will visit to reach ArgoCD. // The value here is used when configuring SSO. Omitting this value will disable SSO. URL string `json:"url,omitempty"` // DexConfig is contains portions of a dex config yaml DexConfig string `json:"dexConfig,omitempty"` // LocalUsers holds users local to (stored on) the server. This is to be distinguished from any potential alternative future login providers (LDAP, SAML, etc.) that might ever be added. LocalUsers map[string]string `json:"localUsers,omitempty"` // ServerSignature holds the key used to generate JWT tokens. ServerSignature []byte `json:"serverSignature,omitempty"` // Certificate holds the certificate/private key for the ArgoCD 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"` }
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
UpdateSettings is used to update the admin password, signature, certificate etc
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) OAuth2ClientSecret ¶ added in v0.4.0
func (a *ArgoCDSettings) OAuth2ClientSecret() string
OAuth2ClientSecret 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) 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 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 ArgoCD configmap and secret.
func (*SettingsManager) SaveSettings ¶
func (mgr *SettingsManager) SaveSettings(settings *ArgoCDSettings) error
SaveSettings serializes ArgoCD settings 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