mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-03-01 05:58:48 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbee7e6011 | ||
|
|
8e61f64cc9 | ||
|
|
e413db45b1 | ||
|
|
26cf7d95b7 | ||
|
|
24bd4aee70 | ||
|
|
5e543518db | ||
|
|
72a69e2f16 |
@@ -50,10 +50,17 @@ func (m *MatrixGenerator) GenerateParams(appSetGenerator *argoprojiov1alpha1.App
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
requiresInterpolation := false // Try to generate 2nd generator's params without interpolation
|
||||
g1, err := m.getParams(appSetGenerator.Matrix.Generators[1], appSet, nil)
|
||||
if err != nil || g1 == nil {
|
||||
requiresInterpolation = true
|
||||
}
|
||||
for _, a := range g0 {
|
||||
g1, err := m.getParams(appSetGenerator.Matrix.Generators[1], appSet, a)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get params for second generator in the matrix generator: %w", err)
|
||||
if requiresInterpolation {
|
||||
g1, err = m.getParams(appSetGenerator.Matrix.Generators[1], appSet, a)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get params for second generator in the matrix generator: %w", err)
|
||||
}
|
||||
}
|
||||
for _, b := range g1 {
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package generators
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/sirupsen/logrus"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -1005,6 +1006,273 @@ func TestMatrixGenerateListElementsYaml(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSkipInterpolatedMatrixCalls(t *testing.T) {
|
||||
interpolatedGitGenerator := &argoprojiov1alpha1.GitGenerator{
|
||||
RepoURL: "RepoURL",
|
||||
Revision: "Revision",
|
||||
Files: []argoprojiov1alpha1.GitFileGeneratorItem{
|
||||
{Path: "examples/git-generator-files-discovery/cluster-config/{{name}}.json"},
|
||||
},
|
||||
}
|
||||
|
||||
nonInterpolatedGitGenerator := &argoprojiov1alpha1.GitGenerator{
|
||||
RepoURL: "RepoURL",
|
||||
Revision: "Revision",
|
||||
Files: []argoprojiov1alpha1.GitFileGeneratorItem{
|
||||
{Path: "examples/git-generator-files-discovery/cluster-config/base.json"},
|
||||
},
|
||||
}
|
||||
|
||||
interpolatedClusterGenerator := &argoprojiov1alpha1.ClusterGenerator{
|
||||
Selector: metav1.LabelSelector{
|
||||
MatchLabels: nil,
|
||||
MatchExpressions: []metav1.LabelSelectorRequirement{
|
||||
{
|
||||
Key: "environment",
|
||||
Operator: "Exists",
|
||||
Values: []string{},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
testCases := []struct {
|
||||
name string
|
||||
baseGenerators []argoprojiov1alpha1.ApplicationSetNestedGenerator
|
||||
expectedErr error
|
||||
expected []map[string]interface{}
|
||||
clientError bool
|
||||
expectedMock [][]map[string]interface{}
|
||||
expectedNumCalls int
|
||||
}{
|
||||
{
|
||||
name: "happy flow - generate noninterpolated params",
|
||||
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
|
||||
{ Clusters: interpolatedClusterGenerator },
|
||||
{ Git: nonInterpolatedGitGenerator },
|
||||
},
|
||||
expected: []map[string]interface{}{
|
||||
{
|
||||
"path": "examples/git-generator-files-discovery/base.json",
|
||||
"path.basename": "base",
|
||||
"path.basenameNormalized": "base",
|
||||
"path.filename": "base.json",
|
||||
"path.filenameNormalized": "base.json",
|
||||
"path[0]": "examples",
|
||||
"path[1]": "git-generator-files-discovery",
|
||||
"path[2]": "base",
|
||||
"name": "dev-01",
|
||||
"nameNormalized": "dev-01",
|
||||
"server": "https://dev-01.example.com",
|
||||
"metadata.labels.environment": "dev",
|
||||
"metadata.labels.argocd.argoproj.io/secret-type": "cluster",
|
||||
},
|
||||
{
|
||||
"path": "examples/git-generator-files-discovery/base.json",
|
||||
"path.basename": "base",
|
||||
"path.basenameNormalized": "base",
|
||||
"path.filename": "base.json",
|
||||
"path.filenameNormalized": "base.json",
|
||||
"path[0]": "examples",
|
||||
"path[1]": "git-generator-files-discovery",
|
||||
"path[2]": "base",
|
||||
"name": "prod-01",
|
||||
"nameNormalized": "prod-01",
|
||||
"server": "https://prod-01.example.com",
|
||||
"metadata.labels.environment": "prod",
|
||||
"metadata.labels.argocd.argoproj.io/secret-type": "cluster",
|
||||
},
|
||||
},
|
||||
clientError: false,
|
||||
expectedMock: [][]map[string]interface{}{
|
||||
{
|
||||
{
|
||||
"path": "examples/git-generator-files-discovery/base.json",
|
||||
"path.basename": "base",
|
||||
"path.basenameNormalized": "base",
|
||||
"path.filename": "base.json",
|
||||
"path.filenameNormalized": "base.json",
|
||||
"path[0]": "examples",
|
||||
"path[1]": "git-generator-files-discovery",
|
||||
"path[2]": "base",
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedNumCalls: 1,
|
||||
},
|
||||
{
|
||||
name: "happy flow - generate interpolated params",
|
||||
baseGenerators: []argoprojiov1alpha1.ApplicationSetNestedGenerator{
|
||||
{ Clusters: interpolatedClusterGenerator },
|
||||
{ Git: interpolatedGitGenerator },
|
||||
},
|
||||
expected: []map[string]interface{}{
|
||||
{
|
||||
"path": "examples/git-generator-files-discovery/dev-01.json",
|
||||
"path.basename": "dev-01",
|
||||
"path.basenameNormalized": "dev-01",
|
||||
"path.filename": "dev-01.json",
|
||||
"path.filenameNormalized": "dev-01.json",
|
||||
"path[0]": "examples",
|
||||
"path[1]": "git-generator-files-discovery",
|
||||
"path[2]": "dev-01",
|
||||
"name": "dev-01",
|
||||
"nameNormalized": "dev-01",
|
||||
"server": "https://dev-01.example.com",
|
||||
"metadata.labels.environment": "dev",
|
||||
"metadata.labels.argocd.argoproj.io/secret-type": "cluster",
|
||||
},
|
||||
{
|
||||
"path": "examples/git-generator-files-discovery/prod-01.json",
|
||||
"path.basename": "prod-01",
|
||||
"path.basenameNormalized": "prod-01",
|
||||
"path.filename": "prod-01.json",
|
||||
"path.filenameNormalized": "prod-01.json",
|
||||
"path[0]": "examples",
|
||||
"path[1]": "git-generator-files-discovery",
|
||||
"path[2]": "prod-01",
|
||||
"name": "prod-01",
|
||||
"nameNormalized": "prod-01",
|
||||
"server": "https://prod-01.example.com",
|
||||
"metadata.labels.environment": "prod",
|
||||
"metadata.labels.argocd.argoproj.io/secret-type": "cluster",
|
||||
},
|
||||
},
|
||||
clientError: false,
|
||||
expectedMock: [][]map[string]interface{}{
|
||||
{}, // Needed, because the 1st call will fail without interpolation
|
||||
{ // Subsequent calls will succeed with interpolation
|
||||
{
|
||||
"path": "examples/git-generator-files-discovery/dev-01.json",
|
||||
"path.basename": "dev-01",
|
||||
"path.basenameNormalized": "dev-01",
|
||||
"path.filename": "dev-01.json",
|
||||
"path.filenameNormalized": "dev-01.json",
|
||||
"path[0]": "examples",
|
||||
"path[1]": "git-generator-files-discovery",
|
||||
"path[2]": "dev-01",
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
"path": "examples/git-generator-files-discovery/prod-01.json",
|
||||
"path.basename": "prod-01",
|
||||
"path.basenameNormalized": "prod-01",
|
||||
"path.filename": "prod-01.json",
|
||||
"path.filenameNormalized": "prod-01.json",
|
||||
"path[0]": "examples",
|
||||
"path[1]": "git-generator-files-discovery",
|
||||
"path[2]": "prod-01",
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedNumCalls: 3,
|
||||
},
|
||||
}
|
||||
clusters := []client.Object{
|
||||
&corev1.Secret{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "Secret",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "dev-01",
|
||||
Namespace: "namespace",
|
||||
Labels: map[string]string{
|
||||
"argocd.argoproj.io/secret-type": "cluster",
|
||||
"environment": "dev",
|
||||
},
|
||||
},
|
||||
Data: map[string][]byte{
|
||||
"config": []byte("{}"),
|
||||
"name": []byte("dev-01"),
|
||||
"server": []byte("https://dev-01.example.com"),
|
||||
},
|
||||
Type: corev1.SecretType("Opaque"),
|
||||
},
|
||||
&corev1.Secret{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "Secret",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "prod-01",
|
||||
Namespace: "namespace",
|
||||
Labels: map[string]string{
|
||||
"argocd.argoproj.io/secret-type": "cluster",
|
||||
"environment": "prod",
|
||||
},
|
||||
},
|
||||
Data: map[string][]byte{
|
||||
"config": []byte("{}"),
|
||||
"name": []byte("prod-01"),
|
||||
"server": []byte("https://prod-01.example.com"),
|
||||
},
|
||||
Type: corev1.SecretType("Opaque"),
|
||||
},
|
||||
}
|
||||
|
||||
// convert []client.Object to []runtime.Object, for use by kubefake package
|
||||
runtimeClusters := []runtime.Object{}
|
||||
for _, clientCluster := range clusters {
|
||||
runtimeClusters = append(runtimeClusters, clientCluster)
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
testCaseCopy := testCase // Since tests may run in parallel
|
||||
|
||||
t.Run(testCaseCopy.name, func(t *testing.T) {
|
||||
genMock := &generatorMock{}
|
||||
appSet := &argoprojiov1alpha1.ApplicationSet{}
|
||||
|
||||
appClientset := kubefake.NewSimpleClientset(runtimeClusters...)
|
||||
fakeClient := fake.NewClientBuilder().WithObjects(clusters...).Build()
|
||||
cl := &possiblyErroringFakeCtrlRuntimeClient{
|
||||
fakeClient,
|
||||
testCase.clientError,
|
||||
}
|
||||
var clusterGenerator = NewClusterGenerator(cl, context.Background(), appClientset, "namespace")
|
||||
logrus.Debug(clusterGenerator)
|
||||
for _, g := range testCaseCopy.baseGenerators {
|
||||
|
||||
gitGeneratorSpec := argoprojiov1alpha1.ApplicationSetGenerator{
|
||||
Clusters: g.Clusters,
|
||||
Git: g.Git,
|
||||
}
|
||||
|
||||
genMock.On("GetTemplate", &gitGeneratorSpec).
|
||||
Return(&argoprojiov1alpha1.ApplicationSetTemplate{})
|
||||
}
|
||||
|
||||
for _, currMock := range testCaseCopy.expectedMock {
|
||||
genMock.On("GenerateParams", mock.AnythingOfType("*v1alpha1.ApplicationSetGenerator"), appSet).Return(currMock, nil).Once()
|
||||
}
|
||||
|
||||
var matrixGenerator = NewMatrixGenerator(
|
||||
map[string]Generator{
|
||||
"Git": genMock,
|
||||
"Clusters": clusterGenerator,
|
||||
},
|
||||
)
|
||||
|
||||
got, err := matrixGenerator.GenerateParams(&argoprojiov1alpha1.ApplicationSetGenerator{
|
||||
Matrix: &argoprojiov1alpha1.MatrixGenerator{
|
||||
Generators: testCaseCopy.baseGenerators,
|
||||
Template: argoprojiov1alpha1.ApplicationSetTemplate{},
|
||||
},
|
||||
}, appSet)
|
||||
|
||||
genMock.AssertNumberOfCalls(t, "GenerateParams", testCase.expectedNumCalls)
|
||||
|
||||
if testCaseCopy.expectedErr != nil {
|
||||
assert.ErrorIs(t, err, testCaseCopy.expectedErr)
|
||||
} else {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, testCaseCopy.expected, got)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
type generatorMock struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ kind: Kustomization
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
newName: quay.io/argoproj/argocd
|
||||
newTag: v2.7.0
|
||||
newTag: v2.7.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
|
||||
@@ -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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
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.2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -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,13 +16,14 @@ 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 (
|
||||
|
||||
@@ -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