updated airflow roles
This commit is contained in:
parent
196ba0b54a
commit
c9c80ad9b9
|
@ -42,7 +42,7 @@ config:
|
|||
logging:
|
||||
remote_logging: "True"
|
||||
logging_level: "INFO"
|
||||
remote_base_log_folder: "s3://lot1-airflow/logs"
|
||||
remote_base_log_folder: "s3://dnet-airflow/logs"
|
||||
remote_log_conn_id: "s3_conn"
|
||||
encrypt_s3_logs: "False"
|
||||
|
||||
|
|
|
@ -13,47 +13,47 @@ resource "kubernetes_namespace" "spark_jobs_namespace" {
|
|||
# }
|
||||
# }
|
||||
#
|
||||
# resource "kubernetes_role" "airflow_spark_role" {
|
||||
# depends_on = [kubernetes_namespace.spark_jobs_namespace]
|
||||
# metadata {
|
||||
# name = "airflow-spark-role"
|
||||
# namespace = "${var.namespace_prefix}spark-jobs"
|
||||
# }
|
||||
#
|
||||
# rule {
|
||||
# api_groups = ["sparkoperator.k8s.io"]
|
||||
# resources = ["sparkapplications", "sparkapplications/status",
|
||||
# "scheduledsparkapplications", "scheduledsparkapplications/status"]
|
||||
# verbs = ["*"]
|
||||
# }
|
||||
#
|
||||
# rule {
|
||||
# api_groups = [""]
|
||||
# resources = ["pods/log"]
|
||||
# verbs = ["*"]
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# resource "kubernetes_role_binding_v1" "airflow_spark_role_binding" {
|
||||
# depends_on = [kubernetes_namespace.spark_jobs_namespace]
|
||||
# metadata {
|
||||
# name = "airflow-spark-role-binding"
|
||||
# namespace = "${var.namespace_prefix}spark-jobs"
|
||||
# }
|
||||
#
|
||||
# subject {
|
||||
# kind = "ServiceAccount"
|
||||
# name = "airflow-worker"
|
||||
# namespace = "${var.namespace_prefix}airflow"
|
||||
# }
|
||||
#
|
||||
# role_ref {
|
||||
# api_group = "rbac.authorization.k8s.io"
|
||||
# kind = "Role"
|
||||
# name = "airflow-spark-role"
|
||||
# }
|
||||
# }
|
||||
#
|
||||
resource "kubernetes_role" "airflow_spark_role" {
|
||||
depends_on = [kubernetes_namespace.spark_jobs_namespace]
|
||||
metadata {
|
||||
name = "airflow-spark-role"
|
||||
namespace = "${var.namespace_prefix}spark-jobs"
|
||||
}
|
||||
|
||||
rule {
|
||||
api_groups = ["sparkoperator.k8s.io"]
|
||||
resources = ["sparkapplications", "sparkapplications/status",
|
||||
"scheduledsparkapplications", "scheduledsparkapplications/status"]
|
||||
verbs = ["*"]
|
||||
}
|
||||
|
||||
rule {
|
||||
api_groups = [""]
|
||||
resources = ["pods/log"]
|
||||
verbs = ["*"]
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_role_binding_v1" "airflow_spark_role_binding" {
|
||||
depends_on = [kubernetes_namespace.spark_jobs_namespace]
|
||||
metadata {
|
||||
name = "airflow-spark-role-binding"
|
||||
namespace = "${var.namespace_prefix}spark-jobs"
|
||||
}
|
||||
|
||||
subject {
|
||||
kind = "ServiceAccount"
|
||||
name = "airflow-worker"
|
||||
namespace = "${var.namespace_prefix}airflow"
|
||||
}
|
||||
|
||||
role_ref {
|
||||
api_group = "rbac.authorization.k8s.io"
|
||||
kind = "Role"
|
||||
name = "airflow-spark-role"
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_role_binding_v1" "airflow_spark_role_binding2" {
|
||||
depends_on = [kubernetes_namespace.spark_jobs_namespace]
|
||||
metadata {
|
||||
|
|
Loading…
Reference in New Issue