Documentation ¶
Index ¶
- func ReplaceStringSecret(val string, secretValues map[string]string) string
- type ArgoCDSettings
- func (a *ArgoCDSettings) DexOAuth2ClientSecret() string
- func (a *ArgoCDSettings) GetAppInstanceLabelKey() string
- func (a *ArgoCDSettings) IsDexConfigured() bool
- func (a *ArgoCDSettings) IsExcludedResource(apiGroup, kind, cluster string) 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 FilteredResource
- type HelmRepoCredentials
- type OIDCConfig
- type RepoCredentials
- type SettingsManager
- func (mgr *SettingsManager) GetResourceOverrides() (map[string]v1alpha1.ResourceOverride, error)
- func (mgr *SettingsManager) GetSecretsLister() (v1listers.SecretLister, error)
- func (mgr *SettingsManager) GetSettings() (*ArgoCDSettings, error)
- func (mgr *SettingsManager) InitializeSettings() (*ArgoCDSettings, error)
- func (mgr *SettingsManager) MigrateLegacyRepoSettings(settings *ArgoCDSettings) error
- func (mgr *SettingsManager) ResyncInformers() error
- func (mgr *SettingsManager) SaveSettings(settings *ArgoCDSettings) error
- func (mgr *SettingsManager) Subscribe(subCh chan<- *ArgoCDSettings)
- func (mgr *SettingsManager) Unsubscribe(subCh chan<- *ArgoCDSettings)
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 repo credentials RepositoryCredentials []RepoCredentials // Repositories holds list of configured helm repositories HelmRepositories []HelmRepoCredentials // AppInstanceLabelKey is the configured application instance label key used to label apps. May be empty AppInstanceLabelKey string // ConfigManagementPlugins hols list of configured config management plugins ConfigManagementPlugins []v1alpha1.ConfigManagementPlugin // ResourceOverrides holds the overrides for specific resources. The keys are in the format of `group/kind` // (e.g. argoproj.io/rollout) for the resource that is being overridden ResourceOverrides map[string]v1alpha1.ResourceOverride // ResourceExclusions holds the api groups, kinds per cluster to exclude from Argo CD's watch ResourceExclusions []FilteredResource // ResourceInclusions holds the only api groups, kinds per cluster that Argo CD will watch ResourceInclusions []FilteredResource }
ArgoCDSettings holds in-memory runtime configuration options.
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) GetAppInstanceLabelKey ¶ added in v0.11.0
func (a *ArgoCDSettings) GetAppInstanceLabelKey() string
func (*ArgoCDSettings) IsDexConfigured ¶ added in v0.11.0
func (a *ArgoCDSettings) IsDexConfigured() bool
func (*ArgoCDSettings) IsExcludedResource ¶ added in v0.12.0
func (a *ArgoCDSettings) IsExcludedResource(apiGroup, kind, cluster string) bool
Behavior of this function is as follows: +-------------+-------------+-------------+ | Inclusions | Exclusions | Result | +-------------+-------------+-------------+ | Empty | Empty | Allowed | +-------------+-------------+-------------+ | Present | Empty | Allowed | +-------------+-------------+-------------+ | Not Present | Empty | Not Allowed | +-------------+-------------+-------------+ | Empty | Present | Not Allowed | +-------------+-------------+-------------+ | Empty | Not Present | Allowed | +-------------+-------------+-------------+ | Present | Not Present | Allowed | +-------------+-------------+-------------+ | Not Present | Present | Not Allowed | +-------------+-------------+-------------+ | Not Present | Not Present | Not Allowed | +-------------+-------------+-------------+ | Present | Present | Not Allowed | +-------------+-------------+-------------+
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 FilteredResource ¶ added in v1.0.0
type FilteredResource struct { APIGroups []string `json:"apiGroups,omitempty"` Kinds []string `json:"kinds,omitempty"` Clusters []string `json:"clusters,omitempty"` }
func (FilteredResource) Match ¶ added in v1.0.0
func (r FilteredResource) Match(apiGroup, kind, cluster string) bool
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"` InsecureIgnoreHostKey bool `json:"insecureIgnoreHostKey,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(ctx context.Context, clientset kubernetes.Interface, namespace string) *SettingsManager
NewSettingsManager generates a new SettingsManager pointer and returns it
func (*SettingsManager) GetResourceOverrides ¶ added in v1.0.0
func (mgr *SettingsManager) GetResourceOverrides() (map[string]v1alpha1.ResourceOverride, error)
GetResouceOverrides loads Resource Overrides from argocd-cm ConfigMap
func (*SettingsManager) GetSecretsLister ¶ added in v0.11.0
func (mgr *SettingsManager) GetSecretsLister() (v1listers.SecretLister, error)
func (*SettingsManager) GetSettings ¶
func (mgr *SettingsManager) GetSettings() (*ArgoCDSettings, error)
GetSettings retrieves settings from the ArgoCDConfigMap and secret.
func (*SettingsManager) InitializeSettings ¶ added in v0.11.0
func (mgr *SettingsManager) InitializeSettings() (*ArgoCDSettings, error)
InitializeSettings is used to initialize empty admin password, signature, certificate etc if missing
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) ResyncInformers ¶ added in v0.11.0
func (mgr *SettingsManager) ResyncInformers() error
func (*SettingsManager) SaveSettings ¶
func (mgr *SettingsManager) SaveSettings(settings *ArgoCDSettings) error
SaveSettings serializes ArgoCDSettings and upserts it into K8s secret/configmap
func (*SettingsManager) Subscribe ¶ added in v0.4.4
func (mgr *SettingsManager) Subscribe(subCh chan<- *ArgoCDSettings)
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<- *ArgoCDSettings)
Unsubscribe unregisters a channel from receiving of settings updates