Skip to content

Commit

Permalink
Updated target allocator KUTTL tests & renamed folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rsvarma95 committed Aug 3, 2021
1 parent e339eba commit 6f39c47
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 35 deletions.
27 changes: 0 additions & 27 deletions tests/e2e/loadbalancer-features/00-assert.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions tests/e2e/smoke-loadbalancer/00-assert.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions tests/e2e/smoke-targetallocator/00-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl create clusterrolebinding default-view-$NAMESPACE --clusterrole=view --serviceaccount=$NAMESPACE:default
21 changes: 21 additions & 0 deletions tests/e2e/smoke-targetallocator/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: stateful-collector
status:
replicas: 1
readyReplicas: 1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: stateful-targetallocator
status:
replicas: 1
readyReplicas: 1
---
apiVersion: v1
kind: ConfigMap
metadata:
name: stateful-targetallocator

4 changes: 4 additions & 0 deletions tests/e2e/smoke-targetallocator/02-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl delete clusterrolebinding default-view-$NAMESPACE
4 changes: 4 additions & 0 deletions tests/e2e/targetallocator-features/00-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl create clusterrolebinding default-view-$NAMESPACE --clusterrole=view --serviceaccount=$NAMESPACE:default
74 changes: 74 additions & 0 deletions tests/e2e/targetallocator-features/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: stateful-collector
spec:
podManagementPolicy: Parallel
template:
spec:
containers:
- args:
- --config=/conf/collector.yaml
name: otc-container
volumeMounts:
- mountPath: /conf
name: otc-internal
- mountPath: /usr/share/testvolume
name: testvolume
volumes:
- configMap:
items:
- key: collector.yaml
path: collector.yaml
name: stateful-collector
name: otc-internal
- emptyDir: {}
name: testvolume
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: testvolume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeMode: Filesystem
status:
replicas: 1
readyReplicas: 1
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: stateful-targetallocator
spec:
template:
spec:
containers:
- name: ta-container
env:
- name: OTELCOL_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- mountPath: /conf
name: ta-internal
volumes:
- configMap:
items:
- key: targetallocator.yaml
path: targetallocator.yaml
name: stateful-targetallocator
name: ta-internal
status:
replicas: 1
readyReplicas: 1
---
apiVersion: v1
kind: ConfigMap
metadata:
name: stateful-targetallocator
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ metadata:
name: stateful
spec:
mode: statefulset
volumes:
- name: testvolume
volumeMounts:
- name: testvolume
mountPath: /usr/share/testvolume
volumeClaimTemplates:
- metadata:
name: testvolume
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
targetAllocator:
enabled: true
config: |
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/targetallocator-features/02-install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl delete clusterrolebinding default-view-$NAMESPACE

0 comments on commit 6f39c47

Please sign in to comment.