Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how do I set an annotation? #803

Closed
ArieLevs opened this issue Aug 5, 2018 · 8 comments
Closed

Question: how do I set an annotation? #803

ArieLevs opened this issue Aug 5, 2018 · 8 comments
Labels

Comments

@ArieLevs
Copy link

ArieLevs commented Aug 5, 2018

Hi,

As part of securing k8s, we set IAM role annotation per pod.
Since function pods are created from the template.yml file there is no option to add IAM role annotation per function.

Expected Behaviour

Have the ability to add annotations to template.yml deployment file

Current Behaviour

template.yml deployment files do not allow annotations pass to function pods

Context

When working with AWS EKS, using IAM roles is needed

Your Environment

  • Docker version: 17.06.2-ce
  • Kubernetes
  • Operating System and version: Amazon Linux 2 (2017.12) (EKS Cluster)
@alexellis
Copy link
Member

Hi @ArieLevs,

You can set annotations via the stack.yml file, this was released recently. I'd suggest updating to the latest version of faas-netes, the gateway and the CLI. Let us know how you get on.

Cc @ewilde who implemented the feature.

Regards,

Alex

@alexellis
Copy link
Member

Derek add label: support

@derek derek bot added the support label Aug 5, 2018
@alexellis
Copy link
Member

Derek set title: Question: how do I set an annotation?

@derek derek bot changed the title Providing AWS IAM roles per function Question: how do I set an annotation? Aug 5, 2018
@ArieLevs
Copy link
Author

ArieLevs commented Aug 5, 2018

Hi @alexellis
Thanks Found it #682,
Will try it out, btw, i could not find this on the official site or github docs.

provider:
  name: faas
  gateway: http://127.0.0.1:8080

functions:
  slack-responder:
    lang: go
    handler: ./slack-responder
    image: alexellis2/slack-responder:0.1.0
    labels:
      source: git
   annotations:
      git: https://github.com/alexellis/super-pancake-fn.git
      topics: "arn:aws:sns:us-west-2:111122223333:MyTopic,arn:aws:sns:us-west-2:111122223333:My-Second-Topic"

Thanks again!

@alexellis
Copy link
Member

Feel free to join slack to ask questions like this in #kubernetes. https://docs.openfaas.com/community

@alexellis
Copy link
Member

Derek close: resolved

@rgee0
Copy link
Contributor

rgee0 commented Mar 25, 2019

For anyone finding this and using the example above, please not the indentation isn't quite correct, it should be:

provider:
  name: faas
  gateway: http://127.0.0.1:8080

functions:
  slack-responder:
    lang: go
    handler: ./slack-responder
    image: alexellis2/slack-responder:0.1.0
    labels:
      source: git
    annotations:
      git: https://github.com/alexellis/super-pancake-fn.git
      topics: "arn:aws:sns:us-west-2:111122223333:MyTopic,arn:aws:sns:us-west-2:111122223333:My-Second-Topic"

@alexellis
Copy link
Member

@ArieLevs I'm not sure where you were looking or if this was added after your issue, but the docs are available at this URL: https://docs.openfaas.com/reference/yaml/#function-annotations

Thanks @rgee0 for the example.

Alex

@openfaas openfaas locked and limited conversation to collaborators Mar 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants