Skip to content

Commit e37ead9

Browse files
Merge branch 'argoproj:master' into master
2 parents 5e6a122 + b7bdb8f commit e37ead9

File tree

110 files changed

+1098
-642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1098
-642
lines changed

.github/workflows/ci-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
env:
1414
# Golang version to use across CI steps
15-
GOLANG_VERSION: '1.16.11'
15+
GOLANG_VERSION: '1.17.6'
1616

1717
jobs:
1818
check-go:

.github/workflows/image.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
types: [ labeled, unlabeled, opened, synchronize, reopened ]
1111

1212
env:
13-
GOLANG_VERSION: '1.16.11'
13+
GOLANG_VERSION: '1.17.6'
1414

1515
jobs:
1616
publish:
@@ -34,13 +34,13 @@ jobs:
3434
# login
3535
- run: |
3636
docker login ghcr.io --username $USERNAME --password $PASSWORD
37-
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
37+
docker login quay.io --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
3838
if: github.event_name == 'push'
3939
env:
4040
USERNAME: ${{ secrets.USERNAME }}
4141
PASSWORD: ${{ secrets.TOKEN }}
42-
DOCKER_USERNAME: ${{ secrets.RELEASE_DOCKERHUB_USERNAME }}
43-
DOCKER_TOKEN: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
42+
DOCKER_USERNAME: ${{ secrets.RELEASE_QUAY_USERNAME }}
43+
DOCKER_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
4444
4545
# build
4646
- uses: docker/setup-qemu-action@v1
@@ -54,7 +54,7 @@ jobs:
5454
echo "Building image for platforms: $IMAGE_PLATFORMS"
5555
docker buildx build --platform $IMAGE_PLATFORMS --push="${{ github.event_name == 'push' }}" \
5656
-t ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} \
57-
-t argoproj/argocd:latest .
57+
-t quay.io/argoproj/argocd:latest .
5858
working-directory: ./src/github.com/argoproj/argo-cd
5959
6060

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- '!release-v0*'
1313

1414
env:
15-
GOLANG_VERSION: '1.16.11'
15+
GOLANG_VERSION: '1.17.6'
1616

1717
jobs:
1818
prepare-release:

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
ARG BASE_IMAGE=docker.io/library/ubuntu:21.04
1+
ARG BASE_IMAGE=docker.io/library/ubuntu:21.10
22
####################################################################################################
33
# Builder image
44
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
55
# Also used as the image in CI jobs so needs all dependencies
66
####################################################################################################
7-
FROM docker.io/library/golang:1.16.11 as builder
7+
FROM docker.io/library/golang:1.17.6 as builder
88

99
RUN echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
1010

@@ -103,7 +103,7 @@ RUN HOST_ARCH='amd64' NODE_ENV='production' NODE_ONLINE_ENV='online' NODE_OPTION
103103
####################################################################################################
104104
# Argo CD Build stage which performs the actual build of Argo CD binaries
105105
####################################################################################################
106-
FROM docker.io/library/golang:1.16.11 as argocd-build
106+
FROM docker.io/library/golang:1.17.6 as argocd-build
107107

108108
WORKDIR /go/src/github.com/argoproj/argo-cd
109109

OWNERS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ reviewers:
2020
- hblixt
2121
- chetan-rns
2222
- wanghong230
23-
- pasha-codefresh
23+
- pasha-codefresh
24+
- ciiay
25+
- leoluz
26+
- crenshaw-dev
27+
- saumeya

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
controller: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-application-controller $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081}"
22
api-server: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-server $COMMAND --loglevel debug --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379} --disable-auth=${ARGOCD_E2E_DISABLE_AUTH:-'true'} --insecure --dex-server http://localhost:${ARGOCD_E2E_DEX_PORT:-5556} --repo-server localhost:${ARGOCD_E2E_REPOSERVER_PORT:-8081} --port ${ARGOCD_E2E_APISERVER_PORT:-8080} "
3-
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/v2/cmd gendexcfg -o `pwd`/dist/dex.yaml && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:v2.30.0 serve /dex.yaml"
3+
dex: sh -c "ARGOCD_BINARY_NAME=argocd-dex go run github.com/argoproj/argo-cd/v2/cmd gendexcfg -o `pwd`/dist/dex.yaml && docker run --rm -p ${ARGOCD_E2E_DEX_PORT:-5556}:${ARGOCD_E2E_DEX_PORT:-5556} -v `pwd`/dist/dex.yaml:/dex.yaml ghcr.io/dexidp/dex:v2.30.2 dex serve /dex.yaml"
44
redis: bash -c "if [ \"$ARGOCD_REDIS_LOCAL\" == 'true' ]; then redis-server --save '' --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}; else docker run --rm --name argocd-redis -i -p ${ARGOCD_E2E_REDIS_PORT:-6379}:${ARGOCD_E2E_REDIS_PORT:-6379} redis:6.2.6-alpine --save '' --appendonly no --port ${ARGOCD_E2E_REDIS_PORT:-6379}; fi"
55
repo-server: [ "$BIN_MODE" == 'true' ] && COMMAND=./dist/argocd || COMMAND='go run ./cmd/main.go' && sh -c "FORCE_LOG_COLORS=1 ARGOCD_FAKE_IN_CLUSTER=true ARGOCD_GNUPGHOME=${ARGOCD_GNUPGHOME:-/tmp/argocd-local/gpg/keys} ARGOCD_PLUGINSOCKFILEPATH=${ARGOCD_PLUGINSOCKFILEPATH:-/tmp/argo-e2e/app/config/plugin} ARGOCD_GPG_DATA_PATH=${ARGOCD_GPG_DATA_PATH:-/tmp/argocd-local/gpg/source} ARGOCD_TLS_DATA_PATH=${ARGOCD_TLS_DATA_PATH:-/tmp/argocd-local/tls} ARGOCD_SSH_DATA_PATH=${ARGOCD_SSH_DATA_PATH:-/tmp/argocd-local/ssh} ARGOCD_BINARY_NAME=argocd-repo-server ARGOCD_GPG_ENABLED=${ARGOCD_GPG_ENABLED:-false} $COMMAND --loglevel debug --port ${ARGOCD_E2E_REPOSERVER_PORT:-8081} --redis localhost:${ARGOCD_E2E_REDIS_PORT:-6379}"
66
ui: sh -c 'cd ui && ${ARGOCD_E2E_YARN_CMD:-yarn} start'

controller/sync.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,13 @@ func normalizeTargetResources(cr *comparisonResult) ([]*unstructured.Unstructure
291291
patchedTargets = append(patchedTargets, nil)
292292
continue
293293
}
294-
// calculate targetPatch between normalized and target resources
295-
targetPatch, err := getMergePatch(normalizedTarget, cr.reconciliationResult.Target[idx])
294+
originalTarget := cr.reconciliationResult.Target[idx]
295+
if live == nil {
296+
patchedTargets = append(patchedTargets, originalTarget)
297+
continue
298+
}
299+
// calculate targetPatch between normalized and target resource
300+
targetPatch, err := getMergePatch(normalizedTarget, originalTarget)
296301
if err != nil {
297302
return nil, err
298303
}
@@ -314,7 +319,8 @@ func normalizeTargetResources(cr *comparisonResult) ([]*unstructured.Unstructure
314319
return nil, err
315320
}
316321
} else {
317-
normalizedTarget = cr.reconciliationResult.Target[idx]
322+
// if there is no patch just use the original target
323+
normalizedTarget = originalTarget
318324
}
319325
patchedTargets = append(patchedTargets, normalizedTarget)
320326
}

docs/operator-manual/argocd-cm.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ data:
8484
managedFieldsManagers:
8585
- kube-controller-manager
8686
87+
# Configuration to define customizations ignoring differences between live and desired states for
88+
# all resources (GK).
89+
resource.customizations.ignoreDifferences.all: |
90+
managedFieldsManagers:
91+
- kube-controller-manager
92+
jsonPointers:
93+
- /spec/replicas
94+
8795
resource.customizations.health.certmanager.k8s.io-Certificate: |
8896
hs = {}
8997
if obj.status ~= nil then

docs/operator-manual/notifications/troubleshooting-commands.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ notifications template get app-sync-succeeded -o=yaml
3232
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
3333
--as string Username to impersonate for the operation
3434
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
35+
--as-uid string UID to impersonate for the operation
3536
--certificate-authority string Path to a cert file for the certificate authority
3637
--client-certificate string Path to a client certificate file for TLS
3738
--client-key string Path to a client key file for TLS
@@ -86,6 +87,7 @@ notifications template notify app-sync-succeeded guestbook
8687
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
8788
--as string Username to impersonate for the operation
8889
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
90+
--as-uid string UID to impersonate for the operation
8991
--certificate-authority string Path to a cert file for the certificate authority
9092
--client-certificate string Path to a client certificate file for TLS
9193
--client-key string Path to a client key file for TLS
@@ -139,6 +141,7 @@ notifications trigger get on-sync-failed -o=yaml
139141
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
140142
--as string Username to impersonate for the operation
141143
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
144+
--as-uid string UID to impersonate for the operation
142145
--certificate-authority string Path to a cert file for the certificate authority
143146
--client-certificate string Path to a client certificate file for TLS
144147
--client-key string Path to a client key file for TLS
@@ -192,6 +195,7 @@ notifications trigger run on-sync-status-unknown ./sample-app.yaml \
192195
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
193196
--as string Username to impersonate for the operation
194197
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
198+
--as-uid string UID to impersonate for the operation
195199
--certificate-authority string Path to a cert file for the certificate authority
196200
--client-certificate string Path to a client certificate file for TLS
197201
--client-key string Path to a client key file for TLS

docs/operator-manual/server-commands/argocd-application-controller.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ argocd-application-controller [flags]
1717
--app-state-cache-expiration duration Cache expiration for app state (default 1h0m0s)
1818
--as string Username to impersonate for the operation
1919
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
20+
--as-uid string UID to impersonate for the operation
2021
--certificate-authority string Path to a cert file for the certificate authority
2122
--client-certificate string Path to a client certificate file for TLS
2223
--client-key string Path to a client key file for TLS

0 commit comments

Comments
 (0)