From 24a4d3d3c8b0f548e2326594d0056855cd23d4b8 Mon Sep 17 00:00:00 2001 From: rpoluri <38321430+rpoluri@users.noreply.github.com> Date: Tue, 21 Sep 2021 10:45:19 -0500 Subject: [PATCH] Feature/fix data island (#87) * add k8s service account * update changelog * update changelog Co-authored-by: Raj Poluri --- CHANGELOG.md | 4 ++++ k8s.tf | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6897b8..23eec87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [3.3.5] - 2021-09-21 +### Change +- Fixes to deploy on k8s clusters requiring serviceaccount for all deployments. + ## [3.3.4] - 2021-08-13 ### Change - Enable health check in k8s deployment. diff --git a/k8s.tf b/k8s.tf index 2f4cdbd..5d2fb64 100644 --- a/k8s.tf +++ b/k8s.tf @@ -10,6 +10,15 @@ locals { actuator_port = 18000 wd_port = 48869 } + +resource "kubernetes_service_account" "waggle_dance" { + metadata { + name = local.instance_alias + namespace = var.k8s_namespace + } + automount_service_account_token = true +} + resource "kubernetes_deployment" "waggle_dance" { count = var.wd_instance_type == "k8s" ? 1 : 0 metadata { @@ -41,6 +50,7 @@ resource "kubernetes_deployment" "waggle_dance" { } spec { + service_account_name = kubernetes_service_account.waggle_dance.metadata.0.name container { image = "${var.docker_image}:${var.docker_version}" name = local.instance_alias