-
Notifications
You must be signed in to change notification settings - Fork 876
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #465 from nestorsalceda/falco-aws-permissions-fix
Fix AWS permissions for Kubernetes Response Engine
- Loading branch information
Showing
11 changed files
with
83 additions
and
14 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
integrations/kubernetes-response-engine/deployment/aws/.gitignore
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.terraform/* | ||
.terraform.* | ||
terraform.* | ||
*.yaml | ||
aws-auth-patch.yml |
12 changes: 9 additions & 3 deletions
12
integrations/kubernetes-response-engine/deployment/aws/Makefile
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 |
---|---|---|
@@ -1,11 +1,17 @@ | ||
all: create configure | ||
deploy: rbac create configure | ||
|
||
rbac: | ||
kubectl apply -f cluster-role.yaml | ||
kubectl apply -f cluster-role-binding.yaml | ||
|
||
create: | ||
terraform apply | ||
terraform apply -auto-approve | ||
|
||
configure: | ||
kubectl get -n kube-system configmap/aws-auth -o yaml | awk "/mapRoles: \|/{print;print \"$(shell terraform output patch_for_aws_auth)\";next}1" > aws-auth-patch.yml | ||
kubectl -n kube-system replace -f aws-auth-patch.yml | ||
|
||
clean: | ||
terraform destroy | ||
terraform destroy -force | ||
kubectl delete -f cluster-role-binding.yaml | ||
kubectl delete -f cluster-role.yaml |
12 changes: 12 additions & 0 deletions
12
integrations/kubernetes-response-engine/deployment/aws/cluster-role-binding.yaml
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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: kubernetes-response-engine-cluster-role-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kubernetes-response-engine-cluster-role | ||
subjects: | ||
- kind: User | ||
apiGroup: rbac.authorization.k8s.io | ||
name: kubernetes-response-engine |
25 changes: 25 additions & 0 deletions
25
integrations/kubernetes-response-engine/deployment/aws/cluster-role.yaml
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,25 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: kubernetes-response-engine-cluster-role | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- delete | ||
- list | ||
- patch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- patch | ||
- apiGroups: | ||
- batch | ||
resources: | ||
- jobs | ||
verbs: | ||
- create |
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
2 changes: 1 addition & 1 deletion
2
integrations/kubernetes-response-engine/deployment/aws/outputs.tf
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
3 changes: 0 additions & 3 deletions
3
integrations/kubernetes-response-engine/deployment/aws/variables.tf
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
integrations/kubernetes-response-engine/deployment/cncf/Makefile
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
5 changes: 3 additions & 2 deletions
5
...response-engine/deployment/cncf/rbac.yaml → ...deployment/cncf/cluster-role-binding.yaml
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: sysdig-kubeless | ||
name: kubernetes-response-engine-cluster-role-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cluster-admin | ||
name: kubernetes-response-engine-cluster-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default | ||
namespace: default | ||
apiGroup: rbac.authorization.k8s.io |
25 changes: 25 additions & 0 deletions
25
integrations/kubernetes-response-engine/deployment/cncf/cluster-role.yaml
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,25 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: kubernetes-response-engine-cluster-role | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- delete | ||
- list | ||
- patch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- patch | ||
- apiGroups: | ||
- batch | ||
resources: | ||
- jobs | ||
verbs: | ||
- create |
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