From bf65f93fd71414b82a942d1b260fc20ae79b2861 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Mon, 2 Nov 2020 10:21:35 -0600 Subject: [PATCH 1/2] Add Service Account to k8s deployment Fixes #66 --- k8s-deployment.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/k8s-deployment.yaml b/k8s-deployment.yaml index 71e36c61..910c0e07 100644 --- a/k8s-deployment.yaml +++ b/k8s-deployment.yaml @@ -13,6 +13,7 @@ spec: metadata: labels: app: gubernator + serviceAccountName: gubernator spec: containers: - image: thrawn01/gubernator:latest @@ -64,3 +65,33 @@ spec: #port: 80 selector: app: gubernator +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: gubernator +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: get-endpoints +rules: +- apiGroups: + - "" + resources: + - endpoints + verbs: + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: get-endpoints +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: get-endpoints +subjects: +- kind: ServiceAccount + name: gubernator From 05047e9cf05fd3f05fb6a8802314b4015ba85dd0 Mon Sep 17 00:00:00 2001 From: Zach Aller Date: Mon, 2 Nov 2020 10:23:46 -0600 Subject: [PATCH 2/2] Update k8s-deployment.yaml --- k8s-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s-deployment.yaml b/k8s-deployment.yaml index 910c0e07..8a45cf0b 100644 --- a/k8s-deployment.yaml +++ b/k8s-deployment.yaml @@ -13,8 +13,8 @@ spec: metadata: labels: app: gubernator - serviceAccountName: gubernator spec: + serviceAccountName: gubernator containers: - image: thrawn01/gubernator:latest imagePullPolicy: IfNotPresent