diff --git a/tests/e2e/loadbalancer-features/00-assert.yaml b/tests/e2e/loadbalancer-features/00-assert.yaml deleted file mode 100644 index 863b0c88ae..0000000000 --- a/tests/e2e/loadbalancer-features/00-assert.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: stateful-targetallocator -spec: - template: - spec: - containers: - - name: ta-container - env: - - name: OTEL_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 \ No newline at end of file diff --git a/tests/e2e/smoke-loadbalancer/00-assert.yaml b/tests/e2e/smoke-loadbalancer/00-assert.yaml deleted file mode 100644 index 4131a8be41..0000000000 --- a/tests/e2e/smoke-loadbalancer/00-assert.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: stateful-targetallocator -status: - replicas: 1 - readyReplicas: 1 - \ No newline at end of file diff --git a/tests/e2e/smoke-targetallocator/00-install.yaml b/tests/e2e/smoke-targetallocator/00-install.yaml new file mode 100644 index 0000000000..6b758e1d18 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/00-install.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl create clusterrolebinding default-view-$NAMESPACE --clusterrole=view --serviceaccount=$NAMESPACE:default \ No newline at end of file diff --git a/tests/e2e/smoke-targetallocator/01-assert.yaml b/tests/e2e/smoke-targetallocator/01-assert.yaml new file mode 100644 index 0000000000..20e774ce99 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/01-assert.yaml @@ -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 + \ No newline at end of file diff --git a/tests/e2e/smoke-loadbalancer/00-install.yaml b/tests/e2e/smoke-targetallocator/01-install.yaml similarity index 100% rename from tests/e2e/smoke-loadbalancer/00-install.yaml rename to tests/e2e/smoke-targetallocator/01-install.yaml diff --git a/tests/e2e/smoke-targetallocator/02-install.yaml b/tests/e2e/smoke-targetallocator/02-install.yaml new file mode 100644 index 0000000000..6bdb21adad --- /dev/null +++ b/tests/e2e/smoke-targetallocator/02-install.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl delete clusterrolebinding default-view-$NAMESPACE \ No newline at end of file diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml new file mode 100644 index 0000000000..6b758e1d18 --- /dev/null +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl create clusterrolebinding default-view-$NAMESPACE --clusterrole=view --serviceaccount=$NAMESPACE:default \ No newline at end of file diff --git a/tests/e2e/targetallocator-features/01-assert.yaml b/tests/e2e/targetallocator-features/01-assert.yaml new file mode 100644 index 0000000000..cca13596e9 --- /dev/null +++ b/tests/e2e/targetallocator-features/01-assert.yaml @@ -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 \ No newline at end of file diff --git a/tests/e2e/loadbalancer-features/00-install.yaml b/tests/e2e/targetallocator-features/01-install.yaml similarity index 70% rename from tests/e2e/loadbalancer-features/00-install.yaml rename to tests/e2e/targetallocator-features/01-install.yaml index 54c412dc20..fc30d5d3e6 100644 --- a/tests/e2e/loadbalancer-features/00-install.yaml +++ b/tests/e2e/targetallocator-features/01-install.yaml @@ -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: | diff --git a/tests/e2e/targetallocator-features/02-install.yaml b/tests/e2e/targetallocator-features/02-install.yaml new file mode 100644 index 0000000000..6bdb21adad --- /dev/null +++ b/tests/e2e/targetallocator-features/02-install.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl delete clusterrolebinding default-view-$NAMESPACE \ No newline at end of file