-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add-psa-config' of https://github.com/jcox10/rke2-ansible…
… into jcox10-add-psa-config
- Loading branch information
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
roles/rke2_common/tasks/add-pod-security-admission-config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
- name: Create the /etc/rancher/rke2 config dir | ||
ansible.builtin.file: | ||
path: /etc/rancher/rke2 | ||
state: directory | ||
recurse: yes | ||
|
||
- name: Add pod security admission config file | ||
ansible.builtin.copy: | ||
src: "{{ pod_security_admission_config_file_path }}" | ||
dest: "/etc/rancher/rke2/pod-security-admission-config.yaml" | ||
mode: '0640' | ||
owner: root | ||
group: root | ||
when: caller_role_name == "server" | ||
notify: Restart rke2-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
apiVersion: apiserver.config.k8s.io/v1 | ||
kind: AdmissionConfiguration | ||
plugins: | ||
- name: PodSecurity | ||
configuration: | ||
apiVersion: pod-security.admission.config.k8s.io/v1 | ||
kind: PodSecurityConfiguration | ||
defaults: | ||
enforce: "restricted" | ||
enforce-version: "latest" | ||
audit: "restricted" | ||
audit-version: "latest" | ||
warn: "restricted" | ||
warn-version: "latest" | ||
exemptions: | ||
usernames: [] | ||
runtimeClasses: [] | ||
namespaces: [calico-apiserver, | ||
calico-system, | ||
cattle-alerting, | ||
cattle-csp-adapter-system, | ||
cattle-elemental-system, | ||
cattle-epinio-system, | ||
cattle-externalip-system, | ||
cattle-fleet-local-system, | ||
cattle-fleet-system, | ||
cattle-gatekeeper-system, | ||
cattle-global-data, | ||
cattle-global-nt, | ||
cattle-impersonation-system, | ||
cattle-istio, | ||
cattle-istio-system, | ||
cattle-logging, | ||
cattle-logging-system, | ||
cattle-monitoring-system, | ||
cattle-neuvector-system, | ||
cattle-prometheus, | ||
cattle-provisioning-capi-system, | ||
cattle-resources-system, | ||
cattle-sriov-system, | ||
cattle-system, | ||
cattle-ui-plugin-system, | ||
cattle-windows-gmsa-system, | ||
cert-manager, | ||
cis-operator-system, | ||
fleet-default, | ||
ingress-nginx, | ||
istio-system, | ||
kube-node-lease, | ||
kube-public, | ||
kube-system, | ||
longhorn-system, | ||
local-path-storage, | ||
rancher-alerting-drivers, | ||
security-scan, | ||
tigera-operator] |