Skip to content

Instantly share code, notes, and snippets.

@AGou-ops
Created September 28, 2023 01:29
Show Gist options
  • Save AGou-ops/e096d9e41a7e0f7d0a4908a1b30d94d3 to your computer and use it in GitHub Desktop.
Save AGou-ops/e096d9e41a7e0f7d0a4908a1b30d94d3 to your computer and use it in GitHub Desktop.
apiVersion: v1
data:
sablier.yaml: |
provider:
name: kubernetes
server:
port: 10000
base-path: /
storage:
file:
sessions:
default-duration: 5m
expiration-interval: 20s
logging:
level: info
strategy:
dynamic:
custom-themes-path:
show-details-by-default: true
default-theme: hacker-terminal
default-refresh-frequency: 5s
blocking:
default-timeout: 1m
kind: ConfigMap
metadata:
name: sablier-cnf
namespace: test
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sablier
namespace: test
labels:
app: sablier
spec:
selector:
matchLabels:
app: sablier
replicas: 1
template:
metadata:
labels:
app: sablier
spec:
serviceAccountName: sablier-sa
containers:
- name: sablier
image: "acouvreur/sablier:latest"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 10000
name: sablier
volumeMounts:
- name: sablier-cnf-volume
mountPath: /etc/test
command:
- "/etc/sablier/sablier"
args:
- "--configFile=/etc/test/sablier.yaml"
- "start"
restartPolicy: Always
volumes:
- name: sablier-cnf-volume
configMap:
name: sablier-cnf
items:
- key: sablier.yaml
path: sablier.yaml
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sablier
rules:
- apiGroups:
- apps
- ""
resources:
- deployments
- statefulsets
verbs:
- get # Retrieve info about specific dep
- list # Events
- watch # Events
- apiGroups:
- apps
- ""
resources:
- deployments/scale
- statefulsets/scale
verbs:
- patch # Scale up and down
- update # Scale up and down
- get # Retrieve info about specific dep
- list # Events
- watch # Events
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment