Skip to content

Instantly share code, notes, and snippets.

View mszostok's full-sized avatar
💭
Hakuna Matata

Mateusz Szostok mszostok

💭
Hakuna Matata
View GitHub Profile
@mszostok
mszostok / backup-job.yaml
Created March 19, 2024 13:35
Backup job for PostgreSQL for demo purposes on Botkube notifications
apiVersion: batch/v1
kind: Job
metadata:
name: backup-job
spec:
template:
spec:
containers:
- name: backup-data
image: mszostok/backup-job:v0.0.3
apiVersion: batch/v1
kind: Job
metadata:
name: backup-job
namespace: default
spec:
template:
spec:
containers:
- name: backup-data
@mszostok
mszostok / bk-argo-cd.yaml
Created October 3, 2023 11:43
Example ArgoCD app for Botkube
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: botkube
namespace: botkube
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: botkube
"gh": {
URLs: map[string]string{
"darwin/amd64": "https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_macOS_amd64.zip//gh_2.32.1_macOS_amd64/bin",
"linux/amd64": "https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_linux_amd64.tar.gz//gh_2.32.1_linux_amd64/bin",
// etc.
},
},
import "embed"
//go:embed sto
var f embed.FS
- trigger:
command:
regex: "flux get sources (buc
type: "parser:table:space"
message:
selects:
- name: "Item"
keyTpl: "{{ .Name }}"
botkube/github-events: # GitHub Events
github:
auth:
accessToken: "ghp_"
repositories:
- name: mszostok/podinfo
on:
pullRequests:
- types: ["open"]
paths:
github:
auth:
accessToken: "ghp_"
@mszostok
mszostok / flux-write.yaml
Last active August 31, 2023 13:10
Cluster role and binding for Botkube Flux executor.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: flux-write
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
@mszostok
mszostok / flux-read-patch.yaml
Created August 30, 2023 12:24
ClusterRole and Binding for the Botkube Flux plugin
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: flux-read-patch
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "watch", "list", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1