Fix Sablier

This commit is contained in:
Adrien Reslinger 2024-10-16 00:39:51 +02:00
parent ccf7bef5eb
commit f83fd94ddf
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
3 changed files with 41 additions and 29 deletions

View file

@ -119,6 +119,6 @@ data:
plugins: plugins:
sablier: sablier:
moduleName: github.com/acouvreur/sablier moduleName: github.com/acouvreur/sablier
version: v1.7.0 version: v1.8.0
{% endif %} {% endif %}
{% endif %} {% endif %}

View file

@ -146,7 +146,7 @@ experimental:
plugins: plugins:
sablier: sablier:
moduleName: "github.com/acouvreur/sablier" moduleName: "github.com/acouvreur/sablier"
version: "v1.7.0" version: "v1.8.0"
{% endif %} {% endif %}
kubernetesGateway: kubernetesGateway:
enabled: false enabled: false

View file

@ -3,23 +3,27 @@ kind: Deployment
metadata: metadata:
name: sablier name: sablier
labels: labels:
app: sablier app.kubernetes.io/name: sablier
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: sablier app.kubernetes.io/name: sablier
template: template:
metadata: metadata:
labels: labels:
app: sablier app.kubernetes.io/name: sablier
spec: spec:
serviceAccountName: sablier serviceAccountName: sablier
serviceAccount: sablier serviceAccount: sablier
containers: containers:
- name: sablier - name: sablier
image: acouvreur/sablier:1.7.0 image: acouvreur/sablier:1.8.0
args: ["start", "--provider.name=kubernetes", "--storage.file=/dev/shm/state.json"] args:
- "start"
- "--provider.name=kubernetes"
- "--server.port=10000"
- "--storage.file=/dev/shm/state.json"
ports: ports:
- containerPort: 10000 - containerPort: 10000
securityContext: securityContext:
@ -41,7 +45,7 @@ metadata:
name: sablier name: sablier
spec: spec:
selector: selector:
app: sablier app.kubernetes.io/name: sablier
ports: ports:
- protocol: TCP - protocol: TCP
port: 10000 port: 10000
@ -63,27 +67,15 @@ rules:
- "" - ""
resources: resources:
- deployments - deployments
# - deployments/scale - deployments/scale
- statefulsets - statefulsets
# - statefulsets/scale - statefulsets/scale
verbs: verbs:
- patch # Scale up and down - patch # Scale up and down
- get # Retrieve info about specific dep - get # Retrieve info about specific dep
- update # Scale up and down - update # Scale up and down
- list # Events - list # Events
- watch # 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---
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -97,6 +89,24 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: sablier name: sablier
namespace: {{ traefik_namespace }} namespace: {{ traefik_namespace }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-traefik-to-sablier
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: sablier
ingress:
- ports:
- port: 10000
from:
- podSelector:
matchLabels:
app.kubernetes.io/name: traefik
policyTypes:
- Ingress
#--- #---
#apiVersion: traefik.io/v1alpha1 #apiVersion: traefik.io/v1alpha1
#kind: Middleware #kind: Middleware
@ -104,11 +114,13 @@ subjects:
# name: ondemand # name: ondemand
#spec: #spec:
# plugin: # plugin:
# group: default # names: toto # Comma separated names of containers/services/deployments etc.
# group: default # Group name to use to filter by label, ignored if names is set
# dynamic: # dynamic:
# displayName: My Title # displayName: My Title # (Optional) Defaults to the middleware name
# refreshFrequency: 5s # refreshFrequency: 5s # (Optional) The loading page refresh frequency
# showDetails: "true" # showDetails: "true" # (Optional) Set to true or false to show details specifcally for this middleware, unset to use Sablier server defaults
# theme: hacker-terminal # theme: hacker-terminal # (Optional) The theme to use
# sablierUrl: http://sablier.{{ traefik_namespace }}:10000 # sablierUrl: http://sablier.{{ traefik_namespace }}:10000 # The sablier URL service, must be reachable from the Traefik instance
# sessionDuration: 1m # sessionDuration: 1m # The session duration after which containers/services/deployments instances are shutdown