Skip to content

Commit

Permalink
restructured kuttl files and added operator patch file
Browse files Browse the repository at this point in the history
  • Loading branch information
raghavi101 committed Sep 18, 2023
1 parent 8acb169 commit be9ae2b
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
# patches the subscription to add label selector in argocd-operator
- script: |
kubectl patch -n $NAMESPACE argocd/argocd --type='json' -p='[{"op": "remove", "path": "/spec/sso"}]'
- script: sleep 10
39 changes: 0 additions & 39 deletions tests/k8s/1-033_validate_label_selector/02-assert.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
name: example-argocd
name: test1
status:
phase: Available
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ kind: TestStep
commands:
# patches the argocd instance with the label-selector
- script: |
kubectl label argocd test1 foo=bar -n test-argocd
kubectl label argocd test1 foo=bar -n $NAMESPACE
- script: sleep 60
68 changes: 38 additions & 30 deletions tests/k8s/1-033_validate_label_selector/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: test1-redis
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test1-repo-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: test1-server
---
apiVersion: v1
kind: Service
metadata:
name: test1-metrics
---
apiVersion: v1
kind: Service
metadata:
name: test1-redis
---
apiVersion: v1
kind: Service
metadata:
name: test1-repo-server
---
apiVersion: v1
data:
policy.csv: ""
policy.default: role:readonly
scopes: '[email]'
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/managed-by: test1
app.kubernetes.io/name: argocd-rbac-cm
app.kubernetes.io/part-of: argocd
name: argocd-rbac-cm
namespace: test-argocd




# apiVersion: argoproj.io/v1alpha1
# kind: ArgoCD
# metadata:
# name: test1
# namespace: test-argocd
# labels:
# example: basic
# spec:
# rbac:
# policy: |
# g, system:cluster-admins, role:admin
# g, cluster-admins, role:admin
# scopes: '[email]'

kind: Service
metadata:
name: test1-server
---
apiVersion: v1
kind: Service
metadata:
name: test1-server-metrics
31 changes: 31 additions & 0 deletions tests/k8s/1-033_validate_label_selector/04-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
data:
policy.csv: ""
policy.default: role:readonly
scopes: '[email]'
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/managed-by: test1
app.kubernetes.io/name: argocd-rbac-cm
app.kubernetes.io/part-of: argocd
name: argocd-rbac-cm
namespace: test-argocd




# apiVersion: argoproj.io/v1alpha1
# kind: ArgoCD
# metadata:
# name: test1
# namespace: test-argocd
# labels:
# example: basic
# spec:
# rbac:
# policy: |
# g, system:cluster-admins, role:admin
# g, cluster-admins, role:admin
# scopes: '[email]'

31 changes: 31 additions & 0 deletions tests/k8s/1-033_validate_label_selector/06-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v1
data:
policy.csv: ""
policy.default: role:readonly
scopes: '[email]'
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/managed-by: test1
app.kubernetes.io/name: argocd-rbac-cm
app.kubernetes.io/part-of: argocd
name: argocd-rbac-cm
namespace: test-argocd




# apiVersion: argoproj.io/v1alpha1
# kind: ArgoCD
# metadata:
# name: test1
# namespace: test-argocd
# labels:
# example: basic
# spec:
# rbac:
# policy: |
# g, system:cluster-admins, role:admin
# g, cluster-admins, role:admin
# scopes: '[email]'

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
# patches the subscription to add label selector in argocd-operator
- script: |
kubectl patch -n $NAMESPACE argocd/argocd --type='json' -p='[{"op": "remove", "path": "/spec/sso"}]'
- script: sleep 10

0 comments on commit be9ae2b

Please sign in to comment.