Add install configmap override flag#47
Add install configmap override flag#47merenbach merged 38 commits intoargoproj:masterfrom merenbach:add-tls-and-auth-support
Conversation
install/install.go
Outdated
| // Use a Kubernetes ConfigMap, if provided. | ||
| if i.InstallOptions.ConfigMap != "" { | ||
| configMap := strconv.Quote(i.InstallOptions.ConfigMap) | ||
| container := &argoCDServerControllerDeployment.Spec.Template.Spec.InitContainers[0] |
There was a problem hiding this comment.
Use Containers instead of InitContainers.
util/configmanager.go
Outdated
| ) | ||
|
|
||
| // ConfigManager holds config info for a new manager with which to access Kubernetes ConfigMaps. | ||
| type ConfigManager struct { |
There was a problem hiding this comment.
Right now argocd only need to read settings from config map and referenced secrets. We don't have use for create/update methods. I think ConfigManager should be responsible to deserialize Argo CD settings structure from config/secrets. E.g. now it needs only one public method GetSettings which encapsulate settings deserialization:
type ConfigManager struct {
clientset kubernetes.Interface
configMapName string
}
func (mgr *ConfigManager) GetSettings() ArgoCDSettigns {
....
}
server/server.go
Outdated
| endpoint = fmt.Sprintf("localhost:%d", port) | ||
| ) | ||
|
|
||
| // ArgoCDServerSettings holds in-memory runtime configuration options. |
There was a problem hiding this comment.
As we discussed we will need to add more hardcoded parameters into settings structure (e.g. app resync timeout). These parameters are not specific to argocd server, so I would suggest to move settings struct definition into util package next to config manager
…nerate cluster cache mock; (argoproj#47)
Background
To get us moving on issue #29, we need to be able to configure the installed server with the name of a config map for settings overrides, including the name of a secret to evaluate against the admin password on attempted login.
Problem
No flags currently exist to provide a configmap override on install, and no generic retrieval for secrets or config maps is currently implemented.
Solution
Add a configmap override for install and argocd-server invocation, along with util methods (and matching tests!) to administer config maps and secrets.