From 5888e837ce2fe01d18edefdfe0b07f9bd9256cdd Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Tue, 14 Apr 2020 10:34:45 +0200 Subject: [PATCH] Add Gateway CRD This will be used to store and report the cluster-local engine status. Signed-off-by: Stephen Kitt --- submariner/templates/crd.yaml | 14 ++++++++++++++ submariner/templates/rbac.yaml | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/submariner/templates/crd.yaml b/submariner/templates/crd.yaml index 3fc0d1a..8b4139c 100644 --- a/submariner/templates/crd.yaml +++ b/submariner/templates/crd.yaml @@ -26,4 +26,18 @@ spec: kind: Endpoint plural: endpoints scope: Namespaced +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: gateways.submariner.io + annotations: + "helm.sh/hook": crd-install +spec: + group: submariner.io + version: v1 + names: + kind: Gateway + plural: gateways + scope: Namespaced {{- end -}} diff --git a/submariner/templates/rbac.yaml b/submariner/templates/rbac.yaml index d901979..202e07a 100644 --- a/submariner/templates/rbac.yaml +++ b/submariner/templates/rbac.yaml @@ -13,7 +13,7 @@ rules: resources: ["configmaps"] verbs: ["create", "get", "list", "watch", "patch", "update"] - apiGroups: ["submariner.io"] - resources: ["clusters", "endpoints"] + resources: ["clusters", "endpoints", "gateways"] verbs: ["create", "get", "list", "watch", "patch", "update", "delete"] - apiGroups: [""] resources: ["events"] @@ -30,7 +30,7 @@ metadata: app: {{ template "submariner.name" . }} rules: - apiGroups: ["submariner.io"] - resources: ["clusters", "endpoints"] + resources: ["clusters", "endpoints", "gateways"] verbs: ["create", "get", "list", "watch", "patch", "update"] - apiGroups: [""] resources: ["pods"] @@ -94,7 +94,7 @@ rules: resources: ["services", "namespaces", "pods", "nodes"] verbs: ["get", "list", "watch", "update"] - apiGroups: ["submariner.io"] - resources: ["endpoints", "clusters"] + resources: ["clusters", "endpoints", "gateways"] verbs: ["get", "list", "watch"] --- apiVersion: rbac.authorization.k8s.io/v1