-
Notifications
You must be signed in to change notification settings - Fork 75
Eventing 0.14 in 1.8 CSV #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ab1bb46
46899fc
919ff54
e14c78b
870fc67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| function install_tracing { | ||
| deploy_zipkin | ||
| enable_eventing_tracing | ||
| } | ||
|
|
||
| function deploy_zipkin { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we use Openshift Tracing (Jaeger) here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea. Just trying to make things work honestly.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will create a JIRA for it after this PR is merged |
||
| logger.info "Installing Zipkin in namespace ${ZIPKIN_NAMESPACE}" | ||
| cat <<EOF | oc apply -f - || return $? | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: zipkin | ||
| namespace: ${ZIPKIN_NAMESPACE} | ||
| spec: | ||
| type: NodePort | ||
| ports: | ||
| - name: http | ||
| port: 9411 | ||
| selector: | ||
| app: zipkin | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: zipkin | ||
| namespace: ${ZIPKIN_NAMESPACE} | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: zipkin | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: zipkin | ||
| annotations: | ||
| sidecar.istio.io/inject: "false" | ||
| spec: | ||
| containers: | ||
| - name: zipkin | ||
| image: docker.io/openzipkin/zipkin:latest | ||
| ports: | ||
| - containerPort: 9411 | ||
| env: | ||
| - name: POD_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| apiVersion: v1 | ||
| fieldPath: metadata.namespace | ||
| resources: | ||
| limits: | ||
| memory: 1000Mi | ||
| requests: | ||
| memory: 256Mi | ||
| --- | ||
| EOF | ||
|
|
||
| logger.info "Waiting until Zipkin is available" | ||
| timeout 600 "[[ \$(oc get pods -n ${ZIPKIN_NAMESPACE} --field-selector=status.phase!=Succeeded -o jsonpath='{.items}') != '[]' ]]" || return 1 | ||
| } | ||
|
|
||
| function enable_eventing_tracing { | ||
| header_text "Configuring tracing for Eventing" | ||
|
|
||
| cat <<EOF | oc apply -f - || return $? | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: config-tracing | ||
| namespace: ${EVENTING_NAMESPACE} | ||
| data: | ||
| enable: "true" | ||
| zipkin-endpoint: "http://zipkin.${ZIPKIN_NAMESPACE}.svc.cluster.local:9411/api/v2/spans" | ||
| sample-rate: "1.0" | ||
| debug: "true" | ||
| EOF | ||
| } | ||
|
|
||
| function teardown_tracing { | ||
| logger.warn 'Teardown tracing' | ||
|
|
||
| oc delete service -n ${ZIPKIN_NAMESPACE} zipkin | ||
| oc delete deployment -n ${ZIPKIN_NAMESPACE} zipkin | ||
|
|
||
| timeout 600 "[[ \$(oc get pods -n ${ZIPKIN_NAMESPACE} --field-selector=status.phase!=Succeeded -o jsonpath='{.items}') != '[]' ]]" || return 2 | ||
|
|
||
| logger.success 'Tracing is uninstalled.' | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.