Skip to content

Commit

Permalink
fix tinkerbell audit config
Browse files Browse the repository at this point in the history
  • Loading branch information
tatlat committed Oct 3, 2023
1 parent d7eee83 commit 5886541
Show file tree
Hide file tree
Showing 28 changed files with 804 additions and 977 deletions.
24 changes: 12 additions & 12 deletions pkg/providers/tinkerbell/config/template-cp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,14 @@ spec:
pathType: DirectoryOrCreate
readOnly: false
{{- if .awsIamAuth}}
extraVolumes:
- hostPath: /var/lib/kubeadm/aws-iam-authenticator/
mountPath: /etc/kubernetes/aws-iam-authenticator/
name: authconfig
readOnly: false
- hostPath: /var/lib/kubeadm/aws-iam-authenticator/pki/
mountPath: /var/aws-iam-authenticator/
name: awsiamcert
readOnly: false
- hostPath: /var/lib/kubeadm/aws-iam-authenticator/
mountPath: /etc/kubernetes/aws-iam-authenticator/
name: authconfig
readOnly: false
- hostPath: /var/lib/kubeadm/aws-iam-authenticator/pki/
mountPath: /var/aws-iam-authenticator/
name: awsiamcert
readOnly: false
{{- end}}
{{- /*
BottleRocket uses different host paths for kubeconfigs requiring host mount path overwrites for
Expand Down Expand Up @@ -299,6 +298,10 @@ spec:
owner: root:root
path: /etc/kubernetes/manifests/kube-vip.yaml
{{- end }}
- content: |
{{ .auditPolicy | indent 8 }}
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
{{- if .awsIamAuth}}
- content: |
# clusters refers to the remote service.
Expand Down Expand Up @@ -336,9 +339,6 @@ spec:
owner: root:root
path: /var/lib/kubeadm/aws-iam-authenticator/pki/key.pem
{{- end}}
{{ .auditPolicy | indent 8 }}
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
{{- if (ne .format "bottlerocket") }}
{{- if .proxyConfig }}
- content: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ spec:
status: {}
owner: root:root
path: /etc/kubernetes/manifests/kube-vip.yaml
- content: |
apiVersion: audit.k8s.io/v1beta1
kind: Policy
rules:
Expand Down Expand Up @@ -371,8 +372,8 @@ spec:
- level: Metadata
omitStages:
- "RequestReceived"
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
users:
- name: ec2-user
sshAuthorizedKeys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ spec:
status: {}
owner: root:root
path: /etc/kubernetes/manifests/kube-vip.yaml
- content: |
apiVersion: audit.k8s.io/v1beta1
kind: Policy
rules:
Expand Down Expand Up @@ -337,8 +338,8 @@ spec:
- level: Metadata
omitStages:
- "RequestReceived"
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
users:
- name: ec2-user
sshAuthorizedKeys:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ spec:
status: {}
owner: root:root
path: /etc/kubernetes/manifests/kube-vip.yaml
- content: |
apiVersion: audit.k8s.io/v1beta1
kind: Policy
rules:
Expand Down Expand Up @@ -311,8 +312,8 @@ spec:
- level: Metadata
omitStages:
- "RequestReceived"
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
ntp:
enabled: true
servers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ spec:
status: {}
owner: root:root
path: /etc/kubernetes/manifests/kube-vip.yaml
- content: |
apiVersion: audit.k8s.io/v1beta1
kind: Policy
rules:
Expand Down Expand Up @@ -329,8 +330,8 @@ spec:
- level: Metadata
omitStages:
- "RequestReceived"
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
owner: root:root
path: /etc/kubernetes/audit-policy.yaml
users:
- name: ec2-user
sshAuthorizedKeys:
Expand Down
Loading

0 comments on commit 5886541

Please sign in to comment.