Skip to content

Commit 8d36c22

Browse files
anandfraghavi101
authored andcommitted
Changes for new DestinationServiceAccount changes in AppProject
Signed-off-by: anandf <anjoseph@redhat.com>
1 parent 44a5810 commit 8d36c22

File tree

6 files changed

+713
-51
lines changed

6 files changed

+713
-51
lines changed

cmd/argocd/commands/project.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co
278278
}
279279

280280
var command = &cobra.Command{
281-
Use: "add-destination PROJECT SERVER/NAME NAMESPACE",
281+
Use: "add-destination PROJECT SERVER/NAME NAMESPACE SERVICEACCOUNT",
282282
Short: "Add project destination",
283283
Example: templates.Examples(`
284284
# Add project destination using a server URL (SERVER) in the specified namespace (NAMESPACE) on the project with name PROJECT
@@ -322,7 +322,7 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co
322322
// NewProjectRemoveDestinationCommand returns a new instance of an `argocd proj remove-destination` command
323323
func NewProjectRemoveDestinationCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
324324
var command = &cobra.Command{
325-
Use: "remove-destination PROJECT SERVER NAMESPACE",
325+
Use: "remove-destination PROJECT SERVER NAMESPACE SERVICEACCOUNT",
326326
Short: "Remove project destination",
327327
Example: templates.Examples(`
328328
# Remove the destination (SERVER) from the specified namespace (NAMESPACE) on the project with name PROJECT
@@ -338,6 +338,7 @@ func NewProjectRemoveDestinationCommand(clientOpts *argocdclient.ClientOptions)
338338
projName := args[0]
339339
server := args[1]
340340
namespace := args[2]
341+
341342
conn, projIf := headless.NewClientOrDie(clientOpts, c).NewProjectClientOrDie()
342343
defer argoio.Close(conn)
343344

@@ -927,7 +928,8 @@ func printProject(p *v1alpha1.AppProject, scopedRepositories []*v1alpha1.Reposit
927928
}
928929
fmt.Printf(printProjFmtStr, "Destinations:", dest0)
929930
for i := 1; i < len(p.Spec.Destinations); i++ {
930-
fmt.Printf(printProjFmtStr, "", fmt.Sprintf("%s,%s", p.Spec.Destinations[i].Server, p.Spec.Destinations[i].Namespace))
931+
destinations := fmt.Sprintf("%s,%s", p.Spec.Destinations[i].Server, p.Spec.Destinations[i].Namespace)
932+
fmt.Printf(printProjFmtStr, "", destinations)
931933
}
932934

933935
// Print sources

docs/user-guide/commands/argocd_proj_add-destination.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Add project destination
66

77
```
8-
argocd proj add-destination PROJECT SERVER/NAME NAMESPACE [flags]
8+
argocd proj add-destination PROJECT SERVER/NAME NAMESPACE SERVICEACCOUNT [flags]
99
```
1010

1111
### Examples

docs/user-guide/commands/argocd_proj_remove-destination.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Remove project destination
66

77
```
8-
argocd proj remove-destination PROJECT SERVER NAMESPACE [flags]
8+
argocd proj remove-destination PROJECT SERVER NAMESPACE SERVICEACCOUNT [flags]
99
```
1010

1111
### Examples

manifests/ha/base/redis-ha/chart/upstream.yaml

+6-46
Original file line numberDiff line numberDiff line change
@@ -1094,13 +1094,7 @@ spec:
10941094
args:
10951095
- /readonly/haproxy_init.sh
10961096
securityContext:
1097-
allowPrivilegeEscalation: false
1098-
capabilities:
1099-
drop:
1100-
- ALL
1101-
runAsNonRoot: true
1102-
seccompProfile:
1103-
type: RuntimeDefault
1097+
null
11041098
volumeMounts:
11051099
- name: config-volume
11061100
mountPath: /readonly
@@ -1112,13 +1106,7 @@ spec:
11121106
image: haproxy:2.6.14-alpine
11131107
imagePullPolicy: IfNotPresent
11141108
securityContext:
1115-
allowPrivilegeEscalation: false
1116-
capabilities:
1117-
drop:
1118-
- ALL
1119-
runAsNonRoot: true
1120-
seccompProfile:
1121-
type: RuntimeDefault
1109+
null
11221110
livenessProbe:
11231111
httpGet:
11241112
path: /healthz
@@ -1216,14 +1204,7 @@ spec:
12161204
args:
12171205
- /readonly-config/init.sh
12181206
securityContext:
1219-
allowPrivilegeEscalation: false
1220-
capabilities:
1221-
drop:
1222-
- ALL
1223-
runAsNonRoot: true
1224-
runAsUser: 1000
1225-
seccompProfile:
1226-
type: RuntimeDefault
1207+
null
12271208
env:
12281209
- name: SENTINEL_ID_0
12291210
value: 3c0d9c0320bb34888c2df5757c718ce6ca992ce6
@@ -1248,14 +1229,7 @@ spec:
12481229
args:
12491230
- /data/conf/redis.conf
12501231
securityContext:
1251-
allowPrivilegeEscalation: false
1252-
capabilities:
1253-
drop:
1254-
- ALL
1255-
runAsNonRoot: true
1256-
runAsUser: 1000
1257-
seccompProfile:
1258-
type: RuntimeDefault
1232+
null
12591233
livenessProbe:
12601234
initialDelaySeconds: 30
12611235
periodSeconds: 15
@@ -1305,14 +1279,7 @@ spec:
13051279
args:
13061280
- /data/conf/sentinel.conf
13071281
securityContext:
1308-
allowPrivilegeEscalation: false
1309-
capabilities:
1310-
drop:
1311-
- ALL
1312-
runAsNonRoot: true
1313-
runAsUser: 1000
1314-
seccompProfile:
1315-
type: RuntimeDefault
1282+
null
13161283
livenessProbe:
13171284
initialDelaySeconds: 30
13181285
periodSeconds: 15
@@ -1356,14 +1323,7 @@ spec:
13561323
args:
13571324
- /readonly-config/fix-split-brain.sh
13581325
securityContext:
1359-
allowPrivilegeEscalation: false
1360-
capabilities:
1361-
drop:
1362-
- ALL
1363-
runAsNonRoot: true
1364-
runAsUser: 1000
1365-
seccompProfile:
1366-
type: RuntimeDefault
1326+
null
13671327
env:
13681328
- name: SENTINEL_ID_0
13691329
value: 3c0d9c0320bb34888c2df5757c718ce6ca992ce6

0 commit comments

Comments
 (0)