mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-03-02 22:48:48 +01:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7891b899a | ||
|
|
ecbb7aa074 | ||
|
|
6d85d6f85f | ||
|
|
3778173c05 | ||
|
|
b0df91d209 | ||
|
|
a565d7d3a4 | ||
|
|
0794a14400 | ||
|
|
fb2ae1198d | ||
|
|
ba17262c96 | ||
|
|
9599930611 | ||
|
|
3f8bd11786 | ||
|
|
d80a5d1a27 | ||
|
|
cbee7e6011 | ||
|
|
8e61f64cc9 | ||
|
|
e413db45b1 | ||
|
|
26cf7d95b7 | ||
|
|
24bd4aee70 | ||
|
|
5e543518db | ||
|
|
72a69e2f16 |
@@ -30,7 +30,7 @@ func TestMatrixGenerate(t *testing.T) {
|
||||
}
|
||||
|
||||
listGenerator := &argoprojiov1alpha1.ListGenerator{
|
||||
Elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "Cluster","url": "Url"}`)}},
|
||||
Elements: []apiextensionsv1.JSON{{Raw: []byte(`{"cluster": "Cluster","url": "Url", "templated": "test-{{path.basenameNormalized}}"}`)}},
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
@@ -50,8 +50,8 @@ func TestMatrixGenerate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
expected: []map[string]interface{}{
|
||||
{"path": "app1", "path.basename": "app1", "path.basenameNormalized": "app1", "cluster": "Cluster", "url": "Url"},
|
||||
{"path": "app2", "path.basename": "app2", "path.basenameNormalized": "app2", "cluster": "Cluster", "url": "Url"},
|
||||
{"path": "app1", "path.basename": "app1", "path.basenameNormalized": "app1", "cluster": "Cluster", "url": "Url", "templated": "test-app1"},
|
||||
{"path": "app2", "path.basename": "app2", "path.basenameNormalized": "app2", "cluster": "Cluster", "url": "Url", "templated": "test-app2"},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -96,6 +96,25 @@ func (r *Render) deeplyReplace(copy, original reflect.Value, replaceMap map[stri
|
||||
// specific case time
|
||||
if currentType == "time.Time" {
|
||||
copy.Field(i).Set(original.Field(i))
|
||||
} else if currentType == "Raw.k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" {
|
||||
var unmarshaled interface{}
|
||||
originalBytes := original.Field(i).Bytes()
|
||||
err := json.Unmarshal(originalBytes, &unmarshaled)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to unmarshal JSON field: %w", err)
|
||||
}
|
||||
jsonOriginal := reflect.ValueOf(&unmarshaled)
|
||||
jsonCopy := reflect.New(jsonOriginal.Type()).Elem()
|
||||
err = r.deeplyReplace(jsonCopy, jsonOriginal, replaceMap, useGoTemplate)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to deeply replace JSON field contents: %w", err)
|
||||
}
|
||||
jsonCopyInterface := jsonCopy.Interface().(*interface{})
|
||||
data, err := json.Marshal(jsonCopyInterface)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal templated JSON field: %w", err)
|
||||
}
|
||||
copy.Field(i).Set(reflect.ValueOf(data))
|
||||
} else if err := r.deeplyReplace(copy.Field(i), original.Field(i), replaceMap, useGoTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
7
controller/cache/cache.go
vendored
7
controller/cache/cache.go
vendored
@@ -488,10 +488,11 @@ func (c *liveStateCache) getSyncedCluster(server string) (clustercache.ClusterCa
|
||||
func (c *liveStateCache) invalidate(cacheSettings cacheSettings) {
|
||||
log.Info("invalidating live state cache")
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
||||
c.cacheSettings = cacheSettings
|
||||
for _, clust := range c.clusters {
|
||||
clusters := c.clusters
|
||||
c.lock.Unlock()
|
||||
|
||||
for _, clust := range clusters {
|
||||
clust.Invalidate(clustercache.SetSettings(cacheSettings.clusterSettings))
|
||||
}
|
||||
log.Info("live state cache invalidated")
|
||||
|
||||
@@ -74,7 +74,7 @@ kind: Kustomization
|
||||
|
||||
namespace: argocd
|
||||
resources:
|
||||
- github.com/argoproj/argo-cd/manifests/ha?ref=v2.6.2
|
||||
- github.com/argoproj/argo-cd/manifests/ha/base?ref=v2.6.2
|
||||
```
|
||||
|
||||
## Helm
|
||||
|
||||
@@ -81,3 +81,12 @@ Read the full [documentation](../deep_links.md) to see all possible combinations
|
||||
Argo CD now supports the `helm.sh/resource-policy` annotation to control the deletion of resources. The behavior is the same as the behavior of
|
||||
`argocd.argoproj.io/sync-options: Delete=false` annotation: if the annotation is present and set to `keep`, the resource will not be deleted
|
||||
when the application is deleted.
|
||||
|
||||
## Check your Kustomize patches for `--redis` changes
|
||||
|
||||
Starting in Argo CD 2.7, the install manifests no longer pass the Redis server name via `--redis`.
|
||||
|
||||
If your environment uses Kustomize JSON patches to modify the Redis server name, the patch might break when you upgrade
|
||||
to the 2.7 manifests. If it does, you can remove the patch and instead set the Redis server name via the `redis.server`
|
||||
field in the argocd-cmd-params-cm ConfigMap. That value will be passed to the necessary components via `valueFrom`
|
||||
environment variables.
|
||||
|
||||
@@ -321,7 +321,7 @@ stringData:
|
||||
|
||||
All the examples above talk about Git repositories, but the same principles apply to clusters as well.
|
||||
|
||||
With cluster-scoped clusters we can also restrict projects to only allow applications whose destinations belong to the
|
||||
With project-scoped clusters we can also restrict projects to only allow applications whose destinations belong to the
|
||||
same project. The default behavior allows for applications to be installed onto clusters which are not a part of the same
|
||||
project, as the example below demonstrates:
|
||||
|
||||
|
||||
4
go.mod
4
go.mod
@@ -8,7 +8,8 @@ require (
|
||||
github.com/Masterminds/semver/v3 v3.2.0
|
||||
github.com/TomOnTime/utfutil v0.0.0-20180511104225-09c41003ee1d
|
||||
github.com/alicebob/miniredis/v2 v2.23.1
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20230214165351-ed70eac8b7bd
|
||||
github.com/antonmedv/expr v1.9.0
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20230512020822-b4dd8b8c3976
|
||||
github.com/argoproj/notifications-engine v0.4.1-0.20230228182525-f754726f03da
|
||||
github.com/argoproj/pkg v0.13.7-0.20221221191914-44694015343d
|
||||
github.com/aws/aws-sdk-go v1.44.164
|
||||
@@ -113,7 +114,6 @@ require (
|
||||
|
||||
require (
|
||||
github.com/Masterminds/sprig/v3 v3.2.3
|
||||
github.com/antonmedv/expr v1.9.0
|
||||
github.com/coreos/go-oidc/v3 v3.4.0
|
||||
github.com/go-redis/cache/v9 v9.0.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
|
||||
4
go.sum
4
go.sum
@@ -135,8 +135,8 @@ github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.m
|
||||
github.com/antonmedv/expr v1.9.0 h1:j4HI3NHEdgDnN9p6oI6Ndr0G5QryMY0FNxT4ONrFDGU=
|
||||
github.com/antonmedv/expr v1.9.0/go.mod h1:5qsM3oLGDND7sDmQGDXHkYfkjYMUX14qsgqmHhwGEk8=
|
||||
github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc/go.mod h1:OawnOmAL4ZX3YaPdN+8HTNwBveT1jMsqP74moa9XUbE=
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20230214165351-ed70eac8b7bd h1:4Y76oXOZ2b7px7ppRSNpdxFPhUEw5e3BYEWpxn8pO2I=
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20230214165351-ed70eac8b7bd/go.mod h1:WpA/B7tgwfz+sdNE3LqrTrb7ArEY1FOPI2pAGI0hfPc=
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20230512020822-b4dd8b8c3976 h1:8i12dOcimhwrJxUznzZR/NW4JpIL5DXZjkI3Bl3yh38=
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20230512020822-b4dd8b8c3976/go.mod h1:WpA/B7tgwfz+sdNE3LqrTrb7ArEY1FOPI2pAGI0hfPc=
|
||||
github.com/argoproj/notifications-engine v0.4.1-0.20230228182525-f754726f03da h1:Vf9xvHcXn4TP/nLIfWn+TaC521V9fpz/DwRP6uEeVR8=
|
||||
github.com/argoproj/notifications-engine v0.4.1-0.20230228182525-f754726f03da/go.mod h1:05koR0gE/O0i5YDbidg1dpr76XitK4DJveh+dIAq6e8=
|
||||
github.com/argoproj/pkg v0.13.7-0.20221221191914-44694015343d h1:7fXEKF3OQ9i1PrgieA6FLrXOL3UAKyiotomn0RHevds=
|
||||
|
||||
@@ -5,7 +5,7 @@ kind: Kustomization
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
newName: quay.io/argoproj/argocd
|
||||
newTag: v2.7.0
|
||||
newTag: v2.7.3
|
||||
resources:
|
||||
- ./application-controller
|
||||
- ./dex
|
||||
|
||||
@@ -30,9 +30,6 @@ spec:
|
||||
- ""
|
||||
- "--appendonly"
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: ""
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
securityContext:
|
||||
|
||||
@@ -7,15 +7,3 @@ resources:
|
||||
- argocd-redis-sa.yaml
|
||||
- argocd-redis-service.yaml
|
||||
- argocd-redis-network-policy.yaml
|
||||
|
||||
replacements:
|
||||
- source:
|
||||
kind: Service
|
||||
name: argocd-redis
|
||||
version: v1
|
||||
targets:
|
||||
- select:
|
||||
kind: Deployment
|
||||
name: argocd-redis
|
||||
fieldPaths:
|
||||
- spec.template.spec.containers.[name=redis].env.[name=ARGOCD_REDIS_SERVICE].value
|
||||
|
||||
@@ -23,8 +23,6 @@ spec:
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- "--redis"
|
||||
- "$(ARGOCD_REDIS_SERVICE):6379"
|
||||
env:
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
|
||||
@@ -16700,7 +16700,7 @@ spec:
|
||||
key: applicationsetcontroller.enable.progressive.syncs
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -16782,9 +16782,6 @@ spec:
|
||||
- ""
|
||||
- --appendonly
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: argocd-redis
|
||||
image: redis:7.0.11-alpine
|
||||
imagePullPolicy: Always
|
||||
name: redis
|
||||
@@ -16838,8 +16835,6 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- $(ARGOCD_REDIS_SERVICE):6379
|
||||
env:
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
@@ -16967,7 +16962,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -17019,7 +17014,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -17232,7 +17227,7 @@ spec:
|
||||
key: controller.kubectl.parallelism.limit
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -12,4 +12,4 @@ resources:
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
newName: quay.io/argoproj/argocd
|
||||
newTag: v2.7.0
|
||||
newTag: v2.7.3
|
||||
|
||||
@@ -6,12 +6,13 @@ patches:
|
||||
- path: overlays/argocd-repo-server-deployment.yaml
|
||||
- path: overlays/argocd-server-deployment.yaml
|
||||
- path: overlays/argocd-application-controller-statefulset.yaml
|
||||
- path: overlays/argocd-cmd-params-cm.yaml
|
||||
|
||||
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
newName: quay.io/argoproj/argocd
|
||||
newTag: v2.7.0
|
||||
newTag: v2.7.3
|
||||
resources:
|
||||
- ../../base/application-controller
|
||||
- ../../base/applicationset-controller
|
||||
|
||||
@@ -9,5 +9,9 @@ spec:
|
||||
- name: argocd-application-controller
|
||||
args:
|
||||
- /usr/local/bin/argocd-application-controller
|
||||
- --redis
|
||||
- "argocd-redis-ha-haproxy:6379"
|
||||
env:
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: argocd-cmd-params-cm
|
||||
key: redis.server
|
||||
|
||||
6
manifests/ha/base/overlays/argocd-cmd-params-cm.yaml
Normal file
6
manifests/ha/base/overlays/argocd-cmd-params-cm.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: argocd-cmd-params-cm
|
||||
data:
|
||||
redis.server: argocd-redis-ha-haproxy:6379
|
||||
@@ -24,5 +24,9 @@ spec:
|
||||
- name: argocd-repo-server
|
||||
args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- "argocd-redis-ha-haproxy:6379"
|
||||
env:
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: argocd-cmd-params-cm
|
||||
key: redis.server
|
||||
|
||||
@@ -25,7 +25,10 @@ spec:
|
||||
env:
|
||||
- name: ARGOCD_API_SERVER_REPLICAS
|
||||
value: '2'
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: argocd-cmd-params-cm
|
||||
key: redis.server
|
||||
args:
|
||||
- /usr/local/bin/argocd-server
|
||||
- --redis
|
||||
- "argocd-redis-ha-haproxy:6379"
|
||||
|
||||
@@ -16777,6 +16777,8 @@ metadata:
|
||||
name: argocd-cm
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
redis.server: argocd-redis-ha-haproxy:6379
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
@@ -17919,7 +17921,7 @@ spec:
|
||||
key: applicationsetcontroller.enable.progressive.syncs
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -18029,7 +18031,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -18086,7 +18088,7 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-notifications
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -18259,9 +18261,12 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- argocd-redis-ha-haproxy:6379
|
||||
env:
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: redis.server
|
||||
name: argocd-cmd-params-cm
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@@ -18388,7 +18393,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -18440,7 +18445,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -18522,11 +18527,14 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-server
|
||||
- --redis
|
||||
- argocd-redis-ha-haproxy:6379
|
||||
env:
|
||||
- name: ARGOCD_API_SERVER_REPLICAS
|
||||
value: "2"
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: redis.server
|
||||
name: argocd-cmd-params-cm
|
||||
- name: ARGOCD_SERVER_INSECURE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@@ -18719,7 +18727,7 @@ spec:
|
||||
key: server.enable.proxy.extension
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -18830,9 +18838,12 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-application-controller
|
||||
- --redis
|
||||
- argocd-redis-ha-haproxy:6379
|
||||
env:
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: redis.server
|
||||
name: argocd-cmd-params-cm
|
||||
- name: ARGOCD_CONTROLLER_REPLICAS
|
||||
value: "1"
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
@@ -18961,7 +18972,7 @@ spec:
|
||||
key: controller.kubectl.parallelism.limit
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -437,6 +437,8 @@ metadata:
|
||||
name: argocd-cm
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
redis.server: argocd-redis-ha-haproxy:6379
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
@@ -1579,7 +1581,7 @@ spec:
|
||||
key: applicationsetcontroller.enable.progressive.syncs
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -1689,7 +1691,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -1746,7 +1748,7 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-notifications
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -1919,9 +1921,12 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- argocd-redis-ha-haproxy:6379
|
||||
env:
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: redis.server
|
||||
name: argocd-cmd-params-cm
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@@ -2048,7 +2053,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -2100,7 +2105,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -2182,11 +2187,14 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-server
|
||||
- --redis
|
||||
- argocd-redis-ha-haproxy:6379
|
||||
env:
|
||||
- name: ARGOCD_API_SERVER_REPLICAS
|
||||
value: "2"
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: redis.server
|
||||
name: argocd-cmd-params-cm
|
||||
- name: ARGOCD_SERVER_INSECURE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@@ -2379,7 +2387,7 @@ spec:
|
||||
key: server.enable.proxy.extension
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -2490,9 +2498,12 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-application-controller
|
||||
- --redis
|
||||
- argocd-redis-ha-haproxy:6379
|
||||
env:
|
||||
- name: ARGOCD_REDIS
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: redis.server
|
||||
name: argocd-cmd-params-cm
|
||||
- name: ARGOCD_CONTROLLER_REPLICAS
|
||||
value: "1"
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
@@ -2621,7 +2632,7 @@ spec:
|
||||
key: controller.kubectl.parallelism.limit
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -17038,7 +17038,7 @@ spec:
|
||||
key: applicationsetcontroller.enable.progressive.syncs
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -17148,7 +17148,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -17205,7 +17205,7 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-notifications
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -17282,9 +17282,6 @@ spec:
|
||||
- ""
|
||||
- --appendonly
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: argocd-redis
|
||||
image: redis:7.0.11-alpine
|
||||
imagePullPolicy: Always
|
||||
name: redis
|
||||
@@ -17338,8 +17335,6 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- $(ARGOCD_REDIS_SERVICE):6379
|
||||
env:
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
@@ -17467,7 +17462,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -17519,7 +17514,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -17794,7 +17789,7 @@ spec:
|
||||
key: server.enable.proxy.extension
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -18034,7 +18029,7 @@ spec:
|
||||
key: controller.kubectl.parallelism.limit
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -698,7 +698,7 @@ spec:
|
||||
key: applicationsetcontroller.enable.progressive.syncs
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -808,7 +808,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -865,7 +865,7 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-notifications
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -942,9 +942,6 @@ spec:
|
||||
- ""
|
||||
- --appendonly
|
||||
- "no"
|
||||
env:
|
||||
- name: ARGOCD_REDIS_SERVICE
|
||||
value: argocd-redis
|
||||
image: redis:7.0.11-alpine
|
||||
imagePullPolicy: Always
|
||||
name: redis
|
||||
@@ -998,8 +995,6 @@ spec:
|
||||
containers:
|
||||
- args:
|
||||
- /usr/local/bin/argocd-repo-server
|
||||
- --redis
|
||||
- $(ARGOCD_REDIS_SERVICE):6379
|
||||
env:
|
||||
- name: ARGOCD_RECONCILIATION_TIMEOUT
|
||||
valueFrom:
|
||||
@@ -1127,7 +1122,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -1179,7 +1174,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -1454,7 +1449,7 @@ spec:
|
||||
key: server.enable.proxy.extension
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -1694,7 +1689,7 @@ spec:
|
||||
key: controller.kubectl.parallelism.limit
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:v2.7.0
|
||||
image: quay.io/argoproj/argocd:v2.7.3
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -183,8 +183,8 @@ func (g ApplicationSetTerminalGenerators) toApplicationSetNestedGenerators() []A
|
||||
// ListGenerator include items info
|
||||
type ListGenerator struct {
|
||||
Elements []apiextensionsv1.JSON `json:"elements" protobuf:"bytes,1,name=elements"`
|
||||
ElementsYaml string `json:"elementsYaml,omitempty" protobuf:"bytes,2,opt,name=elementsYaml"`
|
||||
Template ApplicationSetTemplate `json:"template,omitempty" protobuf:"bytes,3,name=template"`
|
||||
Template ApplicationSetTemplate `json:"template,omitempty" protobuf:"bytes,2,name=template"`
|
||||
ElementsYaml string `json:"elementsYaml,omitempty" protobuf:"bytes,3,opt,name=elementsYaml"`
|
||||
}
|
||||
|
||||
// MatrixGenerator generates the cartesian product of two sets of parameters. The parameters are defined by two nested
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1024,9 +1024,9 @@ message KustomizeReplica {
|
||||
message ListGenerator {
|
||||
repeated k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON elements = 1;
|
||||
|
||||
optional string elementsYaml = 2;
|
||||
optional ApplicationSetTemplate template = 2;
|
||||
|
||||
optional ApplicationSetTemplate template = 3;
|
||||
optional string elementsYaml = 3;
|
||||
}
|
||||
|
||||
message ManagedNamespaceMetadata {
|
||||
|
||||
@@ -3659,18 +3659,18 @@ func schema_pkg_apis_application_v1alpha1_ListGenerator(ref common.ReferenceCall
|
||||
},
|
||||
},
|
||||
},
|
||||
"elementsYaml": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"template": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSetTemplate"),
|
||||
},
|
||||
},
|
||||
"elementsYaml": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"elements"},
|
||||
},
|
||||
|
||||
@@ -500,6 +500,7 @@ func NewKustomizeReplica(text string) (*KustomizeReplica, error) {
|
||||
func (k *ApplicationSourceKustomize) AllowsConcurrentProcessing() bool {
|
||||
return len(k.Images) == 0 &&
|
||||
len(k.CommonLabels) == 0 &&
|
||||
len(k.CommonAnnotations) == 0 &&
|
||||
k.NamePrefix == "" &&
|
||||
k.Namespace == "" &&
|
||||
k.NameSuffix == ""
|
||||
|
||||
@@ -2973,11 +2973,21 @@ func TestRetryStrategy_NextRetryAtCustomBackoff(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSourceAllowsConcurrentProcessing_KustomizeParams(t *testing.T) {
|
||||
src := ApplicationSource{Path: ".", Kustomize: &ApplicationSourceKustomize{
|
||||
NameSuffix: "test",
|
||||
}}
|
||||
t.Run("Has NameSuffix", func(t *testing.T) {
|
||||
src := ApplicationSource{Path: ".", Kustomize: &ApplicationSourceKustomize{
|
||||
NameSuffix: "test",
|
||||
}}
|
||||
|
||||
assert.False(t, src.AllowsConcurrentProcessing())
|
||||
assert.False(t, src.AllowsConcurrentProcessing())
|
||||
})
|
||||
|
||||
t.Run("Has CommonAnnotations", func(t *testing.T) {
|
||||
src := ApplicationSource{Path: ".", Kustomize: &ApplicationSourceKustomize{
|
||||
CommonAnnotations: map[string]string{"foo": "bar"},
|
||||
}}
|
||||
|
||||
assert.False(t, src.AllowsConcurrentProcessing())
|
||||
})
|
||||
}
|
||||
|
||||
func TestUnSetCascadedDeletion(t *testing.T) {
|
||||
|
||||
@@ -1791,7 +1791,7 @@ func (s *Server) Rollback(ctx context.Context, rollbackReq *application.Applicat
|
||||
}
|
||||
|
||||
func (s *Server) ListLinks(ctx context.Context, req *application.ListAppLinksRequest) (*application.LinksResponse, error) {
|
||||
a, err := s.getApplicationEnforceRBACClient(ctx, rbacpolicy.ActionSync, req.GetNamespace(), req.GetName(), "")
|
||||
a, err := s.getApplicationEnforceRBACClient(ctx, rbacpolicy.ActionGet, req.GetNamespace(), req.GetName(), "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1839,14 +1839,6 @@ func (s *Server) getObjectsForDeepLinks(ctx context.Context, app *appv1.Applicat
|
||||
return s.db.GetProjectClusters(ctx, project)
|
||||
}
|
||||
|
||||
permitted, err := proj.IsDestinationPermitted(app.Spec.Destination, getProjectClusters)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if !permitted {
|
||||
return nil, nil, fmt.Errorf("error getting destination cluster")
|
||||
}
|
||||
|
||||
if err := argo.ValidateDestination(ctx, &app.Spec.Destination, s.db); err != nil {
|
||||
log.WithFields(map[string]interface{}{
|
||||
"application": app.GetName(),
|
||||
@@ -1855,6 +1847,14 @@ func (s *Server) getObjectsForDeepLinks(ctx context.Context, app *appv1.Applicat
|
||||
}).Warnf("cannot validate cluster, error=%v", err.Error())
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
||||
permitted, err := proj.IsDestinationPermitted(app.Spec.Destination, getProjectClusters)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if !permitted {
|
||||
return nil, nil, fmt.Errorf("error getting destination cluster")
|
||||
}
|
||||
clst, err := s.db.GetCluster(ctx, app.Spec.Destination.Server)
|
||||
if err != nil {
|
||||
log.WithFields(map[string]interface{}{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import {Tooltip} from 'argo-ui';
|
||||
|
||||
export type ContainerGroup = {offset: number; containers: string[]};
|
||||
export type ContainerGroup = {offset: number; containers: {name: string}[]};
|
||||
|
||||
// ContainerSelector is a component that renders a dropdown menu of containers
|
||||
export const ContainerSelector = ({
|
||||
@@ -16,18 +16,19 @@ export const ContainerSelector = ({
|
||||
if (!containerGroups) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
const containers = containerGroups?.reduce((acc, group) => acc.concat(group.containers), []);
|
||||
const containerNames = containers?.map(container => container.name);
|
||||
const containerGroup = (n: string) => {
|
||||
return containerGroups.find(group => group.containers.find(container => container === n));
|
||||
return containerGroups?.find(group => group.containers?.find(container => container.name === n));
|
||||
};
|
||||
const containerIndex = (n: string) => {
|
||||
return containerGroup(n).containers.findIndex(container => container === n);
|
||||
return containerGroup(n)?.containers.findIndex(container => container.name === n);
|
||||
};
|
||||
if (containerNames.length <= 1) return <></>;
|
||||
return (
|
||||
<Tooltip content='Select a container to view logs'>
|
||||
<select className='argo-field' onChange={e => onClickContainer(containerGroup(e.target.value), containerIndex(e.target.value), 'logs')}>
|
||||
<select className='argo-field' value={containerName} onChange={e => onClickContainer(containerGroup(e.target.value), containerIndex(e.target.value), 'logs')}>
|
||||
{containerNames.map(n => (
|
||||
<option key={n} value={n}>
|
||||
{n}
|
||||
|
||||
@@ -213,12 +213,15 @@ export const PodsLogsViewer = (props: PodLogsProps) => {
|
||||
log.content?.replace(highlight, (substring: string) => whiteOnYellow + substring + reset);
|
||||
|
||||
// logs are in 14px wide fixed width font
|
||||
const width =
|
||||
14 *
|
||||
logs
|
||||
.map(renderLog)
|
||||
.map(v => v.length)
|
||||
.reduce((a, b) => Math.max(a, b));
|
||||
let width = 0;
|
||||
if (logs.length > 0) {
|
||||
width =
|
||||
14 *
|
||||
logs
|
||||
.map(renderLog)
|
||||
.map(v => v.length)
|
||||
.reduce((a, b) => Math.max(a, b));
|
||||
}
|
||||
|
||||
const rowRenderer = ({index, key, style}: {index: number; key: string; style: React.CSSProperties}) => {
|
||||
return (
|
||||
|
||||
@@ -109,12 +109,12 @@ func SendRepoStream(ctx context.Context, appPath, repoPath string, sender Stream
|
||||
func GetCompressedRepoAndMetadata(repoPath string, appPath string, env []string, excludedGlobs []string, opt *senderOption) (*os.File, *pluginclient.AppStreamRequest, error) {
|
||||
// compress all files in appPath in tgz
|
||||
tgz, filesWritten, checksum, err := tgzstream.CompressFiles(repoPath, nil, excludedGlobs)
|
||||
if filesWritten == 0 {
|
||||
return nil, nil, fmt.Errorf("no files to send")
|
||||
}
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("error compressing repo files: %w", err)
|
||||
}
|
||||
if filesWritten == 0 {
|
||||
return nil, nil, fmt.Errorf("no files to send")
|
||||
}
|
||||
if opt != nil && opt.tarDoneChan != nil {
|
||||
opt.tarDoneChan <- true
|
||||
close(opt.tarDoneChan)
|
||||
|
||||
@@ -40,12 +40,12 @@ type RepoStreamReceiver interface {
|
||||
// SendApplicationManifestQueryWithFiles compresses a folder and sends it over the stream
|
||||
func SendApplicationManifestQueryWithFiles(ctx context.Context, stream ApplicationStreamSender, appName string, appNs string, dir string, inclusions []string) error {
|
||||
f, filesWritten, checksum, err := tgzstream.CompressFiles(dir, inclusions, nil)
|
||||
if filesWritten == 0 {
|
||||
return fmt.Errorf("no files to send")
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to compress files: %w", err)
|
||||
}
|
||||
if filesWritten == 0 {
|
||||
return fmt.Errorf("no files to send")
|
||||
}
|
||||
|
||||
err = stream.Send(&applicationpkg.ApplicationManifestQueryWithFilesWrapper{
|
||||
Part: &applicationpkg.ApplicationManifestQueryWithFilesWrapper_Query{
|
||||
|
||||
Reference in New Issue
Block a user