-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49710a9
commit d276245
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: opentelemetry-operator | ||
control-plane: controller-manager | ||
namespace: ($OTEL_NAMESPACE) | ||
status: | ||
containerStatuses: | ||
- name: kube-rbac-proxy | ||
ready: true | ||
started: true | ||
- name: manager | ||
ready: true | ||
started: true | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
name: operator-restart | ||
spec: | ||
# Running the test serially as its disruptive causing operator pod restart | ||
concurrent: false | ||
steps: | ||
- name: Delete operator pod | ||
try: | ||
- command: | ||
entrypoint: kubectl | ||
args: | ||
- get | ||
- pods | ||
- -A | ||
- -l control-plane=controller-manager | ||
- -l app.kubernetes.io/name=opentelemetry-operator | ||
- -o | ||
- jsonpath={.items[0].metadata.namespace} | ||
outputs: | ||
- name: OTEL_NAMESPACE | ||
value: ($stdout) | ||
- delete: | ||
ref: | ||
apiVersion: v1 | ||
kind: Pod | ||
namespace: ($OTEL_NAMESPACE) | ||
labels: | ||
control-plane: controller-manager | ||
app.kubernetes.io/name: opentelemetry-operator | ||
# Adding 10s sleep here cause sometimes the pod will be in running state for a while but can fail later if there is any issue with the component startup. | ||
- sleep: | ||
duration: 10s | ||
- assert: | ||
file: assert-operator-pod.yaml |