fix(ci): Correction problèmes outils et erreurs workflow

This commit is contained in:
Tellsanguis 2025-11-07 10:21:55 +01:00
parent 6bf15cfe3c
commit 830b7229db
5 changed files with 40 additions and 33 deletions

View file

@ -73,7 +73,7 @@ jobs:
- name: Ansible Lint - name: Ansible Lint
run: | run: |
if ! command -v ansible-lint &> /dev/null; then if ! command -v ansible-lint &> /dev/null; then
pip3 install ansible-lint pip3 install --break-system-packages ansible-lint
fi fi
ansible-lint ansible/ || true ansible-lint ansible/ || true
continue-on-error: true continue-on-error: true
@ -81,7 +81,7 @@ jobs:
- name: YAML Lint - name: YAML Lint
run: | run: |
if ! command -v yamllint &> /dev/null; then if ! command -v yamllint &> /dev/null; then
pip3 install yamllint pip3 install --break-system-packages yamllint
fi fi
yamllint ansible/ || true yamllint ansible/ || true
continue-on-error: true continue-on-error: true
@ -100,10 +100,6 @@ jobs:
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
fi fi
- name: Validate Kubernetes Manifests
run: |
kubectl apply --dry-run=client -f kubernetes/apps/ -R || true
kubectl apply --dry-run=client -f kubernetes/flux-system/ -R || true
- name: Install kubeconform - name: Install kubeconform
run: | run: |

View file

@ -25,12 +25,23 @@ spec:
labels: labels:
app: nginx app: nginx
spec: spec:
securityContext:
runAsNonRoot: true
runAsUser: 1001
runAsGroup: 1001
fsGroup: 1001
containers: containers:
- name: nginx - name: nginx
image: nginx:1.25-alpine image: nginx:1.25-alpine
ports: ports:
- containerPort: 80 - containerPort: 80
name: http name: http
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
resources: resources:
requests: requests:
cpu: 100m cpu: 100m

View file

@ -7,7 +7,7 @@ terraform {
version = "~> 3.0" version = "~> 3.0"
} }
local = { local = {
source = "hashicorp/local" source = "hashicorp/local"
version = "~> 2.1" version = "~> 2.1"
} }
} }
@ -31,9 +31,9 @@ resource "proxmox_vm_qemu" "k3s_server_1" {
memory = var.k3s_server_1_config.memory memory = var.k3s_server_1_config.memory
agent = 1 agent = 1
boot = "order=scsi0" boot = "order=scsi0"
scsihw = "virtio-scsi-single" scsihw = "virtio-scsi-single"
onboot = true onboot = true
network { network {
model = "virtio" model = "virtio"
@ -44,20 +44,20 @@ resource "proxmox_vm_qemu" "k3s_server_1" {
scsi { scsi {
scsi0 { scsi0 {
disk { disk {
size = var.k3s_server_1_config.disk_size size = var.k3s_server_1_config.disk_size
storage = var.storage_pool storage = var.storage_pool
iothread = true iothread = true
} }
} }
} }
} }
ipconfig0 = "ip=${var.k3s_server_1_config.ip},gw=${var.k3s_gateway}" ipconfig0 = "ip=${var.k3s_server_1_config.ip},gw=${var.k3s_gateway}"
cicustom = "user=${var.snippets_storage}:snippets/cloud-init-k3s-server-1.yaml" cicustom = "user=${var.snippets_storage}:snippets/cloud-init-k3s-server-1.yaml"
nameserver = join(" ", var.k3s_dns) nameserver = join(" ", var.k3s_dns)
lifecycle { lifecycle {
ignore_changes = [ network ] ignore_changes = [network]
} }
depends_on = [local_file.k3s_server_cloud_init] depends_on = [local_file.k3s_server_cloud_init]

View file

@ -7,7 +7,7 @@ terraform {
version = "~> 3.0" version = "~> 3.0"
} }
local = { local = {
source = "hashicorp/local" source = "hashicorp/local"
version = "~> 2.1" version = "~> 2.1"
} }
} }
@ -31,9 +31,9 @@ resource "proxmox_vm_qemu" "k3s_server_2" {
memory = var.k3s_server_2_config.memory memory = var.k3s_server_2_config.memory
agent = 1 agent = 1
boot = "order=scsi0" boot = "order=scsi0"
scsihw = "virtio-scsi-single" scsihw = "virtio-scsi-single"
onboot = true onboot = true
network { network {
model = "virtio" model = "virtio"
@ -44,20 +44,20 @@ resource "proxmox_vm_qemu" "k3s_server_2" {
scsi { scsi {
scsi0 { scsi0 {
disk { disk {
size = var.k3s_server_2_config.disk_size size = var.k3s_server_2_config.disk_size
storage = var.storage_pool storage = var.storage_pool
iothread = true iothread = true
} }
} }
} }
} }
ipconfig0 = "ip=${var.k3s_server_2_config.ip},gw=${var.k3s_gateway}" ipconfig0 = "ip=${var.k3s_server_2_config.ip},gw=${var.k3s_gateway}"
cicustom = "user=${var.snippets_storage}:snippets/cloud-init-k3s-server-2.yaml" cicustom = "user=${var.snippets_storage}:snippets/cloud-init-k3s-server-2.yaml"
nameserver = join(" ", var.k3s_dns) nameserver = join(" ", var.k3s_dns)
lifecycle { lifecycle {
ignore_changes = [ network ] ignore_changes = [network]
} }
depends_on = [local_file.k3s_server_cloud_init] depends_on = [local_file.k3s_server_cloud_init]

View file

@ -7,7 +7,7 @@ terraform {
version = "~> 3.0" version = "~> 3.0"
} }
local = { local = {
source = "hashicorp/local" source = "hashicorp/local"
version = "~> 2.1" version = "~> 2.1"
} }
} }
@ -31,9 +31,9 @@ resource "proxmox_vm_qemu" "etcd_witness" {
memory = var.etcd_witness_config.memory memory = var.etcd_witness_config.memory
agent = 1 agent = 1
boot = "order=scsi0" boot = "order=scsi0"
scsihw = "virtio-scsi-single" scsihw = "virtio-scsi-single"
onboot = true onboot = true
network { network {
model = "virtio" model = "virtio"
@ -44,20 +44,20 @@ resource "proxmox_vm_qemu" "etcd_witness" {
scsi { scsi {
scsi0 { scsi0 {
disk { disk {
size = var.etcd_witness_config.disk_size size = var.etcd_witness_config.disk_size
storage = var.storage_pool storage = var.storage_pool
iothread = true iothread = true
} }
} }
} }
} }
ipconfig0 = "ip=${var.etcd_witness_config.ip},gw=${var.k3s_gateway}" ipconfig0 = "ip=${var.etcd_witness_config.ip},gw=${var.k3s_gateway}"
cicustom = "user=${var.snippets_storage}:snippets/cloud-init-etcd-witness.yaml" cicustom = "user=${var.snippets_storage}:snippets/cloud-init-etcd-witness.yaml"
nameserver = join(" ", var.k3s_dns) nameserver = join(" ", var.k3s_dns)
lifecycle { lifecycle {
ignore_changes = [ network ] ignore_changes = [network]
} }
depends_on = [local_file.etcd_witness_cloud_init] depends_on = [local_file.etcd_witness_cloud_init]