Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/argoproj/argo-cd
Browse files Browse the repository at this point in the history
  • Loading branch information
pasha-codefresh committed Oct 31, 2024
2 parents cecf8f4 + e861b55 commit e014ed7
Show file tree
Hide file tree
Showing 71 changed files with 809 additions and 220 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Download all Go modules
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Restore go build cache
Expand All @@ -105,7 +105,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Run golangci-lint
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Create symlink in GOPATH
run: ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
- name: Create symlink in GOPATH
run: ln -s $(pwd) ~/go/src/github.com/argoproj/argo-cd
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install required packages
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Create symlink in GOPATH
Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
- name: Setup NodeJS
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
# renovate: datasource=node-version packageName=node versioning=node
node-version: '22.9.0'
Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@8410ad0602e1e429cee44a835ae9f77f654a6694 # v4.0.0
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: GH actions workaround - Kill XSP4 process
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# Use correct go version. https://github.com/github/codeql-action/issues/1842#issuecomment-1704398087
- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: go.mod

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
if: ${{ github.ref_type != 'tag'}}

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ inputs.go-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: git fetch --force --tags

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}

Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: ${{ env.GOLANG_VERSION }}

Expand Down
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [Axians ACSP](https://www.axians.fr)
1. [Axual B.V.](https://axual.com)
1. [Back Market](https://www.backmarket.com)
1. [Bajaj Finserv Health Ltd.](https://www.bajajfinservhealth.in)
1. [Baloise](https://www.baloise.com)
1. [BCDevExchange DevOps Platform](https://bcdevexchange.org/DevOpsPlatform)
1. [Beat](https://thebeat.co/en/)
Expand Down
2 changes: 1 addition & 1 deletion controller/appcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ func (ctrl *ApplicationController) hideSecretData(app *appv1.Application, compar
resDiff := res.Diff
if res.Kind == kube.SecretKind && res.Group == "" {
var err error
target, live, err = diff.HideSecretData(res.Target, res.Live)
target, live, err = diff.HideSecretData(res.Target, res.Live, ctrl.settingsMgr.GetSensitiveAnnotations())
if err != nil {
return nil, fmt.Errorf("error hiding secret data: %w", err)
}
Expand Down
4 changes: 4 additions & 0 deletions controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,10 @@ func specEqualsCompareTo(spec v1alpha1.ApplicationSpec, comparedTo v1alpha1.Comp
currentSpec.Destination.Name = ""
}

// Set IsServerInferred to false on both, because that field is not important for comparison.
comparedTo.Destination.SetIsServerInferred(false)
currentSpec.Destination.SetIsServerInferred(false)

return reflect.DeepEqual(comparedTo, currentSpec)
}

Expand Down
4 changes: 4 additions & 0 deletions controller/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,10 @@ func TestUseDiffCache(t *testing.T) {
t.Fatalf("error merging app: %s", err)
}
}
if app.Spec.Destination.Name != "" && app.Spec.Destination.Server != "" {
// Simulate the controller's process for populating both of these fields.
app.Spec.Destination.SetInferredServer(app.Spec.Destination.Server)
}
return app
}

Expand Down
68 changes: 61 additions & 7 deletions docs/developer-guide/contributors-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,49 @@ and the [toolchain guide](toolchain-guide.md).

## Getting Started

### Install Go
### Prerequisites

<https://go.dev/doc/install/>
Before starting, ensure you have the following tools installed with the specified minimum versions:

Install Go with a version equal to or greater than the version listed in `go.mod` (verify go version with `go version`).
* Git (v2.0.0+)
* Go (version specified in `go.mod` - check with `go version`)
* Docker (v20.10.0+) Or Podman (v3.0.0+)
* Kind (v0.11.0+) Or Minikube (v1.23.0+)
* Yarn (v1.22.0+)
* Goreman (latest version)

### Fork and Clone the Repository

### Clone the Argo CD repo
1. Fork the Argo CD repository to your personal Github Account

2. Clone the forked repository:
```shell
mkdir -p $GOPATH/src/github.com/argoproj/ &&
cd $GOPATH/src/github.com/argoproj &&
git clone https://github.com/argoproj/argo-cd.git
mkdir -p $GOPATH/src/github.com/argoproj/
cd $GOPATH/src/github.com/argoproj/
git clone https://github.com/YOUR-USERNAME/argo-cd.git
```

3. Add the upstream remote for rebasing:
```shell
cd argo-cd
git remote add upstream https://github.com/argoproj/argo-cd.git
```

### Install Required Tools

1. Install development tools:
```shell
make install-go-tools-local
make install-code-gen-tools-local
```

### Install Go

<https://go.dev/doc/install/>

Install Go with a version equal to or greater than the version listed in `go.mod` (verify go version with `go version`).


### Install Docker or Podman

#### Installation guide for docker:
Expand Down Expand Up @@ -103,8 +132,33 @@ DOCKER=podman make start-local ARGOCD_GPG_ENABLED=false
If the UI is not working, check the logs from `make start-local`. The logs are `DEBUG` level by default. If the logs are
too noisy to find the problem, try editing log levels for the commands in the `Procfile` in the root of the Argo CD repo.

## Common Make Targets

Here are some frequently used make targets:

* `make start-local` - Start Argo CD locally
* `make test` - Run unit tests
* `make test-e2e` - Run end-to-end tests
* `make lint` - Run linting
* `make serve-docs` - Serve documentation locally
* `make pre-commit-local` - Run pre-commit checks locally
* `make build` - Build Argo CD binaries

## Making Changes

### Before Submitting a PR

1. Rebase your branch against upstream main:
```shell
git fetch upstream
git rebase upstream/main
```

2. Run pre-commit checks:
```shell
make pre-commit-local
```

### Docs Changes

Modifying the docs auto-reloads the changes on the [documentation website](https://argo-cd.readthedocs.io/) that can be locally built using `make serve-docs` command.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/use-gitpod.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Use Gitpod

[Gitpod](https://www.gitpod.io/) is an open-source platform for automated and ready-to-code development environments.
GitPod is probably the easiest way to get ready to use development environment with the most tools that are required
Gitpod is probably the easiest way to get ready to use development environment with the most tools that are required
for Argo CD development.

## How To Use It
Expand Down
2 changes: 1 addition & 1 deletion docs/operator-manual/applicationset/Generators-Cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ spec:
values: |
clusters:
- name: cluster1
- name: cluster1
- name: cluster2
```

In case you are using several cluster generators, each with the flatList option, one Application would be generated by cluster generator, as we can't simply merge values and templates that would potentially differ in each generator.
3 changes: 3 additions & 0 deletions docs/operator-manual/argocd-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ data:
clusters:
- "*.local"
# An optional comma-separated list of annotation keys to mask in UI/CLI on secrets
resource.sensitive.mask.annotations: openshift.io/token-secret.value,api-key

# An optional comma-separated list of metadata.labels to observe in the UI.
resource.customLabels: tier

Expand Down
8 changes: 8 additions & 0 deletions docs/operator-manual/declarative-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,14 @@ Notes:
* Invalid globs result in the whole rule being ignored.
* If you add a rule that matches existing resources, these will appear in the interface as `OutOfSync`.

## Mask sensitive Annotations on Secrets

An optional comma-separated list of `metadata.annotations` keys can be configured with `resource.sensitive.mask.annotations` to mask their values in UI/CLI on Secrets.

```yaml
resource.sensitive.mask.annotations: openshift.io/token-secret.value, api-key
```

## Auto respect RBAC for controller

Argocd controller can be restricted from discovering/syncing specific resources using just controller rbac, without having to manually configure resource exclusions.
Expand Down
4 changes: 2 additions & 2 deletions docs/operator-manual/user-management/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ data:
dex.config: |
connectors:
# OIDC
- type: OIDC
- type: oidc
id: oidc
name: OIDC
config:
Expand Down Expand Up @@ -292,7 +292,7 @@ data:
dex.config: |
connectors:
# OIDC
- type: OIDC
- type: oidc
id: oidc
name: OIDC
config:
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ markdown_include==0.8.1
pygments==2.18.0
jinja2==3.1.4
markdown==3.7
pymdown-extensions==10.11.2
pymdown-extensions==10.12
1 change: 1 addition & 0 deletions docs/user-guide/diffing.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,4 @@ metadata:
name: argocd-cmd-params-cm
data:
ignore.normalizer.jq.timeout: "5s"
```
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/TomOnTime/utfutil v0.0.0-20180511104225-09c41003ee1d
github.com/alicebob/miniredis/v2 v2.33.0
github.com/antonmedv/expr v1.15.1
github.com/argoproj/gitops-engine v0.7.1-0.20241023134423-09e5225f8472
github.com/argoproj/gitops-engine v0.7.1-0.20241029102952-9ab0b2ecae96
github.com/argoproj/notifications-engine v0.4.1-0.20241007194503-2fef5c9049fd
github.com/argoproj/pkg v0.13.7-0.20230626144333-d56162821bd1
github.com/aws/aws-sdk-go v1.55.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ github.com/antonmedv/expr v1.15.1/go.mod h1:0E/6TxnOlRNp81GMzX9QfDPAmHo2Phg00y4J
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE=
github.com/argoproj/gitops-engine v0.7.1-0.20241023134423-09e5225f8472 h1:NSUzj5CWkOR6xrbGBT4dhZ7WsHhT/pbud+fsvQuUe7k=
github.com/argoproj/gitops-engine v0.7.1-0.20241023134423-09e5225f8472/go.mod h1:b1vuwkyMUszyUK+USUJqC8vJijnQsEPNDpC+sDdDLtM=
github.com/argoproj/gitops-engine v0.7.1-0.20241029102952-9ab0b2ecae96 h1:7Guh0VsAHmccy0c55XfzVMT5Y/t76N3j/O0CXk22/A4=
github.com/argoproj/gitops-engine v0.7.1-0.20241029102952-9ab0b2ecae96/go.mod h1:b1vuwkyMUszyUK+USUJqC8vJijnQsEPNDpC+sDdDLtM=
github.com/argoproj/notifications-engine v0.4.1-0.20241007194503-2fef5c9049fd h1:lOVVoK89j9Nd4+JYJiKAaMNYC1402C0jICROOfUPWn0=
github.com/argoproj/notifications-engine v0.4.1-0.20241007194503-2fef5c9049fd/go.mod h1:N0A4sEws2soZjEpY4hgZpQS8mRIEw6otzwfkgc3g9uQ=
github.com/argoproj/pkg v0.13.7-0.20230626144333-d56162821bd1 h1:qsHwwOJ21K2Ao0xPju1sNuqphyMnMYkyB3ZLoLtxWpo=
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/application/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,12 @@ type ApplicationDestination struct {
isServerInferred bool `json:"-"`
}

// SetIsServerInferred sets the isServerInferred flag. This is used to allow comparison between two destinations where
// one server is inferred and the other is not.
func (d *ApplicationDestination) SetIsServerInferred(inferred bool) {
d.isServerInferred = inferred
}

type ResourceHealthLocation string

var (
Expand Down
Loading

0 comments on commit e014ed7

Please sign in to comment.