File tree Expand file tree Collapse file tree 3 files changed +85
-4
lines changed Expand file tree Collapse file tree 3 files changed +85
-4
lines changed Original file line number Diff line number Diff line change 1+ name : " apparmor kind Ubuntu CI workflow"
2+
3+
4+ on :
5+ push :
6+ branches : [ test ]
7+ # schedule:
8+ # https://crontab.guru/
9+ # https://docs.github.com/en/actions/reference/events-that-trigger-workflows
10+ # - cron: '0 0 * * FRI' ##execution of a task in the first minute of the month
11+
12+
13+ jobs :
14+
15+ # https://kubernetes.io/docs/tutorials/security/apparmor/
16+ seccomp-kind-ubuntu-latest-job :
17+ name : " Restrict a Container's Access to Resources with AppArmor job"
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v2
21+ - name : " os fingerprinti ng"
22+ run : hostnamectl status
23+ # https://kind.sigs.k8s.io/docs/user/quick-start/
24+ - name : " Restrict a Container's Access to Resources with AppArmor"
25+ run : |
26+ curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
27+ chmod +x ./kind
28+ mv ./kind /usr/local/bin/kind
29+ # Default cluster context name is `kind`.
30+ kind create cluster
31+ kind get clusters
32+ kubectl config get-contexts
33+ kubectl cluster-info --context kind-kind
34+ docker ps
35+ # Kubernetes version is at least v1.4 -- Kubernetes support for AppArmor was added in v1.4.
36+ # verify the Kubelet version of nodes
37+ kubectl get nodes -o=jsonpath=$'{range .items[*]}{@.metadata.name}: {@.status.nodeInfo.kubeletVersion}\n{end}'
38+ # check whether the module is enabled
39+ cat /sys/module/apparmor/parameters/enabled
40+
Original file line number Diff line number Diff line change 1- name : " Pod Security Standards kind Ubuntu CI workflow"
1+ name : " Pod Security Standards Cluster Level workflow"
22
33
44on :
1313jobs :
1414
1515# https://kubernetes.io/docs/tutorials/security/cluster-level-pss/
16- psa-kind-ubuntu-latest-job :
17- name : " Restrict a Container's Syscalls with seccomp job "
16+ psa-cluster- kind-ubuntu-latest-job :
17+ name : " Apply Pod Security Standards at the Cluster Level "
1818 runs-on : ubuntu-latest
1919 steps :
2020 - uses : actions/checkout@v2
3535 kind create cluster --name psa-wo-cluster-pss --image kindest/node:v1.23.0
3636 kind get clusters
3737 kubectl config get-contexts
38- # kubectl cluster-info --context kind-kind
38+ kubectl cluster-info --context kind-psa-wo-cluster-pss
3939
Original file line number Diff line number Diff line change 1+ name : " Pod Security Standards Namespace Level workflow"
2+
3+
4+ on :
5+ push :
6+ branches : [ test ]
7+ # schedule:
8+ # https://crontab.guru/
9+ # https://docs.github.com/en/actions/reference/events-that-trigger-workflows
10+ # - cron: '0 0 * * FRI' ##execution of a task in the first minute of the month
11+
12+
13+ jobs :
14+
15+ # https://kubernetes.io/docs/tutorials/security/ns-level-pss/
16+ psa-namespace-kind-ubuntu-latest-job :
17+ name : " Apply Pod Security Standards at the Namespace Level"
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v2
21+ - name : " os fingerprinti ng"
22+ run : hostnamectl status
23+ # https://kind.sigs.k8s.io/docs/user/quick-start/
24+ - name : " Apply Pod Security Standards at the Cluster Level"
25+ run : |
26+ curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
27+ chmod +x ./kind
28+ mv ./kind /usr/local/bin/kind
29+ # Default cluster context name is `kind`.
30+ # kind create cluster
31+ # kind get clusters
32+ # kubectl config get-contexts
33+ # kubectl cluster-info --context kind-kind
34+ # Create a cluster with no Pod Security Standards applied:
35+ kind create cluster --name psa-ns-level --image kindest/node:v1.23.0
36+ kind get clusters
37+ kubectl config get-contexts
38+ kubectl cluster-info --context kind-psa-ns-level
39+ # kubectl cluster-info --context kind-kind
40+ kubectl create ns example
41+
You can’t perform that action at this time.
0 commit comments