diff --git a/CHANGELOG.md b/CHANGELOG.md index 3817ed4066aa7..25f3f676d6042 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,7 +74,7 @@ The above command allows the `default` project to deploy any cluster-scoped reso the behavior of v0.8. * The secret keys in the argocd-secret containing the TLS certificate and key, has been renamed from - `server.crt` and `server.key` to the standard `tls.crt` and `tls.key` keys. This enables ArgoCD + `server.crt` and `server.key` to the standard `tls.crt` and `tls.key` keys. This enables Argo CD to integrate better with Ingress and cert-manager. When upgrading to v0.9, the `server.crt` and `server.key` keys in argocd-secret should be renamed to the new keys. @@ -85,8 +85,8 @@ the behavior of v0.8. + Redact K8s secrets from API server payloads (issue #470) + Support --in-cluster authentication without providing a kubeconfig (issue #527) + Special handling of CustomResourceDefinitions (issue #613) -+ ArgoCD should download helm chart dependencies (issue #582) -+ Export ArgoCD stats as prometheus style metrics (issue #513) ++ Argo CD should download helm chart dependencies (issue #582) ++ Export Argo CD stats as prometheus style metrics (issue #513) + Support restricting TLS version (issue #609) + Use 'kubectl auth reconcile' before 'kubectl apply' (issue #523) + Projects need controls on cluster-scoped resources (issue #330) @@ -107,7 +107,7 @@ the behavior of v0.8. - Fix issue where changes were not pulled when tracking a branch (issue #567) - Lazy enforcement of unknown cluster/namespace restricted resources (issue #599) - Fix controller hot loop when app source contains bad manifests (issue #568) -- Fix issue where ArgoCD fails to deploy when resources are in a K8s list format (issue #584) +- Fix issue where Argo CD fails to deploy when resources are in a K8s list format (issue #584) - Fix comparison failure when app contains unregistered custom resource (issue #583) - Fix issue where helm hooks were being deployed as part of sync (issue #605) - Fix race conditions in kube.GetResourcesWithLabel and DeleteResourceWithLabel (issue #587) @@ -116,7 +116,7 @@ the behavior of v0.8. - Helm hooks are being deployed as resources (issue #605) - Disagreement in three way diff calculation (issue #597) - SIGSEGV in kube.GetResourcesWithLabel (issue #587) -- ArgoCD fails to deploy resources list (issue #584) +- Argo CD fails to deploy resources list (issue #584) - Branch tracking not working properly (issue #567) - Controller hot loop when application source has bad manifests (issue #568) @@ -238,7 +238,7 @@ RBAC policy rules, need to be rewritten to include one extra column with the eff ## v0.5.0 (2018-06-12) + RBAC access control + Repository/Cluster state monitoring -+ ArgoCD settings import/export ++ Argo CD settings import/export + Application creation UI wizard + argocd app manifests for printing the application manifests + argocd app unset command to unset parameter overrides diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8b628e1e8204..fca2b6068611d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,10 +39,10 @@ NOTE: The make command can take a while, and we recommend building the specific * `make codegen` - Builds protobuf and swagger files * `make argocd-util` - Make the administrator's utility, used for certain tasks such as import/export -## Generating ArgoCD manifests for a specific image repository/tag +## Generating Argo CD manifests for a specific image repository/tag During development, the `update-manifests.sh` script, can be used to conveniently regenerate the -ArgoCD installation manifests with a customized image namespace and tag. This enables developers +Argo CD installation manifests with a customized image namespace and tag. This enables developers to easily apply manifests which are using the images that they pushed into their personal container repository. diff --git a/Dockerfile b/Dockerfile index c021ec95dcd8a..defd56e43ccad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,7 +71,7 @@ RUN curl -L -o /usr/local/bin/aws-iam-authenticator https://github.com/kubernete #################################################################################################### -# ArgoCD Build stage which performs the actual build of ArgoCD binaries +# Argo CD Build stage which performs the actual build of Argo CD binaries #################################################################################################### FROM golang:1.10.3 as argocd-build diff --git a/README.md b/README.md index f236a68c25618..b5b234ebcd863 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ the desired application state. Kubernetes manifests can be specified in several * Plain directory of YAML/json manifests Argo CD automates the deployment of the desired application states in the specified target environments. -Application deployments can track updates to branches, tags, or pinned to a specific version of +Application deployments can track updates to branches, tags, or pinned to a specific version of manifests at a git commit. See [tracking strategies](docs/tracking_strategies.md) for additional details about the different tracking strategies available. -For a quick 10 minute overview of ArgoCD, check out the demo presented to the Sig Apps community +For a quick 10 minute overview of Argo CD, check out the demo presented to the Sig Apps community meeting: [![Alt text](https://img.youtube.com/vi/aWDIQMbp1cc/0.jpg)](https://youtu.be/aWDIQMbp1cc?t=1m4s) diff --git a/cmd/argocd-server/commands/root.go b/cmd/argocd-server/commands/root.go index e48082be6f65b..f66b9b768619f 100644 --- a/cmd/argocd-server/commands/root.go +++ b/cmd/argocd-server/commands/root.go @@ -21,7 +21,7 @@ const ( // DefaultDexServerAddr is the HTTP address of the Dex OIDC server, which we run a reverse proxy against DefaultDexServerAddr = "http://dex-server:5556" - // DefaultRepoServerAddr is the gRPC address of the ArgoCD repo server + // DefaultRepoServerAddr is the gRPC address of the Argo CD repo server DefaultRepoServerAddr = "argocd-repo-server:8081" ) diff --git a/cmd/argocd-util/main.go b/cmd/argocd-util/main.go index 11efe98114507..e4254efe69b41 100644 --- a/cmd/argocd-util/main.go +++ b/cmd/argocd-util/main.go @@ -48,7 +48,7 @@ func NewCommand() *cobra.Command { var command = &cobra.Command{ Use: cliName, - Short: "argocd-util has internal tools used by ArgoCD", + Short: "argocd-util has internal tools used by Argo CD", Run: func(c *cobra.Command, args []string) { c.HelpFunc()(c, args) }, @@ -72,7 +72,7 @@ func NewRunDexCommand() *cobra.Command { ) var command = cobra.Command{ Use: "rundex", - Short: "Runs dex generating a config using settings from the ArgoCD configmap and secret", + Short: "Runs dex generating a config using settings from the Argo CD configmap and secret", RunE: func(c *cobra.Command, args []string) error { _, err := exec.LookPath("dex") errors.CheckError(err) @@ -139,7 +139,7 @@ func NewGenDexConfigCommand() *cobra.Command { ) var command = cobra.Command{ Use: "gendexcfg", - Short: "Generates a dex config from ArgoCD settings", + Short: "Generates a dex config from Argo CD settings", RunE: func(c *cobra.Command, args []string) error { config, err := clientConfig.ClientConfig() errors.CheckError(err) @@ -353,8 +353,8 @@ func NewSettingsCommand() *cobra.Command { ) var command = &cobra.Command{ Use: "settings", - Short: "Creates or updates ArgoCD settings", - Long: "Creates or updates ArgoCD settings", + Short: "Creates or updates Argo CD settings", + Long: "Creates or updates Argo CD settings", Run: func(c *cobra.Command, args []string) { conf, err := clientConfig.ClientConfig() errors.CheckError(err) diff --git a/cmd/argocd/commands/cluster.go b/cmd/argocd/commands/cluster.go index 2bc92fa30b83d..05249b308f796 100644 --- a/cmd/argocd/commands/cluster.go +++ b/cmd/argocd/commands/cluster.go @@ -103,7 +103,7 @@ func NewClusterAddCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clie }, } command.PersistentFlags().StringVar(&pathOpts.LoadingRules.ExplicitPath, pathOpts.ExplicitFileFlag, pathOpts.LoadingRules.ExplicitPath, "use a particular kubeconfig file") - command.Flags().BoolVar(&inCluster, "in-cluster", false, "Indicates ArgoCD resides inside this cluster and should connect using the internal k8s hostname (kubernetes.default.svc)") + command.Flags().BoolVar(&inCluster, "in-cluster", false, "Indicates Argo CD resides inside this cluster and should connect using the internal k8s hostname (kubernetes.default.svc)") command.Flags().BoolVar(&upsert, "upsert", false, "Override an existing cluster with the same name even if the spec differs") command.Flags().StringVar(&awsClusterName, "aws-cluster-name", "", "AWS Cluster name if set then aws-iam-authenticator will be used to access cluster") command.Flags().StringVar(&awsRoleArn, "aws-role-arn", "", "Optional AWS role arn. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain.") diff --git a/cmd/argocd/commands/root.go b/cmd/argocd/commands/root.go index bb6ac42538cc9..7b4e41424ce26 100644 --- a/cmd/argocd/commands/root.go +++ b/cmd/argocd/commands/root.go @@ -29,7 +29,7 @@ func NewCommand() *cobra.Command { var command = &cobra.Command{ Use: cliName, - Short: "argocd controls a ArgoCD server", + Short: "argocd controls a Argo CD server", Run: func(c *cobra.Command, args []string) { c.HelpFunc()(c, args) }, @@ -47,8 +47,8 @@ func NewCommand() *cobra.Command { defaultLocalConfigPath, err := localconfig.DefaultLocalConfigPath() errors.CheckError(err) - command.PersistentFlags().StringVar(&clientOpts.ConfigPath, "config", defaultLocalConfigPath, "Path to ArgoCD config") - command.PersistentFlags().StringVar(&clientOpts.ServerAddr, "server", "", "ArgoCD server address") + command.PersistentFlags().StringVar(&clientOpts.ConfigPath, "config", defaultLocalConfigPath, "Path to Argo CD config") + command.PersistentFlags().StringVar(&clientOpts.ServerAddr, "server", "", "Argo CD server address") command.PersistentFlags().BoolVar(&clientOpts.PlainText, "plaintext", false, "Disable TLS") command.PersistentFlags().BoolVar(&clientOpts.Insecure, "insecure", false, "Skip server certificate and domain verification") command.PersistentFlags().StringVar(&clientOpts.CertFile, "server-crt", "", "Server certificate file") diff --git a/common/common.go b/common/common.go index 6fc2d093df989..3ccd42aca73e3 100644 --- a/common/common.go +++ b/common/common.go @@ -35,16 +35,16 @@ const ( const ( // DexAPIEndpoint is the endpoint where we serve the Dex API server DexAPIEndpoint = "/api/dex" - // LoginEndpoint is ArgoCD's shorthand login endpoint which redirects to dex's OAuth 2.0 provider's consent page + // LoginEndpoint is Argo CD's shorthand login endpoint which redirects to dex's OAuth 2.0 provider's consent page LoginEndpoint = "/auth/login" - // CallbackEndpoint is ArgoCD's final callback endpoint we reach after OAuth 2.0 login flow has been completed + // CallbackEndpoint is Argo CD's final callback endpoint we reach after OAuth 2.0 login flow has been completed CallbackEndpoint = "/auth/callback" // ArgoCDClientAppName is name of the Oauth client app used when registering our web app to dex - ArgoCDClientAppName = "ArgoCD" + ArgoCDClientAppName = "Argo CD" // ArgoCDClientAppID is the Oauth client ID we will use when registering our app to dex ArgoCDClientAppID = "argo-cd" // ArgoCDCLIClientAppName is name of the Oauth client app used when registering our CLI to dex - ArgoCDCLIClientAppName = "ArgoCD CLI" + ArgoCDCLIClientAppName = "Argo CD CLI" // ArgoCDCLIClientAppID is the Oauth client ID we will use when registering our CLI to dex ArgoCDCLIClientAppID = "argo-cd-cli" // EnvVarSSODebug is an environment variable to enable additional OAuth debugging in the API server diff --git a/controller/state.go b/controller/state.go index 601e43d042019..cbe5b49edd615 100644 --- a/controller/state.go +++ b/controller/state.go @@ -186,7 +186,7 @@ func (s *appStateManager) getLiveObjs(app *v1alpha1.Application, targetObjs []*u if liveObj == nil && targetObj.GetName() != "" { // If we get here, it indicates we did not find the live resource when querying using // our app label. However, it is possible that the resource was created/modified outside - // of ArgoCD. In order to determine that it is truly missing, we fall back to perform a + // of Argo CD. In order to determine that it is truly missing, we fall back to perform a // direct lookup of the resource by name. See issue #141 gvk := targetObj.GroupVersionKind() apiResource, err := kubeutil.ServerResourceForGroupVersionKind(disco, gvk) diff --git a/controller/sync.go b/controller/sync.go index 4eddefd25f2ee..2c69f8f19b5a5 100644 --- a/controller/sync.go +++ b/controller/sync.go @@ -529,7 +529,7 @@ func (sc *syncContext) doHookSync(syncTasks []syncTask, hooks []*unstructured.Un sc.setOperationPhase(appv1.OperationSucceeded, "successfully synced") } -// getHooks returns all ArgoCD hooks, optionally filtered by ones of the specific type(s) +// getHooks returns all Argo CD hooks, optionally filtered by ones of the specific type(s) func (sc *syncContext) getHooks(hookTypes ...appv1.HookType) ([]*unstructured.Unstructured, error) { var hooks []*unstructured.Unstructured for _, manifest := range sc.manifestInfo.Manifests { @@ -539,7 +539,7 @@ func (sc *syncContext) getHooks(hookTypes ...appv1.HookType) ([]*unstructured.Un return nil, err } if !isArgoHook(&hook) { - // TODO: in the future, if we want to map helm hooks to ArgoCD lifecycles, we should + // TODO: in the future, if we want to map helm hooks to Argo CD lifecycles, we should // include helm hooks in the returned list continue } @@ -711,7 +711,7 @@ func isHookType(hook *unstructured.Unstructured, hookType appv1.HookType) bool { return false } -// isHook indicates if the object is either a ArgoCD or Helm hook +// isHook indicates if the object is either a Argo CD or Helm hook func isHook(obj *unstructured.Unstructured) bool { return isArgoHook(obj) || isHelmHook(obj) } @@ -726,7 +726,7 @@ func isHelmHook(obj *unstructured.Unstructured) bool { return ok } -// isArgoHook indicates if the supplied object is an ArgoCD application lifecycle hook +// isArgoHook indicates if the supplied object is an Argo CD application lifecycle hook // (vs. a normal, synced application resource) func isArgoHook(obj *unstructured.Unstructured) bool { annotations := obj.GetAnnotations() diff --git a/docs/README.md b/docs/README.md index df56ad49474e8..b4eb1e76e183a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -# ArgoCD Documentation +# Argo CD Documentation ## [Getting Started](getting_started.md) diff --git a/docs/application_sources.md b/docs/application_sources.md index 987ea98221482..9fbd2f6f67b3e 100644 --- a/docs/application_sources.md +++ b/docs/application_sources.md @@ -1,6 +1,6 @@ # Application Source Types -ArgoCD supports several different ways in which kubernetes manifests can be defined: +Argo CD supports several different ways in which kubernetes manifests can be defined: * [ksonnet](https://ksonnet.io) applications * [kustomize](https://kustomize.io) applications @@ -36,7 +36,7 @@ guestbook-ui servicePort 80 guestbook-ui type "LoadBalancer" ``` -When overriding ksonnet parameters in ArgoCD, the component name should also be specified in the +When overriding ksonnet parameters in Argo CD, the component name should also be specified in the `argocd app set` command, in the form of `-p COMPONENT=PARAM=VALUE`. For example: ``` argocd app set guestbook-default -p guestbook-ui=image=gcr.io/heptio-images/ks-guestbook-demo:0.1 @@ -61,7 +61,7 @@ a `values.yaml`. For example, `service.type` is a common parameter which is expo ``` helm template . --set service.type=LoadBalancer ``` -Similarly ArgoCD can override values in the `values.yaml` parameters using `argo app set` command, +Similarly Argo CD can override values in the `values.yaml` parameters using `argo app set` command, in the form of `-p PARAM=VALUE`. For example: ``` argocd app set helm-guestbook -p service.type=LoadBalancer @@ -69,16 +69,16 @@ argocd app set helm-guestbook -p service.type=LoadBalancer ### Helm Hooks -Helm hooks are equivalent in concept to [ArgoCD resource hooks](resource_hooks.md). In helm, a hook -is any normal kubernetes resource annotated with the `helm.sh/hook` annotation. When ArgoCD deploys +Helm hooks are equivalent in concept to [Argo CD resource hooks](resource_hooks.md). In helm, a hook +is any normal kubernetes resource annotated with the `helm.sh/hook` annotation. When Argo CD deploys helm application which contains helm hooks, all helm hook resources are currently ignored during -the `kubectl apply` of the manifests. There is an -[open issue](https://github.com/argoproj/argo-cd/issues/355) to map Helm hooks to ArgoCD's concept +the `kubectl apply` of the manifests. There is an +[open issue](https://github.com/argoproj/argo-cd/issues/355) to map Helm hooks to Argo CD's concept of Pre/Post/Sync hooks. - + ### Random Data -Helm templating has the ability to generate random data during chart rendering via the +Helm templating has the ability to generate random data during chart rendering via the `randAlphaNum` function. Many helm charts from the [charts repository](https://github.com/helm/charts) make use of this feature. For example, the following is the secret for the [redis helm chart](https://github.com/helm/charts/blob/master/stable/redis/templates/secrets.yaml): @@ -92,7 +92,7 @@ data: {{- end }} ``` -The ArgoCD application controller periodically compares git state against the live state, running +The Argo CD application controller periodically compares git state against the live state, running the `helm template ` command to generate the helm manifests. Because the random value is regenerated every time the comparison is made, any application which makes use of the `randAlphaNum` function will always be in an `OutOfSync` state. This can be mitigated by explicitly setting a diff --git a/docs/auto_sync.md b/docs/auto_sync.md index 4a4479af1f1ce..c0559a8823e8d 100644 --- a/docs/auto_sync.md +++ b/docs/auto_sync.md @@ -1,14 +1,14 @@ # Automated Sync Policy -ArgoCD has the ability to automatically sync an application when it detects differences between +Argo CD has the ability to automatically sync an application when it detects differences between the desired manifests in git, and the live state in the cluster. A benefit of automatic sync is that -CI/CD pipelines no longer need direct access to the ArgoCD API server to perform the deployment. +CI/CD pipelines no longer need direct access to the Argo CD API server to perform the deployment. Instead, the pipeline makes a commit and push to the git repository with the changes to the manifests in the tracking git repo. To configure automated sync run: ```bash -argocd app set --sync-policy automated +argocd app set --sync-policy automated ``` Alternatively, if creating the application an application manifest, specify a syncPolicy with an @@ -21,7 +21,7 @@ spec: ## Automatic Pruning -By default (and as a safety mechanism), automated sync will not delete resources when ArgoCD detects +By default (and as a safety mechanism), automated sync will not delete resources when Argo CD detects the resource is no longer defined in git. To prune the resources, a manual sync can always be performed (with pruning checked). Pruning can also be enabled to happen automatically as part of the automated sync by running: diff --git a/docs/getting_started.md b/docs/getting_started.md index 6b33dc7aee884..f01d0f7c0bdc3 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -1,17 +1,17 @@ -# ArgoCD Getting Started +# Argo CD Getting Started -An example guestbook application is provided to demonstrate how ArgoCD works. +An example guestbook application is provided to demonstrate how Argo CD works. ## Requirements * Installed [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) command-line tool * Have a [kubeconfig](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) file (default location is `~/.kube/config`). -## 1. Install ArgoCD +## 1. Install Argo CD ```bash kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v0.10.3/manifests/install.yaml ``` -This will create a new namespace, `argocd`, where ArgoCD services and application resources will live. +This will create a new namespace, `argocd`, where Argo CD services and application resources will live. NOTE: * On GKE with RBAC enabled, you may need to grant your account the ability to create new cluster roles @@ -19,9 +19,9 @@ NOTE: kubectl create clusterrolebinding YOURNAME-cluster-admin-binding --clusterrole=cluster-admin --user=YOUREMAIL@gmail.com ``` -## 2. Download ArgoCD CLI +## 2. Download Argo CD CLI -Download the latest ArgoCD version: +Download the latest Argo CD version: On Mac: ```bash @@ -35,10 +35,10 @@ curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/ chmod +x /usr/local/bin/argocd ``` -## 3. Access the ArgoCD API server +## 3. Access the Argo CD API server -By default, the ArgoCD API server is not exposed with an external IP. To access the API server, -choose one of the following means to expose the ArgoCD API server: +By default, the Argo CD API server is not exposed with an external IP. To access the API server, +choose one of the following means to expose the Argo CD API server: ### Service Type LoadBalancer Change the argocd-server service type to `LoadBalancer`: @@ -48,7 +48,7 @@ kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}} ``` ### Ingress -Follow the [ingress documentation](ingress.md) on how to configure ArgoCD with ingress. +Follow the [ingress documentation](ingress.md) on how to configure Argo CD with ingress. ### Port Forwarding `kubectl port-forward` can also be used to connect to the API server without exposing the service. @@ -58,12 +58,12 @@ The API server can be accessed using the localhost address/port. ## 4. Login using the CLI Login as the `admin` user. The initial password is autogenerated to be the pod name of the -ArgoCD API server. This can be retrieved with the command: +Argo CD API server. This can be retrieved with the command: ```bash kubectl get pods -n argocd -l app=argocd-server -o name | cut -d'/' -f 2 ``` -Using the above password, login to ArgoCD's external IP: +Using the above password, login to Argo CD's external IP: ```bash kubectl get svc -n argocd argocd-server argocd login @@ -78,8 +78,8 @@ argocd relogin ## 5. Register a cluster to deploy apps to (optional) -This step registers a cluster's credentials to ArgoCD, and is only necessary when deploying to -an external cluster. When deploying internally (to the same cluster that ArgoCD is running in), +This step registers a cluster's credentials to Argo CD, and is only necessary when deploying to +an external cluster. When deploying internally (to the same cluster that Argo CD is running in), https://kubernetes.default.svc should be used as the application's K8s API server address. First list all clusters contexts in your current kubconfig: @@ -94,7 +94,7 @@ argocd cluster add docker-for-desktop ``` The above command installs an `argocd-manager` ServiceAccount and ClusterRole into the cluster -associated with the supplied kubectl context. ArgoCD uses this service account token to perform its +associated with the supplied kubectl context. Argo CD uses this service account token to perform its management tasks (i.e. deploy/monitoring). @@ -102,10 +102,10 @@ management tasks (i.e. deploy/monitoring). ### Creating apps via UI -Open a browser to the ArgoCD external UI, and login using the credentials set in step 4, and the +Open a browser to the Argo CD external UI, and login using the credentials set in step 4, and the external IP/hostname set in step 4. -Connect a git repository containing your apps. An example repository containing a sample +Connect a git repository containing your apps. An example repository containing a sample guestbook application is available at https://github.com/argoproj/argocd-example-apps.git. ![connect repo](assets/connect_repo.png) @@ -120,7 +120,7 @@ After connecting a git repository, select the guestbook application for creation ### Creating apps via CLI -Applications can be also be created using the ArgoCD CLI: +Applications can be also be created using the Argo CD CLI: ```bash argocd app create guestbook-default --repo https://github.com/argoproj/argocd-example-apps.git --path ksonnet-guestbook @@ -165,7 +165,7 @@ Service guestbook-ui service "guestbook-ui" created Deployment guestbook-ui deployment.apps "guestbook-ui" created ``` -This command retrieves the manifests from git repository and performs a `kubectl apply` of the +This command retrieves the manifests from git repository and performs a `kubectl apply` of the manifests. The guestbook app is now running and you can now view its resource components, logs, events, and assessed health status: @@ -173,5 +173,5 @@ events, and assessed health status: ## 8. Next Steps -ArgoCD supports additional features such as automated sync, SSO, WebHooks, RBAC, Projects. See the +Argo CD supports additional features such as automated sync, SSO, WebHooks, RBAC, Projects. See the rest of the [documentation](./) for details. diff --git a/docs/health.md b/docs/health.md index 6f0df24f5f85e..78972a4365c8c 100644 --- a/docs/health.md +++ b/docs/health.md @@ -1,7 +1,7 @@ # Resource Health ## Overview -ArgoCD provides built-in health assessment for several standard Kubernetes types, which is then +Argo CD provides built-in health assessment for several standard Kubernetes types, which is then surfaced to the overall Application health status as a whole. The following checks are made for specific types of kuberentes resources: diff --git a/docs/ingress.md b/docs/ingress.md index 8072dd95b14e6..c23575d814937 100644 --- a/docs/ingress.md +++ b/docs/ingress.md @@ -1,6 +1,6 @@ # Ingress Configuration -ArgoCD runs both a gRPC server (used by the CLI), as well as a HTTP/HTTPS server (used by the UI). +Argo CD runs both a gRPC server (used by the CLI), as well as a HTTP/HTTPS server (used by the UI). Both protocols are exposed by the argocd-server service object on the following ports: * 443 - gRPC/HTTPS * 80 - HTTP (redirects to HTTPS) @@ -11,14 +11,14 @@ There are several ways how Ingress can be configured. ### Option 1: ssl-passthrough -Because ArgoCD serves multiple protocols (gRPC/HTTPS) on the same port (443), this provides a +Because Argo CD serves multiple protocols (gRPC/HTTPS) on the same port (443), this provides a challenge when attempting to define a single nginx ingress object and rule for the argocd-service, since the `nginx.ingress.kubernetes.io/backend-protocol` [annotation](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#backend-protocol) accepts only a single value for the backend protocol (e.g. HTTP, HTTPS, GRPC, GRPCS). -In order to expose the ArgoCD API server with a single ingress rule and hostname, the +In order to expose the Argo CD API server with a single ingress rule and hostname, the `nginx.ingress.kubernetes.io/ssl-passthrough` [annotation](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#ssl-passthrough) -must be used to passthrough TLS connections and terminate TLS at the ArgoCD API server. +must be used to passthrough TLS connections and terminate TLS at the Argo CD API server. ```yaml apiVersion: extensions/v1beta1 @@ -39,7 +39,7 @@ spec: servicePort: https ``` -The above rule terminates TLS at the ArgoCD API server, which detects the protocol being used, +The above rule terminates TLS at the Argo CD API server, which detects the protocol being used, and responds appropriately. Note that the `nginx.ingress.kubernetes.io/ssl-passthrough` annotation requires that the `--enable-ssl-passthrough` flag be added to the command line arguments to `nginx-ingress-controller`. @@ -122,5 +122,5 @@ happen at the ingress controller. ## AWS Application Load Balancers (ALBs) and Classic ELB (HTTP mode) Neither ALBs and Classic ELB in HTTP mode, do not have full support for HTTP2/gRPC which is the -protocol used by the `argocd` CLI. Thus, when using an AWS load balancer, either Classic ELB in +protocol used by the `argocd` CLI. Thus, when using an AWS load balancer, either Classic ELB in passthrough mode is needed, or NLBs. diff --git a/docs/internal/releasing.md b/docs/internal/releasing.md index 013c47444464e..0fd2450f561f4 100644 --- a/docs/internal/releasing.md +++ b/docs/internal/releasing.md @@ -1,4 +1,4 @@ -# ArgoCD Release Instructions +# Argo CD Release Instructions 1. Tag, build, and push argo-cd-ui ```bash @@ -17,7 +17,7 @@ git push upstream release-X.Y 3. Update VERSION and manifests with new version ```bash -vi VERSION # ensure value is desired X.Y.Z semantic version +vi VERSION # ensure value is desired X.Y.Z semantic version vi manifests/base/kustomization.yaml # update with new image tags make manifests git commit -a -m "Update manifests to vX.Y.Z" diff --git a/docs/parameters.md b/docs/parameters.md index 67e52aa338093..16cc200e19845 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -1,13 +1,13 @@ # Parameter Overrides -ArgoCD provides a mechanism to override the parameters of a ksonnet/helm app. This gives some extra +Argo CD provides a mechanism to override the parameters of a ksonnet/helm app. This gives some extra flexibility in having most of the application manifests defined in git, while leaving room for *some* parts of the k8s manifests determined dynamically, or outside of git. It also serves as an -alternative way of redeploying an application by changing application parameters via ArgoCD, instead +alternative way of redeploying an application by changing application parameters via Argo CD, instead of making the changes to the manifests in git. **NOTE:** many consider this mode of operation as an anti-pattern to GitOps, since the source of -truth becomes a union of the git repository, and the application overrides. The ArgoCD parameter +truth becomes a union of the git repository, and the application overrides. The Argo CD parameter overrides feature is provided mainly convenience to developers and is intended to be used more for dev/test environments, vs. production environments. @@ -17,14 +17,14 @@ argocd app set guestbook -p guestbook=image=example/guestbook:abcd123 argocd app sync guestbook ``` -The following are situations where parameter overrides would be useful: +The following are situations where parameter overrides would be useful: 1. A team maintains a "dev" environment, which needs to be continually updated with the latest version of their guestbook application after every build in the tip of master. To address this use case, the application would expose an parameter named `image`, whose value used in the `dev` environment contains a placeholder value (e.g. `example/guestbook:replaceme`). The placeholder value would be determined externally (outside of git) such as a build systems. Then, as part of the build -pipeline, the parameter value of the `image` would be continually updated to the freshly built image +pipeline, the parameter value of the `image` would be continually updated to the freshly built image (e.g. `argocd app set guestbook -p guestbook=image=example/guestbook:abcd123`). A sync operation would result in the application being redeployed with the new image. diff --git a/docs/projects.md b/docs/projects.md index da5d0224d260a..fb9edc615d40f 100644 --- a/docs/projects.md +++ b/docs/projects.md @@ -1,6 +1,6 @@ ## Projects -Projects provide a logical grouping of applications, which is useful when ArgoCD is used by multiple +Projects provide a logical grouping of applications, which is useful when Argo CD is used by multiple teams. Projects provide the following features: * ability to restrict *what* may be deployed (the git source repositories) @@ -77,7 +77,7 @@ Once projects have been defined, RBAC rules can be written to restrict access to in the project. The following example configures RBAC for two GitHub teams: `team1` and `team2`, both in the GitHub org, `some-github-org`. There are two projects, `project-a` and `project-b`. `team1` can only manage applications in `project-a`, while `team2` can only manage applications in -`project-b`. Both `team1` and `team2` have the ability to manage repositories. +`project-b`. Both `team1` and `team2` have the ability to manage repositories. *ConfigMap `argocd-rbac-cm` example:* @@ -108,7 +108,7 @@ These can be used to give a CI pipeline a restricted set of permissions. For exa may only be able to sync a single app (but not change its source or destination). Projects can have multiple roles, and those roles can have different access granted to them. These -permissions are called policies, and they are stored within the role as a list of policy strings. +permissions are called policies, and they are stored within the role as a list of policy strings. A role's policy can only grant access to that role and are limited to applications within the role's project. However, the policies have an option for granting wildcard access to any application within a project. @@ -125,19 +125,19 @@ argoproj proj role add-policy argoproj proj role remove-policy ``` -Project roles in itself are not useful without generating a token to associate to that role. ArgoCD +Project roles in itself are not useful without generating a token to associate to that role. Argo CD supports JWT tokens as the means to authenticate to a role. Since the JWT token is associated with a role's policies, any changes to the role's policies will immediately take effect for that JWT token. -The following commands are used to manage the JWT tokens. +The following commands are used to manage the JWT tokens. ```bash argoproj proj role create-token PROJECT ROLE-NAME argoproj proj role delete-token PROJECT ROLE-NAME ISSUED-AT ``` -Since the JWT tokens aren't stored in ArgoCD, they can only be retrieved when they are created. A +Since the JWT tokens aren't stored in Argo CD, they can only be retrieved when they are created. A user can leverage them in the cli by either passing them in using the `--auth-token` flag or setting the ARGOCD_AUTH_TOKEN environment variable. The JWT tokens can be used until they expire or are revoked. The JWT tokens can created with or without an expiration, but the default on the cli is @@ -164,7 +164,7 @@ argocd app get $APP --auth-token $JWT argocd proj role add-policy $PROJ $ROLE --action get --permission allow --object $APP argocd app get $PROJ-$ROLE --auth-token $JWT -# Removing the policy we added and adding one with a wildcard. +# Removing the policy we added and adding one with a wildcard. argocd proj role remove-policy $PROJ $TOKEN -a get -o $PROJ-$TOKEN argocd proj role remove-policy $PROJ $TOKEN -a get -o '*' # The wildcard allows us to access the application due to the wildcard. diff --git a/docs/rbac.md b/docs/rbac.md index c16d0aeb4d760..5850aaf06c26c 100644 --- a/docs/rbac.md +++ b/docs/rbac.md @@ -2,22 +2,22 @@ ## Overview -The RBAC feature enables restriction of access to ArgoCD resources. ArgoCD does not have its own +The RBAC feature enables restriction of access to Argo CD resources. Argo CD does not have its own user management system and has only one built-in user `admin`. The `admin` user is a superuser and it has unrestricted access to the system. RBAC requires [SSO configuration](./sso.md). Once SSO is configured, additional RBAC roles can be defined, and SSO groups can man be mapped to roles. ## Configure RBAC -RBAC configuration allows defining roles and groups. ArgoCD has two pre-defined roles: +RBAC configuration allows defining roles and groups. Argo CD has two pre-defined roles: * `role:readonly` - read-only access to all resources * `role:admin` - unrestricted access to all resources These role definitions can be seen in [builtin-policy.csv](../util/rbac/builtin-policy.csv) Additional roles and groups can be configured in `argocd-rbac-cm` ConfigMap. The example below configures a custom role, named `org-admin`. The role is assigned to any user which belongs to -`your-github-org:your-team` group. All other users get the default policy of `role:readonly`, -which cannot modify ArgoCD settings. +`your-github-org:your-team` group. All other users get the default policy of `role:readonly`, +which cannot modify Argo CD settings. *ConfigMap `argocd-rbac-cm` example:* diff --git a/docs/resource_hooks.md b/docs/resource_hooks.md index 6f72d5ec0b573..af802e221fdde 100644 --- a/docs/resource_hooks.md +++ b/docs/resource_hooks.md @@ -22,7 +22,7 @@ metadata: argocd.argoproj.io/hook: PreSync ``` -During a Sync operation, ArgoCD will create the resource during the appropriate stage of the +During a Sync operation, Argo CD will create the resource during the appropriate stage of the deployment. Hooks can be any type of Kuberentes resource kind, but tend to be most useful as [Kubernetes Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/) or [Argo Workflows](https://github.com/argoproj/argo). Multiple hooks can be specified as a comma @@ -35,7 +35,7 @@ The following hooks are defined: |------|-------------| | `PreSync` | Executes prior to the apply of the manifests. | | `Sync` | Executes after all `PreSync` hooks completed and were successful. Occurs in conjuction with the apply of the manifests. | -| `Skip` | Indicates to ArgoCD to skip the apply of the manifest. This is typically used in conjunction with a `Sync` hook which is presumably handling the deployment in an alternate way (e.g. blue-green deployment) | +| `Skip` | Indicates to Argo CD to skip the apply of the manifest. This is typically used in conjunction with a `Sync` hook which is presumably handling the deployment in an alternate way (e.g. blue-green deployment) | | `PostSync` | Executes after all `Sync` hooks completed and were successful, a succcessful apply, and all resources in a `Healthy` state. | diff --git a/docs/sso.md b/docs/sso.md index 3e1196888d369..fb575aec3ab15 100644 --- a/docs/sso.md +++ b/docs/sso.md @@ -2,42 +2,42 @@ ## Overview -ArgoCD embeds and bundles [Dex](https://github.com/coreos/dex) as part of its installation, for the +Argo CD embeds and bundles [Dex](https://github.com/coreos/dex) as part of its installation, for the purpose of delegating authentication to an external identity provider. Multiple types of identity -providers are supported (OIDC, SAML, LDAP, GitHub, etc...). SSO configuration of ArgoCD requires -editing the `argocd-cm` ConfigMap with -[Dex connector](https://github.com/coreos/dex/tree/master/Documentation/connectors) settings. +providers are supported (OIDC, SAML, LDAP, GitHub, etc...). SSO configuration of Argo CD requires +editing the `argocd-cm` ConfigMap with +[Dex connector](https://github.com/coreos/dex/tree/master/Documentation/connectors) settings. -This document describes how to configure ArgoCD SSO using GitHub (OAuth2) as an example, but the +This document describes how to configure Argo CD SSO using GitHub (OAuth2) as an example, but the steps should be similar for other identity providers. ### 1. Register the application in the identity provider In GitHub, register a new application. The callback address should be the `/api/dex/callback` -endpoint of your ArgoCD URL (e.g. https://argocd.example.com/api/dex/callback). +endpoint of your Argo CD URL (e.g. https://argocd.example.com/api/dex/callback). ![Register OAuth App](assets/register-app.png "Register OAuth App") After registering the app, you will receive an OAuth2 client ID and secret. These values will be -inputted into the ArgoCD configmap. +inputted into the Argo CD configmap. ![OAuth2 Client Config](assets/oauth2-config.png "OAuth2 Client Config") -### 2. Configure ArgoCD for SSO +### 2. Configure Argo CD for SSO Edit the argocd-cm configmap: ``` kubectl edit configmap argocd-cm ``` -* In the `url` key, input the base URL of ArgoCD. In this example, it is https://argocd.example.com +* In the `url` key, input the base URL of Argo CD. In this example, it is https://argocd.example.com * In the `dex.config` key, add the `github` connector to the `connectors` sub field. See Dex's [GitHub connector](https://github.com/coreos/dex/blob/master/Documentation/connectors/github.md) documentation for explanation of the fields. A minimal config should populate the clientID, clientSecret generated in Step 1. * You will very likely want to restrict logins to one or more GitHub organization. In the `connectors.config.orgs` list, add one or more GitHub organizations. Any member of the org will - then be able to login to ArgoCD to perform management tasks. + then be able to login to Argo CD to perform management tasks. ``` data: @@ -82,6 +82,6 @@ NOTES: * Any values which start with '$' will look to a key in argocd-secret of the same name (minus the $), to obtain the actual value. This allows you to store the `clientSecret` as a kubernetes secret. * There is no need to set `redirectURI` in the `connectors.config` as shown in the dex documentation. - ArgoCD will automatically use the correct `redirectURI` for any OAuth2 connectors, to match the + Argo CD will automatically use the correct `redirectURI` for any OAuth2 connectors, to match the correct external callback URL (e.g. https://argocd.example.com/api/dex/callback) diff --git a/docs/tracking_strategies.md b/docs/tracking_strategies.md index f98832cd96b85..3131def32830a 100644 --- a/docs/tracking_strategies.md +++ b/docs/tracking_strategies.md @@ -1,26 +1,26 @@ # Tracking and Deployment Strategies -An ArgoCD application spec provides several different ways of track kubernetes resource manifests in +An Argo CD application spec provides several different ways of track kubernetes resource manifests in git. This document describes the different techniques and the means of deploying those manifests to the target environment. ## HEAD / Branch Tracking -If a branch name, or a symbolic reference (like HEAD) is specified, ArgoCD will continually compare +If a branch name, or a symbolic reference (like HEAD) is specified, Argo CD will continually compare live state against the resource manifests defined at the tip of the specified branch or the deferenced commit of the symbolic reference. To redeploy an application, a user makes changes to the manifests, and commit/pushes those the -changes to the tracked branch/symbolic reference, which will then be detected by ArgoCD controller. +changes to the tracked branch/symbolic reference, which will then be detected by Argo CD controller. ## Tag Tracking -If a tag is specified, the manifests at the specified git tag will be used to perform the sync +If a tag is specified, the manifests at the specified git tag will be used to perform the sync comparison. This provides some advantages over branch tracking in that a tag is generally considered more stable, and less frequently updated, with some manual judgement of what constitutes a tag. To redeploy an application, the user uses git to change the meaning of a tag by retagging it to a -different commit SHA. ArgoCD will detect the new meaning of the tag when performing the +different commit SHA. Argo CD will detect the new meaning of the tag when performing the comparison/sync. ## Commit Pinning diff --git a/docs/webhook.md b/docs/webhook.md index 3f9db58fa2b45..703a72c3dcb26 100644 --- a/docs/webhook.md +++ b/docs/webhook.md @@ -2,21 +2,21 @@ ## Overview -ArgoCD will poll git repositories every three minutes for changes to the manifests. To eliminate -this delay from polling, the API server can be configured to receive webhook events. ArgoCD supports +Argo CD will poll git repositories every three minutes for changes to the manifests. To eliminate +this delay from polling, the API server can be configured to receive webhook events. Argo CD supports git webhook notifications from GitHub, GitLab, and BitBucket. The following explains how to configure a git webhook for GitHub, but the same process should be applicable to other providers. ### 1. Create the webhook in the git provider In your git provider, navigate to the settings page where webhooks can be configured. The payload -URL configured in the git provider should use the /api/webhook endpoint of your ArgoCD instance +URL configured in the git provider should use the /api/webhook endpoint of your Argo CD instance (e.g. https://argocd.example.com/api/webhook). Input an arbitrary value in the secret. The same value will be used when configuring the webhook in step 2. ![Add Webhook](assets/webhook-config.png "Add Webhook") -### 2. Configure ArgoCD with the webhook secret +### 2. Configure Argo CD with the webhook secret In the `argocd-secret` kubernetes secret, configure one of the following keys with the git provider webhook secret configured in step 1. @@ -27,14 +27,14 @@ webhook secret configured in step 1. | GitLab | `gitlab.webhook.secret` | | BitBucket | `bitbucket.webhook.uuid` | -Edit the ArgoCD kubernetes secret: +Edit the Argo CD kubernetes secret: ``` kubectl edit secret argocd-secret ``` TIP: for ease of entering secrets, kubernetes supports inputting secrets in the `stringData` field, which saves you the trouble of base64 encoding the values and copying it to the `data` field. -Simply copy the shared webhook secret created in step 1, to the corresponding +Simply copy the shared webhook secret created in step 1, to the corresponding GitHub/GitLab/BitBucket key under the `stringData` field: diff --git a/manifests/README.md b/manifests/README.md index 8ae330fd1909a..df925bd477126 100644 --- a/manifests/README.md +++ b/manifests/README.md @@ -1,16 +1,16 @@ -# ArgoCD Installation Manifests +# Argo CD Installation Manifests Two sets of installation manifests are provided: -* [install.yaml](install.yaml) - Standard ArgoCD installation with cluster-admin access. Use this - manifest set if you plan to use ArgoCD to deploy applications in the same cluster that ArgoCD runs +* [install.yaml](install.yaml) - Standard Argo CD installation with cluster-admin access. Use this + manifest set if you plan to use Argo CD to deploy applications in the same cluster that Argo CD runs in (i.e. kubernetes.svc.default). Will still be able to deploy to external clusters with inputted credentials. -* [namespace-install.yaml](namespace-install.yaml) - Installation of ArgoCD which requires only +* [namespace-install.yaml](namespace-install.yaml) - Installation of Argo CD which requires only namespace level privileges (does not need cluster roles). Use this manifest set if you do not - need ArgoCD to deploy applications in the same cluster that ArgoCD runs in, and will rely solely + need Argo CD to deploy applications in the same cluster that Argo CD runs in, and will rely solely on inputted cluster credentials. An example of using this set of manifests is if you run several - ArgoCD instances for different teams, where each instance will bedeploying applications to + Argo CD instances for different teams, where each instance will bedeploying applications to external clusters. Will still be possible to deploy to the same cluster (kubernetes.svc.default) with inputted credentials (i.e. `argocd cluster add --in-cluster`). diff --git a/manifests/base/argocd-cm.yaml b/manifests/base/argocd-cm.yaml index bf69b3106c2fd..2510923dac069 100644 --- a/manifests/base/argocd-cm.yaml +++ b/manifests/base/argocd-cm.yaml @@ -3,11 +3,11 @@ kind: ConfigMap metadata: name: argocd-cm # data: -# # ArgoCD's externally facing base URL. Required for configuring SSO +# # Argo CD's externally facing base URL. Required for configuring SSO # # url: https://argo-cd-demo.argoproj.io # # # A dex connector configuration. See documentation on how to configure SSO: -# # https://github.com/argoproj/argo-cd/blob/master/docs/sso.md#2-configure-argocd-for-sso +# # https://github.com/argoproj/argo-cd/blob/master/docs/sso.md#2-configure-argocd-for-sso # dex.config: | # connectors: # # GitHub example diff --git a/manifests/base/argocd-rbac-cm.yaml b/manifests/base/argocd-rbac-cm.yaml index 1ac7ec5b55846..1fc78581afffc 100644 --- a/manifests/base/argocd-rbac-cm.yaml +++ b/manifests/base/argocd-rbac-cm.yaml @@ -11,5 +11,5 @@ metadata: # # Make all members of "my-org:team-beta" admins # g, my-org:team-beta, role:admin # -# # The default role ArgoCD will fall back to, when authorizing API requests +# # The default role Argo CD will fall back to, when authorizing API requests # policy.default: role:readonly diff --git a/manifests/base/argocd-secret.yaml b/manifests/base/argocd-secret.yaml index 05671650a97c1..72d8e5047c469 100644 --- a/manifests/base/argocd-secret.yaml +++ b/manifests/base/argocd-secret.yaml @@ -6,21 +6,21 @@ type: Opaque # data: # # TLS certificate and private key for API server. # # Autogenerated with a self-signed ceritificate if keys are missing. -# tls.crt: +# tls.crt: # tls.key: # # # bcrypt hash of the admin password and it's last modified time. Autogenerated on initial # # startup. To reset a forgotten password, delete both keys and restart argocd-server. # admin.password: -# admin.passwordMtime: +# admin.passwordMtime: # # # random server signature key for session validation. Autogenerated on initial startup # server.secretkey: # # # The following keys hold the shared secret for authenticating GitHub/GitLab/BitBucket webhook # # events. To enable webhooks, configure one or more of the following keys with the shared git -# # provider webhook secret. The payload URL configured in the git provider should use the -# # /api/webhook endpoint of your ArgoCD instance (e.g. https://argocd.example.com/api/webhook) -# github.webhook.secret: +# # provider webhook secret. The payload URL configured in the git provider should use the +# # /api/webhook endpoint of your Argo CD instance (e.g. https://argocd.example.com/api/webhook) +# github.webhook.secret: # gitlab.webhook.secret: -# bitbucket.webhook.uuid: +# bitbucket.webhook.uuid: diff --git a/pkg/apiclient/apiclient.go b/pkg/apiclient/apiclient.go index a885eaea23390..d689d17d08f6d 100644 --- a/pkg/apiclient/apiclient.go +++ b/pkg/apiclient/apiclient.go @@ -36,9 +36,9 @@ import ( const ( MetaDataTokenKey = "token" - // EnvArgoCDServer is the environment variable to look for an ArgoCD server address + // EnvArgoCDServer is the environment variable to look for an Argo CD server address EnvArgoCDServer = "ARGOCD_SERVER" - // EnvArgoCDAuthToken is the environment variable to look for an ArgoCD auth token + // EnvArgoCDAuthToken is the environment variable to look for an Argo CD auth token EnvArgoCDAuthToken = "ARGOCD_AUTH_TOKEN" // MaxGRPCMessageSize contains max grpc message size MaxGRPCMessageSize = 100 * 1024 * 1024 @@ -129,7 +129,7 @@ func NewClient(opts *ClientOptions) (Client, error) { } // Make sure we got the server address and auth token from somewhere if c.ServerAddr == "" { - return nil, errors.New("ArgoCD server address unspecified") + return nil, errors.New("Argo CD server address unspecified") } if parts := strings.Split(c.ServerAddr, ":"); len(parts) == 1 { // If port is unspecified, assume the most likely port @@ -166,7 +166,7 @@ func NewClient(opts *ClientOptions) (Client, error) { return &c, nil } -// OIDCConfig returns OAuth2 client config and a OpenID Provider based on ArgoCD settings +// OIDCConfig returns OAuth2 client config and a OpenID Provider based on Argo CD settings // ctx can hold an appropriate http.Client to use for the exchange func (c *client) OIDCConfig(ctx context.Context, set *settings.Settings) (*oauth2.Config, *oidc.Provider, error) { var clientID string diff --git a/reposerver/server.go b/reposerver/server.go index 4744749ecd58f..b52433568eea7 100644 --- a/reposerver/server.go +++ b/reposerver/server.go @@ -25,7 +25,7 @@ type ArgoCDRepoServer struct { opts []grpc.ServerOption } -// NewServer returns a new instance of the ArgoCD Repo server +// NewServer returns a new instance of the Argo CD Repo server func NewServer(gitFactory git.ClientFactory, cache cache.Cache, tlsConfCustomizer tlsutil.ConfigCustomizer) (*ArgoCDRepoServer, error) { // generate TLS cert hosts := []string{ diff --git a/server/account/account.proto b/server/account/account.proto index 5edaad50c3ac1..8bccd1b80447b 100644 --- a/server/account/account.proto +++ b/server/account/account.proto @@ -1,9 +1,9 @@ syntax = "proto3"; option go_package = "github.com/argoproj/argo-cd/server/account"; -// Account Service +// Account Service // -// Account Service API updates ArgoCD account settings +// Account Service API updates Argo CD account settings package account; diff --git a/server/project/project.go b/server/project/project.go index e96c49b079b39..6b9b26f96a2e4 100644 --- a/server/project/project.go +++ b/server/project/project.go @@ -26,7 +26,7 @@ import ( ) const ( - // JWTTokenSubFormat format of the JWT token subject that ArgoCD vends out. + // JWTTokenSubFormat format of the JWT token subject that Argo CD vends out. JWTTokenSubFormat = "proj:%s:%s" ) diff --git a/server/server.go b/server/server.go index fa70180dc0984..3cde7296fa337 100644 --- a/server/server.go +++ b/server/server.go @@ -102,7 +102,7 @@ func init() { errors.CheckError(err) } -// ArgoCDServer is the API server for ArgoCD +// ArgoCDServer is the API server for Argo CD type ArgoCDServer struct { ArgoCDServerOpts @@ -115,7 +115,7 @@ type ArgoCDServer struct { appInformer cache.SharedIndexInformer appLister applister.ApplicationLister - // stopCh is the channel which when closed, will shutdown the ArgoCD server + // stopCh is the channel which when closed, will shutdown the Argo CD server stopCh chan struct{} } @@ -168,7 +168,7 @@ func initializeSettings(settingsMgr *settings_util.SettingsManager, opts ArgoCDS return cdSettings, nil } -// NewServer returns a new instance of the ArgoCD API server +// NewServer returns a new instance of the Argo CD API server func NewServer(opts ArgoCDServerOpts) *ArgoCDServer { settingsMgr := settings_util.NewSettingsManager(opts.KubeClientset, opts.Namespace) diff --git a/server/session/session.go b/server/session/session.go index da4db0d12d70a..74037dd4e1eea 100644 --- a/server/session/session.go +++ b/server/session/session.go @@ -21,7 +21,7 @@ func NewServer(mgr *sessionmgr.SessionManager) *Server { } } -// Create generates a JWT token signed by ArgoCD intended for web/CLI logins of the admin user +// Create generates a JWT token signed by Argo CD intended for web/CLI logins of the admin user // using username/password func (s *Server) Create(ctx context.Context, q *SessionCreateRequest) (*SessionResponse, error) { if q.Token != "" { diff --git a/server/settings/settings.go b/server/settings/settings.go index 15781e25f280e..3ad1b298e9478 100644 --- a/server/settings/settings.go +++ b/server/settings/settings.go @@ -18,7 +18,7 @@ func NewServer(mgr *settings.SettingsManager) *Server { } } -// Get returns ArgoCD settings +// Get returns Argo CD settings func (s *Server) Get(ctx context.Context, q *SettingsQuery) (*Settings, error) { argoCDSettings, err := s.mgr.GetSettings() if err != nil { diff --git a/server/settings/settings.pb.go b/server/settings/settings.pb.go index c50c207503f6a..8ae2e1e993c57 100644 --- a/server/settings/settings.pb.go +++ b/server/settings/settings.pb.go @@ -6,7 +6,7 @@ package settings // import "github.com/argoproj/argo-cd/server/settings" /* Settings Service - Settings Service API retrives ArgoCD settings + Settings Service API retrieves Argo CD settings */ import proto "github.com/gogo/protobuf/proto" @@ -31,7 +31,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -// SettingsQuery is a query for ArgoCD settings +// SettingsQuery is a query for Argo CD settings type SettingsQuery struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -318,7 +318,7 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for SettingsService service type SettingsServiceClient interface { - // Get returns ArgoCD settings + // Get returns Argo CD settings Get(ctx context.Context, in *SettingsQuery, opts ...grpc.CallOption) (*Settings, error) } @@ -342,7 +342,7 @@ func (c *settingsServiceClient) Get(ctx context.Context, in *SettingsQuery, opts // Server API for SettingsService service type SettingsServiceServer interface { - // Get returns ArgoCD settings + // Get returns Argo CD settings Get(context.Context, *SettingsQuery) (*Settings, error) } diff --git a/server/settings/settings.proto b/server/settings/settings.proto index 9d7c0c7f8b281..d06791842baf8 100644 --- a/server/settings/settings.proto +++ b/server/settings/settings.proto @@ -3,13 +3,13 @@ option go_package = "github.com/argoproj/argo-cd/server/settings"; // Settings Service // -// Settings Service API retrives ArgoCD settings +// Settings Service API retrieves Argo CD settings package cluster; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -// SettingsQuery is a query for ArgoCD settings +// SettingsQuery is a query for Argo CD settings message SettingsQuery { } @@ -34,10 +34,10 @@ message OIDCConfig { string clientID = 3 [(gogoproto.customname) = "ClientID"]; } -// SettingsService +// SettingsService service SettingsService { - // Get returns ArgoCD settings + // Get returns Argo CD settings rpc Get(SettingsQuery) returns (Settings) { option (google.api.http).get = "/api/v1/settings"; } diff --git a/server/swagger.json b/server/swagger.json index ef7d8fc2a6845..892777c0bb8b9 100644 --- a/server/swagger.json +++ b/server/swagger.json @@ -1115,7 +1115,7 @@ "tags": [ "SettingsService" ], - "summary": "Get returns ArgoCD settings", + "summary": "Get returns Argo CD settings", "operationId": "Get", "responses": { "200": { @@ -2773,7 +2773,7 @@ }, "versionVersionMessage": { "type": "object", - "title": "VersionMessage represents version of the ArgoCD API server", + "title": "VersionMessage represents version of the Argo CD API server", "properties": { "BuildDate": { "type": "string" diff --git a/server/version/version.pb.go b/server/version/version.pb.go index a6bd3d2c48771..4d6d50a5564d3 100644 --- a/server/version/version.pb.go +++ b/server/version/version.pb.go @@ -31,7 +31,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -// VersionMessage represents version of the ArgoCD API server +// VersionMessage represents version of the Argo CD API server type VersionMessage struct { Version string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"` BuildDate string `protobuf:"bytes,2,opt,name=BuildDate,proto3" json:"BuildDate,omitempty"` diff --git a/server/version/version.proto b/server/version/version.proto index abaafe354fe3a..a633cdc09c933 100644 --- a/server/version/version.proto +++ b/server/version/version.proto @@ -9,7 +9,7 @@ package version; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -// VersionMessage represents version of the ArgoCD API server +// VersionMessage represents version of the Argo CD API server message VersionMessage { string Version = 1; string BuildDate = 2; diff --git a/util/argo/argo.go b/util/argo/argo.go index 883b158fcc9be..56d4ec64a18e9 100644 --- a/util/argo/argo.go +++ b/util/argo/argo.go @@ -181,7 +181,7 @@ func WaitForRefresh(appIf v1alpha1.ApplicationInterface, name string, timeout *t // * the git repository is accessible // * the git path contains a valid app.yaml // * the specified environment exists -// * the referenced cluster has been added to ArgoCD +// * the referenced cluster has been added to Argo CD // * the app source repo and destination namespace/cluster are permitted in app project func GetSpecErrors( ctx context.Context, spec *argoappv1.ApplicationSpec, proj *argoappv1.AppProject, repoClientset reposerver.Clientset, db db.ArgoDB) ([]argoappv1.ApplicationCondition, error) { @@ -199,7 +199,7 @@ func GetSpecErrors( repoRes, err := db.GetRepository(ctx, spec.Source.RepoURL) if err != nil { if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound { - // The repo has not been added to ArgoCD so we do not have credentials to access it. + // The repo has not been added to Argo CD so we do not have credentials to access it. // We support the mode where apps can be created from public repositories. Test the // repo to make sure it is publicly accessible err = git.TestRepo(spec.Source.RepoURL, "", "", "") @@ -269,7 +269,7 @@ func GetSpecErrors( Message: fmt.Sprintf("application destination %v is not permitted in project '%s'", spec.Destination, spec.Project), }) } - // Ensure the k8s cluster the app is referencing, is configured in ArgoCD + // Ensure the k8s cluster the app is referencing, is configured in Argo CD _, err = db.GetCluster(ctx, spec.Destination.Server) if err != nil { if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound { diff --git a/util/dex/dex.go b/util/dex/dex.go index 91a40db3986e2..42f80cf1536e0 100644 --- a/util/dex/dex.go +++ b/util/dex/dex.go @@ -17,7 +17,7 @@ var messageRe = regexp.MustCompile(`

(.*)([\s\S]*?)<\/p>`) // NewDexHTTPReverseProxy returns a reverse proxy to the Dex server. Dex is assumed to be configured // with the external issuer URL muxed to the same path configured in server.go. In other words, if -// ArgoCD API server wants to proxy requests at /api/dex, then the dex config yaml issuer URL should +// Argo CD API server wants to proxy requests at /api/dex, then the dex config yaml issuer URL should // also be /api/dex (e.g. issuer: https://argocd.example.com/api/dex) func NewDexHTTPReverseProxy(serverAddr string) func(writer http.ResponseWriter, request *http.Request) { target, err := url.Parse(serverAddr) diff --git a/util/kube/kube.go b/util/kube/kube.go index 32e83333b8cc4..8118c77082ee0 100644 --- a/util/kube/kube.go +++ b/util/kube/kube.go @@ -143,7 +143,7 @@ func SetLabel(target *unstructured.Unstructured, key, val string) error { } // The following is a workaround for issue #335. In API version extensions/v1beta1 or // apps/v1beta1, if a spec omits spec.selector then k8s will default the - // spec.selector.matchLabels to match spec.template.metadata.labels. This means ArgoCD + // spec.selector.matchLabels to match spec.template.metadata.labels. This means Argo CD // labels can potentially make their way into spec.selector.matchLabels, which is a bad // thing. The following logic prevents this behavior. switch target.GetAPIVersion() { @@ -154,8 +154,8 @@ func SetLabel(target *unstructured.Unstructured, key, val string) error { } if len(selector) == 0 { // If we get here, user did not set spec.selector in their manifest. We do not want - // our ArgoCD labels to get defaulted by kubernetes, so we explicitly set the labels - // for them (minus the ArgoCD labels). + // our Argo CD labels to get defaulted by kubernetes, so we explicitly set the labels + // for them (minus the Argo CD labels). delete(templateLabels, key) err = unstructured.SetNestedMap(target.UnstructuredContent(), templateLabels, "spec", "selector", "matchLabels") if err != nil { diff --git a/util/localconfig/localconfig.go b/util/localconfig/localconfig.go index d64f65cd8c496..6afee2cca7cf4 100644 --- a/util/localconfig/localconfig.go +++ b/util/localconfig/localconfig.go @@ -9,7 +9,7 @@ import ( configUtil "github.com/argoproj/argo-cd/util/config" ) -// LocalConfig is a local ArgoCD config file +// LocalConfig is a local Argo CD config file type LocalConfig struct { CurrentContext string `json:"current-context"` Contexts []ContextRef `json:"contexts"` @@ -31,9 +31,9 @@ type Context struct { User User } -// Server contains ArgoCD server information +// Server contains Argo CD server information type Server struct { - // Server is the ArgoCD server address + // Server is the Argo CD server address Server string `json:"server"` // Insecure indicates to connect to the server over TLS insecurely Insecure bool `json:"insecure,omitempty"` diff --git a/util/oidc/oidc.go b/util/oidc/oidc.go index a157c82512c88..96c4caeef96cb 100644 --- a/util/oidc/oidc.go +++ b/util/oidc/oidc.go @@ -53,7 +53,7 @@ type ClientApp struct { // secureCookie indicates if the cookie should be set with the Secure flag, meaning it should // only ever be sent over HTTPS. This value is inferred by the scheme of the redirectURI. secureCookie bool - // settings holds ArgoCD settings + // settings holds Argo CD settings settings *settings.ArgoCDSettings // provider is the OIDC configuration provider *gooidc.Provider @@ -67,7 +67,7 @@ type appState struct { ReturnURL string `json:"returnURL"` } -// NewClientApp will register the ArgoCD client app (either via Dex or external OIDC) and return an +// NewClientApp will register the Argo CD client app (either via Dex or external OIDC) and return an // object which has HTTP handlers for handling the HTTP responses for login and callback func NewClientApp(settings *settings.ArgoCDSettings) (*ClientApp, error) { a := ClientApp{ @@ -97,7 +97,7 @@ func NewClientApp(settings *settings.ArgoCDSettings) (*ClientApp, error) { ExpectContinueTimeout: 1 * time.Second, }, } - // NOTE: if we ever have replicas of ArgoCD, this needs to switch to Redis cache + // NOTE: if we ever have replicas of Argo CD, this needs to switch to Redis cache a.states = cache.NewInMemoryCache(3 * time.Minute) a.secureCookie = bool(u.Scheme == "https") a.settings = settings diff --git a/util/session/sessionmanager.go b/util/session/sessionmanager.go index f84f7c60fac68..fb54021a5078e 100644 --- a/util/session/sessionmanager.go +++ b/util/session/sessionmanager.go @@ -40,7 +40,7 @@ const ( badUserError = "Bad local superuser username" ) -// NewSessionManager creates a new session manager from ArgoCD settings +// NewSessionManager creates a new session manager from Argo CD settings func NewSessionManager(settings *settings.ArgoCDSettings) *SessionManager { s := SessionManager{ settings: settings, @@ -146,7 +146,7 @@ func (mgr *SessionManager) VerifyToken(tokenString string) (jwt.Claims, error) { } switch claims.Issuer { case SessionManagerClaimsIssuer: - // ArgoCD signed token + // Argo CD signed token return mgr.Parse(tokenString) default: // Dex signed token @@ -206,7 +206,7 @@ func Username(ctx context.Context) string { } // oidcProvider lazily initializes, memoizes, and returns the OIDC provider. -// We have to initialize the provider lazily since ArgoCD can be an OIDC client to itself (in the +// We have to initialize the provider lazily since Argo CD can be an OIDC client to itself (in the // case of dex reverse proxy), which presents a chicken-and-egg problem of (1) serving dex over // HTTP, and (2) querying the OIDC provider (ourself) to initialize the app. func (mgr *SessionManager) oidcProvider() (*oidc.Provider, error) { diff --git a/util/settings/settings.go b/util/settings/settings.go index 26b52b317d4f8..27ce6a720a434 100644 --- a/util/settings/settings.go +++ b/util/settings/settings.go @@ -29,7 +29,7 @@ import ( // ArgoCDSettings holds in-memory runtime configuration options. type ArgoCDSettings struct { - // URL is the externally facing URL users will visit to reach ArgoCD. + // 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 @@ -41,7 +41,7 @@ type ArgoCDSettings struct { 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 ArgoCD API server. + // 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 @@ -72,7 +72,7 @@ const ( settingServerCertificate = "tls.crt" // settingServerPrivateKey designates the key for the private key used in TLS settingServerPrivateKey = "tls.key" - // settingURLKey designates the key where ArgoCDs external URL is set + // settingURLKey designates the key where Argo CD's external URL is set settingURLKey = "url" // settingDexConfigKey designates the key for the dex config settingDexConfigKey = "dex.config" @@ -104,7 +104,7 @@ func (e *incompleteSettingsError) Error() string { return e.message } -// GetSettings retrieves settings from the ArgoCD configmap and secret. +// GetSettings retrieves settings from the ArgoCDConfigMap and secret. func (mgr *SettingsManager) GetSettings() (*ArgoCDSettings, error) { var settings ArgoCDSettings argoCDCM, err := mgr.clientset.CoreV1().ConfigMaps(mgr.namespace).Get(common.ArgoCDConfigMapName, metav1.GetOptions{}) @@ -175,7 +175,7 @@ func updateSettingsFromSecret(settings *ArgoCDSettings, argoCDSecret *apiv1.Secr return nil } -// SaveSettings serializes ArgoCD settings and upserts it into K8s secret/configmap +// SaveSettings serializes ArgoCDSettings and upserts it into K8s secret/configmap func (mgr *SettingsManager) SaveSettings(settings *ArgoCDSettings) error { // Upsert the config data argoCDCM, err := mgr.clientset.CoreV1().ConfigMaps(mgr.namespace).Get(common.ArgoCDConfigMapName, metav1.GetOptions{}) @@ -377,7 +377,7 @@ func (a *ArgoCDSettings) DexOAuth2ClientSecret() string { return base64.URLEncoding.EncodeToString(sha)[:40] } -// newInformers returns two new informers on the ArgoCD +// newInformers returns two new informers on the Argo CD func (mgr *SettingsManager) newInformers() (cache.SharedIndexInformer, cache.SharedIndexInformer) { tweakConfigMap := func(options *metav1.ListOptions) { cmFieldSelector := fields.ParseSelectorOrDie(fmt.Sprintf("metadata.name=%s", common.ArgoCDConfigMapName))