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

feat: Add dig function #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LucasRoesler
Copy link
Member

What

  • Add a dig function that can be used to verify DNS resultion inside a
    cluster. The function is implemented as a small bash script that
    invokes dig and then returns the result as JSON or text, depending
    on an ENV configuration. This function can also be used to demonstrate
    how to lightly wrap the CLI tool and provide some logging to stderr

To test

$ faas-cli build --filter dig
$ docker run --name digtest --rm -p 8080:8080 ghcr.io/openfaas/dig:latest
$ curl localhost:8080 -d "google.com"
{"ip_address": "172.217.23.110"}
$ docker kill digtest

Signed-off-by: Lucas Roesler roesler.lucas@gmail.com

**What**
- Add a `dig` function that can be used to verify DNS resultion inside a
  cluster. The function is implemented as a small bash script that
  invokes `dig` and then returns the result as JSON or text, depending
  on an ENV configuration. This function can also be used to demonstrate
  how to lightly wrap the CLI tool and provide some logging to stderr

To test

```sh
$ faas-cli build --filter dig
$ docker run --name digtest --rm -p 8080:8080 ghcr.io/openfaas/dig:latest
$ curl localhost:8080 -d "google.com"
{"ip_address": "172.217.23.110"}
$ docker kill digtest
```

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
**What**
- Update the docker login step from CI to use the same login action we
  use in all of the other OpenFaaS CI workflows. This brings consistency
  and avoids issues with changes in the Docker CLI that prevented login
  via stdin

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
@LucasRoesler
Copy link
Member Author

@alexellis i think i need a little to understand why the Docker login is failing?

docker login ghcr.io --username
${{ steps.get_repo_owner.outputs.repo_owner }}
--password-stdin
- name: Login to Docker Registry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can revert this part now, since master appears to be working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants