fix(ci): Address tool findings and workflow errors

This commit is contained in:
Tellsanguis 2025-11-07 10:21:55 +01:00
parent cb6b1d666b
commit 10ef8a6c1b
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

@ -57,7 +57,7 @@ resource "proxmox_vm_qemu" "k3s_server_1" {
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

@ -57,7 +57,7 @@ resource "proxmox_vm_qemu" "k3s_server_2" {
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

@ -57,7 +57,7 @@ resource "proxmox_vm_qemu" "etcd_witness" {
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]