feat(k8s): add defaults/main.yml, meta/main.yml for all 27 roles + 4 helm templates
- Added defaults/main.yml with production-ready values for all 27 Ansible roles - Added meta/main.yml with role dependencies (DAG: prereq → namespaces → storage → traefik → cert-manager → services) - Created 4 missing Helm templates: flink-deployment, kafka-cluster, smartapp-web, smartapp-api - Fixed YAML syntax error in backup/tasks/main.yml (Velero backupStorageLocation) - Updated README with domain list, dependencies diagram, and corrected Helm chart names - All 81 YAML files pass validation
This commit is contained in:
140
helms/roles/flink/templates/flink-deployment.yml.j2
Normal file
140
helms/roles/flink/templates/flink-deployment.yml.j2
Normal file
@@ -0,0 +1,140 @@
|
||||
---
|
||||
# Role: flink
|
||||
# Template: flink-deployment.yml.j2
|
||||
# Déploiement d'un cluster Apache Flink via FlinkKubernetesOperator
|
||||
# Variables:
|
||||
# {{ flink_namespace }} - Namespace Kubernetes (défaut: flink)
|
||||
# {{ flink_replicas }} - Nombre de TaskManagers (défaut: 2)
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ flink_namespace | default('flink') }}
|
||||
labels:
|
||||
app: flink
|
||||
version: "1.18"
|
||||
|
||||
---
|
||||
apiVersion: flink.apache.org/v1beta1
|
||||
kind: FlinkDeployment
|
||||
metadata:
|
||||
name: flink-cluster
|
||||
namespace: {{ flink_namespace | default('flink') }}
|
||||
labels:
|
||||
app: flink
|
||||
version: "1.18"
|
||||
spec:
|
||||
image: flink:1.18-scala_2.12
|
||||
flinkVersion: v1_18
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
||||
# --- JobManager ---
|
||||
jobmanager:
|
||||
resource:
|
||||
memory: "2048m"
|
||||
cpu: 1
|
||||
replicas: 1
|
||||
|
||||
# --- TaskManager ---
|
||||
taskmanager:
|
||||
resource:
|
||||
memory: "4096m"
|
||||
cpu: 2
|
||||
replicas: {{ flink_replicas | default(2) }}
|
||||
|
||||
# --- Configuration Flink ---
|
||||
flinkConfiguration:
|
||||
taskmanager.numberOfTaskSlots: "2"
|
||||
state.backend: rocksdb
|
||||
state.checkpoints.dir: s3://flink-checkpoints
|
||||
state.savepoints.dir: s3://flink-savepoints
|
||||
high-availability: zookeeper
|
||||
high-availability.zookeeper.quorum: zk-cs.{{ flink_namespace | default('flink') }}.svc.cluster.local:2181
|
||||
web.upload.dir: /tmp/flink-web-upload
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: flink-jobmanager
|
||||
namespace: {{ flink_namespace | default('flink') }}
|
||||
labels:
|
||||
app: flink
|
||||
component: jobmanager
|
||||
version: "1.18"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: flink
|
||||
component: jobmanager
|
||||
ports:
|
||||
- name: rpc
|
||||
port: 6123
|
||||
targetPort: 6123
|
||||
protocol: TCP
|
||||
- name: blob
|
||||
port: 6124
|
||||
targetPort: 6124
|
||||
protocol: TCP
|
||||
- name: webui
|
||||
port: 8081
|
||||
targetPort: 8081
|
||||
protocol: TCP
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: flink-taskmanager
|
||||
namespace: {{ flink_namespace | default('flink') }}
|
||||
labels:
|
||||
app: flink
|
||||
component: taskmanager
|
||||
version: "1.18"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: flink
|
||||
component: taskmanager
|
||||
ports:
|
||||
- name: rpc
|
||||
port: 6122
|
||||
targetPort: 6122
|
||||
protocol: TCP
|
||||
- name: data
|
||||
port: 6125
|
||||
targetPort: 6125
|
||||
protocol: TCP
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: flink-webui
|
||||
namespace: {{ flink_namespace | default('flink') }}
|
||||
labels:
|
||||
app: flink
|
||||
component: webui
|
||||
version: "1.18"
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- flink.digitribe.fr
|
||||
secretName: flink-tls
|
||||
rules:
|
||||
- host: flink.digitribe.fr
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: flink-jobmanager
|
||||
port:
|
||||
number: 8081
|
||||
Reference in New Issue
Block a user