Code Monkey home page Code Monkey logo

cloudlog's Introduction

cloudlog

A small application to forward received messages.

Right now, it will take in a CloudEvent message from a Tekton task and send Slack notifications.

Usage

Local usage for testing

$ slackURL='https://hooks.slack.com/services/T...' ./cloudlog

Kubernetes deployment

# Create Slack Webhook secret
kubectl create secret generic cloudlog-secret --from-literal slackURL='https://hooks.slack.com/services/T...'

# Create the cloudlog service
kubectl apply -f kubernetes/service.yml

# Create the cloudlog deployment (build your own image?)
kubectl apply -f kubernetes/deployment.yml

# Check that the pod is running
kubectl get pods  -l app=cloudlog

# Follow the logs
kubectl logs -f -l app=cloudlog

Tekton usage

Create a resource for the service

---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: event-to-cloudlog
spec:
  type: cloudEvent
  params:
    - name: targetURI
      value: http://cloudlog.default.svc.cluster.local:3000/inbox

Utilize the resource as the output for a task

---
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
  name: send-a-message
spec:
  inputs:
...
  outputs:
    resources:
      - name: notification
        type: cloudEvent

Provide TaskRun parameters for the resource

---
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
  generateName: send-message-
  label: send-message
spec:
...
  outputs:
    resources:
      - name: notification
        resourceRef:
          name: event-to-cloudlog

cloudlog's People

Contributors

benzcash avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.