Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cluster/manifests/02-admission-control/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ data:
{{- end}}

pod.pod-security-policy.allow-privilege-escalation: "{{ .Cluster.ConfigItems.teapot_admission_controller_pod_security_policy_privileged_allow_privilege_escalation }}"
{{- if eq .Cluster.ConfigItems.eks_fis_support_enabled "true" }}
pod.aws-fis-experiment-service-account-name: "fis-experiment-executor"
pod.aws-fis-experiment-user: "fis-experiment-executor"
pod.aws-fis-experiment-privileged-capabilities.NET_ADMIN: ""
{{- end}}

deployment.default.rolling-update-max-surge: "{{ .Cluster.ConfigItems.teapot_admission_controller_deployment_default_max_surge }}"
deployment.default.rolling-update-max-unavailable: "{{ .Cluster.ConfigItems.teapot_admission_controller_deployment_default_max_unavailable }}"
Expand Down
15 changes: 1 addition & 14 deletions cluster/manifests/eks-fis/01-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{{- if eq .Cluster.ConfigItems.eks_fis_support_enabled "true" }}
# {{ range $namespace := split .Cluster.ConfigItems.eks_fis_namespaces "," }}
kind: ServiceAccount
apiVersion: v1
metadata:
namespace: "{{ $namespace }}"
name: fis-experiment-executor
---
# {{ end }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand All @@ -17,7 +9,7 @@ rules:
verbs: ["get", "create", "patch", "delete"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["create", "get", "delete", "deletecollection", "list"]
verbs: ["create", "list", "get", "delete", "deletecollection"]
- apiGroups: [""]
resources: ["pods/ephemeralcontainers"]
verbs: ["update"]
Expand All @@ -33,11 +25,6 @@ kind: ClusterRoleBinding
metadata:
name: fis-experiment-executor
subjects:
# {{ range $namespace := split .Cluster.ConfigItems.eks_fis_namespaces "," }}
- kind: ServiceAccount
name: fis-experiment-executor
namespace: "{{ $namespace }}"
# {{ end }}
- apiGroup: rbac.authorization.k8s.io
kind: User
name: fis-experiment-executor
Expand Down
5 changes: 4 additions & 1 deletion cluster/manifests/role-sync-controller/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
restartPolicy: Never
containers:
- name: role-sync-controller
image: container-registry.zalando.net/teapot/role-sync-controller:main-13
image: container-registry.zalando.net/teapot/role-sync-controller:main-14
args:
- --subject-group=PowerUser
- --subject-group=Manual
Expand All @@ -47,4 +47,7 @@ spec:
{{- if eq .Cluster.Provider "zalando-eks"}}
- --subject-serviceaccount=kube-system/deployment-service-controller
{{- end}}
{{- if eq .Cluster.ConfigItems.eks_fis_support_enabled "true" }}
- --eks-fis-serviceaccount=fis-experiment-executor
{{- end}}
{{ end }}
26 changes: 26 additions & 0 deletions cluster/manifests/role-sync-controller/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ rules:
- "namespaces"
verbs:
- "list"
# Allow the controller to manage ServiceAccounts
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- "get"
- "create"
- "update"
# Allow the controller to manage Roles and Rolebindings
- apiGroups:
- rbac.authorization.k8s.io
Expand Down Expand Up @@ -41,6 +50,23 @@ rules:
- "get"
- "list"
- "watch"
# Allow the controller to manage roles with permissions required by eks-fis
# integration.
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "create", "patch", "delete"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["create", "get", "delete", "deletecollection", "list"]
- apiGroups: [""]
resources: ["pods/ephemeralcontainers"]
verbs: ["update"]
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["create"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down