Skip to content

Commit 52cbd46

Browse files
Merge pull request #41 from sparkfabrik/fix/1742_cilium_patch
refs platform/1742: add ClusterRoleBinding for cilium
2 parents ff0c645 + cf08bee commit 52cbd46

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

main.tf

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,29 @@ module "gke" {
382382
}
383383
}
384384

385+
# Fix Cilium warning message about patching the nodes
386+
# https://github.com/cilium/cilium/issues/19816#issuecomment-1144551910
387+
resource "kubernetes_cluster_role_binding" "cilium_node_patcher" {
388+
metadata {
389+
name = "cilium-node-patcher"
390+
}
391+
role_ref {
392+
api_group = "rbac.authorization.k8s.io"
393+
kind = "ClusterRole"
394+
name = "system:node"
395+
}
396+
subject {
397+
api_group = ""
398+
kind = "ServiceAccount"
399+
name = "cilium"
400+
namespace = "kube-system"
401+
}
402+
403+
depends_on = [
404+
module.gke
405+
]
406+
}
407+
385408
resource "kubernetes_namespace" "gitlab_namespace" {
386409
metadata {
387410
name = var.gitlab_namespace

0 commit comments

Comments
 (0)