Add Kubernetes annotations on Spinnaker internal component deployments

5/10/2018

We're using Kubernetes 1.9 as our cloud provider for Spinnaker v1.6.

In this mode, halyard deploys all of the Spinnaker components - orca, rosco, igor, etc. - as Kubernetes deployments in the spinnaker namespace.

We want to add custom Kubernetes annotations to these specific Spinnaker pods owing to the way our logging solution for containers is defined.

While we can edit these pods by hand, I was wondering if there was a way to configure Halyard to attach custom annotations on all the pods it creates.

-- Akshat Mahajan
kubernetes
spinnaker
spinnaker-halyard

1 Answer

8/1/2018

While its not documented here, it does look like there is a podAnnations option.

I was able to add the file ~/.hal/default/service-settings/front50.yml with the following config to get kube2iam annotations on the front50 pods.

kubernetes:
  podAnnotations:
    iam.amazonaws.com/role: myawsrole
-- Stephen Garlick
Source: StackOverflow