resource "kubernetes_namespace_v1" "operator_ns" {
  metadata {
    labels = local.common-labels
    name = var.operators_namespace
  }
}
resource "kubectl_manifest" "operator_group" {
  depends_on = [kubernetes_namespace_v1.operator_ns]
  yaml_body  = <<-EOF
    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: global-operators
      namespace: ${var.operators_namespace}
      labels: ${jsonencode(local.common-labels)}
  EOF
}
