Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extraArgs allows same flag multiple times #244

Closed
wants to merge 14 commits into from

Conversation

carlosjgp
Copy link
Contributor

Relates to #232

This change allows ArgoCD chart to render multiple times the same flag with different values

Mainly, if not only, used to specify multiple Redis Sentinel addresses
https://github.com/argoproj/argo-cd/blob/5ec5aeb002cfc9167dba0fb77e7a08a2dc0932cf/manifests/ha/base/overlays/argocd-application-controller-deployment.yaml#L16
https://github.com/argoproj/argo-cd/blob/aeb48b0a69be764f381511f7749d1e094fc79225/util/cache/cache.go#L33

--sentinel 

using this syntax

controller:
  extraArgs:
  - --sentinel
  - argocd-redis-ha-announce-0
  - --sentinel
  - argocd-redis-ha-announce-1
  - --sentinel
  - argocd-redis-ha-announce-2

instead of

controller:
  extraArgs:
    sentinel=argocd-redis-ha-announce-0:
    sentinel=argocd-redis-ha-announce-1:
    sentinel=argocd-redis-ha-announce-2:

Basically same syntax as the flags documentation

docker run --rm argoproj/argocd:v1.4.2 argocd-server help
...
Flags:
      --app-state-cache-expiration duration           Cache expiration for app state (default 1h0m0s)
      --as string                                     Username to impersonate for the operation
      --as-group stringArray                          Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --basehref string                               Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from / (default "/")
      --certificate-authority string                  Path to a cert file for the certificate authority
      --client-certificate string                     Path to a client certificate file for TLS
      --client-key string                             Path to a client key file for TLS
      --cluster string                                The name of the kubeconfig cluster to use
      --connection-status-cache-expiration duration   Cache expiration for cluster/repo connection status (default 1h0m0s)
      --context string                                The name of the kubeconfig context to use
      --default-cache-expiration duration             Cache expiration default (default 24h0m0s)
      --dex-server string                             Dex server address (default "http://argocd-dex-server:5556")
      --disable-auth                                  Disable client authentication
      --gloglevel int                                 Set the glog logging level
  -h, --help                                          help for argocd-server
      --insecure                                      Run server without TLS
      --insecure-skip-tls-verify                      If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string                             Path to a kube config. Only required if out-of-cluster
      --loglevel string                               Set the logging level. One of: debug|info|warn|error (default "info")
      --metrics-port int                              Start metrics on given port (default 8083)
  -n, --namespace string                              If present, the namespace scope for this CLI request
      --oidc-cache-expiration duration                Cache expiration for OIDC state (default 3m0s)
      --password string                               Password for basic authentication to the API server
      --port int                                      Listen on given port (default 8080)
      --redis string                                  Redis server hostname and port (e.g. argocd-redis:6379). 
      --redisdb int                                   Redis database.
      --repo-server string                            Repo server address (default "argocd-repo-server:8081")
      --repo-server-timeout-seconds int               Repo server RPC call timeout seconds. (default 60)
      --request-timeout string                        The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
      --sentinel stringArray                          Redis sentinel hostname and port (e.g. argocd-redis-ha-announce-0:6379). 
      --sentinelmaster string                         Redis sentinel master group name. (default "master")
      --server string                                 The address and port of the Kubernetes API server
      --staticassets string                           Static assets directory path
      --tlsmaxversion string                          The maximum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
      --tlsminversion string                          The minimum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
      --token string                                  Bearer token for authentication to the API server
      --user string                                   The name of the kubeconfig user to use
      --username string                               Username for basic authentication to the API server
      --x-frame-options value                         Set X-Frame-Options header in HTTP responses to value. To disable, set to "". (default "sameorigin")

Signed-off-by: Carlos Juan Gómez Peñalver carlosjuangp@gmail.com

Checklist:

  • I have update the chart version in Chart.yaml following Semantic Versioning.
  • Any new values are backwards compatible and/or have sensible default.
  • I have followed the testing instructions in the contributing guide.
  • I have signed the CLA and the build is green.
  • I will test my changes again once merged to master and published.

Changes are automatically published when merged to master. They are not published on branches.

Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
@carlosjgp
Copy link
Contributor Author

carlosjgp commented Feb 19, 2020

Looks like --as-group will also benefit from these change

@seanson seanson added argo-cd bug Something isn't working labels Feb 22, 2020
Carlos Juan Gómez Peñalver and others added 11 commits February 25, 2020 08:33
Co-Authored-By: Spencer Gilbert <Spencer.Gilbert@gmail.com>
…j#248)

Signed-off-by: David Karlsen <david@davidkarlsen.com>
…j#245)

* fix: reorder hpa metrics to avoid displaying diffs in argocd
* Fixing podLabels in deployment templates
* Updating chart version
* Fix indentation typo on example

* Bump chart version
* Fix volumeMounts indention for argocd-server

VolumeMounts have to be indented with 8 spaces.

* chore: bump chart version

* Fix volumes indention for argo-server

* Bump version
Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
@carlosjgp carlosjgp requested a review from benjaminws as a code owner March 10, 2020 23:05
carlosjgp added a commit to carlosjgp/argo-helm that referenced this pull request Mar 14, 2020
Superseeds argoproj#244 (I messed up the rebase 🤦)

Relates to argoproj#232

This change allows ArgoCD chart to render multiple times the same flag with different values

Mainly, if not only, used to specify multiple Redis Sentinel addresses
https://github.com/argoproj/argo-cd/blob/5ec5aeb002cfc9167dba0fb77e7a08a2dc0932cf/manifests/ha/base/overlays/argocd-application-controller-deployment.yaml#L16
https://github.com/argoproj/argo-cd/blob/aeb48b0a69be764f381511f7749d1e094fc79225/util/cache/cache.go#L33
```
--sentinel
```

using this syntax
```
controller:
  extraArgs:
  - --sentinel
  - argocd-redis-ha-announce-0
  - --sentinel
  - argocd-redis-ha-announce-1
  - --sentinel
  - argocd-redis-ha-announce-2
```

instead of

```
controller:
  extraArgs:
    sentinel=argocd-redis-ha-announce-0:
    sentinel=argocd-redis-ha-announce-1:
    sentinel=argocd-redis-ha-announce-2:
```

Basically same syntax as the flags documentation
```
docker run --rm argoproj/argocd:v1.4.2 argocd-server help
...
Flags:
      --app-state-cache-expiration duration           Cache expiration for app state (default 1h0m0s)
      --as string                                     Username to impersonate for the operation
      --as-group stringArray                          Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --basehref string                               Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from / (default "/")
      --certificate-authority string                  Path to a cert file for the certificate authority
      --client-certificate string                     Path to a client certificate file for TLS
      --client-key string                             Path to a client key file for TLS
      --cluster string                                The name of the kubeconfig cluster to use
      --connection-status-cache-expiration duration   Cache expiration for cluster/repo connection status (default 1h0m0s)
      --context string                                The name of the kubeconfig context to use
      --default-cache-expiration duration             Cache expiration default (default 24h0m0s)
      --dex-server string                             Dex server address (default "http://argocd-dex-server:5556")
      --disable-auth                                  Disable client authentication
      --gloglevel int                                 Set the glog logging level
  -h, --help                                          help for argocd-server
      --insecure                                      Run server without TLS
      --insecure-skip-tls-verify                      If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string                             Path to a kube config. Only required if out-of-cluster
      --loglevel string                               Set the logging level. One of: debug|info|warn|error (default "info")
      --metrics-port int                              Start metrics on given port (default 8083)
  -n, --namespace string                              If present, the namespace scope for this CLI request
      --oidc-cache-expiration duration                Cache expiration for OIDC state (default 3m0s)
      --password string                               Password for basic authentication to the API server
      --port int                                      Listen on given port (default 8080)
      --redis string                                  Redis server hostname and port (e.g. argocd-redis:6379).
      --redisdb int                                   Redis database.
      --repo-server string                            Repo server address (default "argocd-repo-server:8081")
      --repo-server-timeout-seconds int               Repo server RPC call timeout seconds. (default 60)
      --request-timeout string                        The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
      --sentinel stringArray                          Redis sentinel hostname and port (e.g. argocd-redis-ha-announce-0:6379).
      --sentinelmaster string                         Redis sentinel master group name. (default "master")
      --server string                                 The address and port of the Kubernetes API server
      --staticassets string                           Static assets directory path
      --tlsmaxversion string                          The maximum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
      --tlsminversion string                          The minimum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
      --token string                                  Bearer token for authentication to the API server
      --user string                                   The name of the kubeconfig user to use
      --username string                               Username for basic authentication to the API server
      --x-frame-options value                         Set X-Frame-Options header in HTTP responses to value. To disable, set to "". (default "sameorigin")
```

Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
@carlosjgp
Copy link
Contributor Author

Superseded by #265

@carlosjgp carlosjgp closed this Mar 14, 2020
spencergilbert pushed a commit that referenced this pull request Mar 19, 2020
* feat: extraArgs allows same flag multiple times

Superseeds #244 (I messed up the rebase 🤦)

Relates to #232

This change allows ArgoCD chart to render multiple times the same flag with different values

Mainly, if not only, used to specify multiple Redis Sentinel addresses
https://github.com/argoproj/argo-cd/blob/5ec5aeb002cfc9167dba0fb77e7a08a2dc0932cf/manifests/ha/base/overlays/argocd-application-controller-deployment.yaml#L16
https://github.com/argoproj/argo-cd/blob/aeb48b0a69be764f381511f7749d1e094fc79225/util/cache/cache.go#L33
```
--sentinel
```

using this syntax
```
controller:
  extraArgs:
  - --sentinel
  - argocd-redis-ha-announce-0
  - --sentinel
  - argocd-redis-ha-announce-1
  - --sentinel
  - argocd-redis-ha-announce-2
```

instead of

```
controller:
  extraArgs:
    sentinel=argocd-redis-ha-announce-0:
    sentinel=argocd-redis-ha-announce-1:
    sentinel=argocd-redis-ha-announce-2:
```

Basically same syntax as the flags documentation
```
docker run --rm argoproj/argocd:v1.4.2 argocd-server help
...
Flags:
      --app-state-cache-expiration duration           Cache expiration for app state (default 1h0m0s)
      --as string                                     Username to impersonate for the operation
      --as-group stringArray                          Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --basehref string                               Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from / (default "/")
      --certificate-authority string                  Path to a cert file for the certificate authority
      --client-certificate string                     Path to a client certificate file for TLS
      --client-key string                             Path to a client key file for TLS
      --cluster string                                The name of the kubeconfig cluster to use
      --connection-status-cache-expiration duration   Cache expiration for cluster/repo connection status (default 1h0m0s)
      --context string                                The name of the kubeconfig context to use
      --default-cache-expiration duration             Cache expiration default (default 24h0m0s)
      --dex-server string                             Dex server address (default "http://argocd-dex-server:5556")
      --disable-auth                                  Disable client authentication
      --gloglevel int                                 Set the glog logging level
  -h, --help                                          help for argocd-server
      --insecure                                      Run server without TLS
      --insecure-skip-tls-verify                      If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string                             Path to a kube config. Only required if out-of-cluster
      --loglevel string                               Set the logging level. One of: debug|info|warn|error (default "info")
      --metrics-port int                              Start metrics on given port (default 8083)
  -n, --namespace string                              If present, the namespace scope for this CLI request
      --oidc-cache-expiration duration                Cache expiration for OIDC state (default 3m0s)
      --password string                               Password for basic authentication to the API server
      --port int                                      Listen on given port (default 8080)
      --redis string                                  Redis server hostname and port (e.g. argocd-redis:6379).
      --redisdb int                                   Redis database.
      --repo-server string                            Repo server address (default "argocd-repo-server:8081")
      --repo-server-timeout-seconds int               Repo server RPC call timeout seconds. (default 60)
      --request-timeout string                        The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
      --sentinel stringArray                          Redis sentinel hostname and port (e.g. argocd-redis-ha-announce-0:6379).
      --sentinelmaster string                         Redis sentinel master group name. (default "master")
      --server string                                 The address and port of the Kubernetes API server
      --staticassets string                           Static assets directory path
      --tlsmaxversion string                          The maximum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
      --tlsminversion string                          The minimum SSL/TLS version that is acceptable (one of: 1.0|1.1|1.2)
      --token string                                  Bearer token for authentication to the API server
      --user string                                   The name of the kubeconfig user to use
      --username string                               Username for basic authentication to the API server
      --x-frame-options value                         Set X-Frame-Options header in HTTP responses to value. To disable, set to "". (default "sameorigin")
```

Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>

* fix: bump up chart version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argo-cd bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.