{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless-kubeless/issues/124","repository_url":"https://api.github.com/repos/serverless/serverless-kubeless","labels_url":"https://api.github.com/repos/serverless/serverless-kubeless/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless-kubeless/issues/124/comments","events_url":"https://api.github.com/repos/serverless/serverless-kubeless/issues/124/events","html_url":"https://github.com/serverless/serverless-kubeless/issues/124","id":327668299,"node_id":"MDU6SXNzdWUzMjc2NjgyOTk=","number":124,"title":"Unable to redeploy functions","user":{"login":"AlexRex","id":2911626,"node_id":"MDQ6VXNlcjI5MTE2MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/2911626?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexRex","html_url":"https://github.com/AlexRex","followers_url":"https://api.github.com/users/AlexRex/followers","following_url":"https://api.github.com/users/AlexRex/following{/other_user}","gists_url":"https://api.github.com/users/AlexRex/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexRex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexRex/subscriptions","organizations_url":"https://api.github.com/users/AlexRex/orgs","repos_url":"https://api.github.com/users/AlexRex/repos","events_url":"https://api.github.com/users/AlexRex/events{/privacy}","received_events_url":"https://api.github.com/users/AlexRex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-30T10:24:52Z","updated_at":"2018-06-04T13:40:01Z","closed_at":null,"author_association":"NONE","body":"When deploying a function, the first time I can deploy it without any issues, but if I try to redeploy it, either with the command `sls deploy` or only deploying the function with `sls deploy -f ping`, I got an error coming from kubernetes: \r\n\r\n```\r\n$ sls deploy -f ping\r\nServerless: Packaging function: ping...\r\nServerless: Excluding development dependencies...\r\nServerless: Redeploying ping...\r\n\r\n  Error --------------------------------------------------\r\n\r\n  Found errors while processing the given functions:\r\nError: Unable to update the function ping. Received:\r\n  Code: 422\r\n  Message: Function.kubeless.io \"ping\" is invalid: apiVersion: Invalid value: \"Function\": must be kubeless.io/v1beta1\r\n\r\n     For debugging logs, run again after setting the \"SLS_DEBUG=*\" environment variable.\r\n\r\n  Get Support --------------------------------------------\r\n     Docs:          docs.serverless.com\r\n     Bugs:          github.com/serverless/serverless/issues\r\n     Issues:        forum.serverless.com\r\n\r\n  Your Environment Information -----------------------------\r\n     OS:                     darwin\r\n     Node Version:           8.11.1\r\n     Serverless Version:     1.27.3\r\n```\r\n\r\nThe first time after deploying everything it works perfect, but afterwards I am getting this error. \r\n\r\nThis is my `serverless.yml` file: \r\n\r\n```\r\nservice: pingpong\r\nprovider:\r\n  name: kubeless\r\n  runtime: nodejs8\r\n  hostname: myhostname.io\r\n\r\nplugins:\r\n  - serverless-kubeless\r\n\r\nfunctions:\r\n  ping:\r\n    handler: handler.ping\r\n    events:\r\n      - http:\r\n          path: /ping\r\n```\r\n\r\nAnd this is the handler:\r\n\r\n```\r\nconst _ = require('lodash');\r\nconst fetch = require('node-fetch');\r\n\r\nconst ping = (event, context) => {\r\n  const { request, response } = event.extensions;\r\n  _.assign(event.data, { date: new Date().toTimeString() });\r\n\r\n  return fetch('http://pong:8080/pong', {\r\n    method: 'GET'\r\n  }).then(async (res) => {\r\n    const resp = await res.json();\r\n    return {\r\n      msg: 'called from ping, and response from',\r\n      resp\r\n    }\r\n  }); \r\n};\r\n\r\nmodule.exports = {\r\n  ping\r\n};\r\n```\r\n\r\nI noticed that if I change the handler file and try to redeploy, then I don't get any error, even if I only change one space. "},"comment":{"url":"https://api.github.com/repos/serverless/serverless-kubeless/issues/comments/394358194","html_url":"https://github.com/serverless/serverless-kubeless/issues/124#issuecomment-394358194","issue_url":"https://api.github.com/repos/serverless/serverless-kubeless/issues/124","id":394358194,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDM1ODE5NA==","user":{"login":"andresmgot","id":4025665,"node_id":"MDQ6VXNlcjQwMjU2NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/4025665?v=4","gravatar_id":"","url":"https://api.github.com/users/andresmgot","html_url":"https://github.com/andresmgot","followers_url":"https://api.github.com/users/andresmgot/followers","following_url":"https://api.github.com/users/andresmgot/following{/other_user}","gists_url":"https://api.github.com/users/andresmgot/gists{/gist_id}","starred_url":"https://api.github.com/users/andresmgot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresmgot/subscriptions","organizations_url":"https://api.github.com/users/andresmgot/orgs","repos_url":"https://api.github.com/users/andresmgot/repos","events_url":"https://api.github.com/users/andresmgot/events{/privacy}","received_events_url":"https://api.github.com/users/andresmgot/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T13:40:01Z","updated_at":"2018-06-04T13:40:01Z","author_association":"COLLABORATOR","body":"I finally was able to reproduce it forcing the version 1.8.0. Apparently it's a bug there but I am not able to find any reference to that. I recommend you to upgrade to 1.9 but if for some reason you need to run Kubernetes 1.8 you can still create it as:\r\n\r\n```\r\nminikube start --vm-driver=hyperkit --bootstrapper=kubeadm  --kubernetes-version=v1.8.1\r\n```\r\n\r\nNote that you need `hyperkit` for that. Sorry for the inconveniences."}}
{"actor":{"display_login":"andresmgot"}}