Fixing meta
This commit is contained in:
50
virt/bridges/rbac.tf
Normal file
50
virt/bridges/rbac.tf
Normal file
@@ -0,0 +1,50 @@
|
||||
resource "kubectl_manifest" "sa" {
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: bridge-marker
|
||||
namespace: ${var.namespace}
|
||||
ownerReferences: ${jsonencode(var.install_owner)}
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
EOF
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "crb" {
|
||||
yaml_body = <<-EOF
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: bridge-marker-crb
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: bridge-marker-cr
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: bridge-marker
|
||||
namespace: ${var.namespace}
|
||||
EOF
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "cr" {
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: bridge-marker-cr
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
- nodes/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user