Coder Social home page Coder Social logo

k8ron's Introduction

Cron scheduler app for k8s

CI codecov release

Schedule example: https://github.com/boolivar/k8ron/blob/master/app/src/test/resources/k8ron-config.yml

Example manifest to run k8ron app in k8ron namespace

apiVersion: v1
kind: Namespace
metadata:
  name: k8ron

---

apiVersion: v1
kind: ServiceAccount
metadata:
  namespace: k8ron
  name: k8ron

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: cluster-resource-reader
rules:
- apiGroups: [""]
  resources: ["pods", "services", "endpoints"]
  verbs: ["get", "list", "watch"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: k8ron
  name: config-reader
rules:
- apiGroups: [""]
  resources: ["configmaps", "secrets"]
  verbs: ["get", "list", "watch"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: read-resources-global
subjects:
- kind: ServiceAccount
  namespace: k8ron
  name: k8ron
roleRef:
  kind: ClusterRole
  name: cluster-resource-reader
  apiGroup: rbac.authorization.k8s.io

---

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  namespace: k8ron
  name: read-config
subjects:
- kind: ServiceAccount
  namespace: k8ron
  name: k8ron
roleRef:
  kind: Role
  name: config-reader
  apiGroup: rbac.authorization.k8s.io

---

kind: Deployment
apiVersion: apps/v1
metadata:
  namespace: k8ron
  name: k8ron
  labels:
    app.kubernetes.io/name: k8ron
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: k8ron
  template:
    metadata:
      labels:
        app.kubernetes.io/name: k8ron
    spec:
      containers:
        - name: k8ron
          image: boolivar/k8ron:1.0.0
          ports:
            - containerPort: 8080
              protocol: TCP
      serviceAccountName: k8ron

---

apiVersion: v1
kind: Service
metadata:
  namespace: k8ron
  name: k8ron
spec:
  selector:
    app.kubernetes.io/name: k8ron
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080

k8ron's People

Contributors

boolivar avatar dependabot[bot] avatar github-actions[bot] avatar

Watchers

 avatar  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.