Skip to content

Commit

Permalink
Changes for new DestinationServiceAccount changes in AppProject
Browse files Browse the repository at this point in the history
Signed-off-by: anandf <[email protected]>
  • Loading branch information
anandf authored and raghavi101 committed Mar 6, 2024
1 parent 44a5810 commit 8d36c22
Show file tree
Hide file tree
Showing 6 changed files with 713 additions and 51 deletions.
8 changes: 5 additions & 3 deletions cmd/argocd/commands/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co
}

var command = &cobra.Command{
Use: "add-destination PROJECT SERVER/NAME NAMESPACE",
Use: "add-destination PROJECT SERVER/NAME NAMESPACE SERVICEACCOUNT",
Short: "Add project destination",
Example: templates.Examples(`
# Add project destination using a server URL (SERVER) in the specified namespace (NAMESPACE) on the project with name PROJECT
Expand Down Expand Up @@ -322,7 +322,7 @@ func NewProjectAddDestinationCommand(clientOpts *argocdclient.ClientOptions) *co
// NewProjectRemoveDestinationCommand returns a new instance of an `argocd proj remove-destination` command
func NewProjectRemoveDestinationCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var command = &cobra.Command{
Use: "remove-destination PROJECT SERVER NAMESPACE",
Use: "remove-destination PROJECT SERVER NAMESPACE SERVICEACCOUNT",
Short: "Remove project destination",
Example: templates.Examples(`
# Remove the destination (SERVER) from the specified namespace (NAMESPACE) on the project with name PROJECT
Expand All @@ -338,6 +338,7 @@ func NewProjectRemoveDestinationCommand(clientOpts *argocdclient.ClientOptions)
projName := args[0]
server := args[1]
namespace := args[2]

conn, projIf := headless.NewClientOrDie(clientOpts, c).NewProjectClientOrDie()
defer argoio.Close(conn)

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

// Print sources
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/commands/argocd_proj_add-destination.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Add project destination

```
argocd proj add-destination PROJECT SERVER/NAME NAMESPACE [flags]
argocd proj add-destination PROJECT SERVER/NAME NAMESPACE SERVICEACCOUNT [flags]
```

### Examples
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/commands/argocd_proj_remove-destination.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Remove project destination

```
argocd proj remove-destination PROJECT SERVER NAMESPACE [flags]
argocd proj remove-destination PROJECT SERVER NAMESPACE SERVICEACCOUNT [flags]
```

### Examples
Expand Down
52 changes: 6 additions & 46 deletions manifests/ha/base/redis-ha/chart/upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1094,13 +1094,7 @@ spec:
args:
- /readonly/haproxy_init.sh
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
null
volumeMounts:
- name: config-volume
mountPath: /readonly
Expand All @@ -1112,13 +1106,7 @@ spec:
image: haproxy:2.6.14-alpine
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
null
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -1216,14 +1204,7 @@ spec:
args:
- /readonly-config/init.sh
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
env:
- name: SENTINEL_ID_0
value: 3c0d9c0320bb34888c2df5757c718ce6ca992ce6
Expand All @@ -1248,14 +1229,7 @@ spec:
args:
- /data/conf/redis.conf
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 15
Expand Down Expand Up @@ -1305,14 +1279,7 @@ spec:
args:
- /data/conf/sentinel.conf
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 15
Expand Down Expand Up @@ -1356,14 +1323,7 @@ spec:
args:
- /readonly-config/fix-split-brain.sh
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
null
env:
- name: SENTINEL_ID_0
value: 3c0d9c0320bb34888c2df5757c718ce6ca992ce6
Expand Down
Loading

0 comments on commit 8d36c22

Please sign in to comment.