Skip to content

Commit

Permalink
Merge branch 'argoproj:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
pasha-codefresh committed Jan 24, 2022
2 parents 5e6a122 + b7bdb8f commit e37ead9
Show file tree
Hide file tree
Showing 110 changed files with 1,098 additions and 642 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

env:
# Golang version to use across CI steps
GOLANG_VERSION: '1.16.11'
GOLANG_VERSION: '1.17.6'

jobs:
check-go:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
types: [ labeled, unlabeled, opened, synchronize, reopened ]

env:
GOLANG_VERSION: '1.16.11'
GOLANG_VERSION: '1.17.6'

jobs:
publish:
Expand All @@ -34,13 +34,13 @@ jobs:
# login
- run: |
docker login ghcr.io --username $USERNAME --password $PASSWORD
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
docker login quay.io --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
if: github.event_name == 'push'
env:
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.TOKEN }}
DOCKER_USERNAME: ${{ secrets.RELEASE_DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.RELEASE_QUAY_USERNAME }}
DOCKER_TOKEN: ${{ secrets.RELEASE_QUAY_TOKEN }}
# build
- uses: docker/setup-qemu-action@v1
Expand All @@ -54,7 +54,7 @@ jobs:
echo "Building image for platforms: $IMAGE_PLATFORMS"
docker buildx build --platform $IMAGE_PLATFORMS --push="${{ github.event_name == 'push' }}" \
-t ghcr.io/argoproj/argocd:${{ steps.image.outputs.tag }} \
-t argoproj/argocd:latest .
-t quay.io/argoproj/argocd:latest .
working-directory: ./src/github.com/argoproj/argo-cd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '!release-v0*'

env:
GOLANG_VERSION: '1.16.11'
GOLANG_VERSION: '1.17.6'

jobs:
prepare-release:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ARG BASE_IMAGE=docker.io/library/ubuntu:21.04
ARG BASE_IMAGE=docker.io/library/ubuntu:21.10
####################################################################################################
# Builder image
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
# Also used as the image in CI jobs so needs all dependencies
####################################################################################################
FROM docker.io/library/golang:1.16.11 as builder
FROM docker.io/library/golang:1.17.6 as builder

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

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

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

Expand Down
6 changes: 5 additions & 1 deletion OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ reviewers:
- hblixt
- chetan-rns
- wanghong230
- pasha-codefresh
- pasha-codefresh
- ciiay
- leoluz
- crenshaw-dev
- saumeya
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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}"
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} "
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"
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"
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"
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}"
ui: sh -c 'cd ui && ${ARGOCD_E2E_YARN_CMD:-yarn} start'
Expand Down
12 changes: 9 additions & 3 deletions controller/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,13 @@ func normalizeTargetResources(cr *comparisonResult) ([]*unstructured.Unstructure
patchedTargets = append(patchedTargets, nil)
continue
}
// calculate targetPatch between normalized and target resources
targetPatch, err := getMergePatch(normalizedTarget, cr.reconciliationResult.Target[idx])
originalTarget := cr.reconciliationResult.Target[idx]
if live == nil {
patchedTargets = append(patchedTargets, originalTarget)
continue
}
// calculate targetPatch between normalized and target resource
targetPatch, err := getMergePatch(normalizedTarget, originalTarget)
if err != nil {
return nil, err
}
Expand All @@ -314,7 +319,8 @@ func normalizeTargetResources(cr *comparisonResult) ([]*unstructured.Unstructure
return nil, err
}
} else {
normalizedTarget = cr.reconciliationResult.Target[idx]
// if there is no patch just use the original target
normalizedTarget = originalTarget
}
patchedTargets = append(patchedTargets, normalizedTarget)
}
Expand Down
8 changes: 8 additions & 0 deletions docs/operator-manual/argocd-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ data:
managedFieldsManagers:
- kube-controller-manager
# Configuration to define customizations ignoring differences between live and desired states for
# all resources (GK).
resource.customizations.ignoreDifferences.all: |
managedFieldsManagers:
- kube-controller-manager
jsonPointers:
- /spec/replicas
resource.customizations.health.certmanager.k8s.io-Certificate: |
hs = {}
if obj.status ~= nil then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ notifications template get app-sync-succeeded -o=yaml
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down Expand Up @@ -86,6 +87,7 @@ notifications template notify app-sync-succeeded guestbook
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down Expand Up @@ -139,6 +141,7 @@ notifications trigger get on-sync-failed -o=yaml
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down Expand Up @@ -192,6 +195,7 @@ notifications trigger run on-sync-status-unknown ./sample-app.yaml \
--argocd-repo-server-strict-tls Perform strict validation of TLS certificates when connecting to repo server
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ argocd-application-controller [flags]
--app-state-cache-expiration duration Cache expiration for app state (default 1h0m0s)
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argocd-dex gendexcfg [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
1 change: 1 addition & 0 deletions docs/operator-manual/server-commands/argocd-dex_rundex.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argocd-dex rundex [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
1 change: 1 addition & 0 deletions docs/operator-manual/server-commands/argocd-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ argocd-server [flags]
--app-state-cache-expiration duration Cache expiration for app state (default 1h0m0s)
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--basehref string Value for base href in index.html. Used if Argo CD is running behind reverse proxy under subpath different from / (default "/")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ argocd-server version [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
4 changes: 4 additions & 0 deletions docs/operator-manual/upgrading/2.2-2.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ data:
help.download.darwin-arm64: "path-or-url-to-download"
help.download.windows-amd64: "path-or-url-to-download"
```
## Upgraded Kustomize Version
Note that bundled Kustomize version has been upgraded from 4.2.0 to 4.4.1.
1 change: 1 addition & 0 deletions docs/user-guide/commands/argocd_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argocd account [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argocd admin app get-reconcile-results PATH [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argocd admin cluster kubeconfig CLUSTER_URL OUTPUT_PATH [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argocd admin cluster namespaces [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ argocd admin cluster namespaces disable-namespaced-mode PATTERN [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--auth-token string Authentication token
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ argocd admin cluster namespaces enable-namespaced-mode PATTERN [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--auth-token string Authentication token
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/commands/argocd_admin_cluster_shards.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ argocd admin cluster shards [flags]
--app-state-cache-expiration duration Cache expiration for app state (default 1h0m0s)
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/commands/argocd_admin_cluster_stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ argocd admin cluster stats [flags]
--app-state-cache-expiration duration Cache expiration for app state (default 1h0m0s)
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/commands/argocd_admin_dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ argocd admin dashboard [flags]
--address string Listen on given address (default "localhost")
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
1 change: 1 addition & 0 deletions docs/user-guide/commands/argocd_admin_export.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argocd admin export [flags]
```
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
Expand Down
Loading

0 comments on commit e37ead9

Please sign in to comment.