fix(ci): Address tool findings and workflow errors
This commit is contained in:
parent
cb6b1d666b
commit
10ef8a6c1b
5 changed files with 40 additions and 33 deletions
|
|
@ -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: |
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue