Skip to content

Commit

Permalink
Merge branch 'main' into fix-strimzi-app-set
Browse files Browse the repository at this point in the history
  • Loading branch information
Frawless authored Jan 23, 2024
2 parents 9974548 + 78f3f20 commit ef6af26
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Create Loki datasources on Infra cluster
- name: Delete Loki datasources on Infra cluster
kubernetes.core.k8s:
state: absent
kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}"
Expand All @@ -12,13 +12,14 @@
name: "loki-{{ clusterName }}-{{ loki_tenant_id }}"
namespace: "{{ infra_monitoring_namespace }}"
labels:
project: "tealc"
project: "skodjob"
managed: "true"
app: "grafana"
spec:
name: "loki-{{ clusterName }}-{{ loki_tenant_id }}"
instanceSelector:
matchLabels:
dashboards: "tealc"
dashboards: "skodjob"
datasource:
access: proxy
type: loki
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@
name: "loki-{{ cluster.name }}-{{ loki_tenant_id }}"
namespace: "{{ infra_monitoring_namespace }}"
labels:
project: "tealc"
project: "skodjob"
managed: "true"
app: "grafana"
spec:
name: "loki-{{ cluster.name }}-{{ loki_tenant_id }}"
instanceSelector:
matchLabels:
dashboards: "tealc"
dashboards: "skodjob"
datasource:
access: proxy
type: loki
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
metadata:
name: "{{ infra_ci_namespace }}"
labels:
project: "tealc"
project: "skodjob"
secret: "cert-manager"

- name: Create image pull secret on infra cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name: "{{ infra_ci_namespace }}"
labels:
'argocd.argoproj.io/managed-by': "{{ infra_argo_namespace }}"
project: "tealc"
project: "skodjob"

- name: Create Tekton subscription
kubernetes.core.k8s:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
metadata:
name: "{{ item }}"
labels:
project: "tealc"
project: "skodjob"
loop:
- "{{ infra_ci_namespace }}"
- "{{ openshift_pipelines_namespace }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name: "{{ infra_monitoring_namespace }}"
labels:
'argocd.argoproj.io/managed-by': "{{ infra_argo_namespace }}"
project: "tealc"
project: "skodjob"

- name: Enable & configure user-workload on infra cluster
kubernetes.core.k8s:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: alertmanager-{{ suffix }}
namespace: {{ namespace }}
labels:
project: tealc
project: skodjob
type: Opaque
stringData:
slack.tmpl: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
- CreateNamespace=true
managedNamespaceMetadata:
labels:
project: tealc
project: skodjob
destination:
name: '{{name}}'
namespace: '{{namespace}}'
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
- CreateNamespace=true
managedNamespaceMetadata:
labels:
project: tealc
project: skodjob
destination:
name: '{{name}}'
namespace: '{{namespace}}'
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
- CreateNamespace=false
managedNamespaceMetadata:
labels:
project: tealc
project: skodjob
destination:
name: '{{name}}'
namespace: '{{namespace}}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
annotations:
argocd.argoproj.io/hook: PreSync
name: chaos-smoke-pipeline-worker-01
namespace: tealc-pipelines
labels:
project: skodjob
spec:
workspaces:
- name: pipeline-ws
tasks:
- name: chaos-smoke-pipeline
workspaces:
- name: pipeline-ws
workspace: pipeline-ws
taskSpec:
workspaces:
- name: pipeline-ws
steps:
- name: execute-tests
image: quay.io/mk-ci-cd/mas-ci-tools:latest
env:
- name: WORKER_01_OCP_TOKEN
valueFrom:
secretKeyRef:
key: token
name: worker-01-tekton
- name: WORKER_01_URL
valueFrom:
secretKeyRef:
key: server
name: worker-01-tekton
- name: WORKER_02_OCP_TOKEN
valueFrom:
secretKeyRef:
key: token
name: worker-02-tekton
- name: WORKER_02_URL
valueFrom:
secretKeyRef:
key: server
name: worker-02-tekton
- name: WORKER_03_OCP_TOKEN
valueFrom:
secretKeyRef:
key: token
name: worker-03-tekton
- name: WORKER_03_URL
valueFrom:
secretKeyRef:
key: server
name: worker-03-tekton
script: |
cd $(workspaces.pipeline-ws.path)

# point to worker-01 cluster
oc login --token $WORKER_01_OCP_TOKEN $WORKER_01_URL --insecure-skip-tls-verify=true

# PROMETHEUS URL
PROMETHEUS_URL=$(oc get route thanos-querier -n openshift-monitoring | awk '/thanos-querier/ {print $2}')
PROMETHEUS_URL=https://$PROMETHEUS_URL:443
export PROMETHEUS_URL=$PROMETHEUS_URL

git clone https://github.com/see-quick/StrimKKhaos.git

cd StrimKKhaos

# debug output
./strimkkhaos.sh --pod-chaos anubis-kafka-kill-random-leader --debug
finally:
- name: notify-slack
when:
- input: $(tasks.status)
operator: in
values: ["Failed"]
taskRef:
name: send-to-webhook-slack
params:
- name: webhook-secret
value: webhook-secret
- name: message
value: "PipelineRun `$(context.pipelineRun.name)` has status: `$(tasks.status)!`"
- name: title
value: "$(context.pipeline.name)"
- name: status
value: "$(tasks.status)"
- name: button_url
value: "{{ infra_console_url }}/k8s/ns/{{ infra_ci_namespace }}/tekton.dev~v1~PipelineRun/$(context.pipelineRun.name)"
- name: button_text
value: "Pipeline :tekton:"

0 comments on commit ef6af26

Please sign in to comment.