Code Monkey home page Code Monkey logo

Comments (13)

alexellis avatar alexellis commented on May 17, 2024

/set title: Error pulling from GitLab.com private registry

from faasd.

alexellis avatar alexellis commented on May 17, 2024

Hi @rienafairefr I'm not a GitLab.com user, but I wonder if they have any known issues with containerd? Until recently even GitHub's registry didn't work with containerd and faasd is built with containerd.

go version go1.10.4 linux/amd64

I am noticing that you have Go installed, and a really old version. Why is that? You don't need it to install faasd, but if you built it you must use the minimum version we recommend.

terraform-provider-openfaas

I've not used this provider, perhaps you could use faas-cli deploy/up to confirm that it's working as expected?

I see a large size here, is your disk running out of space? size 34971859

"envVars":{"MAPBOX_API_KEY":"

You may prefer using a secret to env-vars for anything confidential. Do you need to scrub this key from the GitHub issue?

Private registry support is tested and working with the Docker Hub and GitHub's container registry. Maybe @AkihiroSuda has some ideas? @mrsimonemms also has a GitLab account and may be able to help us test / verify with one of his images.

Alex

from faasd.

alexellis avatar alexellis commented on May 17, 2024

One thing that stands out to me is how many / slashes you have in your image name. It could be an edge case where some part of the code is expecting a standard image URL i.e. server.com/repo/image:version (x3) instead of registry.gitlab.com/**/**/**/address-modified:openfaas (x5)

from faasd.

rienafairefr avatar rienafairefr commented on May 17, 2024

One thing that stands out to me is how many / slashes you have in your image name. It could be an edge case where some part of the code is expecting a standard image URL i.e. server.com/repo/image:version (x3) instead of registry.gitlab.com/**/**/**/address-modified:openfaas (x5)

That might be the edge case I'm running into, and why I explicitely didn't redact that detail. In our case, it's a namespace thing for all our images:

registry.gitlab.com/company/project/functions/functiona

registry.gitlab.com/company/project/functions/functionb

registry.gitlab.com/company/project/serviceA
etc ..., because in gitlab you can create groups inside groups, etc, and the docker registry attached to a project gets the same namespace (project is at https://gitlab.com/company/project/functions, then the registry is gitlab.com/company/project/functions)

from faasd.

mrsimonemms avatar mrsimonemms commented on May 17, 2024

@alexellis the number slashes look normal - GitLab allows you to have up to three levels on the container registry (which is very useful).

I'll have a dig around later today and let you know what I find

from faasd.

alexellis avatar alexellis commented on May 17, 2024

@rienafairefr can you try a top-level image to see if it still breaks that way?

from faasd.

rienafairefr avatar rienafairefr commented on May 17, 2024

Hi @rienafairefr I'm not a GitLab.com user, but I wonder if they have any known issues with containerd? Until recently even GitHub's registry didn't work with containerd and faasd is built with containerd.

go version go1.10.4 linux/amd64

I am noticing that you have Go installed, and a really old version. Why is that? You don't need it to install faasd, but if you built it you must use the minimum version we recommend.

the go version is the one on the droplet, i didn't install it myself. might be installed as part of the faasd cloud-config, not sure. Might be better to update all that, that's for sure

terraform-provider-openfaas

I've not used this provider, perhaps you could use faas-cli deploy/up to confirm that it's working as expected?

Weirdly, faas deploy seems to work (details below)

I see a large size here, is your disk running out of space? size 34971859

"envVars":{"MAPBOX_API_KEY":"

You may prefer using a secret to env-vars for anything confidential. Do you need to scrub this key from the GitHub issue?

You're right, secret will be better, I'm still trying out ;-) I redacted the api_key, good catch !

Private registry support is tested and working with the Docker Hub and GitHub's container registry. Maybe @AkihiroSuda has some ideas? @mrsimonemms also has a GitLab account and may be able to help us test / verify with one of his images.

Alex

Might not be about the image registry after all:

when the deploy fails (using the api or terraform)
Sep 11 10:49:36 faasd faasd[12711]: 2020/09/11 10:49:36 [Update] request: {"service":"address-modified","image":"registry.gitlab.com/**/**/**/address-modified:openfaas","network":"","envProcess":"sha512sum","envVars":{"MAPBOX_API_KEY":"[redacted]"},"constraints":null,"secrets":null,"labels":null,"annotations":{"CreatedDate":"Mon Sep 3 07:15:55 BST 2018"},"limits":null,"requests":null,"readOnlyRootFilesystem":false}

when the deploy returns 200 ok (using faas deploy):
Sep 11 10:51:28 faasd faasd[12711]: 2020/09/11 10:51:28 [Deploy] request: {"service":"address-modified","image":"registry.gitlab.com/**/**/**/address-modified:openfaas","network":"","envProcess":"node index.js","envVars":{},"constraints":null,"secrets":[],"labels":{},"annotations":{},"limits":null,"requests":null,"readOnlyRootFilesystem":false,"namespace":"openfaas-fn"}
the images are the same, but the rest of the config has differences, not sure what's happenning

from faasd.

alexellis avatar alexellis commented on May 17, 2024

So if faas-cli deploy works, it may make sense to raise an issue on the functions terraform provider, which is a third-party component.

I can help with the API call though. Can you share what you're writing into your curl statement? faas-cli deploy just creates a HTTP request, so I'm curious what's going show up here.

Let's format that JSON?

Your first example (terraform)

{
  "service": "address-modified",
  "image": "registry.gitlab.com/**/**/**/address-modified:openfaas",
  "network": "",
  "envProcess": "sha512sum",
  "envVars": {
    "MAPBOX_API_KEY": "[redacted]"
  },
  "constraints": null,
  "secrets": null,
  "labels": null,
  "annotations": {
    "CreatedDate": "Mon Sep 3 07:15:55 BST 2018"
  },
  "limits": null,
  "requests": null,
  "readOnlyRootFilesystem": false
}

Second example: (faas-cli):

{
  "service": "address-modified",
  "image": "registry.gitlab.com/**/**/**/address-modified:openfaas",
  "network": "",
  "envProcess": "node index.js",
  "envVars": {},
  "constraints": null,
  "secrets": [],
  "labels": {},
  "annotations": {},
  "limits": null,
  "requests": null,
  "readOnlyRootFilesystem": false,
  "namespace": "openfaas-fn"
}

from faasd.

alexellis avatar alexellis commented on May 17, 2024

I suspect that the code handling something like labels may be expecting a value, where as the terraform provider is giving null instead.

from faasd.

alexellis avatar alexellis commented on May 17, 2024

/set title: Panic when "null" labels are given in deployment

from faasd.

alexellis avatar alexellis commented on May 17, 2024

I've found the cause of the issue - the last output and the JSON formatting helped with that.

PR #102 is up and when CI passes I'll release it.

For now, include a label in your terraform to get around the issue?

Alex

from faasd.

rienafairefr avatar rienafairefr commented on May 17, 2024

This closes the issue, adding a label works for deployment ! I chased the most obvious 'difference' in the private registry but that wasn't it. Thanks @alexellis

from faasd.

alexellis avatar alexellis commented on May 17, 2024

No problem. Here is your release https://github.com/openfaas/faasd/releases/tag/0.9.4

You may enjoy weekly updates on OpenFaaS including faasd and the other community projects via GitHub Sponsors - https://www.openfaas.com/support - click "Community Insiders Program"

from faasd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.